JDFTx  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LinkDescription< Enum > Struct Template Reference

Generate a description functor for addDescriptions() from an EnumStringMap. More...

#include <command.h>

Public Member Functions

 LinkDescription (const EnumStringMap< Enum > &nameMap, const EnumStringMap< Enum > &descMap)
 
string operator() (const string &name) const
 Look name up in nameMap, and return the corresponding description in descMap. More...
 

Public Attributes

const EnumStringMap< Enum > & nameMap
 
const EnumStringMap< Enum > & descMap
 

Detailed Description

template<typename Enum>
struct LinkDescription< Enum >

Generate a description functor for addDescriptions() from an EnumStringMap.

Template Parameters
EnumThe template parameter of EnumStringMap

Constructor & Destructor Documentation

template<typename Enum>
LinkDescription< Enum >::LinkDescription ( const EnumStringMap< Enum > &  nameMap,
const EnumStringMap< Enum > &  descMap 
)
inline
Parameters
nameMapLink between enum members to corresponding name strings
descMapLink between enum members to corresponding description strings

Member Function Documentation

template<typename Enum>
string LinkDescription< Enum >::operator() ( const string name) const
inline

Look name up in nameMap, and return the corresponding description in descMap.

Parameters
nameOne of the string entries in nameMap
Returns
The corresponding string in descMap

The documentation for this struct was generated from the following file: