ponder
3.2
C++ reflection library
|
Template providing a mapping between C++ arrays and Ponder ArrayProperty. More...
#include <arraymapper.hpp>
Template providing a mapping between C++ arrays and Ponder ArrayProperty.
ArrayMapper<T> must define the following members in order to make T fully compliant with the system:
ElementType
: type of the elements stored in the arraydynamic()
: tells if the array is dynamic (i.e. supports insert and remove)size()
: retrieve the size of the arrayget()
: get the value of an elementset()
: set the value of an elementinsert()
: insert a new elementremove()
: remove an elementValueMapper is specialized for every supported type, and can be specialized for any of your own array types in order to extend the system.
By default, ValueMapper supports the following types of array:
T[]
std::vector
& std::vector<bool>
std::list
Here is an example of mapping for the std::vector
class: