Maps names to objects. More...
#include "keyvalue/key/map/ObjectMap.h"
Public Types | |
typedef shared_ptr< OutputType > | OutputType_ |
Public Member Functions | |
shared_ptr< OutputType > | map (const value::Variant &variant) const |
Performs the mapping. | |
Private Member Functions | |
virtual string | getName () const =0 |
Gets Key's name. |
Maps names to objects.
A name (string
) is mapped to (a pointer to) an object with that name. The mapping is performed by the Repository.
When the object's name is not found in the Repository, an attempt to build one from the given input (which, in fact, is a value::Variant) is done.
This map policy is automatically chosen by Traits when OutputType is not considered a basic type (see Default documentation). Hence, most users can ignore this map.
OutputType | : (template parameter) Output type. |
OutputType_ | : Same as shared_ptr<OutputType> . |
shared_ptr< OutputType > map | ( | const value::Variant & | variant | ) | const [inline] |
Performs the mapping.
variant | : A value::Variant containing the object's name. |