UCommon

vectorbuf< T, S > Class Template Reference

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

#include <vector.h>

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

Public Member Functions

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.
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.
Vectoroperator+ (Vector &vector)
 Concatenate fixed typed vector in an expression.
T & operator[] (int index)
 Return a pointer from the vector by array reference.
 vectorbuf ()
 Construct fixed sized vector object in heap or stack.

Detailed Description

template<typename T, vectorsize_t S>
class 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 686 of file vector.h.


Member Function Documentation

template<typename T , vectorsize_t S>
T* 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 720 of file vector.h.

template<typename T , vectorsize_t S>
T* 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 727 of file vector.h.

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

Get object pointer of specified type from fixed vector.

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

Definition at line 702 of file vector.h.

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

Retrieve a typed member of the fixed vector directly.

Parameters:
positionto retrieve object from.
Returns:
typed object pointer retrieved from vector.

Reimplemented from Vector.

Definition at line 713 of file vector.h.

Here is the call graph for this function:

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

Concatenate fixed typed vector in an expression.

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

Reimplemented from Vector.

Definition at line 735 of file vector.h.

Here is the call graph for this function:

template<typename T , vectorsize_t S>
T& vectorbuf< T, S >::operator[] ( int  index) [inline]

Return a pointer from the vector by array reference.

Parameters:
indexof vector member pointer to return.

Reimplemented from Vector.

Definition at line 705 of file vector.h.

Here is the call graph for this function:


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