Encapsulates a field in a model object. Fields are represented as a triplet of the field in the class, and its accessor and mutator methods.
More...
#include <ODMObject.h>
|
| typedef DataType &(Model::* | Accessor )() |
| | Member function pointer to the accessor method.
|
| |
| typedef void(Model::* | Mutator )(const DataType &) |
| | Member function pointer to the mutator method.
|
| |
|
| | MetaFieldImpl (const std::string &field, Accessor get, Mutator set) |
| | Create a new field instance for the specified instance and methods.
|
| |
| Value & | getValue (Model *model) |
| | Return the value for the field represented by this instance.
|
| |
| void | setValue (Model *model, const Value &value) |
| | Set the value for the field represented by this instance.
|
| |
| | MetaField (const std::string &field) |
| | Create a new instance representing the field with the specified name.
|
| |
| virtual | ~MetaField () |
| | Virtual dtor for sub-classing.
|
| |
| const std::string & | getName () const |
| | Return the name of the field encapsulated in this meta field instance.
|
| |
template<typename Model>
template<typename DataType>
class uma::bson::ODMObject< Model >::MetaFieldImpl< DataType >
Encapsulates a field in a model object. Fields are represented as a triplet of the field in the class, and its accessor and mutator methods.
- Template Parameters
-
| Model | The type of the class whose field is to be represented. This is implied by the template parameter for the wrapper ODMObject class. |
| DataType | The data type for the field. Must be a sub-class of uma::bson::Value. |
template<typename Model >
template<typename DataType >
Member function pointer to the accessor method.
template<typename Model >
template<typename DataType >
Member function pointer to the mutator method.
template<typename Model >
template<typename DataType >
Create a new field instance for the specified instance and methods.
- Parameters
-
| field | The name of the field. |
| get | The accessor method for the field. |
| set | The mutator method for the field. |
template<typename Model >
template<typename DataType >
template<typename Model >
template<typename DataType >
Set the value for the field represented by this instance.
- Parameters
-
| model | The model object in which the value is to be stored. |
| value | The value for the field to store. |
Implements uma::bson::ODMObject< Model >::MetaField.
The documentation for this class was generated from the following file:
- /Users/rakesh/projects/opensource/mongoviewer/bson/src/api/uma/bson/ODMObject.h