Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

CdbBdbPrintObjectTree Class Reference

This class provides "print object tree" facility for persistent objects. More...

#include <CdbBdbPrintObjectTree.hh>

List of all members.

Public Member Functions

 CdbBdbPrintObjectTree (CdbBdbPrintObjectTreeUserAction *theUserAction, bool verboseMode=false, bool debugMode=false)
 Normal constructor.

virtual ~CdbBdbPrintObjectTree ()
 Destructor.

bool print (const ooHandle(ooObj)&theInputH)
 Visit the specified object.

CdbBdbPrintObjectTreeUserActionsetUserAction (CdbBdbPrintObjectTreeUserAction *theUserAction)
 Set user action.


Detailed Description

This class provides "print object tree" facility for persistent objects.

This facility uses the Objectivity/DB Active Schema API to navigate accross an arbitrary graph of objects by visiting and printing OID-s of each node in the graph. Specified (if any) user defined action will be called for each node. Each node is visited just once. But it (the object) still would be printed. A user defined action object provides a feedback wether the operation should propagate beyond a visited node or it should stop at this node or it should break visiting due to a error.

IMPLEMENTATION NOTES:

(1) This class uses PIMPL idiom to protect end users of the class from being exposed to the buggy header files of the Objectivity/DB Active Schema API.

(2) This class violates CDB API convention on the inclusion of "CdbBase/CdbCommon.hh" header file to avoid STD namespace conflicts of the kind described above.

ATTENTION:

Definition at line 41 of file CdbBdbPrintObjectTree.hh.


Constructor & Destructor Documentation

CdbBdbPrintObjectTree::CdbBdbPrintObjectTree CdbBdbPrintObjectTreeUserAction   theUserAction,
bool    verboseMode = false,
bool    debugMode = false
 

Normal constructor.

Sets the initial context for the profiling. This context can be reused accross multiple calls to the profiling method itself.

A non-zero pointer onto a user defined action is required.

The ownership to a user action does not get transferred into the current object. We may need non-const pointer to let a user to maintain the context of user action between calls.

Note, a user action object can be overriden by passing another user action object by calling a special "setUserAction" method.

Definition at line 15 of file CdbBdbPrintObjectTree.cc.

CdbBdbPrintObjectTree::~CdbBdbPrintObjectTree   [virtual]
 

Destructor.

More details...

Definition at line 23 of file CdbBdbPrintObjectTree.cc.


Member Function Documentation

bool CdbBdbPrintObjectTree::print const ooHandle(ooObj)&    theInputH
 

Visit the specified object.

The operation will return "true" in case of success, it will return "false" in case of any errors.

Definition at line 30 of file CdbBdbPrintObjectTree.cc.

References CdbBdbPrintObjectTreeImpl::print().

CdbBdbPrintObjectTreeUserAction * CdbBdbPrintObjectTree::setUserAction CdbBdbPrintObjectTreeUserAction   theUserAction
 

Set user action.

If 0 pointer is passed then the current user action will be reset and it will not be called anymore.

The method will return a pointer onto the previous action (if any).

See also:
class CdbBdbPrintObjectTreeUserAction

Definition at line 36 of file CdbBdbPrintObjectTree.cc.

References CdbBdbPrintObjectTreeImpl::setUserAction().


The documentation for this class was generated from the following files:
Generated on Mon Dec 5 18:22:18 2005 for CDB by doxygen1.3-rc3