#include <IXSynchronAction.hpp>
Public Types | |
| enum | ENodeActionType { etNodeUnchanged = 0, etNodeChange = 1, etNodeAdd = 2, etNodeRemove = 3, etNodeError = 4 } |
Public Member Functions | |
| virtual Retval MQUALIFIER | addNewChild (IXObject *pNode1, IXObject *pNode2, IXSynchronAction::ENodeActionType eType, IXSynchronAction *&pChild)=0 |
| virtual void MQUALIFIER | add (IXSynchronAction &pChild)=0 |
| virtual Retval MQUALIFIER | getNextChildOfAction (IXSynchronAction &rRefChild, IXSynchronAction *&rpNextChild)=0 |
| virtual Int MQUALIFIER | getCount () const =0 |
| virtual Retval MQUALIFIER | getChild (Int iIndex, IXSynchronAction *&rpAction) const =0 |
| virtual ENodeActionType MQUALIFIER | getType () const =0 |
| virtual Retval MQUALIFIER | getNode1 (IXObject *&rpNode) const =0 |
| virtual Retval MQUALIFIER | getNode2 (IXObject *&rpNode) const =0 |
| virtual Retval MQUALIFIER | getParent (IXSynchronAction *&rpParent) const =0 |
| virtual void MQUALIFIER | setParent (IXSynchronAction &rParent)=0 |
| virtual void MQUALIFIER | disable ()=0 |
| virtual void MQUALIFIER | enable ()=0 |
| virtual bool MQUALIFIER | isEnabled () const =0 |
| virtual Retval MQUALIFIER | executeAction (Int iCycleCount=0, bool bUnfreeze=false, bool bCleanTree=false, IXSynchronActionListener *pListener=NULL)=0 |
| virtual void MQUALIFIER | getCaption (IString &rCaption) const =0 |
| virtual Retval MQUALIFIER | findAction (IXObject &rObject, IXSynchronAction *&rpAction)=0 |
| virtual Retval MQUALIFIER | executeRecurs (Int iActCylceIndex, IXSynchronActionListener *pListener=NULL)=0 |
| virtual void MQUALIFIER | finishRecurs ()=0 |
| virtual void MQUALIFIER | cleanTargetTree ()=0 |
| virtual Int MQUALIFIER | getSubActionCount () const =0 |
| virtual Retval MQUALIFIER | getErrorCode () const =0 |
| virtual Retval MQUALIFIER | checkPreConditions (Int iCycleIndex=0, bool bForce=false)=0 |
| virtual void MQUALIFIER | setRootObjectNotification (bool bFlag)=0 |
| virtual Retval MQUALIFIER | getRootAction (IXSynchronAction *&rpRoot) const =0 |
This interface defines the access to synchronisation actions of a tree synchronisation. The synchronisation proceeds like follows:
| virtual void MQUALIFIER zeus::IXSynchronAction::add | ( | IXSynchronAction & | pChild ) | [pure virtual] |
Adds a child action to this instance
Implemented in zeus::TXSynchronAction.
| virtual Retval MQUALIFIER zeus::IXSynchronAction::addNewChild | ( | IXObject * | pNode1, |
| IXObject * | pNode2, | ||
| IXSynchronAction::ENodeActionType | eType, | ||
| IXSynchronAction *& | pChild | ||
| ) | [pure virtual] |
Adds a new child action to this action
Implemented in zeus::TXSynchronAction.
| virtual Retval MQUALIFIER zeus::IXSynchronAction::checkPreConditions | ( | Int | iCycleIndex = 0, |
| bool | bForce = false |
||
| ) | [pure virtual] |
Checks the pre conditions of the whole action tree. It will return the specific error code of the first failing action node. The method might continue recursivly after that, if the flag bForce is set. Otherwise it will terminate the precondition search.
| iCycleIndex | : Check condition for that cycle |
| bForce | : Check children even the parent has an error |
Implemented in zeus::TXSynchronAction.
| virtual void MQUALIFIER zeus::IXSynchronAction::cleanTargetTree | ( | ) | [pure virtual] |
This method removes all objects which are frozen at this moment. Do not call this method directly. Use executeAction()
Implemented in zeus::TXSynchronAction.
| virtual void MQUALIFIER zeus::IXSynchronAction::disable | ( | ) | [pure virtual] |
Disabling an action is used to skip this action from execution. All its children will be disabled as well.
Implemented in zeus::TXSynchronAction.
| virtual void MQUALIFIER zeus::IXSynchronAction::enable | ( | ) | [pure virtual] |
If an action is enabled, it can be executed to transform the one tree node from tree 1 to tree 2
Implemented in zeus::TXSynchronAction.
| virtual Retval MQUALIFIER zeus::IXSynchronAction::executeAction | ( | Int | iCycleCount = 0, |
| bool | bUnfreeze = false, |
||
| bool | bCleanTree = false, |
||
| IXSynchronActionListener * | pListener = NULL |
||
| ) | [pure virtual] |
This method synchronizes two tree nodes
| iCycleCount,: | Number of cycles for synchronizing. If zero is given (default), it will simply run the X-Object synchronisation. If lCycleCount > 0 then it will repeat lCycleCount times the executeRecus() method. |
| bUnfreeze | : Unfreeze synchronized tree |
| bCleanTree | : Remove all frozen objects after synchronizing and unfreezing |
| pListener | : Listener interface to get callbacks of the actual execution state |
| RET_NOERROR | : No error occured transforming the nodes or the action has been disabled |
| RET_REQUEST_FAILED | : Could not transform the nodes |
| virtual Retval MQUALIFIER zeus::IXSynchronAction::executeRecurs | ( | Int | iActCylceIndex, |
| IXSynchronActionListener * | pListener = NULL |
||
| ) | [pure virtual] |
This executes an action recursivly
| iActCylceIndex | : ID of the cycle to run. Zero is the X-Object synchronisation cycle. Every thing else is a custom cycle |
| pListener | : Listener interface to get callbacks of the actual execution state Do not call this method directly. Use executeAction() |
Implemented in zeus::TXSynchronAction.
| virtual Retval MQUALIFIER zeus::IXSynchronAction::findAction | ( | IXObject & | rObject, |
| IXSynchronAction *& | rpAction | ||
| ) | [pure virtual] |
Finds an action containing the rObject as left or right child
| rObject | : Target or Source Object of the action |
| rpAction | : Return parameter of a found action |
| RET_NOERROR | : Action found and returned |
| RET_REQUEST_FAILED | : Could not find the action |
Implemented in zeus::TXSynchronAction.
| virtual void MQUALIFIER zeus::IXSynchronAction::finishRecurs | ( | ) | [pure virtual] |
This finishes an action recursivly Do not call this method directly. Use executeAction()
Implemented in zeus::TXSynchronAction.
| virtual void MQUALIFIER zeus::IXSynchronAction::getCaption | ( | IString & | rCaption ) | const [pure virtual] |
Returns the caption of the action
Implemented in zeus::TXSynchronAction.
| virtual Retval MQUALIFIER zeus::IXSynchronAction::getChild | ( | Int | iIndex, |
| IXSynchronAction *& | rpAction | ||
| ) | const [pure virtual] |
returns an indexed child action
| iIndex | : index of the requested child action |
| rpAction | : return parameter |
| RET_NOERROR | : child returned |
| RET_REQUEST_FAILED | : no such child found |
Implemented in zeus::TXSynchronAction.
| virtual Int MQUALIFIER zeus::IXSynchronAction::getCount | ( | ) | const [pure virtual] |
returns the number of child actions
Implemented in zeus::TXSynchronAction.
| virtual Retval MQUALIFIER zeus::IXSynchronAction::getErrorCode | ( | ) | const [pure virtual] |
Returns an error code if the node has the state etNodeError. Otherwise it will return RET_NOERROR
Implemented in zeus::TXSynchronAction.
| virtual Retval MQUALIFIER zeus::IXSynchronAction::getNextChildOfAction | ( | IXSynchronAction & | rRefChild, |
| IXSynchronAction *& | rpNextChild | ||
| ) | [pure virtual] |
This method is used to get the next action.
| rRefChild | : The rRefChild Action is the previous sibling of the requested child instance |
| rpNextChild | : Return parameter of the requested child |
| RET_NOERROR | : Child returned |
| RET_REQUEST_FAILED | : No next child found |
Implemented in zeus::TXSynchronAction.
| virtual Retval MQUALIFIER zeus::IXSynchronAction::getNode1 | ( | IXObject *& | rpNode ) | const [pure virtual] |
This returns the 1st node of the action (source)
| rpNode | : Return parameter of the node |
| RET_REQUEST_FAILED,: | could not return the node |
| RET_NOERROR,: | node returned |
Implemented in zeus::TXSynchronAction.
| virtual Retval MQUALIFIER zeus::IXSynchronAction::getNode2 | ( | IXObject *& | rpNode ) | const [pure virtual] |
This returns the 1st node of the action (target)
| rpNode | : Return parameter of the node |
| RET_REQUEST_FAILED,: | could not return the node |
| RET_NOERROR,: | node returned |
Implemented in zeus::TXSynchronAction.
| virtual Retval MQUALIFIER zeus::IXSynchronAction::getParent | ( | IXSynchronAction *& | rpParent ) | const [pure virtual] |
This returns the parent action node
| rpParent | : Return parameter of the parent |
| RET_REQUEST_FAILED,: | could not return the parent |
| RET_NOERROR,: | parent returned |
Implemented in zeus::TXSynchronAction.
| virtual Retval MQUALIFIER zeus::IXSynchronAction::getRootAction | ( | IXSynchronAction *& | rpRoot ) | const [pure virtual] |
returns the root of the action tree
Implemented in zeus::TXSynchronAction.
| virtual Int MQUALIFIER zeus::IXSynchronAction::getSubActionCount | ( | ) | const [pure virtual] |
Returns the number of all cycle of this sub tree
Implemented in zeus::TXSynchronAction.
| virtual ENodeActionType MQUALIFIER zeus::IXSynchronAction::getType | ( | ) | const [pure virtual] |
This method returns the type of the action
Implemented in zeus::TXSynchronAction.
| virtual bool MQUALIFIER zeus::IXSynchronAction::isEnabled | ( | ) | const [pure virtual] |
Checks is an action is enabled.
| true | : Action is enabled |
| false,: | Action is disabled |
Implemented in zeus::TXSynchronAction.
| virtual void MQUALIFIER zeus::IXSynchronAction::setParent | ( | IXSynchronAction & | rParent ) | [pure virtual] |
Adds a child action to this instance
| rParent | : Parent instance |
Implemented in zeus::TXSynchronAction.
| virtual void MQUALIFIER zeus::IXSynchronAction::setRootObjectNotification | ( | bool | bFlag ) | [pure virtual] |
If this property is set, the root object of the X-Object tree will be notified of start and end synchronizing process events
| bFlag | : Notify the root object |
Implemented in zeus::TXSynchronAction.