![]() |
OGS
|
This class defines components (substances).
The Component class is a base class used for not further specified components. Components are specified by the property 'name'. For specified components we derive special classes from this class (for clarity they are located in the 'components' subfolder).
Definition at line 24 of file Component.h.
#include <Component.h>
Public Member Functions | |
Component () | |
Component (std::string const &component_name, std::unique_ptr< PropertyArray > &&properties) | |
Constructor for a custom component. More... | |
virtual | ~Component ()=default |
Property const & | property (PropertyType const &) const |
A get-function for retrieving a certain property. More... | |
Property const & | operator[] (PropertyType const &p) const |
bool | hasProperty (PropertyType const &p) const |
template<typename T > | |
T | value (PropertyType const p) const |
template<typename T > | |
T | value (PropertyType const p, VariableArray const &variable_array) const |
template<typename T > | |
T | dValue (PropertyType const p, VariableArray const &variable_array, Variable const variable) const |
template<typename T > | |
T | d2Value (PropertyType const p, VariableArray const &variable_array, Variable const variable1, Variable const variable2) const |
std::string | description () const |
Short description of the component with its name. More... | |
Public Attributes | |
std::string const | name |
Protected Attributes | |
PropertyArray | properties_ |
The property array of the component. More... | |
MaterialPropertyLib::Component::Component | ( | ) |
Default constructor of Component. This constructor is used when the component is not specified via the 'name'-tag.
Definition at line 20 of file Component.cpp.
MaterialPropertyLib::Component::Component | ( | std::string const & | component_name, |
std::unique_ptr< PropertyArray > && | properties | ||
) |
Constructor for a custom component.
Definition at line 22 of file Component.cpp.
References MaterialPropertyLib::overwriteExistingProperties(), and properties_.
|
virtualdefault |
|
inline |
Definition at line 64 of file Component.h.
References property().
std::string MaterialPropertyLib::Component::description | ( | ) | const |
Short description of the component with its name.
Definition at line 54 of file Component.cpp.
References name.
Referenced by property().
|
inline |
Definition at line 56 of file Component.h.
References property().
bool MaterialPropertyLib::Component::hasProperty | ( | PropertyType const & | p | ) | const |
Property const & MaterialPropertyLib::Component::operator[] | ( | PropertyType const & | p | ) | const |
Definition at line 44 of file Component.cpp.
References property().
Property const & MaterialPropertyLib::Component::property | ( | PropertyType const & | p | ) | const |
A get-function for retrieving a certain property.
Definition at line 32 of file Component.cpp.
References description(), OGS_FATAL, properties_, and MaterialPropertyLib::property_enum_to_string.
Referenced by d2Value(), dValue(), operator[](), and value().
|
inline |
Definition at line 44 of file Component.h.
References property().
|
inline |
Definition at line 50 of file Component.h.
References property().
std::string const MaterialPropertyLib::Component::name |
Definition at line 77 of file Component.h.
Referenced by description().
|
protected |
The property array of the component.
Definition at line 81 of file Component.h.
Referenced by Component(), hasProperty(), and property().