17#include "ioss_export.h"
21 struct QuadraturePoint;
39 return m_registry.find(type);
52 explicit Suffix(
const char *new_data) : m_data(new_data) {}
53 explicit Suffix(std::string new_data) : m_data(std::move(new_data)) {}
56 return Utils::str_equal(m_data, str);
60 return !Utils::str_equal(m_data, str);
85 static void alias(
const std::string &base,
const std::string &syn);
86 static int describe(
NameList *names);
95 static bool create_named_suffix_type(
const std::string &type_name,
99 [[deprecated(
"Use create_named_suffix_type")]]
static bool
102 return create_named_suffix_type(type_name, suffices);
105 static bool create_basis_type(
const std::string &type_name,
const Ioss::Basis &basis);
106 static bool create_quadrature_type(
const std::string &type_name,
107 const std::vector<Ioss::QuadraturePoint> &quad_points);
108 static bool get_field_type_mapping(
const std::string &field, std::string *type);
109 static bool add_field_type_mapping(
const std::string &raw_field,
const std::string &raw_type);
115 virtual void print()
const;
127 IOSS_NODISCARD static std::string numeric_label(
int which,
int ncomp,
const std::string &name);
129 IOSS_NODISCARD virtual std::string label_name(
const std::string &base,
int which,
130 char suffix_sep1 =
'_',
char suffix_sep2 =
'_',
131 bool suffices_uppercase =
false)
const;
132 IOSS_NODISCARD virtual bool match(
const std::vector<Suffix> &suffices)
const;
136 const std::string &secondary);
138 bool ignore_realn_fields =
false);
143 VariableType(
const std::string &type,
int comp_count,
bool delete_me =
false);
146 const std::string name_{};
147 int componentCount{};
149 static bool build_variable_type(
const std::string &raw_type);
#define IOSS_NODISCARD
Definition Ioss_CodeTypes.h:55
Definition Ioss_VariableType.h:30
IOSS_NODISCARD VariableTypeMap::iterator begin()
Definition Ioss_VariableType.h:35
IOSS_NODISCARD VariableTypeMap::iterator find(const std::string &type)
Definition Ioss_VariableType.h:37
std::map< std::string, std::string > customFieldTypes
Definition Ioss_VariableType.h:45
Ioss::VariableTypeMap m_registry
Definition Ioss_VariableType.h:46
IOSS_NODISCARD VariableTypeMap::iterator end()
Definition Ioss_VariableType.h:36
std::vector< Ioss::VariableType * > m_deleteThese
Definition Ioss_VariableType.h:47
A generic variable type.
Definition Ioss_VariableType.h:70
const std::string name_
Definition Ioss_VariableType.h:146
VariableType & operator=(const VariableType &)=delete
static bool create_named_suffix_field_type(const std::string &type_name, const Ioss::NameList &suffices)
Definition Ioss_VariableType.h:100
Type
Definition Ioss_VariableType.h:72
VariableType(const VariableType &)=delete
virtual IOSS_NODISCARD std::string label(int which, char suffix_sep='_') const =0
IOSS_NODISCARD std::string name() const
Definition Ioss_VariableType.h:152
virtual IOSS_NODISCARD int suffix_count() const
Definition Ioss_VariableType.h:156
virtual ~VariableType()=default
IOSS_NODISCARD int component_count() const
Definition Ioss_VariableType.h:154
The main namespace for the Ioss library.
Definition Ioad_DatabaseIO.C:40
VariableTypeMap::value_type VTM_ValuePair
Definition Ioss_VariableType.h:27
Ioss::NameList NameList
Definition Ioss_ChangeSetFactory.h:25
std::map< std::string, VariableType *, std::less<> > VariableTypeMap
Definition Ioss_VariableType.h:26
Definition Ioss_BasisVariableType.h:30
Definition Ioss_VariableType.h:51
IOSS_NODISCARD bool is_uppercase() const
Definition Ioss_VariableType.h:62
IOSS_NODISCARD bool operator==(const std::string &str) const
Definition Ioss_VariableType.h:54
Suffix(std::string new_data)
Definition Ioss_VariableType.h:53
IOSS_NODISCARD bool operator!=(const std::string &str) const
Definition Ioss_VariableType.h:58
Suffix(const char *new_data)
Definition Ioss_VariableType.h:52