IOSS 2.0

Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Ioss::Property Class Reference

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 }

## Public Member Functions
| Property ()
| Create an explicit, empty property having no name, INVALID type. More...
| Property (std::string name, BasicType type, void *data, bool is_it_implicit=false)
| Create a property with a specified type. More...
| Property (std::string name, int64_t value, bool is_it_implicit=false)
| Create an INTEGER type property using an int64_t variable. More...
| Property (std::string name, int value, bool is_it_implicit=false)
| Create an INTEGER type property. More...
| Property (std::string name, double value, bool is_it_implicit=false)
| Create a REAL type property. More...
| Property (std::string name, const std::string &value, bool is_it_implicit=false)
| Create a STRING type property. More...
| Property (std::string name, void *value, bool is_it_implicit)
| Create a POINTER 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...
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

## Private Attributes
std::string | name_
BasicType | type_
bool | isImplicit_
Data | data_ {}

## Detailed Description

A named value that has a known type.

## Member Enumeration Documentation

## ◆ BasicType

enum Ioss::Property::BasicType

Enumerator
INVALID |
REAL |
INTEGER |
POINTER |
STRING |

## Constructor & Destructor Documentation

## ◆ Property() [1/9]

Ioss::Property::Property | ( |  | ) |

Create an explicit, empty property having no name, INVALID type.

## ◆ Property() [2/9]

Ioss::Property::Property | ( | std::string | name,
|  | BasicType | type,
|  | void * | data,
|  | bool | is_it_implicit = `false`
| ) |  |

Create a property with a specified type.

Parameters

  [in] | name | The property name.
  [in] | type | The property type.
  [in] | data | The property value.
  [in] | is_it_implicit | True if the property is calculated, rather than stored directly

## ◆ Property() [3/9]

Ioss::Property::Property | ( | std::string | name,
|  | int64_t | value,
|  | bool | is_it_implicit = `false`
| ) |  |

Create an INTEGER type property using an int64_t variable.

Parameters

  [in] | name | The property name.
  [in] | value | The property value.
  [in] | is_it_implicit | True if the property is calculated, rather than stored directly

## ◆ Property() [4/9]

Ioss::Property::Property | ( | std::string | name,
|  | int | value,
|  | bool | is_it_implicit = `false`
| ) |  |

Create an INTEGER type property.

Parameters

  [in] | name | The property name.
  [in] | value | The property value.
  [in] | is_it_implicit | True if the property is calculated, rather than stored directly

## ◆ Property() [5/9]

Ioss::Property::Property | ( | std::string | name,
|  | double | value,
|  | bool | is_it_implicit = `false`
| ) |  |

Create a REAL type property.

Parameters

  [in] | name | The property name.
  [in] | value | The property value.
  [in] | is_it_implicit | True if the property is calculated, rather than stored directly

## ◆ Property() [6/9]

Ioss::Property::Property | ( | std::string | name,
|  | const std::string & | value,
|  | bool | is_it_implicit = `false`
| ) |  |

Create a STRING type property.

Parameters

  [in] | name | The property name.
  [in] | value | The property value.
  [in] | is_it_implicit | True if the property is calculated, rather than stored directly

## ◆ Property() [7/9]

Ioss::Property::Property | ( | std::string | name,
|  | void * | value,
|  | bool | is_it_implicit
| ) |  |

Create a POINTER type property.

Parameters

  [in] | name | The property name.
  [in] | value | The property value.
  [in] | is_it_implicit | True if the property is calculated, rather than stored directly

## ◆ Property() [8/9]

Ioss::Property::Property | ( | const GroupingEntity * | ge,
|  | std::string | name,
|  | BasicType | type
| ) |  |

Set implicit property with a specified type.

Parameters

  [in] | ge | The property value.
  [in] | name | The property name.
  [in] | type | The property type.

## ◆ Property() [9/9]

Ioss::Property::Property | ( | const Property & | from | ) |

Copy constructor.

Parameters

  [in] | from | The Ioss::Property to copy

## ◆ ~Property()

Ioss::Property::~Property | ( |  | ) |

## Member Function Documentation

## ◆ get_int()

int64_t Ioss::Property::get_int | ( |  | ) | const

Get the property value if it is of type INTEGER.

Returns
  The INTEGER-type property value

## ◆ get_name()

std::string Ioss::Property::get_name | ( |  | ) | const
| inline

Get the property name.

Returns
  The property name.

## ◆ get_pointer()

void * Ioss::Property::get_pointer | ( |  | ) | const

Get the property value if it is of type POINTER.

Returns
  The POINTER-type property value.

## ◆ get_real()

double Ioss::Property::get_real | ( |  | ) | const

Get the property value if it is of type REAL.

Returns
  The REAL-type property value.

## ◆ get_string()

std::string Ioss::Property::get_string | ( |  | ) | const

Get the property value if it is of type STRING.

Returns
  The STRING-type property value

## ◆ get_type()

BasicType Ioss::Property::get_type | ( |  | ) | const
| inline

Get the property type.

Returns
  The property type.

## ◆ get_value() [1/4]

bool Ioss::Property::get_value | ( | int64_t * | value | ) | const
| private

## ◆ get_value() [2/4]

bool Ioss::Property::get_value | ( | double * | value | ) | const
| private

## ◆ get_value() [3/4]

bool Ioss::Property::get_value | ( | std::string * | value | ) | const
| private

## ◆ get_value() [4/4]

bool Ioss::Property::get_value | ( | void *& | value | ) | const
| private

## ◆ is_explicit()

bool Ioss::Property::is_explicit | ( |  | ) | const
| inline

Tells whether the property is stored, rather than calculated.

Returns
  True if property is stored directly; False if it is calculated.

## ◆ is_implicit()

bool Ioss::Property::is_implicit | ( |  | ) | const
| inline

Tells whether the property is calculated, rather than stored.

Returns
  True if property is calculated; False if it is stored directly.

## ◆ is_invalid()

bool Ioss::Property::is_invalid | ( |  | ) | const
| inline

Tells whether the property has an invalid type (currently not one of REAL, INTEGER, POINTER, or STRING)

Returns
  True if the property type is invalid.

## ◆ is_valid()

bool Ioss::Property::is_valid | ( |  | ) | const
| inline

Tells whether the property has a valid type (currently REAL, INTEGER, POINTER, or STRING)

Returns
  True if the property type is valid.

## ◆ operator=()

Ioss::Property & Ioss::Property::operator= | ( | Ioss::Property | rhs | ) |

## Member Data Documentation

## ◆ data_

Data Ioss::Property::data_ {}
| private

## ◆ isImplicit_

bool Ioss::Property::isImplicit_
| private

## ◆ name_

std::string Ioss::Property::name_
| private

## ◆ type_

BasicType Ioss::Property::type_
| private

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

- src/Ioss_Property.h
- src/Ioss_Property.C