MDArray< TYPE > Class Template Reference

#include <c4d_baseeffectordata.h>

Detailed Description

template<class TYPE>
class MDArray< TYPE >

Template array class used for arrays filled by MoData.

Public Member Functions

 MDArray ()
 
 MDArray (TYPE *array_pointer, Int32 array_count, TYPE default_value)
 
 ~MDArray ()
 
void Fill (const TYPE &default_value)
 
 operator TYPE * ()
 
 operator const TYPE * () const
 
TYPEGetPointer ()
 
const TYPEGetPointer () const
 
Bool operator! () const
 
TYPEoperator[] (Int32 i)
 
const TYPEoperator[] (Int32 i) const
 
TYPEoperator[] (Int64 i)
 
const TYPEoperator[] (Int64 i) const
 

Private Attributes

TYPEptr
 
TYPE dv
 
Int count
 

Constructor & Destructor Documentation

◆ MDArray() [1/2]

MDArray ( )

Default constructor.

◆ MDArray() [2/2]

MDArray ( TYPE array_pointer,
Int32  array_count,
TYPE  default_value 
)

Constructor with the array pointer and the default value.

Parameters
[in]array_pointerThe array pointer.
[in]array_countThe number of elements in array_pointer.
[in]default_valueThe default value.

◆ ~MDArray()

~MDArray ( )

Default destructor.

Member Function Documentation

◆ Fill()

void Fill ( const TYPE default_value)

Fills the elements of the array with default_value.

Parameters
[in]default_valueThe value to fill with.

◆ operator TYPE *()

operator TYPE * ( )

Conversion operator.

◆ operator const TYPE *()

operator const TYPE * ( ) const

◆ GetPointer() [1/2]

TYPE* GetPointer ( )

Gets the array pointer.

Returns
The array pointer.

◆ GetPointer() [2/2]

const TYPE* GetPointer ( ) const

Gets the const array pointer.

Returns
The array pointer.

◆ operator!()

Bool operator! ( ) const

Checks if the array contains any elements.

Returns
true if the array is empty, otherwise false.

◆ operator[]() [1/4]

TYPE& operator[] ( Int32  i)

Array access operator.

Parameters
[in]iThe element index in the array.
Returns
The element reference at i in the array.

◆ operator[]() [2/4]

const TYPE& operator[] ( Int32  i) const

Const array access operator.

Parameters
[in]iThe element index in the array.
Returns
The element reference at i in the array.

◆ operator[]() [3/4]

TYPE& operator[] ( Int64  i)

Array access operator.

Parameters
[in]iThe element index in the array.
Returns
The element reference at i in the array.

◆ operator[]() [4/4]

const TYPE& operator[] ( Int64  i) const

Const array access operator.

Parameters
[in]iThe element index in the array.
Returns
The element reference at i in the array.

Member Data Documentation

◆ ptr

TYPE* ptr
private

◆ dv

TYPE dv
mutableprivate

◆ count

Int count
private