Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
istd::TVarArray< Element > Class Template Reference

Multidimensional array with fixed number of dimensions. More...

#include <TVarArray.h>

Classes

class  Iterator
 

Public Types

typedef CVarIndex IndexType
 
typedef CVarIndex SizesType
 
typedef Element ElementType
 

Public Member Functions

 TVarArray ()
 
 TVarArray (const TVarArray &array)
 
void Reset ()
 Removes all elements and set all sizes to 1. More...
 
bool IsDimensionsCountFixed () const
 Check, if number dimensions is fixed. More...
 
int GetDimensionsCount () const
 Get number of dimensions of this array. More...
 
bool SetDimensionsCount (int count)
 Set number of dimensions of this array. More...
 
const SizesTypeGetSizes () const
 Get list of all sizes. More...
 
bool SetSizes (const SizesType &sizes)
 Set list of all sizes. More...
 
int GetSize (int dimension) const
 Get size of array for specified dimension. More...
 
bool SetSize (int dimension, int size)
 Set size of array for specified dimension. More...
 
const Element & GetAt (const IndexType &index) const
 Get element stored at specified index. More...
 
void SetAt (const IndexType &index, const Element &value)
 Set element at specified index. More...
 
void SetAllElements (const Element &value)
 Set some value to all elements. More...
 
Iterator Begin () const
 Get begin value of element access iterator. More...
 
const IteratorEnd () const
 Get end value of element access iterator. More...
 
const Element & operator[] (const IndexType &index) const
 
Element & operator[] (const IndexType &index)
 
int GetElementIndex (const IndexType &index) const
 Get index of element in one dimensional array. More...
 

Protected Member Functions

void UpdateElementsSize ()
 Update size of elements to size changes. More...
 

Detailed Description

template<class Element>
class istd::TVarArray< Element >

Multidimensional array with fixed number of dimensions.

Definition at line 20 of file TVarArray.h.

Member Typedef Documentation

template<class Element >
typedef Element istd::TVarArray< Element >::ElementType

Definition at line 25 of file TVarArray.h.

template<class Element >
typedef CVarIndex istd::TVarArray< Element >::IndexType

Definition at line 23 of file TVarArray.h.

template<class Element >
typedef CVarIndex istd::TVarArray< Element >::SizesType

Definition at line 24 of file TVarArray.h.

Constructor & Destructor Documentation

template<class Element >
istd::TVarArray< Element >::TVarArray ( )

Definition at line 287 of file TVarArray.h.

template<class Element >
istd::TVarArray< Element >::TVarArray ( const TVarArray< Element > &  array)

Definition at line 293 of file TVarArray.h.

Member Function Documentation

template<class Element >
TVarArray< Element >::Iterator istd::TVarArray< Element >::Begin ( ) const

Get begin value of element access iterator.

Please refer to general description of ACF iterators, STL iterators or Qt iterators concept.

Definition at line 231 of file TVarArray.h.

template<class Element >
const TVarArray< Element >::Iterator & istd::TVarArray< Element >::End ( ) const

Get end value of element access iterator.

Please refer to general description of ACF iterators, STL iterators or Qt iterators concept.

Definition at line 238 of file TVarArray.h.

template<class Element >
const Element & istd::TVarArray< Element >::GetAt ( const IndexType index) const
inline

Get element stored at specified index.

Definition at line 205 of file TVarArray.h.

References istd::CVarIndex::IsInside().

template<class Element >
int istd::TVarArray< Element >::GetDimensionsCount ( ) const
inline

Get number of dimensions of this array.

Definition at line 170 of file TVarArray.h.

template<class Element >
int istd::TVarArray< Element >::GetElementIndex ( const IndexType index) const
inline

Get index of element in one dimensional array.

Definition at line 262 of file TVarArray.h.

References istd::CVarIndex::GetDimensionsCount().

template<class Element >
int istd::TVarArray< Element >::GetSize ( int  dimension) const
inline

Get size of array for specified dimension.

Definition at line 195 of file TVarArray.h.

template<class Element >
const TVarArray< Element >::SizesType & istd::TVarArray< Element >::GetSizes ( ) const
inline

Get list of all sizes.

Definition at line 188 of file TVarArray.h.

template<class Element >
bool istd::TVarArray< Element >::IsDimensionsCountFixed ( ) const
inline

Check, if number dimensions is fixed.

It is provided for template implementations. It returns always false.

Definition at line 163 of file TVarArray.h.

template<class Element >
const Element & istd::TVarArray< Element >::operator[] ( const IndexType index) const
inline

Definition at line 245 of file TVarArray.h.

template<class Element >
Element & istd::TVarArray< Element >::operator[] ( const IndexType index)
inline

Definition at line 252 of file TVarArray.h.

template<class Element >
void istd::TVarArray< Element >::Reset ( )

Removes all elements and set all sizes to 1.

Definition at line 301 of file TVarArray.h.

template<class Element >
void istd::TVarArray< Element >::SetAllElements ( const Element &  value)

Set some value to all elements.

Definition at line 335 of file TVarArray.h.

template<class Element >
void istd::TVarArray< Element >::SetAt ( const IndexType index,
const Element &  value 
)
inline

Set element at specified index.

Definition at line 217 of file TVarArray.h.

References istd::CVarIndex::IsInside().

template<class Element >
bool istd::TVarArray< Element >::SetDimensionsCount ( int  count)
inline

Set number of dimensions of this array.

Parameters
countnumber of dimensions will be set.
Returns
always true.

Definition at line 177 of file TVarArray.h.

template<class Element >
bool istd::TVarArray< Element >::SetSize ( int  dimension,
int  size 
)

Set size of array for specified dimension.

Please note, that it can make all elements invalid.

Returns
always true, it is provided for generic implementations.

Definition at line 321 of file TVarArray.h.

template<class Element >
bool istd::TVarArray< Element >::SetSizes ( const SizesType sizes)

Set list of all sizes.

Returns
always true, it is provided for generic implementations.

Definition at line 310 of file TVarArray.h.

template<class Element >
void istd::TVarArray< Element >::UpdateElementsSize ( )
protected

Update size of elements to size changes.

Definition at line 348 of file TVarArray.h.


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

© 2007-2017 Witold Gantzke and Kirill Lepskiy