Identity map (aka, NoMap). More...
#include "keyvalue/key/map/NoMap.h"
Public Types | |
| typedef OutputType | OutputType_ |
Public Member Functions | |
| OutputType | map (const value::Variant &variant) const |
| Performs the mapping. | |
Private Types | |
|
typedef boost::is_same < OutputType, bool >::type | IsBool_ |
|
typedef boost::is_same < OutputType, double >::type | IsDouble_ |
|
typedef boost::is_same < OutputType, ptime >::type | IsPtime_ |
|
typedef boost::is_same < OutputType, string >::type | IsString_ |
|
typedef boost::is_same < OutputType, unsigned int > ::type | IsUInt_ |
Private Member Functions | |
| virtual string | getName () const =0 |
| Gets Key's name. | |
| BOOST_STATIC_ASSERT (IsBool_::value||IsDouble_::value||IsString_::value||IsPtime_::value||IsUInt_::value) | |
Identity map (aka, NoMap).
The input value is mapped to itself. For example, the value associated to key "Price" is supposed to be a double which must be passed on, without any kind of mapping or, in other terms, mapped by the identity function.
Remark: Only instance for Output equal to bool, double, ptime, string or unsigned int are provided.
| OutputType | : (template parameter) Output type. |
| OutputType_ | : Same as OutputType. |
| OutputType map | ( | const value::Variant & | variant | ) | const |
Performs the mapping.
This method retrieves the content of value::Variant and, by considering enabled lexical convertions, converts it to Output. (See LexicalToolKit documentation.)
| variant | : A value::Variant containing the input to be mapped. |
| virtual string getName | ( | ) | const [private, pure virtual] |
Gets Key's name.
Implemented in Traits< ElementType, StdVector, NoMap >, Traits< double, StdSingle, NoMap >, and Traits< ElementType, StdSingle, NoMap >.
1.6.1