FEMSuite
Public Member Functions | Protected Attributes | List of all members
ParameterBase Class Reference

This class implements the most basic features of the IParameter interface. More...

#include <ParameterBase.h>

Inheritance diagram for ParameterBase:
Inheritance graph
[legend]
Collaboration diagram for ParameterBase:
Collaboration graph
[legend]

Public Member Functions

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 std::type_index GetBasicType () override
 
virtual std::string ToString () override
 
virtual void SetFromString (const std::string &s) override
 
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::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

This class implements the most basic features of the IParameter interface.

Member Function Documentation

virtual void ParameterBase::AlwaysUseDefaultDir ( const bool  = true)
inlineoverridevirtual

Uses the default directory for loading and saving xml files.

Implements IParameter.

virtual ParameterId ParameterBase::GetId ( )
inlineoverridevirtual

Returns a generic type id pertaining to this parameter

Implements IParameter.

virtual std::shared_ptr< IParameter > ParameterBase::GetIParameter ( const std::string &  name)
inlineoverridevirtual

Finds a parameter by name

Implements IParameter.

virtual bool ParameterBase::IsDisabled ( )
inlineoverridevirtual

A disabled parameter cannot have its value updated using the SetFromString method

Implements IParameter.

void ParameterBase::LoadFromXMLFile ( const std::string &  rootDir = "",
const bool  loadFromRootNode = false 
)
overridevirtual

If loadFromRootNode is set, the parameter is loaded from the root node directly.

Implements IParameter.

void ParameterBase::LoadFromXMLNode ( TiXmlElement *  node)
overridevirtual

Loads xml from a specified root node. Will look in the root node for the exact node of this parameter

Implements IParameter.

Reimplemented in ParameterContainer< T >.

void ParameterBase::LoadFromXMLSubNode ( TiXmlElement *  rootNode)
overridevirtual

Loads xml from an node. Will look in the root node for the exact node of this parameter

Implements IParameter.


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