OSB_LIB::Asn1Print Class Reference

Collaboration diagram for OSB_LIB::Asn1Print:

Collaboration graph
[legend]
List of all members.

Detailed Description

Convert ASN.1 data to (meaningful) strings.

This purely static class provides decoder functions to convert ASN.1 data into human readable strings.

The class supports a handfull build-in decoder functions:
prRaw(), prHex(), prInt(), prAscii(), prBcd() and prTbcd().

See also:
RegAsn1CdrPrint().

Definition at line 71 of file asn1print.h.

Public Types

Static Public Member Functions

Build-in decoder functions:

Private Member Functions

Static Private Member Functions

Private Attributes

Static Private Attributes

Classes


Member Typedef Documentation

typedef void(*) OSB_LIB::Asn1Print::Decoder(const Asn1Byte *data, const size_t size, std::string &dest)

Decoder function for ASN.1 data.

Parameters:
data ASN.1 data to decode.
size Size of ASN.1 data.
dest String to populate.
The type must match Asn1TagDes::Decoder.

Definition at line 82 of file asn1print.h.

typedef std::deque<Info> OSB_LIB::Asn1Print::DecoderList

STL container used to store the decoder information.

Definition at line 120 of file asn1print.h.


Constructor & Destructor Documentation

OSB_LIB::Asn1Print::Asn1Print (  )  [private]

Default constructor.

Adds the build-in decoders (and a few more),
use decoderList() to list all of them.


Member Function Documentation

void OSB_LIB::Asn1Print::add ( Decoder  decoder,
const char *  name,
const char *  des 
) [private]

Add a decoder function.

static void OSB_LIB::Asn1Print::add ( const Info info  )  [static]

Register a decoder function.

Parameters:
info Information about the decoder function.
Note:
Replaces existing entries.

static DecoderList& OSB_LIB::Asn1Print::decoderList (  )  [static, private]

Get the whole list of decoders.

static const DecoderList& OSB_LIB::Asn1Print::decoders (  )  [static]

Get the whole list of support decoders.

static Info* OSB_LIB::Asn1Print::find ( const std::string &  name  )  [static, private]

Find the information for a decoder.

Returns:
The decoder function for name,
it is 0 if name is not supported.

static const Info* OSB_LIB::Asn1Print::findInfo ( const std::string &  name  )  [static]

Find the information for a decoder.

Returns:
The decoder function for name,
it is 0 if name is not supported.

static Decoder OSB_LIB::Asn1Print::getDecoder ( const std::string &  name  )  [static]

Get a decoder function.

Returns:
The decoder function for name,
it is 0 if name is not supported.

static void OSB_LIB::Asn1Print::prAscii ( const Asn1Byte data,
const size_t  size,
std::string &  dest 
) [static]

Print ASN.1 string data.

static void OSB_LIB::Asn1Print::prBcd ( const Asn1Byte data,
const size_t  size,
std::string &  dest 
) [static]

BCD encoded ASN.1 as decimal string.

static void OSB_LIB::Asn1Print::prHex ( const Asn1Byte data,
const size_t  size,
std::string &  dest 
) [static]

Hex format: each byte as 2-digit uppercase hex.

static void OSB_LIB::Asn1Print::prInt ( const Asn1Byte data,
const size_t  size,
std::string &  dest 
) [static]

Print ASN.1 integer data.

static void OSB_LIB::Asn1Print::prRaw ( const Asn1Byte data,
const size_t  size,
std::string &  dest 
) [static]

Raw format: each byte as 2-digit lowercase hex.

static void OSB_LIB::Asn1Print::prTbcd ( const Asn1Byte data,
const size_t  size,
std::string &  dest 
) [static]

TBCD encoded ASN.1 as decimal string.


Member Data Documentation

DecoderList OSB_LIB::Asn1Print::decoders_ [private]

List of known decoder functions.

Definition at line 224 of file asn1print.h.

Asn1Print* OSB_LIB::Asn1Print::instance_ [static, private]

The only instance of the class.

Definition at line 222 of file asn1print.h.


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