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 Member Functions | |
virtual string | getName () const =0 |
Gets Key's name. | |
BOOST_STATIC_ASSERT (util::IsBasic< OutputType >::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 instantiations 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 conversions, converts it to Output. (See LexicalToolKit documentation.)
variant | : A value::Variant containing the input to be mapped. |