#include <CdbBdbObjectVisitor.hh>
Public Member Functions | |
| CdbBdbObjectVisitor (CdbBdbObjectVisitorUserAction *theUserAction, bool verboseMode=false, bool debugMode=false) | |
| Normal constructor. | |
| virtual | ~CdbBdbObjectVisitor () |
| Destructor. | |
| bool | visit (const ooHandle(ooObj)&theInputH) |
| Visit the specified object. | |
| CdbBdbObjectVisitorUserAction * | setUserAction (CdbBdbObjectVisitorUserAction *theUserAction) |
| Set user action. | |
This facility uses the Objectivity/DB Active Schema API to navigate accross an arbitrary graph of objects by visiting each node and calling a user defined action at each node. Each node is visited just once. A user defined action object provides a feedback wether the visiting 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 39 of file CdbBdbObjectVisitor.hh.
|
||||||||||||||||
|
Normal constructor. Sets the initial context for the visiting. This context can be reused accross multiple calls to the visiting 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 CdbBdbObjectVisitor.cc. |
|
|
Destructor. More details... Definition at line 23 of file CdbBdbObjectVisitor.cc. |
|
|
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).
Definition at line 36 of file CdbBdbObjectVisitor.cc. References CdbBdbObjectVisitorImpl::setUserAction(). |
|
|
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 CdbBdbObjectVisitor.cc. References CdbBdbObjectVisitorImpl::visit(). |
1.3-rc3