|
IOSS
2.0
|
A named value that has a known type. More...
#include <Ioss_Property.h>
Classes | |
| union | Data |
Public Types | |
| enum | BasicType { INVALID = -1, REAL, INTEGER, POINTER, STRING, VEC_INTEGER, VEC_DOUBLE } |
| enum | Origin { INTERNAL = -1, IMPLICIT, EXTERNAL, ATTRIBUTE } |
Public Member Functions | |
| Property ()=default | |
| Property (std::string name, int64_t value, Origin origin=INTERNAL) | |
| Create an INTEGER type property using an int64_t variable. More... | |
| Property (std::string name, int value, Origin origin=INTERNAL) | |
| Create an INTEGER type property. More... | |
| Property (std::string name, double value, Origin origin=INTERNAL) | |
| Create a REAL type property. More... | |
| Property (std::string name, const std::string &value, Origin origin=INTERNAL) | |
| Create a STRING type property. More... | |
| Property (std::string name, const char *value, Origin origin=INTERNAL) | |
| Create a STRING type property from const char* argument. More... | |
| Property (std::string name, void *value, Origin origin=INTERNAL) | |
| Create a POINTER type property. More... | |
| Property (std::string name, const std::vector< int > &value, Origin origin=INTERNAL) | |
| Create a VEC_INTEGER type property. More... | |
| Property (std::string name, const std::vector< double > &value, Origin origin=INTERNAL) | |
| Create a VEC_DOUBLE type property. More... | |
| Property (const GroupingEntity *ge, std::string name, BasicType type) | |
| Set implicit property with a specified type. More... | |
| Property (const Property &from) | |
| Copy constructor. More... | |
| Property & | operator= (Property rhs) |
| ~Property () | |
| std::string | get_string () const |
| Get the property value if it is of type STRING. More... | |
| int64_t | get_int () const |
| Get the property value if it is of type INTEGER. More... | |
| double | get_real () const |
| Get the property value if it is of type REAL. More... | |
| void * | get_pointer () const |
| Get the property value if it is of type POINTER. More... | |
| std::vector< double > | get_vec_double () const |
| Get the property value if it is of type VEC_DOUBLE. More... | |
| std::vector< int > | get_vec_int () const |
| Get the property value if it is of type VEC_INT. More... | |
| void | set_origin (Origin origin) |
| Origin | get_origin () const |
| bool | is_implicit () const |
| Tells whether the property is calculated, rather than stored. More... | |
| bool | is_explicit () const |
| Tells whether the property is stored, rather than calculated. More... | |
| bool | is_valid () const |
| bool | is_invalid () const |
| std::string | get_name () const |
| Get the property name. More... | |
| BasicType | get_type () const |
| Get the property type. More... | |
Private Member Functions | |
| bool | get_value (int64_t *value) const |
| bool | get_value (double *value) const |
| bool | get_value (std::string *value) const |
| bool | get_value (void *&value) const |
| bool | get_value (std::vector< double > *value) const |
| bool | get_value (std::vector< int > *value) const |
Private Attributes | |
| std::string | name_ {} |
| BasicType | type_ {INVALID} |
| Origin | origin_ {INTERNAL} |
| Data | data_ {} |
A named value that has a known type.
|
default |
Create an INTEGER type property using an int64_t variable.
| [in] | name | The property name. |
| [in] | value | The property value. |
| [in] | origin | The origin of the property - IMPLICIT, or EXTERNAL, or ATTRIBUTE |
Create an INTEGER type property.
| [in] | name | The property name. |
| [in] | value | The property value. |
| [in] | origin | The origin of the property - IMPLICIT, or EXTERNAL, or ATTRIBUTE |
Create a REAL type property.
| [in] | name | The property name. |
| [in] | value | The property value. |
| [in] | origin | The origin of the property - IMPLICIT, or EXTERNAL, or ATTRIBUTE |
Create a STRING type property.
| [in] | name | The property name. |
| [in] | value | The property value. |
| [in] | origin | The origin of the property - IMPLICIT, or EXTERNAL, or ATTRIBUTE |
Create a STRING type property from const char* argument.
| [in] | name | The property name. |
| [in] | value | The property value. |
| [in] | origin | The origin of the property - IMPLICIT, or EXTERNAL, or ATTRIBUTE |
Create a POINTER type property.
| [in] | name | The property name. |
| [in] | value | The property value. |
| [in] | origin | The origin of the property - IMPLICIT, or EXTERNAL, or ATTRIBUTE |
| Ioss::Property::Property | ( | std::string | name, |
| const std::vector< int > & | value, | ||
| Origin | origin = INTERNAL |
||
| ) |
Create a VEC_INTEGER type property.
| [in] | name | The property name. |
| [in] | value | The property value. |
| [in] | origin | The origin of the property - IMPLICIT, or EXTERNAL, or ATTRIBUTE |
| Ioss::Property::Property | ( | std::string | name, |
| const std::vector< double > & | value, | ||
| Origin | origin = INTERNAL |
||
| ) |
Create a VEC_DOUBLE type property.
| [in] | name | The property name. |
| [in] | value | The property value. |
| [in] | origin | The origin of the property - IMPLICIT, or EXTERNAL, or ATTRIBUTE |
| Ioss::Property::Property | ( | const GroupingEntity * | ge, |
| std::string | name, | ||
| BasicType | type | ||
| ) |
Set implicit property with a specified type.
| [in] | ge | The property value. |
| [in] | name | The property name. |
| [in] | type | The property type. |
| Ioss::Property::Property | ( | const Property & | from | ) |
Copy constructor.
| [in] | from | The Ioss::Property to copy |
| Ioss::Property::~Property | ( | ) |
| int64_t Ioss::Property::get_int | ( | ) | const |
Get the property value if it is of type INTEGER.
|
inline |
Get the property name.
|
inline |
| void * Ioss::Property::get_pointer | ( | ) | const |
Get the property value if it is of type POINTER.
| double Ioss::Property::get_real | ( | ) | const |
Get the property value if it is of type REAL.
| std::string Ioss::Property::get_string | ( | ) | const |
Get the property value if it is of type STRING.
|
inline |
Get the property type.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| std::vector< double > Ioss::Property::get_vec_double | ( | ) | const |
Get the property value if it is of type VEC_DOUBLE.
| std::vector< int > Ioss::Property::get_vec_int | ( | ) | const |
Get the property value if it is of type VEC_INT.
|
inline |
Tells whether the property is stored, rather than calculated.
|
inline |
Tells whether the property is calculated, rather than stored.
|
inline |
Tells whether the property has an invalid type (currently not one of REAL, INTEGER, POINTER, or STRING)
|
inline |
Tells whether the property has a valid type (currently REAL, INTEGER, POINTER, or STRING)
| Ioss::Property & Ioss::Property::operator= | ( | Ioss::Property | rhs | ) |
|
inline |
|
private |
|
private |
True if property is calculated rather than stored. False if property is stored in 'data_'