Murl::SharedArray< DataType > Class Template Reference

A proxy class contaning a shared pointer to an array. More...

#include "murl_shared_array.h"

Public Types

typedef DataType ValueType
 The template parameter value type. More...
 
typedef Array< DataType > ArrayType
 The array type definition.
 

Public Member Functions

 SharedArray ()
 Forward to Array::Array() constructor.
 
 SharedArray (const DataType &item)
 Forward to Array::Array(const DataType& item) constructor.
 
 SharedArray (const DataType &item1, const DataType &item2)
 Forward to Array::Array(const DataType& item1, const DataType& item2) constructor.
 
 SharedArray (const DataType &item1, const DataType &item2, const DataType &item3)
 Forward to Array::Array(const DataType& item1, const DataType& item2, const DataType& item3) constructor.
 
void Clear ()
 Forward to Array::Clear() method.
 
void Empty ()
 Forward to Array::Empty() method.
 
void Shrink ()
 Forward to Array::Shrink() method.
 
Bool Trim (SInt32 n)
 Forward to Array::Trim() method.
 
Bool Drop (SInt32 n=1)
 Forward to Array::Drop() method.
 
void Reserve (SInt32 n)
 Forward to Array::Reserve() method.
 
Bool SetCount (SInt32 n)
 Forward to Array::SetCount(SInt32 n) method.
 
Bool SetCount (SInt32 n, const DataType &item)
 Forward to Array::SetCount(SInt32 n, const DataType& item) method.
 
Bool SetCountAndReserve (SInt32 n)
 Forward to Array::SetCountAndReserve(SInt32 n) method.
 
Bool SetCountAndReserve (SInt32 n, const DataType &item)
 Forward to Array::SetCountAndReserve(SInt32 n, const DataType& item) method.
 
DataType & Set (SInt32 index, const DataType &item)
 Forward to Array::Set(SInt32 index, const DataType& item) method.
 
Bool Set (SInt32 index, const DataType &item, SInt32 count)
 Forward to Array::Set(SInt32 index, const DataType& item, SInt32 count) method.
 
void Fill (const DataType &item)
 Forward to Array::Fill() method.
 
void Swap (SInt32 index1, SInt32 index2)
 Forward to Array::Swap() method.
 
DataType & Add ()
 Forward to Array::Add() method.
 
DataType & Add (const DataType &item)
 Forward to Array::Add(const DataType& item) method.
 
void AddN (SInt32 count)
 Forward to Array::AddN() method.
 
Bool Add (const SharedArray &other)
 Forward to Array::Add(const Array& other) method.
 
Bool Add (const SharedArray &other, int offset, int count)
 Forward to Array::Add(const Array& other, int offset, int count) method.
 
DataType & Insert (SInt32 index)
 Forward to Array::Insert(SInt32 index) method.
 
DataType & Insert (SInt32 index, const DataType &item)
 Forward to Array::Insert(SInt32 index, const DataType& item) method.
 
Bool Insert (SInt32 index, const DataType &item, SInt32 count)
 Forward to Array::Insert(SInt32 index, const DataType& item, SInt32 count) method.
 
Bool InsertN (SInt32 index, SInt32 count=1)
 Forward to Array::InsertN(SInt32 index, SInt32 count = 1) method.
 
Bool Insert (SInt32 index, const SharedArray &other)
 Forward to Array::Insert(SInt32 index, const Array& other) method.
 
Bool Insert (SInt32 index, const SharedArray &other, SInt32 offset, SInt32 count)
 Forward to Array::Insert(SInt32 index, const Array& other, SInt32 offset, SInt32 count) method.
 
Bool Remove (SInt32 index, SInt32 count=1)
 Forward to Array::Remove(SInt32 index, SInt32 count = 1) method.
 
void Remove (const SInt32 *sortedIndices, SInt32 count)
 Forward to Array::Remove(const SInt32* sortedIndices, SInt32 count) method.
 
void Remove (const SInt32Array &sortedIndices)
 Forward to Array::Remove(const SInt32Array& sortedIndices) method.
 
SInt32 Find (const DataType &item) const
 Forward to Array::Find(const DataType& item) const method.
 
SInt32 Find (const DataType &item, SInt32 firstIndex) const
 Forward to Array::Find(const DataType& item, SInt32 firstIndex) const method.
 
SInt32 FindLast (const DataType &item) const
 Forward to Array::FindLast(const DataType& item) const method.
 
SInt32 FindLast (const DataType &item, SInt32 lastIndex) const
 Forward to Array::FindLast(const DataType& item, SInt32 lastIndex) const method.
 
DataType & Bottom ()
 Forward to Array::Bottom() method.
 
const DataType & Bottom () const
 Forward to Array::Bottom() const method.
 
