OSB_LIB::Asn1Buffer Class Reference

Collaboration diagram for OSB_LIB::Asn1Buffer:

Collaboration graph
[legend]
List of all members.

Detailed Description

Buffer to store encoded data of one ASN.1 type.

Definition at line 121 of file asn1writer.h.

Public Member Functions

Private Types

Private Member Functions

Private Attributes

Friends


Member Typedef Documentation

typedef std::list<Asn1Buffer*> OSB_LIB::Asn1Buffer::Members [private]

STL container to store subtypes.

Definition at line 131 of file asn1writer.h.


Constructor & Destructor Documentation

OSB_LIB::Asn1Buffer::Asn1Buffer ( Asn1BufferCache cache  ) 

Constructor with cache that owns the buffer.

OSB_LIB::Asn1Buffer::~Asn1Buffer (  )  [private]

Destructor: force creation on the heap.

OSB_LIB::Asn1Buffer::Asn1Buffer ( const Asn1Buffer  )  [private]

Prevent copying until needed: not implemented.


Member Function Documentation

void OSB_LIB::Asn1Buffer::add ( const Asn1DataEncoder encoder,
bool  force = false 
)

Add a primitive ASN.1 type.

Parameters:
encoder Encode to use to get the data.
force Flag to add the ASN.1 type even if it has no data.
Calls operator() of encoder with data_.

void OSB_LIB::Asn1Buffer::add ( const Asn1Encoder encoder,
bool  force = false 
)

Add a constructed ASN.1 type.

Parameters:
encoder Encode to use to get the data.
force Flag to add the ASN.1 type even if it has no data.
Calls operator() of encoder with itself.

void OSB_LIB::Asn1Buffer::clearData (  ) 

Clear the data of the buffer.

Returns the content of members_ to the cache_.

For performance reasons only data_ and members_ are cleared, but not the other data members.

void OSB_LIB::Asn1Buffer::destroy (  ) 

Destroy the buffer.

bool OSB_LIB::Asn1Buffer::getData ( const Asn1DataEncoder encoder,
bool  force 
) [private]

Get the data of a primitive ASN.1 type.

Parameters:
encoder Encode to use to get the data.
force Flag to add the ASN.1 type even if it has no data.
Returns:
true if ASN.1 data have been generated, else false.
Calls operator() of encoder with data_.

bool OSB_LIB::Asn1Buffer::getData ( const Asn1Encoder encoder,
bool  force 
) [private]

Get the data of a constructed ASN.1 type.

Parameters:
encoder Encode to use to get the data.
force Flag to add the ASN.1 type even if it has no data.
Returns:
true if ASN.1 data have been generated, else false.
Calls operator() of encoder with itself.

size_t OSB_LIB::Asn1Buffer::memberSize (  )  const [private]

Number of bytes of the members_.

Asn1Buffer& OSB_LIB::Asn1Buffer::operator= ( const Asn1Buffer  )  [private]

Prevent assignment until needed: not implemented.

bool OSB_LIB::Asn1Buffer::write ( FILE *  out  )  const

Write binary ASN.1 data to an output file.

Returns:
true if successful, else false.


Friends And Related Function Documentation

friend class Asn1BufferCache [friend]

Give access to totSize_.

Definition at line 129 of file asn1writer.h.

friend class Asn1Writer [friend]

Allow the ASN.1 writer to:

Definition at line 127 of file asn1writer.h.


Member Data Documentation

Asn1BufferCache& OSB_LIB::Asn1Buffer::cache_ [private]

Cache that owns the buffer.

Definition at line 246 of file asn1writer.h.

Asn1Data OSB_LIB::Asn1Buffer::data_ [private]

Binary ASN.1 data.

Definition at line 234 of file asn1writer.h.

Asn1Len OSB_LIB::Asn1Buffer::dataLen_ [private]

Size of the encoded data.

Definition at line 241 of file asn1writer.h.

Members OSB_LIB::Asn1Buffer::members_ [private]

Members of the ASN.1 constructed type.

Definition at line 236 of file asn1writer.h.

Asn1Tag OSB_LIB::Asn1Buffer::tag_ [private]

Tag of the encoded data.

Definition at line 239 of file asn1writer.h.

Asn1Data OSB_LIB::Asn1Buffer::tagBuf_ [private]

Buffer to encode the tag and data length.

Definition at line 244 of file asn1writer.h.

size_t OSB_LIB::Asn1Buffer::totSize_ [private]

Size of binary data, incl. tag and data length.

At the same time this used as indicator if the buffer must be cleared (actually read: contains data).

Definition at line 232 of file asn1writer.h.


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:09:18 2006 for OSB Library by  doxygen 1.4.7