Template class for implementing the SObject interface. More...
#include <Sobject.hpp>
Public Member Functions | |
SObjectImpl () | |
Constructor. | |
BOOL | InitFromXml (IXmlNode *pXmlNode) OVERRIDE |
Initializes the object from an XML node. | |
LPCWSTR | GetName () SCONST OVERRIDE |
Retrieves the object's name. | |
LPCSTR | GetNameA () SCONST OVERRIDE |
Retrieves the object's name in ANSI format. | |
void | SetName (LPCWSTR pszName) OVERRIDE |
Sets the object's name. | |
int | GetID () SCONST OVERRIDE |
Retrieves the object's ID. | |
void | SetID (int nID) OVERRIDE |
Sets the object's ID. | |
HRESULT | AfterAttribute (LPCWSTR strAttribName, LPCWSTR strValue, BOOL bLoading, HRESULT hr) OVERRIDE |
Handles attribute processing after setting an attribute. | |
HRESULT | SetAttributeA (LPCSTR pszAttr, LPCSTR pszValue, BOOL bLoading) OVERRIDE |
Sets an attribute using ANSI strings. | |
HRESULT | SetAttribute (LPCWSTR pszAttr, LPCWSTR pszValue, BOOL bLoading) OVERRIDE |
Sets an attribute using wide strings. | |
HRESULT | ISetAttribute (const IStringW *strAttr, const IStringW *strValue, BOOL bLoading) OVERRIDE |
Sets an attribute using IStringW objects. | |
LPCWSTR | GetObjectClass () SCONST OVERRIDE |
Retrieves the object's class name. | |
int | GetObjectType () SCONST OVERRIDE |
Retrieves the object's type. | |
BOOL | IsClass (LPCWSTR lpszName) SCONST OVERRIDE |
Checks if the object is of a specific class. | |
BOOL | GetAttribute (LPCWSTR strAttr, IStringW *pValue) SCONST OVERRIDE |
Retrieves an attribute value. | |
void | OnInitFinished (IXmlNode *xmlNode) OVERRIDE |
Handles initialization completion. | |
void | SetAttrHandler (FunAttrHandler attrHandler) OVERRIDE |
Sets the attribute handler. | |
virtual HRESULT | SetAttribute (const SStringW &strAttr, const SStringW &strValue, BOOL bLoading) |
Sets an attribute using wide strings. | |
virtual HRESULT | DefAttributeProc (const SStringW &strAttr, const SStringW &strValue, BOOL bLoading) |
Default attribute processing. | |
Static Public Member Functions | |
static int | GetClassType () |
Retrieves the class type. | |
static LPCWSTR | GetClassName () |
Retrieves the class name. | |
static LPCWSTR | GetClassAlias () |
Retrieves the class alias. | |
static void | MarkAttributeHandled (SXmlAttr xmlAttr, bool bHandled) |
Marks an attribute as handled. | |
static bool | IsAttributeHandled (SXmlAttr xmlAttr) |
Checks if an attribute is handled. | |
Protected Attributes | |
SStringW | m_strName |
int | m_nID |
FunAttrHandler | m_attrHandler |
Template class for implementing the SObject interface.
This class provides runtime type identification and attribute dispatching based on XML descriptions.
T | Base class that implements the IObject interface. |
Definition at line 26 of file Sobject.hpp.
|
inline |
Constructor.
Definition at line 75 of file Sobject.hpp.
|
inline |
Handles attribute processing after setting an attribute.
strAttribName | Attribute name. |
strValue | Attribute value. |
bLoading | TRUE if the object is being loaded, FALSE otherwise. |
hr | Result of the attribute setting. |
Definition at line 154 of file Sobject.hpp.
|
inlinevirtual |
Default attribute processing.
strAttr | Attribute name. |
strValue | Attribute value. |
bLoading | TRUE if the object is being loaded, FALSE otherwise. |
Reimplemented in SWindow.
Definition at line 279 of file Sobject.hpp.
|
inline |
Retrieves an attribute value.
strAttr | Attribute name. |
pValue | Pointer to store the attribute value. |
Definition at line 238 of file Sobject.hpp.
|
inlinestatic |
Retrieves the class alias.
Definition at line 49 of file Sobject.hpp.
|
inlinestatic |
Retrieves the class name.
Definition at line 41 of file Sobject.hpp.
|
inlinestatic |
|
inline |
|
inline |
Retrieves the object's name.
Definition at line 108 of file Sobject.hpp.
|
inline |
Retrieves the object's name in ANSI format.
Definition at line 116 of file Sobject.hpp.
|
inline |
Retrieves the object's class name.
Definition at line 211 of file Sobject.hpp.
|
inline |
Retrieves the object's type.
Definition at line 219 of file Sobject.hpp.
|
inline |
Initializes the object from an XML node.
pXmlNode | Pointer to the XML node containing the object's attributes. |
Definition at line 83 of file Sobject.hpp.
|
inlinestatic |
Checks if an attribute is handled.
xmlAttr | XML attribute to check. |
Definition at line 68 of file Sobject.hpp.
|
inline |
Checks if the object is of a specific class.
lpszName | Class name to check. |
Definition at line 228 of file Sobject.hpp.
|
inline |
Sets an attribute using IStringW objects.
strAttr | Attribute name. |
strValue | Attribute value. |
bLoading | TRUE if the object is being loaded, FALSE otherwise. |
Definition at line 197 of file Sobject.hpp.
|
inlinestatic |
Marks an attribute as handled.
xmlAttr | XML attribute to mark. |
bHandled | TRUE if the attribute is handled, FALSE otherwise. |
Definition at line 59 of file Sobject.hpp.
|
inline |
Handles initialization completion.
xmlNode | XML node containing the object's attributes. |
Definition at line 248 of file Sobject.hpp.
|
inline |
Sets the attribute handler.
attrHandler | Function pointer to the attribute handler. |
Definition at line 256 of file Sobject.hpp.
|
inlinevirtual |
Sets an attribute using wide strings.
strAttr | Attribute name. |
strValue | Attribute value. |
bLoading | TRUE if the object is being loaded, FALSE otherwise. |
Definition at line 268 of file Sobject.hpp.
|
inline |
Sets an attribute using wide strings.
pszAttr | Attribute name. |
pszValue | Attribute value. |
bLoading | TRUE if the object is being loaded, FALSE otherwise. |
Definition at line 179 of file Sobject.hpp.
|
inline |
Sets an attribute using ANSI strings.
pszAttr | Attribute name. |
pszValue | Attribute value. |
bLoading | TRUE if the object is being loaded, FALSE otherwise. |
Definition at line 168 of file Sobject.hpp.
|
inline |
|
inline |
|
protected |
Attribute handler function
Definition at line 296 of file Sobject.hpp.
|
protected |
Object's ID
Definition at line 294 of file Sobject.hpp.
|
protected |
Object's name
Definition at line 293 of file Sobject.hpp.