SECPersistentTreeNode Class
class SECPersistentTreeNode: public CObject
Objects of this type are used to store "Key-Value" data, much like is used in the registry or a profile (key describing the data, value representing the data). These objects can then be organized in a tree structure and stored to persistance storage via a mechanism defined by the SECPTNStrategy abstract base class.
Defined in: PERSTREE.H
See Also
Class Members
Construction/Initialization
SECPersistentTreeNode()
Constructor
virtual DWORD Create(const CString& strNodeName,SECPersistentTreeNode* pParent)
Initialize this object.
Accessors
virtual DWORD AddKeyValue(const CString& strKey,const CString& strValue, BOOL bOverwriteExisting=TRUE)
Add string data to this object's internal state.
virtual DWORD AddKeyValue(const CString& strKey,SEC_INT nValue, BOOL bOverwriteExisting=TRUE)
Add integer data to this object's internal state.
virtual DWORD AddKeyValueBool(const CString& strKey,BOOL bValue, BOOL bOverwriteExisting=TRUE)
Add boolean data to this object's internal state.
virtual DWORD AddKeyValueBinary(const CString& strKey, BYTE* pBuffer,UINT nBufferSize, BOOL bOverwriteExisting=TRUE)
Add raw binary data to this object's internal state.
virtual DWORD Delete(const CString& strKeyName)
Deletes a key-value pair given a key name.
virtual DWORD GetKeyValue(const CString& strKey,CString& strValue,CString strDefault=(CHAR)NULL)
Get string data from this object's internal state
virtual DWORD GetKeyValueInt(const CString& strKey,int& nValue,int nDefault=0)
Get integer data from this object's internal state
virtual DWORD GetKeyValueUInt(const CString& strKey,UINT& nValue,UINT nDefault=0)
Get unsigned integer data from this object's internal state
virtual DWORD GetKeyValueLong(const CString& strKey,long& nValue,long nDefault=0)
Get long data from this object's internal state
virtual DWORD GetKeyValueULong(const CString& strKey,ULONG& nValue,ULONG nDefault=0)
Get unsigned long data from this object's internal state
virtual DWORD GetKeyValueBool(const CString& strKey,BOOL& bValue,BOOL bDefault=TRUE)
Get boolean data from this object's internal state
virtual DWORD GetKeyValueBinary(const CString& strKey,BYTE** pBinaryBuffer,UINT& nSize)
Get raw binary data from this object's internal state
SECPersistentTreeNode* GetParent() const
Get the parent node of this object.
SECPersistentTreeNode* FindChildNode(const CString& strNodeName)
Locate child node with a specific name.
PTNList* GetChildList()
Get list of all children.
POSITION GetFirstKeyValuePosition() const
Get the first position of the key-value pairs
BOOL EnumerateKeyValues(POSITION& position, CString& strKey, CString& strValue)
Enumerate the key-value pairs
CString GetNodeName()
Get the name of this particular node (must be unique among siblings)
Operations
virtual BOOL SaveKeyValues(SECPTNStrategy* pStrategy)
Save the data associated with this node and all children.
virtual BOOL LoadKeyValues(SECPTNStrategy* pStrategy)
Load data from the strategy and populate child nodes.