Public Types | Public Member Functions | Static Public Member Functions | Static Private Attributes | List of all members
MarmotLibrary::MarmotElementFactory Class Reference

#include <Marmot.h>

Public Types

using elementFactoryFunction = MarmotElement *(*)(int elementNumber)
 

Public Member Functions

 MarmotElementFactory ()=delete
 

Static Public Member Functions

static int getElementCodeFromName (const std::string &elementName)
 
static MarmotElementcreateElement (int elementCode, int elementNumber)
 
static bool registerElement (const std::string &elementName, int elementCode, elementFactoryFunction factoryFunction)
 

Static Private Attributes

static std::unordered_map< std::string, int > elementNameToCodeAssociation
 
static std::unordered_map< int, elementFactoryFunctionelementFactoryFunctionByCode
 

Member Typedef Documentation

◆ elementFactoryFunction

Constructor & Destructor Documentation

◆ MarmotElementFactory()

MarmotLibrary::MarmotElementFactory::MarmotElementFactory ( )
delete

Member Function Documentation

◆ getElementCodeFromName()

static int MarmotLibrary::MarmotElementFactory::getElementCodeFromName ( const std::string &  elementName)
static

◆ createElement()

static MarmotElement* MarmotLibrary::MarmotElementFactory::createElement ( int  elementCode,
int  elementNumber 
)
static

◆ registerElement()

static bool MarmotLibrary::MarmotElementFactory::registerElement ( const std::string &  elementName,
int  elementCode,
elementFactoryFunction  factoryFunction 
)
static

Member Data Documentation

◆ elementNameToCodeAssociation

std::unordered_map< std::string, int > MarmotLibrary::MarmotElementFactory::elementNameToCodeAssociation
staticprivate

◆ elementFactoryFunctionByCode

std::unordered_map< int, elementFactoryFunction > MarmotLibrary::MarmotElementFactory::elementFactoryFunctionByCode
staticprivate

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