Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

base::Array< X > Class Template Reference

Array of X where X is a scalar type (or struct of scalars without constructor or destructor. More...

#include <Array.h>

Inheritance diagram for base::Array< X >:

base::Object List of all members.

Public Member Functions

virtual ~Array ()
virtual void destroy ()
 Wrapper to delete.
Array< X > * copy () const
 Copy (also trunk and reallocate more).
Array< X > * copy (size_t size) const
const X * begin () const
 Simplified iterators.
const X * end () const
X * begin ()
X * end ()
const X & operator[] (size_t index) const
 Standard operators.
X & operator[] (size_t index)
size_t size () const
Array< X > * zero ()
 Set the array to zero.

Static Public Member Functions

static Array< X > * create (size_t size)
 Creation & destruction.

Private Member Functions

 Array (size_t size)

Private Attributes

X * last
first []

Detailed Description

template<class X>
class base::Array< X >

Array of X where X is a scalar type (or struct of scalars without constructor or destructor.

Constructors and destructors of X are not called.


Constructor & Destructor Documentation

template<class X>
virtual base::Array< X >::~Array  )  [inline, virtual]
 

template<class X>
base::Array< X >::Array size_t  size  )  [inline, private]
 


Member Function Documentation

template<class X>
X* base::Array< X >::begin  )  [inline]
 

template<class X>
const X* base::Array< X >::begin  )  const [inline]
 

Simplified iterators.

template<class X>
Array< X > * base::Array< X >::copy size_t  size  )  const [inline]
 

template<class X>
Array<X>* base::Array< X >::copy  )  const [inline]
 

Copy (also trunk and reallocate more).

Postcondition:
New elements = 0.

template<class X>
Array< X > * base::Array< X >::create size_t  size  )  [inline, static]
 

Creation & destruction.

template<class X>
void base::Array< X >::destroy  )  [inline, virtual]
 

Wrapper to delete.

It is virtual in case we have objects that are not deallocated by delete, in which case, the method is overriden.

Reimplemented from base::Object.

template<class X>
X* base::Array< X >::end  )  [inline]
 

template<class X>
const X* base::Array< X >::end  )  const [inline]
 

template<class X>
X & base::Array< X >::operator[] size_t  index  )  [inline]
 

template<class X>
const X & base::Array< X >::operator[] size_t  index  )  const [inline]
 

Standard operators.

template<class X>
size_t base::Array< X >::size  )  const [inline]
 

Returns:
the size of the array.

template<class X>
Array< X > * base::Array< X >::zero  )  [inline]
 

Set the array to zero.


Member Data Documentation

template<class X>
X base::Array< X >::first[] [private]
 

template<class X>
X* base::Array< X >::last [private]
 


The documentation for this class was generated from the following file:
Generated on Fri Jun 30 00:02:30 2006 for Module base by  doxygen 1.4.2