Public Types | Public Member Functions | Private Member Functions

NoMap< OutputType > Class Template Reference

Identity map (aka, NoMap). More...

#include <keyvalue/key/map/NoMap.h>

List of all members.

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)

Detailed Description

template<typename OutputType>
class keyvalue::key::NoMap< OutputType >

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.

Parameters:
OutputType : (template parameter) Output type.
Return values:
OutputType_ : Same as OutputType.

Member Function Documentation

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.)

Parameters:
variant : A value::Variant containing the input to be mapped.
Returns:
The mapping result.
virtual string getName (  )  const [private, pure virtual]

Gets Key's name.

Returns:
The Key's name.