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

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

#include <vector.h>

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

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

Collaboration graph
[legend]

Public Member Functions

T & at (int index)
 Get object pointer of specified type from fixed vector.
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 * 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 ucommon::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 697 of file vector.h.


Member Function Documentation

template<typename T, vectorsize_t S>
T& ucommon::vectorbuf< T, S >::at ( 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 713 of file vector.h.

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

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

Returns:
first typed object pointer.

Reimplemented from ucommon::Vector.

Definition at line 731 of file vector.h.

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

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

Returns:
last typed object pointer.

Reimplemented from ucommon::Vector.

Definition at line 738 of file vector.h.

template<typename T, vectorsize_t S>
T* ucommon::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 ucommon::Vector.

Definition at line 724 of file vector.h.

template<typename T, vectorsize_t S>
Vector& ucommon::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 ucommon::Vector.

Definition at line 746 of file vector.h.

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

Return a pointer from the vector by array reference.

Parameters:
index of vector member pointer to return.

Reimplemented from ucommon::Vector.

Definition at line 716 of file vector.h.


The documentation for this class was generated from the following file:
Generated on 14 Aug 2013 for UCommon by  doxygen 1.4.7