Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

CODEX_ASN1::Array< T > Class Template Reference

Serializable representation of an array of serializable objects. More...

#include <Array.h>

Inheritance diagram for CODEX_ASN1::Array< T >:

Inheritance graph
[legend]
Collaboration diagram for CODEX_ASN1::Array< T >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef T ValueType
 template argument -- useful when using typedefs

typedef vector< T * > ArrayType
 internal representation of the array

typedef ArrayType::const_iterator ArrayItr
 iterator to the elements of the array


Public Methods

 Array ()
 Default constructor, for creating an object to be filled or unmarshalled.

 Array (const Array &aArr)
 Create an Array from another Array.

virtual ~Array ()
 Destructor -- frees the objects held.

void operator= (const Array &aArr)
 Assignment operator-- deep copy.

unsigned int size () const
 
Returns:
length of the array


const T * element (unsigned int i) const
 
Returns:
element i of the array


ArrayItr begin () const
 
Returns:
iterator to the beginning of the array


ArrayItr end () const
 
Returns:
iterator to the end of the array


void append (T *item)
 
Parameters:
item  New item to add to the array, taking ownership


int marshal (unsigned char **pp) const
 This function creates a serialized representation of the object, which is returned through the argument pp.

void * unmarshal (void *bogus, unsigned char **pp, long length)
 This function takes a serialized representation of the object and recreates the object representation.


Detailed Description

template<class T>
class CODEX_ASN1::Array< T >

Serializable representation of an array of serializable objects.

Definition at line 31 of file Array.h.


Member Function Documentation

template<class T>
int CODEX_ASN1::Array< T >::marshal unsigned char **    pp const [inline, virtual]
 

This function creates a serialized representation of the object, which is returned through the argument pp.

This must be overridden by the concrete derived class.

Parameters:
pp  Serialized form of the object
Returns:
Length of the marshalled data

Implements CODEX_ASN1::Base.

Definition at line 113 of file Array.h.

template<class T>
void* CODEX_ASN1::Array< T >::unmarshal void *    bogus,
unsigned char **    pp,
long    length
[inline, virtual]
 

This function takes a serialized representation of the object and recreates the object representation.

This must be overridden by the concrete derived class.

Parameters:
bogus  Included for compatibility with OpenSSL ASN.1 macros
pp  Serialized form of the data
length  Number of bytes of pp to unmarshal
Returns:
success or failure of the unmarshalling

Implements CODEX_ASN1::Base.

Definition at line 139 of file Array.h.


The documentation for this class was generated from the following file:
Generated on Wed Jun 2 16:33:02 2004 for COrnell Data EXchange (CODEX) by doxygen1.2.18