OSB_LIB::Asn1Info Class Reference

Collaboration diagram for OSB_LIB::Asn1Info:

Collaboration graph
[legend]
List of all members.

Detailed Description

Provide information about ASN.1 data.

Attention:
data_ points to memory owned by the ASN.1 reader:
thus copying and assignment will work only as long as the reader exists and its data was not modified.

Definition at line 66 of file asn1reader.h.

Public Member Functions

Private Member Functions

Private Attributes

Friends


Constructor & Destructor Documentation

OSB_LIB::Asn1Info::Asn1Info ( long  filePos = -1  )  [explicit]

Default constructor with optional file position.


Member Function Documentation

size_t OSB_LIB::Asn1Info::construct ( const Asn1Byte data,
size_t  size 
) [private]

Construct from ASN.1 data.

Parameters:
data ASN.1 data: tag, length and data.
size Size of the ASN.1 data.
Returns:
size_t(-1) in case of an error, else the total number of bytes of the ASN.1 type.

const Asn1Byte * OSB_LIB::Asn1Info::data (  )  const [inline]

Get the data.

Definition at line 306 of file asn1reader.h.

References data_.

const OSB_LIB::Asn1Len & OSB_LIB::Asn1Info::dataLen (  )  const [inline]

Get information about the data length.

Definition at line 301 of file asn1reader.h.

References dataLen_.

long OSB_LIB::Asn1Info::filePos (  )  const [inline]

The position of the ASN.1 record in the input stream.

It is -1 if the position is not available.

Definition at line 286 of file asn1reader.h.

References filePos_.

size_t OSB_LIB::Asn1Info::getTagAndLen ( const Asn1Byte data,
size_t  size 
) [private]

Get tag and length from input data.

Parameters:
data Data to use.
size Size of data.
Returns:
The total number of bytes the tag and length,
size_t(-1) in case of an error.

size_t OSB_LIB::Asn1Info::nextMember ( Asn1Info dest  ) 

Determine the ASN.1 member.

Parameters:
dest Gets the next ASN.1 member if available.
Returns:
The tag value of dest or Asn1Tag::tagNotSet if
  • data_ is 0,
  • all data was processed
  • the ASN.1 type is not constructed.

const OSB_LIB::Asn1Tag & OSB_LIB::Asn1Info::tag (  )  const [inline]

Full information about the tag.

Definition at line 296 of file asn1reader.h.

References tag_.

size_t OSB_LIB::Asn1Info::tagValue (  )  const [inline]

Short-hand: value of the tag.

Definition at line 291 of file asn1reader.h.

References tag_, and OSB_LIB::Asn1Tag::value().


Friends And Related Function Documentation

friend class Asn1Reader [friend]

Allow the reader to call getTagAndLen() and set data_.

Definition at line 68 of file asn1reader.h.


Member Data Documentation

size_t OSB_LIB::Asn1Info::asn1Size_ [private]

Total number of bytes for the ASN.1 record.

Definition at line 134 of file asn1reader.h.

size_t OSB_LIB::Asn1Info::curPos_ [private]

Current position in data_.

Definition at line 144 of file asn1reader.h.

const Asn1Byte* OSB_LIB::Asn1Info::data_ [private]

Binary data of the ASN.1 type.

This memory is owned by the ASN.1 reader, see also class description.

Definition at line 142 of file asn1reader.h.

Referenced by data().

Asn1Len OSB_LIB::Asn1Info::dataLen_ [private]

Length of data_.

Definition at line 132 of file asn1reader.h.

Referenced by dataLen().

long OSB_LIB::Asn1Info::filePos_ [private]

The position of the ASN.1 record in the input stream.

Definition at line 128 of file asn1reader.h.

Referenced by filePos().

Asn1Tag OSB_LIB::Asn1Info::tag_ [private]

ASN.1 tag of data_.

Definition at line 130 of file asn1reader.h.

Referenced by tag(), and tagValue().


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