Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File 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 Member Functions

 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
 Length of the array.
const T * element (unsigned int i) const
 Element i of the array.
ArrayItr begin () const
 Iterator to the beginning of the array.
ArrayItr end () const
 Iterator to the end of the array.
void append (T *item)
 Add item 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.
bool initialized () const

Protected Attributes

bool m_initialized
 Has this object been initialized yet, or is it still blank?

Detailed Description

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

Serializable representation of an array of serializable objects.

Definition at line 34 of file Array.h.


Member Function Documentation

bool CODEX_ASN1::Base::initialized  )  const [inline, inherited]
 

Returns:
Has this object been initialized?

Definition at line 175 of file Base.h.

References CODEX_ASN1::Base::m_initialized.

Referenced by CODEX_APSS::SecretManagement::addComputeMsg(), CODEX_APSS::SecretManagement::addEstablishMsg(), CODEX_APSS::SecretManagement::addEstablishResponse(), CODEX_APSS::SecretManagement::addInitMsg(), CODEX_APSS::SecretManagement::addSharing(), CODEX_APSS::SecretManagement::addSubsharing(), CODEX_VSS::Combinatoric< NumT, ThreshT >::apply(), CODEX_Server::ServerState::caKey(), CODEX_KeyService::ClientCreateCallback::ClientCreateCallback(), CODEX_VSS::Combinatoric< NumT, ThreshT >::count(), CODEX_Server::QuorumBuilderAct::handler(), CODEX_APSS::MessageVerifier::handler(), CODEX_KeyService::DelegateResponseVerifier::handler(), CODEX_KeyService::DelegateRequestDistributor::handler(), CODEX_KeyService::ClientMessageVerifier::handler(), CODEX_KeyService::ClientMessageSigner::handler(), CODEX_VSS::SubshareLabel< LabelType >::marshal(), CODEX_KeyService::KeyInfo::marshal(), CODEX_VSS::LabeledShare< ShareType, OneWay >::marshal(), CODEX_VSS::ShareLabel< _ShareType, _OneWay >::marshal(), CODEX_VSS::ModExpFunctionalArgs::marshal(), CODEX_VSS::Combinatoric< NumT, ThreshT >::marshal(), CODEX_KeyService::SignWriteCallback::operator()(), CODEX_KeyService::SignReadCallback::operator()(), CODEX_KeyService::SignCreateCallback::operator()(), CODEX_VSS::ModExpFunctional::operator()(), CODEX_KeyService::ClientReadCallback::operator()(), CODEX_KeyService::ClientCreateCallback::operator()(), CODEX_VSS::Combinatoric< NumT, ThreshT >::operator+=(), CODEX_Server::ServerState::readElGamalShares(), CODEX_VSS::Combinatoric< NumT, ThreshT >::recover(), CODEX_APSS::SecretManagement::sendFinished(), CODEX_Server::ServerState::serviceKey(), CODEX_Server::ServerState::setEGShareCallback(), and CODEX_Server::ServerState::setRSAShareCallback().

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 116 of file Array.h.

Referenced by CODEX_KeyService::SupportedKeyStoredMsg::marshal(), CODEX_KeyService::SupportedClientResponse< RespType, ReqType >::marshal(), CODEX_Ciphers::RSAPlaintextPK::marshal(), CODEX_APSS::FinishedMsg::marshal(), CODEX_APSS::ContributeMsg::marshal(), CODEX_Ciphers::RSAPlaintextPK::RSAPlaintextPK(), and CODEX_Ciphers::RSAPlaintextPK::verify().

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 142 of file Array.h.

Referenced by CODEX_KeyService::SupportedKeyStoredMsg::unmarshal(), CODEX_KeyService::SupportedClientResponse< RespType, ReqType >::unmarshal(), CODEX_Ciphers::RSAPlaintextPK::unmarshal(), CODEX_APSS::FinishedMsg::unmarshal(), and CODEX_APSS::ContributeMsg::unmarshal().


The documentation for this class was generated from the following file:
Generated on Fri May 6 17:41:46 2005 for COrnell Data EXchange (CODEX) by  doxygen 1.4.1