15#include "ioss_export.h"
86 INFORMATION = MESH_REDUCTION,
105 Field(std::string name, BasicType type,
const std::string &storage, RoleType role,
106 size_t value_count = 0,
size_t index = 0);
108 Field(std::string name, BasicType type,
const std::string &storage,
int copies, RoleType role,
109 size_t value_count = 0,
size_t index = 0);
111 Field(std::string name, BasicType type,
const std::string &storage,
112 const std::string &secondary, RoleType role,
size_t value_count = 0,
size_t index = 0);
114 Field(std::string name, BasicType type,
const VariableType *storage, RoleType role,
115 size_t value_count = 0,
size_t index = 0);
138 IOSS_NODISCARD std::string get_component_name(
int component_index, InOut in_out,
139 char suffix = 1)
const;
144 suffixSeparator1_ = suffix_separator1;
145 suffixSeparator2_ = suffix_separator2 == 2 ? suffix_separator1 : suffix_separator2;
150 return index == 0 ? suffixSeparator1_ : suffixSeparator2_;
154 sufficesUppercase_ = true_false;
159 const Field &set_zero_copy_enabled(
bool true_false =
true)
const;
198 void reset_count(
size_t new_count);
199 void reset_type(BasicType new_type);
204 size_t verify(
size_t data_size)
const;
208 void check_type(BasicType the_type)
const;
218 bool add_transform(
Transform *my_transform);
219 bool transform(
void *data);
226 size_t transCount_{};
237 std::vector<Transform *> transforms_{};
238 char suffixSeparator1_{1};
239 char suffixSeparator2_{1};
240 bool sufficesUppercase_{
false};
241 mutable bool zeroCopyable_{
false};
243 bool equal_(
const Ioss::Field &rhs,
bool quiet)
const;
245 IOSS_EXPORT std::ostream &
operator<<(std::ostream &os,
const Field &fld);
#define IOSS_NODISCARD
Definition Ioss_CodeTypes.h:55
std::complex< double > Complex
Definition Ioss_CodeTypes.h:91
Holds metadata for bulk data associated with a GroupingEntity.
Definition Ioss_Field.h:25
Field & set_index(size_t index)
Definition Ioss_Field.h:192
static IOSS_NODISCARD Ioss::Field::BasicType get_field_type(Complex)
Definition Ioss_Field.h:58
static IOSS_NODISCARD Ioss::Field::BasicType get_field_type(uint64_t)
Definition Ioss_Field.h:54
IOSS_NODISCARD bool is_type(BasicType the_type) const
Definition Ioss_Field.h:210
IOSS_NODISCARD const VariableType * raw_storage() const
Definition Ioss_Field.h:168
IOSS_NODISCARD BasicType get_type() const
Get the basic data type of the data held in the field.
Definition Ioss_Field.h:166
IOSS_NODISCARD bool has_transform() const
Definition Ioss_Field.h:220
IOSS_NODISCARD bool is_valid() const
Definition Ioss_Field.h:124
IOSS_NODISCARD std::string & get_name()
Definition Ioss_Field.h:128
IOSS_NODISCARD bool operator<(const Field &other) const
BasicType
The basic data type held in the field.
Definition Ioss_Field.h:29
@ COMPLEX
Definition Ioss_Field.h:36
@ STRING
Definition Ioss_Field.h:37
IOSS_NODISCARD size_t raw_count() const
Definition Ioss_Field.h:171
RoleType
Definition Ioss_Field.h:69
@ COMMUNICATION
Definition Ioss_Field.h:80
@ MAP
Definition Ioss_Field.h:79
@ INTERNAL
Definition Ioss_Field.h:70
IOSS_NODISCARD bool zero_copy_enabled() const
Definition Ioss_Field.h:160
IOSS_NODISCARD const VariableType * transformed_storage() const
Definition Ioss_Field.h:169
IOSS_NODISCARD bool get_suffices_uppercase() const
Definition Ioss_Field.h:157
static IOSS_NODISCARD Ioss::Field::BasicType get_field_type(double)
Definition Ioss_Field.h:47
static IOSS_NODISCARD Ioss::Field::BasicType get_field_type(unsigned int)
Definition Ioss_Field.h:49
static IOSS_NODISCARD Ioss::Field::BasicType get_field_type(const std::string &)
Definition Ioss_Field.h:62
Field & set_suffix_separator(char suffix_separator1, char suffix_separator2=2)
Definition Ioss_Field.h:142
IOSS_NODISCARD const std::string & get_name() const
Definition Ioss_Field.h:127
static IOSS_NODISCARD Ioss::Field::BasicType get_field_type(int64_t)
Definition Ioss_Field.h:53
static IOSS_NODISCARD Ioss::Field::BasicType get_field_type(int)
Definition Ioss_Field.h:48
IOSS_NODISCARD bool is_invalid() const
Definition Ioss_Field.h:125
IOSS_NODISCARD char get_suffix_separator(int index=0) const
Definition Ioss_Field.h:148
IOSS_NODISCARD size_t get_index() const
Definition Ioss_Field.h:186
Field & set_suffices_uppercase(bool true_false)
Definition Ioss_Field.h:152
static IOSS_NODISCARD Ioss::Field::BasicType get_field_type(char)
Definition Ioss_Field.h:43
IOSS_NODISCARD RoleType get_role() const
Get the role (MESH, ATTRIBUTE, TRANSIENT, REDUCTION, etc.) of the data in the field.
Definition Ioss_Field.h:184
const Field & set_index(size_t index) const
Definition Ioss_Field.h:187
InOut
Definition Ioss_Field.h:41
IOSS_NODISCARD size_t transformed_count() const
Definition Ioss_Field.h:172
A generic variable type.
Definition Ioss_VariableType.h:70
The main namespace for the Ioss library.
Definition Ioad_DatabaseIO.C:40
std::ostream & OUTPUT()
Definition Ioss_Utils.h:608
std::ostream & operator<<(std::ostream &os, const Field &fld)
Definition Ioss_Field.C:41