Main Page | User's Guide | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

Seldon::Vector_Base< T, Allocator > Class Template Reference

Base structure for all vectors. More...

#include <Vector.hxx>

Inheritance diagram for Seldon::Vector_Base< T, Allocator >:

Seldon::Vector< T, Vect_Full, Allocator > List of all members.

Public Types

typedef Allocator::value_type value_type
typedef Allocator::pointer pointer
typedef Allocator::const_pointer const_pointer
typedef Allocator::reference reference
typedef Allocator::const_reference const_reference

Public Member Functions

 Vector_Base ()
 Default constructor.
 Vector_Base (int i)
 Main constructor.
 Vector_Base (Vector_Base< T, Allocator > &A)
 Copy constructor.
 ~Vector_Base ()
 Destructor.
int GetM () const
 Returns the number of elements.
int GetLength () const
 Returns the number of elements.
int GetSize () const
 Returns the number of elements stored.
pointer GetData () const
 Returns a pointer to data_ (stored data).
const_pointer GetDataConst () const
 Returns a const pointer to data_ (stored data).
void * GetDataVoid () const
 Returns a pointer of type "void*" to the data array (data_).
const void * GetDataConstVoid () const
 Returns a pointer of type "const void*" to the data array (data_).

Protected Attributes

int m_
pointer data_

Static Protected Attributes

static Allocator vect_allocator_

Detailed Description

template<class T, class Allocator = SELDON_DEFAULT_ALLOCATOR<T>>
class Seldon::Vector_Base< T, Allocator >

Base structure for all vectors.

It stores data and the vector size. It defines basic methods as well.


Constructor & Destructor Documentation

template<class T, class Allocator>
Seldon::Vector_Base< T, Allocator >::Vector_Base  )  [inline]
 

Default constructor.

Nothing is allocated. Vector length is set to zero.

template<class T, class Allocator>
Seldon::Vector_Base< T, Allocator >::Vector_Base int  i  )  [inline, explicit]
 

Main constructor.

Parameters:
i length.
Warning:
Nothing is allocated.

template<class T, class Allocator>
Seldon::Vector_Base< T, Allocator >::Vector_Base Vector_Base< T, Allocator > &  A  )  [inline]
 

Copy constructor.

Parameters:
A base vector to be copied.
Warning:
Only the length is copied.


Member Function Documentation

template<class T, class Allocator>
Vector_Base< T, Allocator >::pointer Seldon::Vector_Base< T, Allocator >::GetData  )  const
 

Returns a pointer to data_ (stored data).

Returns:
A pointer to the data_, i.e. the data array.

template<class T, class Allocator>
Vector_Base< T, Allocator >::const_pointer Seldon::Vector_Base< T, Allocator >::GetDataConst  )  const
 

Returns a const pointer to data_ (stored data).

Returns:
A const pointer to the data_, i.e. the data array.

template<class T, class Allocator>
const void * Seldon::Vector_Base< T, Allocator >::GetDataConstVoid  )  const
 

Returns a pointer of type "const void*" to the data array (data_).

Returns:
A pointer of type "const void*" to the data array.

template<class T, class Allocator>
void * Seldon::Vector_Base< T, Allocator >::GetDataVoid  )  const
 

Returns a pointer of type "void*" to the data array (data_).

Returns:
A pointer of type "void*" to the data array.

template<class T, class Allocator>
int Seldon::Vector_Base< T, Allocator >::GetLength  )  const
 

Returns the number of elements.

Returns:
The length of the vector.

template<class T, class Allocator>
int Seldon::Vector_Base< T, Allocator >::GetM  )  const
 

Returns the number of elements.

Returns:
The length of the vector.

template<class T, class Allocator>
int Seldon::Vector_Base< T, Allocator >::GetSize  )  const
 

Returns the number of elements stored.

Returns:
The length of the vector stored.


The documentation for this class was generated from the following files:
Generated on Sun Jan 16 23:38:03 2005 for Multivac by  doxygen 1.4.0