Class for managing default attributes of objects. More...
#include <SObjDefAttr.h>
Public Member Functions | |
SObjDefAttr () | |
Constructor. | |
virtual | ~SObjDefAttr () |
Destructor. | |
BOOL | Init (SXmlNode xmlNode) |
Initializes the default attributes from an XML node. | |
bool | IsEmpty () |
Checks if the attribute list is empty. | |
SXmlNode | GetDefAttribute (LPCWSTR pszClassName) |
Retrieves the default attributes for a specific class. | |
![]() | |
SCmnMap (void(*funOnKeyRemoved)(const SXmlNode &)=NULL) | |
Constructor. | |
virtual | ~SCmnMap () |
Destructor. | |
bool | HasKey (const SStringW &key) const |
Checks if a key exists in the map. | |
bool | GetKeyObject (const SStringW &key, SXmlNode &obj) const |
Retrieves an object associated with a key. | |
SXmlNode & | GetKeyObject (const SStringW &key) const |
Retrieves an object associated with a key. | |
bool | AddKeyObject (const SStringW &key, const SXmlNode &obj) |
Adds a key-object pair to the map. | |
void | SetKeyObject (const SStringW &key, const SXmlNode &obj) |
Sets an object for a key, replacing any existing object. | |
bool | RemoveKeyObject (const SStringW &key) |
Removes a key-object pair from the map. | |
void | RemoveAll () |
Removes all key-object pairs from the map. | |
size_t | GetCount () |
Gets the number of key-object pairs in the map. | |
![]() | |
TObjRefImpl () | |
Constructor that initializes the reference count to 1. | |
virtual | ~TObjRefImpl () |
Virtual destructor. | |
long | AddRef () override |
Increments the reference count. | |
long | Release () override |
Decrements the reference count and deletes the object if the count reaches zero. | |
void | OnFinalRelease () override |
Deletes the object. | |
![]() | |
long | AddRef () PURE |
Increases the reference count. | |
long | Release () PURE |
Decreases the reference count. | |
void | OnFinalRelease () PURE |
Called when the reference count reaches zero and the object is about to be released. | |
Protected Member Functions | |
void | BuildClassAttribute (SXmlNode &xmlNode, LPCWSTR pszClassName) |
Builds the class attributes from an XML node. | |
Protected Attributes | |
SXmlDoc | m_xmlRoot |
![]() | |
void(* | m_pFunOnKeyRemoved )(const SXmlNode &obj) |
SMap< SStringW, SXmlNode > * | m_mapNamedObj |
![]() | |
LONG | m_cRef |
Reference count. | |
Class for managing default attributes of objects.
This class manages default attributes for objects using an XML document. It allows initialization from an XML node, checking if the attribute list is empty, and retrieving default attributes for specific classes.
Definition at line 15 of file SObjDefAttr.h.
|
inline |
Constructor.
Definition at line 22 of file SObjDefAttr.h.
|
inlinevirtual |
Destructor.
Definition at line 29 of file SObjDefAttr.h.
|
protected |
Builds the class attributes from an XML node.
xmlNode | XML node containing the class attributes. |
pszClassName | Name of the class. |
Definition at line 34 of file SObjDefAttr.cpp.
SXmlNode SObjDefAttr::GetDefAttribute | ( | LPCWSTR | pszClassName | ) |
Retrieves the default attributes for a specific class.
pszClassName | Name of the class. |
Definition at line 54 of file SObjDefAttr.cpp.
SNSBEGIN BOOL SObjDefAttr::Init | ( | SXmlNode | xmlNode | ) |
Initializes the default attributes from an XML node.
xmlNode | XML node containing the default attributes. |
Definition at line 7 of file SObjDefAttr.cpp.
|
inline |
Checks if the attribute list is empty.
Definition at line 44 of file SObjDefAttr.h.
|
protected |
Definition at line 64 of file SObjDefAttr.h.