Asn1Context Class Reference

List of all members.

Public Member Functions

void EnableElementTracking ()
String GetCurrentElement ()

Public Attributes

Asn1NamedEventDispatcher EventDispatcher

Detailed Description

This class is a holder for things which are to be contained in an encoder or decoder. Since we have multiple base classes for encoders/decoders (Asn1MessageBuffer and Asn1OutputStream), this class provides a single container for all of those things which would otherwise be contained in the various base classes.

This class also provides a location for some convenience methods related to the contained objects (e.g. getCurrentElement).

Thread-safety: a given instance of this class should be accessed by a single thread.

/p>


Member Function Documentation

void EnableElementTracking (  ) 

Enable element name tracking. This can be useful for error reporting. Element name tracking must be enabled for getCurrentElement to be of any use.

String GetCurrentElement (  ) 

Return the name of the current element. This is only useful if you have called enableElementTracking at the start of encoding/decoding. The name returned will be in the form element1.element2..., If you have not enabled element tracking, an exception will be thrown.


Member Data Documentation

Asn1NamedEventDispatcher EventDispatcher
Initial value:
 
         new Asn1NamedEventDispatcher()

The named event dispatcher for this context. /p>