Clarisse 4.0 SP4b SDK  4.0.0.0.4.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
CoreArray< T > Class Template Reference
Inheritance diagram for CoreArray< T >:
CoreBasicArray< T > CoreBaseType

Public Member Functions

 CoreArray ()
 
 CoreArray (const T *data, unsigned int size)
 
 CoreArray (const CoreArray< T > &other)
 
 CoreArray (CoreArray< T > &&other)
 
 CoreArray (std::initializer_list< T > list)
 
 CoreArray (const unsigned int &size)
 
 ~CoreArray ()
 
void append (const CoreBasicArray< T > &other)
 
void append (CoreBasicArray< T > &&other)
 
const unsigned int & get_count () const
 
void remove_all ()
 
void resize (const unsigned int &size)
 
void resize (const unsigned int &size, const bool &preserve)
 
void resize (const unsigned int &size, const CoreArrayResizeMode &mode)
 
void copy_from (const CoreBasicArray< T > &other)
 
void copy_from (const CoreList< T > &list)
 
void copy_to (CoreArray< T > &dest) const
 
void get_list (CoreList< T > &list) const
 
void set_list (const CoreList< T > &list)
 
T & operator[] (const unsigned int &index)
 
const T & operator[] (const unsigned int &index) const
 
CoreArray< T > & operator= (const CoreArray< T > &other)
 
CoreArray< T > & operator= (CoreArray< T > &&other)
 
const T * get_data () const
 
T * get_data ()
 
size_t get_memory_size () const
 
const CoreClassInfoget_class_info () const
 
- Public Member Functions inherited from CoreBasicArray< T >
 CoreBasicArray ()
 Empty constructor.
 
 CoreBasicArray (T *array, const unsigned int &count)
 Default constructor.
 
 CoreBasicArray (const CoreBasicArray< T > &src)
 Copy constructor.
 
 CoreBasicArray (CoreBasicArray< T > &&src) noexcept
 Move constructor.
 
- Public Member Functions inherited from CoreBaseType
bool is_kindof (const CoreClassInfo &cinfo) const
 
bool operator== (const CoreBaseType &obj) const
 

Static Public Member Functions

static const CoreClassInfoclass_info ()
 
static bool ___class_destructor__ (void *instance, const bool &is_array)
 

Additional Inherited Members

- Static Public Attributes inherited from CoreBasicArray< T >
static constexpr unsigned int INVALID_INDEX = CORE_INVALID_INDEX
 For backward compatibility. Use CORE_INVALID_INDEX instead.
 

Constructor & Destructor Documentation

template<class T >
CoreArray< T >::CoreArray ( )
inline

Default constructor.

template<class T>
CoreArray< T >::CoreArray ( const T *  data,
unsigned int  size 
)
inline

Default constructor.

template<class T>
CoreArray< T >::CoreArray ( const CoreArray< T > &  other)
inline

Copy constructor.

Parameters
[in]otherarray to copy
template<class T>
CoreArray< T >::CoreArray ( CoreArray< T > &&  other)
inline

Move constructor.

Parameters
[in]otherarray to move
template<class T>
CoreArray< T >::CoreArray ( std::initializer_list< T >  list)
inline

Initializer list constructor.

template<class T>
CoreArray< T >::CoreArray ( const unsigned int &  size)
inlineexplicit

Create an array with the given size.

Parameters
[in]sizesize of the array
template<class T >
CoreArray< T >::~CoreArray ( )

Destructor.

Member Function Documentation

template<class T>
void CoreArray< T >::append ( const CoreBasicArray< T > &  other)

Append the given array to this array.

The array data is reallocated and resized to receive the values of the other array. If the array to be appended is empty, the data isn't reallocated nor resized.

Parameters
[in]otherarray to append
template<class T>
void CoreArray< T >::append ( CoreBasicArray< T > &&  other)

Append the given array to this array by moving it.

The array data is reallocated and resized to receive the values of the other array. If the array to be appended is empty, the data isn't reallocated nor resized.

Parameters
[in]otherarray to append, emptied after moved
template<class T>
void CoreArray< T >::copy_from ( const CoreBasicArray< T > &  other)

Copy the given array into this array.

Parameters
[in]otherarray to copy
template<class T>
void CoreArray< T >::copy_from ( const CoreList< T > &  list)

Copy the given CoreList into this array

Parameters
[in]listsource list
template<class T>
void CoreArray< T >::get_list ( CoreList< T > &  list) const

Return the array as a CoreList.

Parameters
[out]listdestination list
template<class T >
size_t CoreArray< T >::get_memory_size ( void  ) const

Return the number of bytes used by the array and it's content.

Returns
memory size in bytes
template<class T >
void CoreArray< T >::resize ( const unsigned int &  size,
const bool &  preserve 
)

Resize the array to the specified size.

Parameters
[in]sizenew size of the array
[in]perserveif true, previous content will be kept after the resize
template<class T >
void CoreArray< T >::resize ( const unsigned int &  size,
const CoreArrayResizeMode &  mode 
)

Resize the array to the specified size.

Parameters
[in]sizenew size of the array
[in]modetells which part of the data has to be kept: none, left or right
template<class T>
void CoreArray< T >::set_list ( const CoreList< T > &  list)

Set the array from a CoreList.

Parameters
[in]listsource list