FEMSuite
Public Member Functions | Protected Attributes | List of all members
EnumParameter< T > Class Template Reference

This class describes a generic parameter to be used with enums, eliminating the need to define methods such as ToString, FromString for each enum More...

#include <EnumParameter.h>

Inheritance diagram for EnumParameter< T >:
Inheritance graph
[legend]
Collaboration diagram for EnumParameter< T >:
Collaboration graph
[legend]

Public Member Functions

GetEnumValue () const
 
void SetValue (const T t)
 
std::string GetValue (const T t)
 
 EnumParameter (const std::string &name, const std::map< T, std::string > &values)
 
- Public Member Functions inherited from Parameter< int >
virtual std::type_index GetBasicType () override
 
virtual int GetValue ()
 
virtual void SetValue (const int &v)
 
virtual _DLL std::string ToString () override
 
virtual _DLL int FromString (const std::string &)
 
virtual void SetFromString (const std::string &s) override
 
 Parameter (const std::string &name, const std::string &unit="")
 
- Public Member Functions inherited from ParameterBase
virtual std::string GetName () override
 
virtual void SetName (const std::string &name)
 
virtual std::string GetUnit () override
 
virtual ParameterId GetId () override
 Returns a generic type id pertaining to this parameter More...
 
virtual ParameterDataType GetDataType () override
 
void SetDataType (const ParameterDataType pdt)
 
virtual const Extrema< double > & GetLimits () override
 
virtual void SetLimits (Extrema< double > &limits)
 
virtual bool IsHidden () override
 
virtual void Show (const bool s=true) override
 
virtual void Hide (const bool h=true) override
 
virtual bool IsDisabled () override
 A disabled parameter cannot have its value updated using the SetFromString method More...
 
virtual void Enable (const bool e=true) override
 
virtual void Disable (const bool d=true) override
 
virtual void DisableAndHide () override
 
virtual IParameterContainer & GetParameters () override
 
void AddIParameter (std::shared_ptr< IParameter > p) override
 
virtual void RemoveParameter (const std::string &name) override
 
virtual void ClearParameters () override
 
virtual std::shared_ptr< IParameterGetIParameter (const std::string &name) override
 Finds a parameter by name More...
 
virtual void LoadFromXMLFile (const std::string &rootDir="", const bool loadFromRootNode=false) override
 
virtual void LoadFromXMLNode (TiXmlElement *node) override
 Loads xml from a specified root node. Will look in the root node for the exact node of this parameter More...
 
virtual void LoadFromXMLSubNode (TiXmlElement *root) override
 Loads xml from an node. Will look in the root node for the exact node of this parameter More...
 
virtual void SaveToXMLFile (const std::string &rootDir="") override
 
virtual void SaveToXMLNode (TiXmlElement *node) override
 
virtual void SaveToXMLSubNode (TiXmlElement *root) override
 
virtual bool IsAlwaysUsingDefaultDir () override
 
virtual void AlwaysUseDefaultDir (const bool a=true) override
 Uses the default directory for loading and saving xml files. More...
 
 ParameterBase (const std::string &name)
 
 ParameterBase (const std::string &name, const std::string &unit)
 
- Public Member Functions inherited from IParameter
template<class T , typename... Args>
std::shared_ptr< Parameter< T > > GetParameter (Args...args)
 
template<class T , typename... Args>
std::shared_ptr< T > Get (Args...args)
 
template<class T , typename... Args>
std::shared_ptr< Parameter< T > > AddParameter (Args...args)
 
template<class T , typename... Args>
std::shared_ptr< T > Add (Args...args)
 

Protected Attributes

std::map< T, std::string > m_Values
 
- Protected Attributes inherited from Parameter< int >
std::type_index m_BasicType
 
int m_Value
 
- Protected Attributes inherited from ParameterBase
std::string m_Name
 
std::string m_Unit
 
ParameterId m_Id
 
ParameterDataType m_DataType
 
Extrema< double > m_Limits
 
bool m_Hidden
 
bool m_Disabled
 
IParameterContainer m_Parameters
 
bool m_AlwaysUseDefaultDir
 

Detailed Description

template<typename T>
class EnumParameter< T >

This class describes a generic parameter to be used with enums, eliminating the need to define methods such as ToString, FromString for each enum


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