ucc::vectorbuf< T, S > Class Template Reference

Allocated vector list of a specified type. More...

#include <vector.h>

Inheritance diagram for ucc::vectorbuf< T, S >:

Inheritance graph
[legend]
Collaboration diagram for ucc::vectorbuf< T, S >:

Collaboration graph
[legend]

Public Member Functions

 vectorbuf ()
 Construct fixed sized vector object in heap or stack.
T * get (int index)
 Get object pointer of specified type from fixed vector.
T * operator() (vectorsize_t position)
 Retrieve a typed member of the fixed vector directly.
T * begin (void)
 Get the first typed object pointer contained in the fixed vector.
T * end (void)
 Get the last typed object pointer contained in the fixed vector.
Vectoroperator+ (Vector &vector)
 Concatenate fixed typed vector in an expression.

Detailed Description

template<class T, vectorsize_t S>
class ucc::vectorbuf< T, S >

Allocated vector list of a specified type.

This analogous to the stringbuf class and allows one to create a vector with it's member list as a single object that can live in the heap or that can be created at once and used as a auto variable.

Author:
David Sugar <dyfet@gnutelephony.org>

Definition at line 650 of file vector.h.


Member Function Documentation

template<class T , vectorsize_t S>
T* ucc::vectorbuf< T, S >::begin ( void   )  [inline]

Get the first typed object pointer contained in the fixed vector.

Returns:
first typed object pointer.

Definition at line 681 of file vector.h.

template<class T , vectorsize_t S>
T* ucc::vectorbuf< T, S >::end ( void   )  [inline]

Get the last typed object pointer contained in the fixed vector.

Returns:
last typed object pointer.

Definition at line 688 of file vector.h.

template<class T , vectorsize_t S>
T* ucc::vectorbuf< T, S >::get ( int  index  )  [inline]

Get object pointer of specified type from fixed vector.

Parameters:
index of typed member to return, < 0 to use from end of list.
Returns:
typed object pointer of member.

Definition at line 666 of file vector.h.

template<class T , vectorsize_t S>
T* ucc::vectorbuf< T, S >::operator() ( vectorsize_t  position  )  [inline]

Retrieve a typed member of the fixed vector directly.

Parameters:
position to retrieve object from.
Returns:
typed object pointer retrieved from vector.

Reimplemented from ucc::Vector.

Definition at line 674 of file vector.h.

template<class T , vectorsize_t S>
Vector& ucc::vectorbuf< T, S >::operator+ ( Vector vector  )  [inline]

Concatenate fixed typed vector in an expression.

Parameters:
vector to concatenate.
Returns:
effective object to continue in expression.

Reimplemented from ucc::Vector.

Definition at line 696 of file vector.h.


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

Generated on Wed May 13 08:42:20 2009 for UCommon by  doxygen 1.5.7.1