ASN1TPDU Struct Reference
[ASN.1 Type (ASN1T_) Base Classes]

#include <asn1CppTypes.h>

Inheritance diagram for ASN1TPDU:
ASN1TPDUSeqOfList

List of all members.

Public Member Functions

void setContext (OSRTContext *ctxt)
virtual ~ASN1TPDU ()

Protected Attributes

OSRTCtxtPtr mpContext

Detailed Description

Base class for PDU types. This class is used as the base class for all compiler-generated PDU types. Control classes do not inherit from this class.


Constructor & Destructor Documentation

virtual ASN1TPDU::~ASN1TPDU (  )  [inline, virtual]

The virtual destructor does nothing. It is overridden by derived versions of this class.


Member Function Documentation

void ASN1TPDU::setContext ( OSRTContext ctxt  )  [inline]

The setContext method allows the context member variable to be set. It is invoked in compiler-generated control class decode and copy methods. This method is invoked to prevent memory freeing of decoded or copied data after a control class or message buffer object goes out of scope. Also, if context is set to ASN1TPDU then generated destuctor of inherited ASN1T_<type> class will invoke generated free routines. Note, it is not obligatory to call generated free routines unless a series of messages is being decoded or control class and message buffer objects go out of scope somewhere. The destructor of the control class or message buffer class will free all dynamicly allocated memory. Thus, if performance is a main issue, "setContext (NULL)" may be called after Decode method call. In this case destructor of ASN1T_<type> will do nothing.

Parameters:
ctxt A pointer to reference counted ASN.1 context class instance.

Member Data Documentation

The mpContext member variable holds a smart-pointer to the current context variable. This ensures an instance of this PDU type will persist if the control class and message buffer classes used to decode or copy the message are destroyed.


The documentation for this struct was generated from the following file: