ZeusBase-Library
2.0.4
|
#include <IXObject.hpp>
Public Types | |
typedef Retval MQUALIFIER(* | DltCreateXObject) (IXMLNode *pMainNode, IXMLDocument *pDocu, IXObject *&rpObj) |
Public Member Functions | |
virtual void MQUALIFIER | getName (IString &rstrName) const =0 |
virtual void MQUALIFIER | getClassName (IString &rstrName) const =0 |
virtual Uint MQUALIFIER | getID () const =0 |
virtual Retval MQUALIFIER | addChild (IXObject &rChild)=0 |
virtual Retval MQUALIFIER | deleteChild (Int iIndex, bool bDoFreeze=false)=0 |
virtual Retval MQUALIFIER | removeChild (IXObject &rChild, bool bDoFreeze=false)=0 |
virtual Int MQUALIFIER | getChildCount () const =0 |
virtual Retval MQUALIFIER | getChild (Int iIndex, IXObject *&rpChild)=0 |
virtual Retval MQUALIFIER | getChildByName (const IString &rstrName, IXObject *&rpChild)=0 |
virtual Retval MQUALIFIER | getChildrenByName (const IString &rstrName, IXObjectCollection *&rpObjects)=0 |
virtual Retval MQUALIFIER | getParent (IXObject *&rpParent) const =0 |
virtual Retval MQUALIFIER | getXMLNode (IXMLNode *&rpParent) const =0 |
virtual Retval MQUALIFIER | setParent (IXObject *pParent)=0 |
virtual Retval MQUALIFIER | setChild (IXObject &rChild)=0 |
virtual Retval MQUALIFIER | getRootObject (IXObject *&rpObj)=0 |
virtual Retval MQUALIFIER | getObject (const IString &rstrPath, IXObject *&rpObj)=0 |
virtual Retval MQUALIFIER | getObjects (const IString &rstrPath, IXObjectCollection *&rpObjects)=0 |
virtual bool MQUALIFIER | canCreateChildren () const =0 |
virtual bool MQUALIFIER | freeze ()=0 |
virtual bool MQUALIFIER | unfreeze ()=0 |
virtual bool MQUALIFIER | isFrozen () const =0 |
virtual void MQUALIFIER | setTreeLock (ICriticalSection *pSection)=0 |
virtual void MQUALIFIER | lockTree ()=0 |
virtual void MQUALIFIER | unlockTree ()=0 |
virtual Retval MQUALIFIER | onExecute (ISimpleCommand &rCommand, Uint uiMode)=0 |
virtual void MQUALIFIER | onBroadCast (ISimpleCommand &rMessage)=0 |
virtual Retval MQUALIFIER | insertChild (Int iIndex, IXObject &rChild)=0 |
virtual Int MQUALIFIER | indexOfChild (IXObject &rChild)=0 |
virtual Retval MQUALIFIER | createChildObject (const IString &rstrName, const IString &rstrClassName, const IString &rstrCodeModule, IXObject *&rpChild)=0 |
virtual Retval MQUALIFIER | createChildObjectCustom (const IString &rstrName, const IString &rstrClassName, const IString &rstrCodeModule, const IStringList &rList, IXObject *&rpChild)=0 |
virtual Retval MQUALIFIER | getCastedObject (const IString &rstrPath, const InterfaceID &rInterfaceID, IZUnknown *&rpObj)=0 |
virtual Retval MQUALIFIER | readIntAttribute (const IString &rstrName, Int &riValue, Int iDefault=0) const =0 |
virtual Retval MQUALIFIER | readUintAttribute (const IString &rstrName, Uint &ruiValue, Uint uiDefault=0) const =0 |
virtual Retval MQUALIFIER | readFloatAttribute (const IString &rstrName, Float &rfValue, Float fDefault=0) const =0 |
virtual Retval MQUALIFIER | readStringAttribute (const IString &rstrName, IString &rstrValue) const =0 |
virtual Retval MQUALIFIER | readTimevalAttribute (const IString &rstrName, Timeval &rtmValue, Timeval tmDefault=0) const =0 |
virtual Retval MQUALIFIER | readBoolAttribute (const IString &rstrName, bool &rbValue, bool bDefault=false) const =0 |
virtual Retval MQUALIFIER | storeIntAttribute (const IString &rstrName, const Int &riValue)=0 |
virtual Retval MQUALIFIER | storeUintAttribute (const IString &rstrName, const Uint &ruiValue)=0 |
virtual Retval MQUALIFIER | storeFloatAttribute (const IString &rstrName, const Float &rfValue)=0 |
virtual Retval MQUALIFIER | storeStringAttribute (const IString &rstrName, const IString &rstrValue)=0 |
virtual Retval MQUALIFIER | storeTimevalAttribute (const IString &rstrName, const Timeval &rtmValue)=0 |
virtual Retval MQUALIFIER | storeBoolAttribute (const IString &rstrName, const bool &rbValue)=0 |
virtual Int MQUALIFIER | getMemberCount () const =0 |
virtual Retval MQUALIFIER | getMemberVariable (Int iIndex, IXMemberVariable *&rpMember) const =0 |
virtual Retval MQUALIFIER | getMemberVariableByName (const IString &rstrName, IXMemberVariable *&rpMember) const =0 |
virtual Retval MQUALIFIER | addNewMemberVariable (const IString &rstrName, IXMemberVariable::EVariableType eType)=0 |
virtual Retval MQUALIFIER | removeMemberVariable (const IString &rstrName)=0 |
virtual Retval MQUALIFIER | getMemberObjectReference (const IString &rstrName, IXObject *&rpRef)=0 |
virtual Retval MQUALIFIER | getMemberXMLNode (const IString &rstrName, IXMLNode *&rpNode) const =0 |
virtual Retval MQUALIFIER | readMemberVariable (const IString &rstrName, IZVariant &rValue) const =0 |
virtual Retval MQUALIFIER | storeMemberVariable (const IString &rstrName, const IZVariant &rValue)=0 |
virtual void MQUALIFIER | resetMemberVariables ()=0 |
Public Member Functions inherited from zeus::IZUnknown | |
virtual Retval MQUALIFIER | askForInterface (const InterfaceID &rInterfaceID, IZUnknown *&rpIface)=0 |
virtual void MQUALIFIER | addRef () const =0 |
virtual void MQUALIFIER | release () const =0 |
This interface defines a X-Object interface. An X-Object wrapps a XML node and can be created using automated factories. X-Objects are used to created object trees and for persistent object layers using xml.
typedef Retval MQUALIFIER(* zeus::IXObject::DltCreateXObject) (IXMLNode *pMainNode, IXMLDocument *pDocu, IXObject *&rpObj) |
Callback function definition for creation of an XObject
pMainNode | Xml node repersenting the object |
pDocu | Xml document containing node definition |
rpObj | Created object |
|
pure virtual |
This methods adds an XObject as a child to this object
rChild | child object to add |
RET_NOERROR | Child object added |
RET_REQUEST_FAILED | Could not add object |
Implemented in zeus::TXLoaderObject, and zeus::TXObject.
|
pure virtual |
Adds a new member variable to the x-object class. This method is used to design a X-Object.
rstrName | Name of the member variable |
eType | Type of the member variable |
RET_NOERROR | Member created and added |
RET_REQUEST_FAILED | Invalid name |
Implemented in zeus::TXObject.
|
pure virtual |
This methods checks if the children components can be created
true | Able to create children |
false | Do not create children |
Implemented in zeus::TXObject, and zeus::TXLoaderObject.
|
pure virtual |
creates a new child object
rstrName | Object name |
rstrClassName | Name of the class |
rstrCodeModule | Codemodule |
rpChild | Return parameter of the child object |
RET_NOERROR | Child created |
RET_INVALID_DATA | Could not generate XML data |
RET_REQUEST_FAILED | Could not create child |
Implemented in zeus::TXObject.
|
pure virtual |
creates a new child object
rstrName | Object name |
rstrClassName | Name of the class |
rstrCodeModule | Codemodule |
rList | List of attribute - value pairs |
rpChild | Return parameter of the child object |
RET_NOERROR | Child created |
RET_INVALID_DATA | Could not generate XML data |
RET_REQUEST_FAILED | Could not create child |
Implemented in zeus::TXObject.
|
pure virtual |
Deletes a child out of the list.
iIndex | Index of child to Remove |
bDoFreeze | Flag to freeze the removed child. Default is false |
RET_NOERROR | Child deleted |
RET_REQUEST_FAILED | Could not delete child. |
Implemented in zeus::TXObject.
|
pure virtual |
This method freezes a xobject. All external references has to be released at that point.
true | Freezing has been performed |
false | Already frozen |
Implemented in zeus::TXObject, zeus::TSimpleCommand, zeus::TModule, zeus::TSystemManager, and zeus::TXLoaderObject.
|
pure virtual |
This method is used to get an object from the tree. Therefor a special Syntax is used. The object will be casted to the required type. If the cast fails, this method will return the next object with the corresponding name and interface id.
rstrPath | Objectpath |
rInterfaceID | ID of the interface |
rpObj | Return parameter of the object |
RET_NOERROR | object found and returned |
RET_REQUEST_FAILED | Could not find object |
RET_INVALID_DATA | Invalid path |
Implemented in zeus::TXObject.
|
pure virtual |
Get a child object by index
iIndex | Index of the object |
rpChild | Return parameter of the found object |
RET_NOERROR | Child object found |
RET_INVALID_PARAMETER | Invalid parameter received |
Implemented in zeus::TXLoaderObject, and zeus::TXObject.
|
pure virtual |
Get a child object by name
rstrName | Name of the object |
rpChild | Return parameter of the found object |
RET_NOERROR | Child object found |
RET_INVALID_PARAMETER | Invalid parameter received |
RET_REQUEST_FAILED | No child found |
Implemented in zeus::TXLoaderObject, and zeus::TXObject.
|
pure virtual |
|
pure virtual |
Get children objects by name. If the name is empty, all children of this object are returned.
rstrName | Name of the objects |
rpObjects | Return parameter of the found objects |
RET_NOERROR | Child objects found |
RET_INVALID_PARAMETER | Invalid parameter received |
RET_REQUEST_FAILED | No child found |
Implemented in zeus::TXObject.
|
pure virtual |
This methods returns the classname of the object
rstrName | return parameter |
Implemented in zeus::TXObject.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Returns the object reference if the member value is of type 'ref'. The Reference attribute of the member node contains the X-Object path of the requested object. This method is not const since reading a X-Object can change the X-Object tree (see XLoaderObject).
rstrName | Name of the member variable |
rpRef | Return value |
RET_NOERROR | object found and returned |
RET_INVALID_PARAMETER | no such member found. Name is invalid. |
RET_INVALID_TYPE | Invalid type. Must be 'ref'. |
RET_REQUEST_FAILED | No such object found. |
Implemented in zeus::TXObject.
|
pure virtual |
Returns the indexed member variable
iIndex | Index of the member |
rpMember | Member description object |
RET_NOERROR | Member returned |
RET_REQUEST_FAILED | Could not find such a member |
Implemented in zeus::TXObject.
|
pure virtual |
Returns the a member variable by name
rstrName | Name of the member |
rpMember | Member description object |
RET_NOERROR | Member returned |
RET_REQUEST_FAILED | Could not find such a member |
Implemented in zeus::TXObject.
|
pure virtual |
This returns the XML node of a requested member variable. The type of the variable must be 'xml'.
rstrName | Name of the member variable |
rpNode | Return value |
RET_NOERROR | XML Node returned |
RET_INVALID_PARAMETER | no such member found. Name is invalid |
RET_INVALID_TYPE | Type is not 'xml' |
Implemented in zeus::TXObject.
|
pure virtual |
This methods returns the name of the object
rstrName | return parameter |
Implemented in zeus::TSystemManager, zeus::TModule, and zeus::TXObject.
|
pure virtual |
This method is used to get an object from the tree. Therefor a special Syntax is used.
rstrPath | Path of the object inside the xobject tree |
rpObj | Return parameter of the object |
RET_NOERROR | object found and returned |
RET_REQUEST_FAILED | Could not find object |
RET_INVALID_DATA | Invalid path |
Implemented in zeus::TXObject.
|
pure virtual |
This method is used to get an object list from the tree. Therefor a special Syntax is used.
rstrPath | Path of the object inside the xobject tree |
rpObjects | Return parameter of the objects |
RET_NOERROR | object list returned (maybe empty) |
RET_REQUEST_FAILED | no object list returned (maybe invalid xpath) |
Implemented in zeus::TXObject.
|
pure virtual |
Get the parent object
rpParent | Return parameter of the found object |
RET_NOERROR | parent found |
RET_REQUEST_FAILED | No parent found -> this is the root object |
Implemented in zeus::TXObject.
|
pure virtual |
Returns the root object of the object tree.
rpObj | Return parameter of the root object |
RET_NOERROR | Root object returned |
RET_INVALID_PARAMETER | Invalid parameter received; |
Implemented in zeus::TXObject.
|
pure virtual |
Get the xml node of the xobject
rpParent | return parameter of the xml node |
RET_NOERROR | node returned |
RET_REQUEST_FAILED | Could not get the xml node |
Implemented in zeus::TXObject.
|
pure virtual |
This method returns the index of a child object
rChild | Child reference |
>=0 | index of child in the list |
-1 | the child does not exists inside the list. |
Implemented in zeus::TXObject.
|
pure virtual |
This method inserts a child to the parent object. The child will be added at the insert position. If the insert position is bigger than the child list, it will add the child at the end of the list.
iIndex | Insert position of the child |
rChild | Child reference |
RET_NOERROR | Child inserted |
RET_REQUEST_FAILED | Could not inset the child object |
Implemented in zeus::TXObject, and zeus::TXLoaderObject.
|
pure virtual |
Checks if a xobject is frozen.
true | xobject is frozen |
false | xobject is alive |
Implemented in zeus::TXObject.
|
pure virtual |
This locks the xobject tree. Before using this method, set a lock object using setTreeLock()
Implemented in zeus::TXObject.
|
pure virtual |
Handles and sents a broad cast message to all its children.
rMessage | Message to perform |
Implemented in zeus::TXObject.
|
pure virtual |
Executes a simple command. This can be used as a action method
rCommand | Command to execute |
uiMode | Mode of execution |
RET_NOERROR | Command executed |
RET_REQUEST_FAILED | Command has not been understand |
Implemented in zeus::TXObject.
|
pure virtual |
Returns a bool attribute of the object.
rstrName | Name of the attribute |
rbValue | Return value |
bDefault | Default value if the attribute can not be converted |
RET_NOERROR | Attribute returned |
RET_REQUEST_FAILED | No such attribute found |
Implemented in zeus::TXObject.
|
pure virtual |
Returns a float attribute of the object.
rstrName | Name of the attribute |
rfValue | Return value |
fDefault | Default value if the attribute can not be converted |
RET_NOERROR | Attribute returned |
RET_REQUEST_FAILED | No such attribute found |
Implemented in zeus::TXObject.
|
pure virtual |
Returns an integer attribute of the object.
rstrName | Name of the attribute |
riValue | Return value |
iDefault | Default value if the attribute can not be converted |
RET_NOERROR | Attribute returned |
RET_REQUEST_FAILED | No such attribute found |
Implemented in zeus::TXObject.
|
pure virtual |
Returns an member variable of the object.
rstrName | Name of the member variable |
rValue | Return value |
RET_NOERROR | member returned |
RET_INVALID_PARAMETER | no such member found. Name is invalid |
RET_INVALID_TYPE | Invalid member type. Could not get value. |
Implemented in zeus::TXObject.
|
pure virtual |
Returns a string attribute of the object.
rstrName | Name of the attribute |
rstrValue | Return value |
RET_NOERROR | Attribute returned |
RET_REQUEST_FAILED | No such attribute found |
Implemented in zeus::TXObject.
|
pure virtual |
Returns a timeval attribute of the object.
rstrName | Name of the attribute |
rtmValue | Return value |
tmDefault | Default value if the attribute can not be converted |
RET_NOERROR | Attribute returned |
RET_REQUEST_FAILED | No such attribute found |
Implemented in zeus::TXObject.
|
pure virtual |
Returns an unsigned integer attribute of the object.
rstrName | Name of the attribute |
ruiValue | Return value |
uiDefault | Default value if the attribute can not be converted |
RET_NOERROR | Attribute returned |
RET_REQUEST_FAILED | No such attribute found |
Implemented in zeus::TXObject.
|
pure virtual |
This methods removes an XObject
rChild | child object to remove |
bDoFreeze | Flag to freeze the removed child. Default is false |
RET_NOERROR | Child removed |
RET_REQUEST_FAILED | Could not remove child. |
Implemented in zeus::TXObject.
|
pure virtual |
Removes a member variable from this X-Object. This method is used to design a X-Object.
rstrName | Name of the member variable |
RET_NOERROR | Member removed |
RET_REQUEST_FAILED | Member not found |
Implemented in zeus::TXObject.
|
pure virtual |
Resets the list of member variables. This is nessecary if the XMember structure of the XML changes. This might happen during a synchronizing process of the XObjectTreeSynchronizing.
Implemented in zeus::TXObject.
|
pure virtual |
This methods sets an XObject as a child of this object. Do not use this method. Its only used by the factory creating the tree. Therefor the xml structure wont be touched. For adding children, use the method addChild() instead. It will update the xml structure as well.
rChild | child object to add |
RET_NOERROR | Child object added |
RET_REQUEST_FAILED | Could not add child |
Implemented in zeus::TXObject.
|
pure virtual |
Set the parent object. Only for internal use
pParent | Parameter to set. If NULL is set, the object resets its parent |
RET_NOERROR | parent set |
RET_REQUEST_FAILED | Could not set the parent |
Implemented in zeus::TXObject.
|
pure virtual |
This method sets a lock for the whole XObject tree. This enables a secure multithreading access to the xobject tree.
pSection | Lock object |
Implemented in zeus::TXObject.
|
pure virtual |
Stores a bool attribute of the object. The value will be stored as 0 for false, or 1 for true.
rstrName | Name of the attribute |
rbValue | value to store |
RET_NOERROR | Attribute stored |
RET_REQUEST_FAILED | Storing attribute failed |
Implemented in zeus::TXObject.
|
pure virtual |
Stores a float attribute of the object.
rstrName | Name of the attribute |
rfValue | value to store |
RET_NOERROR | Attribute stored |
RET_REQUEST_FAILED | Storing attribute failed |
Implemented in zeus::TXObject.
|
pure virtual |
Stores an integer attribute of the object.
rstrName | Name of the attribute |
riValue | value to store |
RET_NOERROR | Attribute stored |
RET_REQUEST_FAILED | Storing attribute failed |
Implemented in zeus::TXObject.
|
pure virtual |
Stores an member variable of the object.
rstrName | Name of the member variable |
rValue | Return value |
RET_NOERROR | member stored |
RET_INVALID_PARAMETER | no such member found. Name is invalid |
RET_INVALID_TYPE | Invalid member type. Could not get value. |
Implemented in zeus::TXObject.
|
pure virtual |
Stores a string attribute of the object.
rstrName | Name of the attribute |
rstrValue | value to store |
RET_NOERROR | Attribute stored |
RET_REQUEST_FAILED | Storing attribute failed |
Implemented in zeus::TXObject.
|
pure virtual |
Stores a timeval attribute of the object.
rstrName | Name of the attribute |
rtmValue | value to store |
RET_NOERROR | Attribute stored |
RET_REQUEST_FAILED | Storing attribute failed |
Implemented in zeus::TXObject.
|
pure virtual |
Stores an unsigned integer attribute of the object.
rstrName | Name of the attribute |
ruiValue | value to store |
RET_NOERROR | Attribute stored |
RET_REQUEST_FAILED | Storing attribute failed |
Implemented in zeus::TXObject.
|
pure virtual |
This method unfreezes a xobject. The external References begin to live and are accecible for others.
true | Unfreezing has been performed |
false | Already unfrozen |
Implemented in zeus::TXObject, zeus::TModule, zeus::TSystemManager, zeus::TXLoaderObject, and zeus::TXErrorObject.
|
pure virtual |
Unlocks the xobject tree
Implemented in zeus::TXObject.