zeus::TXObjectTreeSynchronizer Class Reference

#include <XObjectTreeSynchronizer.h>

Inheritance diagram for zeus::TXObjectTreeSynchronizer:

zeus::TZObject zeus::IZUnknown

List of all members.

Public Member Functions

 TXObjectTreeSynchronizer ()
Retval synchronizeTree (IXObject &rSource, IXObject &rTarget)
Retval getRootAction (IXSynchronAction *&rpObject)
Retval getSubAction (IXObject *pRefObject, IXSynchronAction *&rpObject)
Retval executeRootAction (IXSynchronActionListener *pListener=NULL)
Retval executeSubAction (IXObject *pRefObject, IXSynchronActionListener *pListener=NULL)
void setUnfreezeFlag (bool bUnfreeze)
void setCleanTreeFlag (bool bClean)
void setForceChangeActions (bool bForceChanges)
void setNumberOfCycles (Int iCycleCount)
void setAutoCheck (bool bValue)
void MQUALIFIER reset ()

Protected Member Functions

virtual ~TXObjectTreeSynchronizer ()


Detailed Description

The X-object tree synchronizer implements the functionality of synchronizing 2 object trees. There are different modes for synchronizing. The first mode is used to get changes between a source and a target tree. The second mode is used to complete both trees. At the moment only the first mode has been implemented.

Constructor & Destructor Documentation

TXObjectTreeSynchronizer::TXObjectTreeSynchronizer (  ) 

Creates a Tree synchronizer

TXObjectTreeSynchronizer::~TXObjectTreeSynchronizer (  )  [protected, virtual]

Destroys the Tree synchronizer


Member Function Documentation

Retval TXObjectTreeSynchronizer::synchronizeTree ( IXObject rSource,
IXObject rTarget 
)

This method starts the synchronizing of a tree. It will compare the target tree with the source tree and creates a action tree of changes to be processed. To receive the action tree call getActionTree().

Parameters:
rSource : Reference of the source tree
rTarget : Reference of the target tree
Return values:
RET_NOERROR : Processing is done.
RET_REQUEST_FAILED : Unable to process the tree comperation. This may occur if the source and the target are the same object.

Retval TXObjectTreeSynchronizer::getRootAction ( IXSynchronAction *&  rpObject  ) 

gets the action tree. If the parameter pRefObject is valid (not NULL), then it will return all actions from this object and its sub objects.

Parameters:
rpObject : Return parameter of an action tree
Return values:
RET_NOERROR : Actions returned
RET_REQUEST_FAILED : No actions available
RET_INVALID_DATA : Could not return actions because the ref object is not valid. (see note below)
Note:
If the parant of the pRefObject is changing (adding or removing) this method will fail.

Retval TXObjectTreeSynchronizer::getSubAction ( IXObject pRefObject,
IXSynchronAction *&  rpObject 
)

gets the action tree. If the parameter pRefObject is valid (not NULL), then it will return all actions from this object and its sub objects.

Parameters:
pRefObject : Reference object to get all actions from this object. If NULL is given, all actions will be returned
rpObject : Return parameter of an action tree
Return values:
RET_NOERROR : Actions returned
RET_REQUEST_FAILED : No actions available
RET_INVALID_DATA : Could not return actions because the ref object is not valid. (see note below)
Note:
If the parant of the pRefObject is changing (adding or removing) this method will fail.

Retval TXObjectTreeSynchronizer::executeRootAction ( IXSynchronActionListener pListener = NULL  ) 

This method will execute the root action of the synchronizing.

See also:
IXSynchronAction::executeAction

Retval TXObjectTreeSynchronizer::executeSubAction ( IXObject pRefObject,
IXSynchronActionListener pListener = NULL 
)

This method will execute the sub action of the synchronizing.

See also:
IXSynchronAction::executeAction

void zeus::TXObjectTreeSynchronizer::setUnfreezeFlag ( bool  bUnfreeze  )  [inline]

This sets the unfreeze flag. If true the synchronized target tree will be unfrozen after synchronizing

void zeus::TXObjectTreeSynchronizer::setCleanTreeFlag ( bool  bClean  )  [inline]

This sets the clean flag. If true the synchronized target tree will be cleaned after synchronizing and unfreezing (if bUnfreeze flag is set)

void zeus::TXObjectTreeSynchronizer::setForceChangeActions ( bool  bForceChanges  )  [inline]

Sets the flag to force the creation of change actions

void zeus::TXObjectTreeSynchronizer::setNumberOfCycles ( Int  iCycleCount  )  [inline]

Sets the number of cycles

void zeus::TXObjectTreeSynchronizer::setAutoCheck ( bool  bValue  )  [inline]

The auto check flag must be set to check all attributes and sub nodes during the synchronizing process. This flag is set to false as default, meaning only following attributes are checked: name, ID and classname.

void MQUALIFIER zeus::TXObjectTreeSynchronizer::reset (  )  [inline]

Resets the synchronizer


The documentation for this class was generated from the following files:


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Wed Oct 28 21:42:36 2009