PKIFOCSPMemoryHelper Class Reference

#include <PKIFOCSPMemoryHelper.h>

Collaboration diagram for PKIFOCSPMemoryHelper:

Collaboration graph
[legend]

List of all members.


Detailed Description

The PKIFOCSPMemoryHelper class assists with clean-up of memory allocated to OCSP-related structures and structure members. The class has 3 public member variables that may be used instead of raw pointers to structures. The following code snippet demonstrates the usage of this class:

	//declare an instance of PKIFOCSPMemoryHelper in support
	//of creating an encoded OCSP request 
	PKIFOCSPMemoryHelper mhOCSPRequest;
	mhOCSPRequest.pTBSRequest = new TBSRequest;
	 
	//populate members of pTBSRequest
	//create a CPKIFASNWrapper object to encode the structure
	//help by mhOCSPRequest

	CACASNWRAPPER_CREATE(TBSRequest, objPDU);
	ASN1OpenType* data1 = objPDU.Encode(mhOCSPRequest.pTBSRequest);
	CPKIFBufferPtr tmp(new CPKIFBuffer(data1->data, data1->numocts));

	delete data1;

In the above example, note that memory is automatically deleted when mhOCSPRequest falls out of scope.

TSP-enforcing: No

Definition at line 47 of file PKIFOCSPMemoryHelper.h.


Public Member Functions

 PKIFOCSPMemoryHelper ()
virtual ~PKIFOCSPMemoryHelper ()

Public Attributes

OCSPRequest * pRequest
OCSPResponse * pResponse
TBSRequest * pTBSRequest

Constructor & Destructor Documentation

PKIFOCSPMemoryHelper::PKIFOCSPMemoryHelper (  ) 

Interface: External

This function creates and initializes an instance of PKIFOCSPMemoryHelp. All public member variables are initialized to NULL. Member variables that are non-NULL when the destructor is invoked will be deleted, along with selected fields within the member variables.

Returns:
None

Definition at line 176 of file PKIFOCSPMemoryHelper.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_OCSP_ASN.

PKIFOCSPMemoryHelper::~PKIFOCSPMemoryHelper (  )  [virtual]

Interface: External

This function destroys PKIFOCSPMemoryHelp objects including the clean-up of the public member variables.

Returns:
None

Definition at line 187 of file PKIFOCSPMemoryHelper.cpp.

References FreeRequestMembers(), FreeTBSRequestMembers(), LOG_STRING_DEBUG, pRequest, pResponse, pTBSRequest, and TOOLKIT_OCSP_ASN.


Member Data Documentation

Definition at line 54 of file PKIFOCSPMemoryHelper.h.

Referenced by CPKIFOCSPRequest::Encode(), and ~PKIFOCSPMemoryHelper().

Definition at line 55 of file PKIFOCSPMemoryHelper.h.

Referenced by ~PKIFOCSPMemoryHelper().

Definition at line 56 of file PKIFOCSPMemoryHelper.h.

Referenced by CPKIFTBSRequest::Encode(), and ~PKIFOCSPMemoryHelper().


The documentation for this class was generated from the following files:

Generated on Mon Nov 15 11:21:05 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6