JDFTx  1.7.0
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

◆ LinkDescription()

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

◆ operator()()

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: