WARPXM v1.10.0
Loading...
Searching...
No Matches
WmArrayBase< MAJOR_ORDER_TYPE > Class Template Reference

Defines common interface for variables that are arrays. More...

#include <wmarraybase.h>

Inheritance diagram for WmArrayBase< MAJOR_ORDER_TYPE >:
WmTypeOpaqueArray< MAJOR_ORDER_TYPE > WmTypedArray< _WX_ROW_MAJOR_ORDER, T > WmTypedArray< MAJOR_ORDER_TYPE, T > WmUnstructuredPatchArray< T >

Detailed Description

template<int MAJOR_ORDER_TYPE>
class WmArrayBase< MAJOR_ORDER_TYPE >

Defines common interface for variables that are arrays.

Implies structure to multiple pieces of underlying data. Does not specify element type or provide any element storage or access to elements.

Start values for array coordinates can be arbitrary. i.e. start index does not have to be 0,0,0...

Public Member Functions

const WxRangerange () const
 

Protected Member Functions

 WmArrayBase ()
 Default ctor does not set up array geometry initially, this must be done later.
 
 WmArrayBase (const WxRange &range)
 Array spanning given range object.
 
 WmArrayBase (const WmArrayBase< MAJOR_ORDER_TYPE > &that)
 Copy constructor duplicates the array geometry properties of original one.
 
WmArrayBase< MAJOR_ORDER_TYPE > & operator= (const WmArrayBase< MAJOR_ORDER_TYPE > &that)
 Assignment operator duplicates the array geometry properties of right hand side one.
 
 ~WmArrayBase ()
 Delete object which only describes the array geometry, no array allocation is deleted.
 
void setRange (const WxRange &range)
 Array spanning given range object.
 
unsigned rank () const
 Rank of array.
 

Protected Attributes

WmIndexer< MAJOR_ORDER_TYPE > _indexer
 Indexer assists finding linear position of array elements.
 
WxRange _range
 Range covered by this array.
 

Static Protected Attributes

static const int max_dims = 8
 

Constructor & Destructor Documentation

◆ WmArrayBase() [1/3]

template<int MAJOR_ORDER_TYPE>
WmArrayBase< MAJOR_ORDER_TYPE >::WmArrayBase ( )
inlineprotected

Default ctor does not set up array geometry initially, this must be done later.

◆ WmArrayBase() [2/3]

template<int MAJOR_ORDER_TYPE>
WmArrayBase< MAJOR_ORDER_TYPE >::WmArrayBase ( const WxRange range)
inlineprotected

Array spanning given range object.

Parameters
rangerange spanned by array

◆ WmArrayBase() [3/3]

template<int MAJOR_ORDER_TYPE>
WmArrayBase< MAJOR_ORDER_TYPE >::WmArrayBase ( const WmArrayBase< MAJOR_ORDER_TYPE > &  that)
inlineprotected

Copy constructor duplicates the array geometry properties of original one.

Parameters
thatarray to copy

◆ ~WmArrayBase()

template<int MAJOR_ORDER_TYPE>
WmArrayBase< MAJOR_ORDER_TYPE >::~WmArrayBase ( )
inlineprotected

Delete object which only describes the array geometry, no array allocation is deleted.

Protected because I anticipate programmer error if ever trying to call delete on a pointer to a WmArrayBase and for performance reasons, I did not want to make the destructor virtual.

Member Function Documentation

◆ operator=()

template<int MAJOR_ORDER_TYPE>
WmArrayBase< MAJOR_ORDER_TYPE > & WmArrayBase< MAJOR_ORDER_TYPE >::operator= ( const WmArrayBase< MAJOR_ORDER_TYPE > &  that)
inlineprotected

Assignment operator duplicates the array geometry properties of right hand side one.

Parameters
thatarray to copy
Returns
reference to new array

◆ range()

template<int MAJOR_ORDER_TYPE>
const WxRange & WmArrayBase< MAJOR_ORDER_TYPE >::range ( ) const
inline

◆ rank()

template<int MAJOR_ORDER_TYPE>
unsigned WmArrayBase< MAJOR_ORDER_TYPE >::rank ( ) const
inlineprotected

Rank of array.

◆ setRange()

template<int MAJOR_ORDER_TYPE>
void WmArrayBase< MAJOR_ORDER_TYPE >::setRange ( const WxRange range)
inlineprotected

Array spanning given range object.

Parameters
rangerange spanned by array

Member Data Documentation

◆ _indexer

template<int MAJOR_ORDER_TYPE>
WmIndexer<MAJOR_ORDER_TYPE> WmArrayBase< MAJOR_ORDER_TYPE >::_indexer
protected

Indexer assists finding linear position of array elements.

◆ _range

template<int MAJOR_ORDER_TYPE>
WxRange WmArrayBase< MAJOR_ORDER_TYPE >::_range
protected

Range covered by this array.

(start indices do not have to be zero)

◆ max_dims

template<int MAJOR_ORDER_TYPE>
const int WmArrayBase< MAJOR_ORDER_TYPE >::max_dims = 8
staticprotected

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