#include <shibsp/attribute/BinaryAttribute.h>
Public Member Functions | |
BinaryAttribute (const std::vector< std::string > &ids) | |
Constructor. | |
BinaryAttribute (DDF &in) | |
Constructs based on a remoted BinaryAttribute. | |
std::vector< std::string > & | getValues () |
Returns the set of raw binary values. | |
const std::vector< std::string > & | getValues () const |
Returns the set of raw binary values. | |
size_t | valueCount () const |
Returns the number of values. | |
void | clearSerializedValues () |
Informs the Attribute that values have changed and any serializations must be cleared. | |
const char * | getString (size_t index) const |
Gets the string equivalent of the value at the specified position (starting from zero). | |
void | removeValue (size_t index) |
Removes the value at the specified position (starting from zero). | |
const std::vector< std::string > & | getSerializedValues () const |
Returns serialized Attribute values encoded as UTF-8 strings. | |
DDF | marshall () const |
Marshalls an Attribute for remoting. |
Binary attributes use base64 encoding to serialize their values. The original binary values are accessible in the underlying value collection.
shibsp::BinaryAttribute::BinaryAttribute | ( | const std::vector< std::string > & | ids | ) |
Constructor.
ids | array with primary identifier in first position, followed by any aliases |
shibsp::BinaryAttribute::BinaryAttribute | ( | DDF & | in | ) |
Constructs based on a remoted BinaryAttribute.
in | input object containing marshalled BinaryAttribute |
std::vector<std::string>& shibsp::BinaryAttribute::getValues | ( | ) |
Returns the set of raw binary values.
const std::vector<std::string>& shibsp::BinaryAttribute::getValues | ( | ) | const |
Returns the set of raw binary values.
size_t shibsp::BinaryAttribute::valueCount | ( | ) | const [virtual] |
const char* shibsp::BinaryAttribute::getString | ( | size_t | index | ) | const [virtual] |
Gets the string equivalent of the value at the specified position (starting from zero).
index | position of value |
Reimplemented from shibsp::Attribute.
void shibsp::BinaryAttribute::removeValue | ( | size_t | index | ) | [virtual] |
Removes the value at the specified position (starting from zero).
index | position of value to remove |
Reimplemented from shibsp::Attribute.
const std::vector<std::string>& shibsp::BinaryAttribute::getSerializedValues | ( | ) | const [virtual] |
Returns serialized Attribute values encoded as UTF-8 strings.
Reimplemented from shibsp::Attribute.
DDF shibsp::BinaryAttribute::marshall | ( | ) | const [virtual] |
Marshalls an Attribute for remoting.
This allows Attribute objects to be communicated across process boundaries without excess XML parsing. The DDF returned must be a struct containing a single list member named with the Attribute's "id". The name of the struct should contain the registered name of the Attribute implementation.
Reimplemented from shibsp::Attribute.