mbsim  4.0.0
MBSim Kernel
MBSim::EnumFactory< EnumType > Class Template Reference

#include <objectfactory.h>

Public Member Functions

 EnumFactory (const EnumType &enumVar, MBXMLUtils::FQN fqn_)
 
 ~EnumFactory ()
 

Static Public Member Functions

static const EnumType & get (const MBXMLUtils::FQN &fqn, const xercesc::DOMElement *e=nullptr)
 

Static Private Member Functions

static std::map< MBXMLUtils::FQN, std::reference_wrapper< const EnumType > > & regmap ()
 

Private Attributes

MBXMLUtils::FQN fqn
 

Friends

template<class EV >
void registerEnum_internal (const MBXMLUtils::FQN &name, const EV &value)
 
template<class EV >
void deregisterEnum_internal (const MBXMLUtils::FQN &name)
 

Detailed Description

template<class EnumType>
class MBSim::EnumFactory< EnumType >

Helper function for automatic enum registration for ObjectFactory. You should not use this class directly but use the macro MBSIM_OBJECTFACTORY_REGISTERENUM.

Constructor & Destructor Documentation

◆ EnumFactory()

template<class EnumType >
MBSim::EnumFactory< EnumType >::EnumFactory ( const EnumType &  enumVar,
MBXMLUtils::FQN  fqn_ 
)
inline

ctor registring the new enum

◆ ~EnumFactory()

template<class EnumType >
MBSim::EnumFactory< EnumType >::~EnumFactory ( )
inline

dtor deregistring the enum

Member Function Documentation

◆ get()

template<class EnumType >
static const EnumType & MBSim::EnumFactory< EnumType >::get ( const MBXMLUtils::FQN fqn,
const xercesc::DOMElement *  e = nullptr 
)
inlinestatic

get an enum value given by the string enumStr


The documentation for this class was generated from the following files: