Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

zeus::TXSynchronAction Class Reference

#include <XSynchronAction.h>

Inheritance diagram for zeus::TXSynchronAction:
zeus::TZObject zeus::IXSynchronAction zeus::IZUnknown zeus::IZUnknown

List of all members.

Public Member Functions

 TXSynchronAction (IXObject *pNode1, IXObject *pNode2, ENodeActionType actionType=IXSynchronAction::etNodeUnchanged)
 TXSynchronAction (IXObject *pNode1, IXObject *pNode2, IXSynchronAction *pParent, ENodeActionType actionType=IXSynchronAction::etNodeUnchanged)
virtual Retval MQUALIFIER addNewChild (IXObject *pNode1, IXObject *pNode2, IXSynchronAction::ENodeActionType mType, IXSynchronAction *&pChild)
virtual void MQUALIFIER add (IXSynchronAction &pChild)
virtual Retval MQUALIFIER getNextChildOfAction (IXSynchronAction &rRefChild, IXSynchronAction *&rpNextChild)
virtual Int MQUALIFIER getCount () const
virtual Retval MQUALIFIER getChild (Int iIndex, IXSynchronAction *&pAction) const
virtual ENodeActionType MQUALIFIER getType () const
virtual Retval MQUALIFIER getNode1 (IXObject *&pNode) const
virtual Retval MQUALIFIER getNode2 (IXObject *&pNode) const
virtual Retval MQUALIFIER getParent (IXSynchronAction *&pParent) const
virtual void MQUALIFIER setParent (IXSynchronAction &pParent)
virtual void MQUALIFIER disable ()
virtual void MQUALIFIER enable ()
virtual bool MQUALIFIER isEnabled () const
virtual Retval MQUALIFIER executeAction (long lCycleCount=0, bool bUnfreeze=false, bool bCleanTree=false, IXSynchronActionListener *pListener=NULL)
virtual void MQUALIFIER getCaption (IString &rCaption) const
virtual Retval MQUALIFIER findAction (IXObject &rObject, IXSynchronAction *&rpAction)
virtual Int MQUALIFIER getSubActionCount () const
virtual Retval MQUALIFIER getErrorCode () const
virtual Retval MQUALIFIER checkPreConditions (Int iCycleID=0, bool bForce=false)
virtual void MQUALIFIER setRootObjectNotification (bool bFlag)
virtual Retval MQUALIFIER getRootAction (IXSynchronAction *&rpRoot) const
virtual Retval MQUALIFIER askForInterface (const InterfaceID &rInterfaceID, IZUnknown *&rpIface)
virtual void MQUALIFIER addRef () const
virtual void MQUALIFIER release () const

Static Public Member Functions

static bool isNodeEqual (IXMLNode &pSource, IXMLNode &rTarget, bool bRecurs=true)
static bool isNodeEqual (IXMLNode &pSource, IXMLNode &rTarget, const TSet< TString > &rExcludedAttributes, bool bRecurs=true)

Protected Member Functions

virtual ~TXSynchronAction ()
virtual Retval MQUALIFIER executeRecurs (Int iActCylceID, IXSynchronActionListener *pListener=NULL)
virtual void MQUALIFIER finishRecurs ()
virtual void MQUALIFIER cleanTargetTree ()
virtual void onStartExecuting (bool &rAbort)
virtual void onExecuted (bool, bool &rAbort)
virtual void onPostProcessing (bool)
bool isRootOfExecution ()
bool canUnfreeze ()
bool canCleanTree ()
void setErrorCode (Retval retErrorCode)

Protected Attributes

TManagedList< IXSynchronActionm_lstChildren
 List of all children.
bool m_bRootObjectNotification
 Flag if the root must be notificated.

Detailed Description

This class implements the basic action object to synchronize two X-object trees


Constructor & Destructor Documentation

zeus::TXSynchronAction::TXSynchronAction ( IXObject pNode1,
IXObject pNode2,
ENodeActionType  actionType = IXSynchronAction::etNodeUnchanged 
)
zeus::TXSynchronAction::TXSynchronAction ( IXObject pNode1,
IXObject pNode2,
IXSynchronAction pParent,
ENodeActionType  actionType = IXSynchronAction::etNodeUnchanged 
)
TXSynchronAction::~TXSynchronAction (  ) [protected, virtual]

Destroys the synchronisation action


Member Function Documentation

void MQUALIFIER TXSynchronAction::add ( IXSynchronAction pChild ) [virtual]
Retval MQUALIFIER TXSynchronAction::addNewChild ( IXObject pNode1,
IXObject pNode2,
IXSynchronAction::ENodeActionType  mType,
IXSynchronAction *&  pChild 
) [virtual]
virtual void MQUALIFIER zeus::TXSynchronAction::addRef (  ) const [virtual]
See also:
IZUnknown::addRef

Reimplemented from zeus::TZObject.

virtual Retval MQUALIFIER zeus::TXSynchronAction::askForInterface ( const InterfaceID rInterfaceID,
IZUnknown *&  rpIface 
) [virtual]
See also:
IZUnknown::askForInterface

Reimplemented from zeus::TZObject.

