ASN1C C/C++ Common Runtime  ASN1C v7.7.x
Public Member Functions | Protected Attributes | List of all members

#include <asn1CppTypes.h>

Inheritance diagram for ASN1TPDU:
ASN1TPDUSeqOfList

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

◆ ~ASN1TPDU()

virtual ASN1TPDU::~ASN1TPDU ( )
inlinevirtual

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

Member Function Documentation

◆ setContext()

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
ctxtA pointer to reference counted ASN.1 context class instance.

References OSRTCtxtPtr::isNull().

Member Data Documentation

◆ mpContext

OSRTCtxtPtr ASN1TPDU::mpContext
protected

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: