1 #ifndef MATIOCPP_STRUCT_H
2 #define MATIOCPP_STRUCT_H
StructArray is a particular type of Variable specialized for array of structs.
Struct is a particular type of Variable specialized for structs.
size_t getFieldIndex(const std::string &field) const
Get the index of the specified field in the struct by performing a linear search.
bool setName(const std::string &newName)
Change the name of the Struct.
std::vector< std::string > fields() const
Get the list of fields.
bool fromVectorOfVariables(const std::vector< Variable > &elements)
Set from a vector of Variables.
matioCpp::Variable operator[](index_type el)
Access field at a specific index.
Struct & operator=(const Struct &other)
Assignement operator (copy) from another Struct.
bool setField(index_type index, const Variable &newValue)
Set the field at the specified position.
void clear()
Clear the struct.
Struct()
The type used for indices.
bool isFieldExisting(const std::string &field) const
Check if a field is existing It performs a linear search over the output of fields().
index_type numberOfFields() const
Get the total number of fields in the struct.
matioCpp::Variable operator()(index_type el)
Access field at a specific index.
The matioCpp::Variable class is the equivalent of matvar_t in matio.
std::string name() const
Get the name of the Variable.
matioCpp::VariableType variableType() const
Get the VariableType.
matioCpp::ValueType valueType() const
Get the ValueType.
VariableType
Define the type of variable.
ValueType
The list of types for an element of a certain variable type.