AFF --- A container for numbers (array) by Friederich and Forbriger.
aff::CArray< T > Class Template Reference

Interface class to raw memory (C style array) More...

#include <Carray.h>

Inheritance diagram for aff::CArray< T >:
Collaboration diagram for aff::CArray< T >:

Public Types

Various types

In particular due to our concept of const-correctness we need several typedefs to declare types derived from the element type of the array.

See also
Member typedefs
Notes on the const-correctness of arrays
typedef aff::Array< T > Tarray
 Type of array to be interfaced. More...
 
typedef aff::ConstCArray< T > Tbase
 Base class. More...
 
typedef Tarray::Trepresentation Trepresentation
 Type of representation. More...
 
typedef Tarray::Tshape Tshape
 Type of shape. More...
 
typedef Tshape::TSizeVec TSizeVec
 we use this for one of the access operators More...
 
typedef Tarray::Tvalue Tvalue
 Element type. More...
 
typedef Tarray::Tpointer Tpointer
 Type of pointer to element. More...
 
typedef Tarray::Treference Treference
 Type of reference to element. More...
 
typedef Tarray::Tconst_value Tconst_value
 const element type More...
 
typedef Tarray::Tconst_pointer Tconst_pointer
 Type of pointer to const element. More...
 
typedef Tarray::Tconst_reference Tconst_reference
 Type of reference to const element. More...
 
typedef CArray< T > Tcontainer
 Type of this array. More...
 
typedef Tbase Tcontainer_of_const
 Type of the array of const values. More...
 
typedef Tcontainer Tcoc
 Short for Tcontainer_of_const. More...
 

Public Member Functions

Constructors

No copy constructors or copy operators are provided since this is provided as an interface class only.

 CArray (const Tarray &array)
 construct from shape and representation More...
 
Memory access
Tpointer pointer () const
 return pointer to first element in Fortran layout More...
 
template<class TT >
TT * castedpointer () const
 return type-casted pointer to first element in Fortran layout More...
 
Shape access
const Tsizesize (const Tsubscript &i) const
 size of dimension More...
 
const TSizeVecsize () const
 size of dimensions More...
 
const Tsizestride (const Tsubscript &i) const
 stride of dimension More...
 
const TSizeVecstride () const
 strides of dimensions More...
 

Protected Member Functions

const TSizeVec::Tvalueoffset () const
 pass offset to derived class More...
 

Private Attributes

Trepresentation Mrepresentation
 my (mutable) data representation More...
 

Detailed Description

template<class T>
class aff::CArray< T >

Interface class to raw memory (C style array)

See aff::ConstCArray for the basic concepts used here.

See also
aff::ConstCArray
Examples:
tests/helpertest.cc.

Definition at line 229 of file Carray.h.


The documentation for this class was generated from the following file: