Go to the source code of this file.
Define Documentation
| #define MExportXObjectFactory |
( |
|
classid ) |
|
Value:Defines a factory method to create XObjects which will be exported by the library
| #define MExportXObjectFactoryNS |
( |
|
__namespace, |
|
|
|
classid |
|
) |
| |
Value:MODULE_EXPORT_PRE Retval MODULE_EXPORT MQUALIFIER create##__namespace(NAMESPACE_Zeus::IXMLNode* pMainNode, NAMESPACE_Zeus::IXMLDocument*, NAMESPACE_Zeus::IXObject*& rpObj) \
{ \
Retval retValue = RET_INTERNAL_ERROR; \
\
if (pMainNode != NULL) \
{ \
rpObj = new __namespace::classid(*pMainNode); \
retValue = RET_NOERROR; \
} \
\
return retValue; \
} \
Defines a factory method to create XObjects using special namespace, which will be exported by the library
| #define MExportXRootObjectFactory |
( |
|
classid ) |
|
Value:MODULE_EXPORT_PRE Retval MODULE_EXPORT MQUALIFIER create##classid(NAMESPACE_Zeus::IXMLNode* pMainNode, NAMESPACE_Zeus::IXMLDocument* pDocu, NAMESPACE_Zeus::IXObject*& rpObj) \
{ \
Retval retValue = RET_INTERNAL_ERROR; \
if (pMainNode != NULL && pDocu != NULL) \
{ \
rpObj = new classid(*pMainNode, *pDocu); \
retValue = RET_NOERROR; \
} \
return retValue; \
} \
Defines a factory method to create XRootObjects which will be exported by the library
Defines a factory method to create XRootObjects using a special namespace, which will be exported by the library
| #define MExportXRootObjectFactoryNS |
( |
|
__namespace, |
|
|
|
classid |
|
) |
| |
Value:MODULE_EXPORT_PRE Retval MODULE_EXPORT MQUALIFIER create##classid(NAMESPACE_Zeus::IXMLNode* pMainNode, NAMESPACE_Zeus::IXMLDocument* pDocu, NAMESPACE_Zeus::IXObject*& rpObj) \
{ \
Retval retValue = RET_INTERNAL_ERROR; \
if (pMainNode != NULL && pDocu != NULL) \
{ \
rpObj = new __namespace::classid(*pMainNode, *pDocu); \
retValue = RET_NOERROR; \
} \
return retValue; \
} \
| #define REG_ROOT_ADD |
( |
|
classid, |
|
|
|
classname |
|
) |
| |
Value:strClassName = classname; \
static Uint classid##Handle = 0;\
if (reg)\
{\
classid##Handle = TXObjectFactory::getInstance().registerXClass(strClassName, createXRootObject); \
}\
else\
{\
TXObjectFactory::getInstance().unregisterXClass(classid##Handle, strClassName); \
}
Entry of autoregistration. This will be added to the database of the XObjectFactory.
- Parameters:
-
| classid | : ID of the class |
| classname,: | String value representing the class name |
| #define REG_ROOT_BEGIN |
( |
|
classid ) |
|
Value:protected: \
static Retval MQUALIFIER createXRootObject(IXMLNode* pMainNode, IXMLDocument* pDocu, IXObject*& rpObj) \
{ \
Retval retValue = RET_REQUEST_FAILED; \
if (pMainNode != NULL && pDocu != NULL) \
{ \
rpObj = new classid(*pMainNode, *pDocu); \
retValue = RET_NOERROR; \
} \
else \
{ \
retValue = RET_INTERNAL_ERROR; \
} \
return retValue; \
} \
public: \
static bool autoregRoot(bool reg) \
{ \
TString strClassName;\
Declaration of autoregistration and factory method to create a XRootObject using the XObjectFactory.
- Parameters:
-
| classid | : ID of the class to be registered |
Value:End of registration.
| #define REG_SUB_ADD |
( |
|
classid, |
|
|
|
classname |
|
) |
| |
Value:strClassName = classname; \
static Uint classid##Handle = 0;\
if (reg)\
{\
classid##Handle = TXObjectFactory::getInstance().registerXClass(strClassName, createXObject); \
}\
else\
{\
TXObjectFactory::getInstance().unregisterXClass(classid##Handle, strClassName); \
}
Entry of autoregistration. This will be added to the database of the XObjectFactory.
- Parameters:
-
| classid | : ID of the class |
| classname,: | String value representing the class name |
| #define REG_SUB_BEGIN |
( |
|
classid ) |
|
Value:protected: \
static Retval MQUALIFIER createXObject(IXMLNode* pMainNode, IXMLDocument* , IXObject*& rpObj) \
{ \
Retval retVal = RET_REQUEST_FAILED; \
if (pMainNode != NULL) \
{ \
rpObj = new classid(*pMainNode); \
retVal = RET_NOERROR; \
} \
else \
{ \
retVal = RET_INTERNAL_ERROR; \
} \
return retVal; \
} \
public: \
static bool autoregSub(bool reg) \
{ \
TString strClassName;\
Declaration of autoregistration and factory method to create a XObject using the XObjectFactory. Those Objects are sub objects of a XRootObject.
- Parameters:
-
| classid | : ID of the class to be registered |
| #define REG_SUB_END REG_ROOT_END |
End of registration, same as REG_ROOT_END
| #define XOBJECTFACTORY_REGISTER_ROOT |
( |
|
classid ) |
classid::autoregRoot(true); |
Implementation of the registration. This will registrate the class explicitly.
| #define XOBJECTFACTORY_REGISTER_SUB |
( |
|
classid ) |
classid::autoregSub(true); |
Implementation of the registration. This will registrate the class explicitly.
| #define XOBJECTFACTORY_UNREGISTER_ROOT |
( |
|
classid ) |
classid::autoregRoot(false); |
Implementation of the unregistration. This will unregistrate the class explicitly.
| #define XOBJECTFACTORY_UNREGISTER_SUB |
( |
|
classid ) |
classid::autoregSub(false); |
Implementation of the unregistration. This will unregistrate the class explicitly.