DataType & Top ()
 Forward to Array::Top() method.
 
const DataType & Top () const
 Forward to Array::Top() const method.
 
DataType Pop ()
 Forward to Array::Pop() method.
 
DataType & At (SInt32 index)
 Forward to Array::At(SInt32 index) method.
 
DataType & At (SInt32 index, const DataType &item)
 Forward to Array::At(SInt32 index, const DataType& item) method.
 
SInt32 GetCount () const
 Forward to Array::GetCount() method.
 
Bool IsEmpty () const
 Forward to Array::IsEmpty() method.
 
SInt32 GetAlloc () const
 Forward to Array::GetAlloc() method.
 
Bool IsEqual (const SharedArray &other) const
 Forward to Array::IsEqual() method.
 
bool operator== (const SharedArray &rhs) const
 Forward to Array::operator==() method.
 
bool operator!= (const SharedArray &rhs) const
 Forward to Array::operator!=() method.
 
DataType & operator[] (SInt32 index)
 Forward to Array::operator[](SInt32 index) method.
 
const DataType & operator[] (SInt32 index) const
 Forward to Array::operator[](SInt32 index) const method.
 
DataType & Get (SInt32 index)
 Forward to Array::Get(SInt32 index) method.
 
const DataType & Get (SInt32 index) const
 Forward to Array::Get(SInt32 index) const method.
 
 operator DataType * ()
 Forward to Array::operator DataType*() method.
 
 operator const DataType * () const
 Forward to Array::operator const DataType*() method.
 
UInt32 GetByteSize () const
 Forward to Array::GetByteSize() method.
 
ArrayType::ConstIterator Begin () const
 Forward to Array::Begin() const method.
 
ArrayType::ConstIterator End () const
 Forward to Array::End() const method.
 
ArrayType::ConstIterator GetIter (SInt32 index) const
 Forward to Array::GetIter(SInt32 index) const method.
 
SInt32 GetIterIndex (typename ArrayType::ConstIterator iterator) const
 Forward to Array::GetIterIndex() method.
 
ArrayType::Iterator Begin ()
 Forward to Array::Begin() method.
 
ArrayType::Iterator End ()
 Forward to Array::End() method.
 
ArrayType::Iterator GetIter (SInt32 index)
 Forward to Array::GetIter(SInt32 index) method.
 
ArrayType GetArray () const
 Get a copy of the internal Array object. More...
 
 operator ArrayType & () const
 Conversion operator to the internal Array object. More...
 
ArrayTypeoperator-> () const
 Dereference operator to the internal Array object. More...
 
 SharedArray (const ArrayType &array)
 Copy constructor taking an Array object. More...
 
 SharedArray (const SharedArray &array)
 Copy constructor taking a shared array object. More...
 
void operator= (const SharedArray &array)
 The assignment operator copying the internal Array. More...
 

Detailed Description

template<class DataType>
class Murl::SharedArray< DataType >

A proxy class contaning a shared pointer to an array.

The copy constructor copies the object itself (the shared pointer). The assignment operator copies the content of the object.

See Murl::Array for method documentation.

Template Parameters
DataTypeThe value's data type of the array.

Member Typedef Documentation

◆ ValueType

template<class DataType>
typedef DataType Murl::SharedArray< DataType >::ValueType

The template parameter value type.

Constructor & Destructor Documentation

◆ SharedArray() [1/2]

template<class DataType>
Murl::SharedArray< DataType >::SharedArray ( const ArrayType array)
inline

Copy constructor taking an Array object.

Parameters
arrayThe array to copy.

◆ SharedArray() [2/2]

template<class DataType>
Murl::SharedArray< DataType >::SharedArray ( const SharedArray< DataType > &  array)
inlineexplicit

Copy constructor taking a shared array object.

Parameters
arrayThe shared array to share.

Member Function Documentation

◆ GetArray()

template<class DataType>
ArrayType Murl::SharedArray< DataType >::GetArray ( ) const
inline

Get a copy of the internal Array object.

Returns
A copy of the array object.

◆ operator ArrayType &()

template<class DataType>
Murl::SharedArray< DataType >::operator ArrayType & ( ) const
inline

Conversion operator to the internal Array object.

Returns
A reference to the array object.

◆ operator->()

template<class DataType>
ArrayType* Murl::SharedArray< DataType >::operator-> ( ) const
inline

Dereference operator to the internal Array object.

Returns
A pointer to the array object.

◆ operator=()

template<class DataType>
void Murl::SharedArray< DataType >::operator= ( const SharedArray< DataType > &  array)
inline

The assignment operator copying the internal Array.

Parameters
arrayThe shared array object to assign.

The documentation for this class was generated from the following file:
  • murl_shared_array.h


Copyright © 2011-2018 Spraylight GmbH.