Public Member Functions

zeus::IXObjectFactory Class Reference

#include <IXObjectFactory.hpp>

Inheritance diagram for zeus::IXObjectFactory:
zeus::IZUnknown zeus::TXObjectFactory

List of all members.

Public Member Functions

virtual Retval MQUALIFIER createObjectFromStream (const IString &rstrStream, IXObject *&rpObj, bool bOnlyRoot=true, bool bDoUnfreeze=true)=0
virtual Retval MQUALIFIER createObjectFromFile (const IString &rstrFileName, IXObject *&rpObj, bool bOnlyRoot=true, bool bDoUnfreeze=true)=0
virtual Retval MQUALIFIER createChildObjects (IXMLNode &rParentNode, IXObject &rParent, bool bDoUnfreeze=true)=0
virtual Retval MQUALIFIER addNewChildObjects (IXMLNode &rNewNode, IXObject &rParent, IXObject *&rpChild, bool bDoUnfreeze=true, IXObject *pRightSibling=NULL)=0
virtual Uint MQUALIFIER registerXClassOfCodeModule (const IString &rstrClassName, const IString &rstrCodeModule, IXObject::DltCreateXObject pdltFunct)=0
virtual Uint MQUALIFIER registerXClass (const IString &rstrClassName, IXObject::DltCreateXObject pdltFunct)=0
virtual bool MQUALIFIER unregisterXClass (Uint hHandle, const IString &rstrClassName)=0
virtual Retval MQUALIFIER createObjectFromDocument (NAMESPACE_Zeus::IXMLDocument &rDocument, IXObject *&rpObj, bool bOnlyRoot=true, bool bDoUnfreeze=true)=0
virtual void MQUALIFIER setErrorObjectExpandProperty (bool bValue)=0
virtual Retval MQUALIFIER createChildObjectBySchema (const IString &rstrName, IXObject &rParent, IXMLNode &rSchemaNode, IXObject *&rpChildObj, bool bDoUnfreeze=true)=0
virtual Retval MQUALIFIER createObjectByXMLNode (IXMLNode &rMainNode, NAMESPACE_Zeus::IXMLDocument *pDocu, IXObject *&rpObj, bool bDoUnfreeze=true)=0
virtual bool MQUALIFIER isRegistered (const IString &rstrClassName, const IString &rstrCodeModule) const =0

Detailed Description

This interface defines the x object factory. It can create a x object tree out of a xml stream or xml file.


Member Function Documentation

virtual Retval MQUALIFIER zeus::IXObjectFactory::addNewChildObjects ( IXMLNode rNewNode,
IXObject rParent,
IXObject *&  rpChild,
bool  bDoUnfreeze = true,
IXObject pRightSibling = NULL 
) [pure virtual]

This creates all child objects of a new XML node and add them to the parent.

Parameters:
rNewNode,:New XML Node
rParent,:Parent Object
rpChild,:return of the child object
bDoUnfreeze,:If this flag is set, the object tree will be unfrozen after creation
pRightSibling,:If this parameter is a valid child object of the parent, the new child object will be added before this object
Return values:
RET_INTERNAL_ERROR,:Internal Error occured
RET_NOERROR,:Object created

Implemented in zeus::TXObjectFactory.

virtual Retval MQUALIFIER zeus::IXObjectFactory::createChildObjectBySchema ( const IString rstrName,
IXObject rParent,
IXMLNode rSchemaNode,
IXObject *&  rpChildObj,
bool  bDoUnfreeze = true 
) [pure virtual]

This creates a child object of a XSD schema template and add them to the parent.

Parameters:
rstrName,:Name of the XObject
rParent,:Parent Object
rSchemaNode,:XSD-Schema node with the definition of the XObject (xsd:complexType)
rpChildObj,:Return of the child object
bDoUnfreeze,:If this flag is set, the object tree will be unfrozen after creation
Return values:
RET_NOERROR,:Object created
RET_INTERNAL_ERROR,:Internal Error occured
RET_INVALID_PARAMETER,:Parameter rSchemaNode is not a valid XSD node
RET_INVALID_TYPE,:Type definition not found
RET_ABORT,:Maximum count of XObject of this parent reached
RET_REQUEST_FAILED,:No valid XML

Implemented in zeus::TXObjectFactory.

virtual Retval MQUALIFIER zeus::IXObjectFactory::createChildObjects ( IXMLNode rParentNode,
IXObject rParent,
bool  bDoUnfreeze = true 
) [pure virtual]

This creates all child objects of a existing parent object. This method can been called to create all children to a later point of time.

Parameters:
rParentNode,:Parent XML Node
rParent,:Parent Object
bDoUnfreeze,:If this flag is set, the object tree will be unfrozen after creation
Return values:
RET_INTERNAL_ERROR,:Internal Error occured
RET_NOERROR,:Object created

Implemented in zeus::TXObjectFactory.

virtual Retval MQUALIFIER zeus::IXObjectFactory::createObjectByXMLNode ( IXMLNode rMainNode,
NAMESPACE_Zeus::IXMLDocument *  pDocu,
IXObject *&  rpObj,
bool  bDoUnfreeze = true 
) [pure virtual]

