Helper class used to access contents of array. More...
#include <InstantIO/FieldArrayAccessor.h>
Public Types | |
typedef void(ClassType::* | SetMethod )(const ContainerType &) |
Defines the method that sets the field value. | |
typedef ContainerType(ClassType::* | GetMethod )() const |
Defines the method that returns the field value. | |
Public Member Functions | |
FieldArrayAccessor (SetMethod setMethod, GetMethod getMethod) | |
Creates a new FieldArrayAccessor object. | |
FieldArrayAccessor (const FieldArrayAccessor< ClassType, ValueType, ContainerType > &other) | |
Creates a new FieldArrayAccessor object that is an exact copy of another FieldArrayAccessor object. | |
virtual | ~FieldArrayAccessor () |
Destroys the FieldArrayAccessor object. | |
virtual void | set (Node &node, const std::string &value) const |
Sets the value of the field. | |
virtual std::string | get (const Node &node) const |
Returns the value of the field. | |
virtual bool | sameValue (const Node &node, const std::string &value) const |
Checks if a field is set to given value. | |
virtual BasicFieldAccessor * | clone () const |
Creates a copy a FieldArrayAccessor object. |
Helper class used to access contents of array.
InstantIO::FieldArrayAccessor< ClassType, ValueType, ContainerType >::FieldArrayAccessor | ( | SetMethod | setMethod, | |
GetMethod | getMethod | |||
) | [inline] |
Creates a new FieldArrayAccessor object.
setMethod | Pointer to the method that sets the field value. | |
getMethod | Pointer to the method that returns the field value. |
InstantIO::FieldArrayAccessor< ClassType, ValueType, ContainerType >::FieldArrayAccessor | ( | const FieldArrayAccessor< ClassType, ValueType, ContainerType > & | other | ) | [inline] |
Creates a new FieldArrayAccessor object that is an exact copy of another FieldArrayAccessor object.
other | The other FieldArrayAccessor object. |
virtual void InstantIO::FieldArrayAccessor< ClassType, ValueType, ContainerType >::set | ( | Node & | node, | |
const std::string & | value | |||
) | const [inline, virtual] |
Sets the value of the field.
node | The Node that contains the field. | |
value | The new value of the field. |
Implements InstantIO::BasicFieldAccessor.
virtual std::string InstantIO::FieldArrayAccessor< ClassType, ValueType, ContainerType >::get | ( | const Node & | node | ) | const [inline, virtual] |
Returns the value of the field.
node | The Node that contains the field. |
Implements InstantIO::BasicFieldAccessor.
virtual bool InstantIO::FieldArrayAccessor< ClassType, ValueType, ContainerType >::sameValue | ( | const Node & | node, | |
const std::string & | value | |||
) | const [inline, virtual] |
Checks if a field is set to given value.
node | The Node that contains the field. | |
value | The value we compare the field with. |
Implements InstantIO::BasicFieldAccessor.
virtual BasicFieldAccessor* InstantIO::FieldArrayAccessor< ClassType, ValueType, ContainerType >::clone | ( | ) | const [inline, virtual] |
Creates a copy a FieldArrayAccessor object.
Implements InstantIO::BasicFieldAccessor.