SECPTNFactory::CreateNode

Create a new SECPersistentTreeNode object.

Defined in: PERSTREE.CPP

Syntax

CreateNode()

CreateNode(CRuntimeClass* pClass)

CreateNode(const CString& strNodeName,SECPersistentTreeNode* pParent)

CreateNode(const CString& strNodeName,SECPersistentTreeNode* pParent,CRuntimeClass* pClass)

Return Value

Pointer to new SECPersistentTreeNode object.

Parameters

pClass

Pointer to runtime class to use for node allocation. Must be derived from SECPersistentTreeNode.

strNodeName

Node name for new object. If specified with pParent, will attempt to call SECPersistentTreeNode::Create in addition to allocating object.

pParent

Parent PTN object. If specified with strNodeName, will attempt to call SECPersistentTreeNode::Create in addition to allocating object.

Comments

Main factory function to allocate a new SECPersistentTreeNode derived object. All allocations are stored in an internal linked list and are deallocated when this factory goes out of scope, therefore track the scope of the factory object closely. If strNodeName and pParent is specified, the factory will also attempt to issue a Create call on the new PTN object (and return NULL if the create failed).