1 #ifndef MATIOCPP_VECTOR_H
2 #define MATIOCPP_VECTOR_H
The matioCpp::Variable class is the equivalent of matvar_t in matio.
std::string name() const
Get the name of the Variable.
matioCpp::Span< const size_t > dimensions() const
Get the dimensions of this object.
matioCpp::VariableType variableType() const
Get the VariableType.
matioCpp::ValueType valueType() const
Get the ValueType.
Vector is a particular type of Variable specialized for 1-D arrays of a generic type T.
Vector(const std::string &name, index_type dimensions)
Constructor.
matioCpp::Span< element_type > toSpan()
Get this Vector as a Span.
value_type operator()(index_type el) const
Access specified element.
size_t index_type
Defines how to allocate T.
pointer data()
Direct access to the underlying array.
index_type size() const
Get the size of the vector.
Vector< T > & operator=(const Vector< T > &other)
Assignement operator (copy) from another Vector.
reverse_iterator rend()
rend Iterator to the element following the last element of the reversed vector.
const_reverse_iterator crend() const
crend Iterator to the element following the last element of the reversed vector.
Vector< element_type > & operator=(const Span< element_type > &other)
Assignement operator from another Vector.
std::remove_cv_t< element_type > value_type
Defines the type of an element of the Vector.
element_type & reference
The type used for indices.
typename get_type< T >::type element_type
Defines the type specified in the template.
typename std::allocator_traits< std::allocator< element_type > >::const_pointer const_pointer
The pointer type.
typename std::conditional< matioCpp::is_string16_compatible< T >::value, std::u16string, typename std::conditional< matioCpp::is_string32_compatible< T >::value, std::u32string, std::string >::type >::type string_input_type
The const reverse iterator type.
value_type operator[](index_type el) const
Access specified element.
reverse_iterator rbegin()
rbegin Iterator to the first element of the reversed vector
Vector()
The output type of the conversion to string.
iterator begin()
begin Iterator
void clear()
Clear the vector.
string_output_type operator()() const
Get the Vector as a string.
const_iterator cbegin() const
cbegin Iterator
reference operator[](index_type el)
Access specified element.
typename std::conditional< matioCpp::is_string_compatible< T >::value, std::string, typename std::conditional< matioCpp::is_string16_compatible< T >::value, std::u16string, typename std::conditional< matioCpp::is_string32_compatible< T >::value, std::u32string, void >::type >::type >::type string_output_type
The type of string that can be used as initialization.
typename std::allocator_traits< std::allocator< element_type > >::pointer pointer
The reference type.
void resize(index_type newSize)
Resize the vector.
const_reverse_iterator crbegin() const
crbegin Iterator to the first element of the reversed vector
const_iterator cend() const
cend Iterator
Vector(const std::string &name, Span< const element_type > inputVector)
Constructor.
iterator end()
end Iterator
reference operator()(index_type el)
Access specified element.
bool setName(const std::string &newName)
Change the name of the Variable.
VariableType
Define the type of variable.
ValueType
The list of types for an element of a certain variable type.
Utility metafunction to get the ValueType from a given primitive type.