This method creates an object tree out of an Xml node

Parameters:
rMainNode,:Main node of the document
pDocu,:XML document
rpObj,:Return of the created tree root node
bDoUnfreeze,:If this flag is set, the object tree will be unfrozen after creation
Return values:
RET_UNREGISTERED_CLASS,:Class is not registered
RET_REQUEST_FAILED,:No valid XML
RET_INTERNAL_ERROR,:Internal Error occured
RET_NOERROR,:Object created

Implemented in zeus::TXObjectFactory.

virtual Retval MQUALIFIER zeus::IXObjectFactory::createObjectFromDocument ( NAMESPACE_Zeus::IXMLDocument &  rDocument,
IXObject *&  rpObj,
bool  bOnlyRoot = true,
bool  bDoUnfreeze = true 
) [pure virtual]

This creates a xrootobject out of a xml document.

Parameters:
rDocument,:XML Document
rpObj,:Return parameter of created xrootobject
bDoUnfreeze,:If this flag is set, the object tree will be unfrozen after creation
Return values:
RET_UNREGISTERED_CLASS,:Class is not registered
RET_REQUEST_FAILED,:No valid XML
RET_INTERNAL_ERROR,:Internal Error occured
RET_INVALID_DATA,:Not a valid XML Format
RET_NOERROR,:Object created

Implemented in zeus::TXObjectFactory.

virtual Retval MQUALIFIER zeus::IXObjectFactory::createObjectFromFile ( const IString rstrFileName,
IXObject *&  rpObj,
bool  bOnlyRoot = true,
bool  bDoUnfreeze = true 
) [pure virtual]

This creates a xrootobject out of a xml file stream.

Parameters:
rstrFileName,:File name
rpObj,:Return parameter of created xrootobject
bDoUnfreeze,:If this flag is set, the object tree will be unfrozen after creation
Return values:
RET_UNREGISTERED_CLASS,:Class is not registered
RET_REQUEST_FAILED,:No valid XML
RET_INTERNAL_ERROR,:Internal Error occured
RET_NOERROR,:Object created

Implemented in zeus::TXObjectFactory.

virtual Retval MQUALIFIER zeus::IXObjectFactory::createObjectFromStream ( const IString rstrStream,
IXObject *&  rpObj,
bool  bOnlyRoot = true,
bool  bDoUnfreeze = true 
) [pure virtual]

This creates a xrootobject out of a xml stream.

Parameters:
rstrStream,:Stream data (xml format)
rpObj,:Return parameter of created xrootobject
bDoUnfreeze,:If this flag is set, the object tree will be unfrozen after creation
Return values:
RET_UNREGISTERED_CLASS,:Class is not registered
RET_REQUEST_FAILED,:No valid XML
RET_INTERNAL_ERROR,:Internal Error occured
RET_NOERROR,:Object created

Implemented in zeus::TXObjectFactory.

virtual bool MQUALIFIER zeus::IXObjectFactory::isRegistered ( const IString rstrClassName,
const IString rstrCodeModule 
) const [pure virtual]

Checks if a factory function is registered.

Parameters:
rstrClassName,:Name of class to check availability of its factory function
rstrCodeModule,:Module name of class hosting module
Returns:
Factory function registered

Implemented in zeus::TXObjectFactory.

virtual Uint MQUALIFIER zeus::IXObjectFactory::registerXClass ( const IString rstrClassName,
IXObject::DltCreateXObject  pdltFunct 
) [pure virtual]

This method registeres a factory method to create a specific xobject named by classname.

Parameters:
rstrClassName,:Name of class
pdltFunct,:Function to call
Returns:
If the handle is = 0xFFFFFFFF the registration failed

Implemented in zeus::TXObjectFactory.

virtual Uint MQUALIFIER zeus::IXObjectFactory::registerXClassOfCodeModule ( const IString rstrClassName,
const IString rstrCodeModule,
IXObject::DltCreateXObject  pdltFunct 
) [pure virtual]

This method registeres a factory method to create a specific xobject named by classname and codemodule.

Parameters:
rstrClassName,:Name of class
rstrCodeModule,:Code module of the class
pdltFunct,:Function to call
Returns:
If the handle is = 0xFFFFFFFF the registration failed

Implemented in zeus::TXObjectFactory.

virtual void MQUALIFIER zeus::IXObjectFactory::setErrorObjectExpandProperty ( bool  bValue ) [pure virtual]

This property must be set to expand the x-object tree with all possible x-object node, even they can not be created with the correct object classes. Therefore the error object will be created. This property is set to false as default, meaning the objects are not created and put to the tree if the correct class can not be found.

Parameters:
bValue,:property flag

Implemented in zeus::TXObjectFactory.

virtual bool MQUALIFIER zeus::IXObjectFactory::unregisterXClass ( Uint  hHandle,
const IString rstrClassName 
) [pure virtual]

This method unregisteres a factory method.

Parameters:
hHandle,:Handle of the registration
rstrClassName,:Name of class
Return values:
true,:Class unregistered
false,:Could not unregister class

Implemented in zeus::TXObjectFactory.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Sun Jan 22 2012 15:28:37