ObjectMap< OutputType > Class Template Reference

Maps names to objects. More...

#include "keyvalue/key/map/ObjectMap.h"

List of all members.

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.

Detailed Description

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

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.

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

Member Function Documentation

shared_ptr< OutputType > map ( const value::Variant variant  )  const [inline]

Performs the mapping.

Parameters:
variant : A value::Variant containing the object's name.
Returns:
The mapping result.
virtual string getName (  )  const [private, pure virtual]

Gets Key's name.

Returns:
The Key's name.

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