Generated on Mon Aug 25 11:35:49 2008 for Gecode by doxygen 1.5.6

Gecode::SharedArray< T > Class Template Reference

Inherits Gecode::SharedHandle.

List of all members.


Detailed Description

template<class T>
class Gecode::SharedArray< T >

Shared array with arbitrary number of elements.

Sharing is implemented by reference counting: the same elements are shared among several objects.

Definition at line 53 of file shared-array.icc.


Public Member Functions

 SharedArray (void)
 Construct as not yet intialized.
 SharedArray (int n)
 Initialize as array with n elements.
void init (int n)
 Initialize as array with n elements.
 SharedArray (const SharedArray &a)
 Initialize from shared array a (share elements).
T & operator[] (int i)
 Access element at position i.
const T & operator[] (int i) const
 Access element at position i.
int size (void) const
 Return number of elements.
Reflection::Argspec (Reflection::VarMap &vm) const
 Return specification for reflection.
 SharedArray (Reflection::VarMap &vm, Reflection::Arg *arg)
 Recreate from specification.

Classes

class  SAO
 Implementation of object for shared arrays. More...

Constructor & Destructor Documentation

template<class T>
Gecode::SharedArray< T >::SharedArray ( void   )  [inline]

Construct as not yet intialized.

The only member functions that can be used on a constructed but not yet initialized shared array is init and the assignment operator.

Definition at line 184 of file shared-array.icc.

template<class T>
Gecode::SharedArray< T >::SharedArray ( int  n  )  [inline]

Initialize as array with n elements.

Definition at line 188 of file shared-array.icc.

template<class T>
Gecode::SharedArray< T >::SharedArray ( const SharedArray< T > &  a  )  [inline]

Initialize from shared array a (share elements).

Definition at line 193 of file shared-array.icc.

template<class T>
Gecode::SharedArray< T >::SharedArray ( Reflection::VarMap vm,
Reflection::Arg arg 
) [inline]

Recreate from specification.

Definition at line 258 of file shared-array.icc.


Member Function Documentation

template<class T>
void Gecode::SharedArray< T >::init ( int  n  )  [inline]

Initialize as array with n elements.

This member function can only be used once and only if the shared array has been constructed with the default constructor.

Definition at line 198 of file shared-array.icc.

template<class T>
T & Gecode::SharedArray< T >::operator[] ( int  i  )  [inline]

Access element at position i.

Definition at line 205 of file shared-array.icc.

template<class T>
const T & Gecode::SharedArray< T >::operator[] ( int  i  )  const [inline]

Access element at position i.

Definition at line 212 of file shared-array.icc.

template<class T>
int Gecode::SharedArray< T >::size ( void   )  const [inline]

Return number of elements.

Definition at line 219 of file shared-array.icc.

template<class T>
Reflection::Arg * Gecode::SharedArray< T >::spec ( Reflection::VarMap vm  )  const [inline]

Return specification for reflection.

Definition at line 246 of file shared-array.icc.


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