libtgd 4.3
A library that makes working with multidimensional arrays in C++ easy
array.hpp File Reference

The libtgd C++ interface. More...

Classes

class  TGD::ArrayDescription
 The ArrayDescription manages array metadata. More...
 
class  TGD::ArrayContainer
 The ArrayContainer class manages arrays with arbitrary component data types. More...
 
class  TGD::Array< T >
 An Array with a specific component data type given the template parameter. This is the main class to work with since it allows useful for operations on arrays (e.g. component-wise addition) and provides iterators. More...
 
class  TGD::Array< T >::ComponentIterator
 Iterator over all components in the array. This is a random access iterator. More...
 
class  TGD::Array< T >::ConstComponentIterator
 Const iterator over all components in the array. This is a random access iterator. More...
 
class  TGD::Array< T >::ElementIterator
 Iterator over all elements in the array. When dereferenced, this returns a pointer to the components of an element. This is a random access iterator. More...
 
class  TGD::Array< T >::ConstElementIterator
 Const iterator over all elements in the array. When dereferenced, this returns a pointer to the components of an element. This is a random access iterator. More...
 

Namespaces

namespace  TGD
 

Enumerations

enum  TGD::Type {
  TGD::int8 = 0 , TGD::uint8 = 1 , TGD::int16 = 2 , TGD::uint16 = 3 ,
  TGD::int32 = 4 , TGD::uint32 = 5 , TGD::int64 = 6 , TGD::uint64 = 7 ,
  TGD::float32 = 8 , TGD::float64 = 9
}
 The data type that array element components can represent. More...
 

Functions

constexpr size_t TGD::typeSize (Type t)
 Returns the size of a TGD type.
 
template<typename T >
constexpr Type TGD::typeFromTemplate ()
 Returns the TGD component type that corresponds to the template parameter.
 
bool TGD::typeFromString (const std::string &s, Type *t)
 Determine the TGD component type described in the string, return false if this fails.
 
const char * TGD::typeToString (Type t)
 Return the name of the given type.
 
ArrayContainer TGD::convert (const ArrayContainer &a, Type newType)
 Convert the given array to the given new component type. If conversion is not actually necessary because the new type is the same as the old, the returned array will simply share its data with the original array.
 

Detailed Description

The libtgd C++ interface.