10#include "ioss_export.h"
38 Property(std::string name, int64_t value, Origin origin = INTERNAL);
39 Property(std::string name,
int value, Origin origin = INTERNAL);
40 Property(std::string name,
double value, Origin origin = INTERNAL);
41 Property(std::string name,
const std::string &value, Origin origin = INTERNAL);
42 Property(std::string name,
const char *value, Origin origin = INTERNAL);
43 Property(std::string name,
void *value, Origin origin = INTERNAL);
44 Property(std::string name,
const std::vector<int> &value, Origin origin = INTERNAL);
45 Property(std::string name,
const std::vector<double> &value, Origin origin = INTERNAL);
104 swap(first.name_, second.name_);
105 swap(first.type_, second.type_);
106 swap(first.origin_, second.origin_);
107 swap(first.data_, second.data_);
118 bool get_value(int64_t *value)
const;
119 bool get_value(
double *value)
const;
120 bool get_value(std::string *value)
const;
121 bool get_value(
void *&value)
const;
122 bool get_value(std::vector<double> *value)
const;
123 bool get_value(std::vector<int> *value)
const;
127 std::variant<std::string, const Ioss::GroupingEntity *, double, int64_t, std::vector<double>,
128 std::vector<int>,
void *>
#define IOSS_NODISCARD
Definition Ioss_CodeTypes.h:55
Base class for all 'grouping' entities. The following derived classes are typical:
Definition Ioss_GroupingEntity.h:67
A named value that has a known type.
Definition Ioss_Property.h:27
Origin origin_
Definition Ioss_Property.h:116
std::string name_
Definition Ioss_Property.h:111
Origin
Definition Ioss_Property.h:30
@ IMPLICIT
Property is calculated on the fly based on current state of entity containing.
Definition Ioss_Property.h:32
@ EXTERNAL
Property was created by client.
Definition Ioss_Property.h:34
@ ATTRIBUTE
Property created from an Exodus or Database Attribute.
Definition Ioss_Property.h:35
@ INTERNAL
Property is for internal use.
Definition Ioss_Property.h:31
Property(std::string name, int64_t value, Origin origin=INTERNAL)
Create an INTEGER type property using an int64_t variable.
Definition Ioss_Property.C:57
std::variant< std::string, const Ioss::GroupingEntity *, double, int64_t, std::vector< double >, std::vector< int >, void * > data_
Definition Ioss_Property.h:129
IOSS_NODISCARD BasicType get_type() const
Get the property type.
Definition Ioss_Property.h:95
void set_origin(Origin origin)
Definition Ioss_Property.h:57
IOSS_NODISCARD std::string get_name() const
Get the property name.
Definition Ioss_Property.h:89
IOSS_NODISCARD bool is_explicit() const
Tells whether the property is stored, rather than calculated.
Definition Ioss_Property.h:70
BasicType
Definition Ioss_Property.h:29
@ INTEGER
Definition Ioss_Property.h:29
@ VEC_INTEGER
Definition Ioss_Property.h:29
@ POINTER
Definition Ioss_Property.h:29
@ REAL
Definition Ioss_Property.h:29
@ INVALID
Definition Ioss_Property.h:29
@ VEC_DOUBLE
Definition Ioss_Property.h:29
@ STRING
Definition Ioss_Property.h:29
IOSS_NODISCARD bool is_valid() const
Definition Ioss_Property.h:76
BasicType type_
Definition Ioss_Property.h:112
IOSS_NODISCARD bool is_implicit() const
Tells whether the property is calculated, rather than stored.
Definition Ioss_Property.h:64
IOSS_NODISCARD bool is_invalid() const
Definition Ioss_Property.h:83
IOSS_NODISCARD Origin get_origin() const
Definition Ioss_Property.h:58
The main namespace for the Ioss library.
Definition Ioad_DatabaseIO.C:40