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

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 instance 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 convertions, 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]

Generated on Sat Mar 20 15:08:30 2010 for KeyValue by  doxygen 1.6.1