bool zeus::TXSynchronAction::canCleanTree (  ) [inline, protected]

Returns the clean tree flag

bool zeus::TXSynchronAction::canUnfreeze (  ) [inline, protected]

Returns the unfreeze flag

Retval MQUALIFIER TXSynchronAction::checkPreConditions ( Int  iCycleID = 0,
bool  bForce = false 
) [virtual]
void MQUALIFIER TXSynchronAction::cleanTargetTree (  ) [protected, virtual]
void MQUALIFIER TXSynchronAction::disable (  ) [virtual]
void MQUALIFIER TXSynchronAction::enable (  ) [virtual]
virtual Retval MQUALIFIER zeus::TXSynchronAction::executeAction ( long  lCycleCount = 0,
bool  bUnfreeze = false,
bool  bCleanTree = false,
IXSynchronActionListener pListener = NULL 
) [virtual]
Retval MQUALIFIER TXSynchronAction::executeRecurs ( Int  iActCylceID,
IXSynchronActionListener pListener = NULL 
) [protected, virtual]
Retval MQUALIFIER TXSynchronAction::findAction ( IXObject rObject,
IXSynchronAction *&  rpAction 
) [virtual]
void MQUALIFIER TXSynchronAction::finishRecurs (  ) [protected, virtual]
void MQUALIFIER TXSynchronAction::getCaption ( IString rCaption ) const [virtual]
Retval MQUALIFIER TXSynchronAction::getChild ( Int  iIndex,
IXSynchronAction *&  pAction 
) const [virtual]
Int MQUALIFIER TXSynchronAction::getCount (  ) const [virtual]
Retval MQUALIFIER TXSynchronAction::getErrorCode (  ) const [virtual]
Retval MQUALIFIER TXSynchronAction::getNextChildOfAction ( IXSynchronAction rRefChild,
IXSynchronAction *&  rpNextChild 
) [virtual]
Retval MQUALIFIER TXSynchronAction::getNode1 ( IXObject *&  pNode ) const [virtual]
Retval MQUALIFIER TXSynchronAction::getNode2 ( IXObject *&  pNode ) const [virtual]
Retval MQUALIFIER TXSynchronAction::getParent ( IXSynchronAction *&  pParent ) const [virtual]
Retval MQUALIFIER TXSynchronAction::getRootAction ( IXSynchronAction *&  rpRoot ) const [virtual]
Int MQUALIFIER TXSynchronAction::getSubActionCount (  ) const [virtual]
IXSynchronAction::ENodeActionType MQUALIFIER TXSynchronAction::getType (  ) const [virtual]
virtual bool MQUALIFIER zeus::TXSynchronAction::isEnabled (  ) const [inline, virtual]

Checks is an action is enabled.

Return values:
true: Action is enabled
false,:Action is disabled

Implements zeus::IXSynchronAction.

bool TXSynchronAction::isNodeEqual ( IXMLNode pSource,
IXMLNode rTarget,
const TSet< TString > &  rExcludedAttributes,
bool  bRecurs = true 
) [static]

This method checks two nodes and returns true if they are equal

Parameters:
pSource: Source node to check
rTarget: Target node to check
rExcludedAttributes: exculded attributes, which are not synchronized
bRecurs: Check nodes recursivly (with children)
Return values:
true: nodes are equal
false: Nodes are different

rExcludedAttributes.hasItem(strAttName)

bool zeus::TXSynchronAction::isNodeEqual ( IXMLNode pSource,
IXMLNode rTarget,
bool  bRecurs = true 
) [inline, static]
bool zeus::TXSynchronAction::isRootOfExecution (  ) [inline, protected]

Returns true if the action is root of execution. The root of execution is valid during the execution of an action. After the execution the flag will be reset

virtual void zeus::TXSynchronAction::onExecuted ( bool  ,
bool &  rAbort 
) [inline, protected, virtual]

This call back can be used to access the xml data after the changes were made. Note that the child object were not processed at that time.

Parameters:
bErrorOccured: true = an error has been occured
rAbort: if the flag is true, the executeAction will abort and return an error
virtual void zeus::TXSynchronAction::onPostProcessing ( bool   ) [inline, protected, virtual]

This call back can be used for subclasses to do some post processing

Parameters:
bErrorOccured: true = an error has been occured
virtual void zeus::TXSynchronAction::onStartExecuting ( bool &  rAbort ) [inline, protected, virtual]

This call back can be used for subclasses to do some pre processing.

Parameters:
rAbort: if the flag is true, the executeAction will abort and return an error
virtual void MQUALIFIER zeus::TXSynchronAction::release (  ) const [virtual]
See also:
IZUnknown::release

Reimplemented from zeus::TZObject.

void zeus::TXSynchronAction::setErrorCode ( Retval  retErrorCode ) [inline, protected]

sets the error code of the action

void MQUALIFIER TXSynchronAction::setParent ( IXSynchronAction pParent ) [virtual]
void MQUALIFIER zeus::TXSynchronAction::setRootObjectNotification ( bool  bFlag ) [inline, virtual]

Member Data Documentation

Flag if the root must be notificated.

List of all children.


The documentation for this class was generated from the following files:
 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:43