Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | List of all members
om::util::StaticArray< T, size > Class Template Reference

A class that provides a safe wrapper for statically-sized arrays. More...

#include <omStaticArray.h>

Public Member Functions

 StaticArray ()
 Create an empty static array with all elements default initialized. More...
 
 StaticArray (const T &prototype)
 Create a static array with all elements initialized to some prototype value. More...
 
 StaticArray (const T *newArray)
 Create a static array with elements from the specified pointer. More...
 
template<typename U >
 StaticArray (const U *newArray)
 Create a static array with elements from the specified pointer of a different type. More...
 
 StaticArray (const StaticArray &other)
 Create a copy of the specified static array. More...
 
template<typename U >
 StaticArray (const StaticArray< U, size > &other)
 Create a copy of the specified static array with different data type. More...
 
StaticArrayoperator= (const StaticArray &other)
 Assign the contents of another static array to this one. More...
 
template<typename U >
StaticArrayoperator= (const StaticArray< U, size > &other)
 Assign the contents of another static array with different element type to this one. More...
 
 ~StaticArray ()
 Destroy an static array object, destroying all elements that it contains. More...
 
T * getPointer ()
 Return a pointer to this static array's internal array pointer. More...
 
const T * getPointer () const
 Return a const pointer to this static array's internal array pointer. More...
 
 operator T * ()
 Convert this static array to a const pointer to its first element. More...
 
 operator const T * () const
 Convert this static array to a const pointer to its first element. More...
 
Bool operator== (const StaticArray &other) const
 Return whether or not every element in this Static Array is equal to another's elements. More...
 
Bool operator!= (const StaticArray &other) const
 Return whether or not every element in this Static Array is not equal to another's elements. More...
 
template<Size otherSize>
StaticArray< T, size+otherSize > operator+ (const StaticArray< T, otherSize > &other) const
 Apend the contents of this static array to another and return the result. More...
 
Size getSize () const
 Return the number of elements in this static array. More...
 
void setAll (const T &prototype)
 Set all of the values in this array to the specified value. More...
 

Detailed Description

template<class T, Size size>
class om::util::StaticArray< T, size >

A class that provides a safe wrapper for statically-sized arrays.

Constructor & Destructor Documentation

template<class T, Size size>
om::util::StaticArray< T, size >::StaticArray ( )
inline

Create an empty static array with all elements default initialized.

template<class T, Size size>
om::util::StaticArray< T, size >::StaticArray ( const T &  prototype)
inlineexplicit

Create a static array with all elements initialized to some prototype value.

template<class T, Size size>
om::util::StaticArray< T, size >::StaticArray ( const T *  newArray)
inlineexplicit

Create a static array with elements from the specified pointer.

template<class T, Size size>
template<typename U >
om::util::StaticArray< T, size >::StaticArray ( const U *  newArray)
inlineexplicit

Create a static array with elements from the specified pointer of a different type.

template<class T, Size size>
om::util::StaticArray< T, size >::StaticArray ( const StaticArray< T, size > &  other)
inline

Create a copy of the specified static array.

template<class T, Size size>
template<typename U >
om::util::StaticArray< T, size >::StaticArray ( const StaticArray< U, size > &  other)
inline

Create a copy of the specified static array with different data type.

template<class T, Size size>
om::util::StaticArray< T, size >::~StaticArray ( )
inline

Destroy an static array object, destroying all elements that it contains.

Member Function Documentation

template<class T, Size size>
StaticArray& om::util::StaticArray< T, size >::operator= ( const StaticArray< T, size > &  other)
inline

Assign the contents of another static array to this one.

template<class T, Size size>
template<typename U >
StaticArray& om::util::StaticArray< T, size >::operator= ( const StaticArray< U, size > &  other)
inline

Assign the contents of another static array with different element type to this one.

template<class T, Size size>
T* om::util::StaticArray< T, size >::getPointer ( )
inline

Return a pointer to this static array's internal array pointer.

template<class T, Size size>
const T* om::util::StaticArray< T, size >::getPointer ( ) const
inline

Return a const pointer to this static array's internal array pointer.

template<class T, Size size>
om::util::StaticArray< T, size >::operator T * ( )
inline

Convert this static array to a const pointer to its first element.

template<class T, Size size>
om::util::StaticArray< T, size >::operator const T * ( ) const
inline

Convert this static array to a const pointer to its first element.

template<class T, Size size>
Bool om::util::StaticArray< T, size >::operator== ( const StaticArray< T, size > &  other) const
inline

Return whether or not every element in this Static Array is equal to another's elements.

template<class T, Size size>
Bool om::util::StaticArray< T, size >::operator!= ( const StaticArray< T, size > &  other) const
inline

Return whether or not every element in this Static Array is not equal to another's elements.

template<class T, Size size>
template<Size otherSize>
StaticArray< T, size + otherSize > om::util::StaticArray< T, size >::operator+ ( const StaticArray< T, otherSize > &  other) const
inline

Apend the contents of this static array to another and return the result.

template<class T, Size size>
Size om::util::StaticArray< T, size >::getSize ( ) const
inline

Return the number of elements in this static array.

template<class T, Size size>
void om::util::StaticArray< T, size >::setAll ( const T &  prototype)
inline

Set all of the values in this array to the specified value.


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