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

CdbBdbObjectCloneUserAction.hh

Go to the documentation of this file.
00001 #ifndef CDBBDB_OBJECT_CLONE_USER_ACTION_HH
00002 #define CDBBDB_OBJECT_CLONE_USER_ACTION_HH
00003 
00004 // File and Version Information:
00005 //      $Id: CdbBdbObjectCloneUserAction.hh,v 1.2 2004/10/21 20:35:49 gapon Exp $
00006 
00007 #include "CdbBase/CdbCommon.hh"
00008 
00009 #include <oo.h>     // ooRef(ooObj), ooHandle(ooObj)
00010 
00011 /// The interface for user defined actions
00012 /**
00013   * This interface has to implemented by users willing to control
00014   * the "deep copy" navigation in complex graphs.
00015   * 
00016   * IMPLEMENTATION NOTES:
00017   *
00018   *   (1) This class violates CDB API convention on the inclusion
00019   *       of "CdbBase/CdbCommon.hh" header file to avoid STD namespace
00020   *       conflicts of the kind described above.
00021   */
00022 class CdbBdbObjectCloneUserAction {
00023 
00024 public:
00025 
00026   /// These values will be used to indicate the user's response
00027 
00028     typedef enum { ACTION_NEUTRAL,
00029                    ACTION_COPIED,
00030                    ACTION_ERROR } ActionType;
00031 
00032 public:
00033 
00034   /// The destructor
00035   /**
00036     * Moe details...
00037     */
00038     virtual ~CdbBdbObjectCloneUserAction( );
00039 
00040   /// Let a user to make a decision on what has to be done next
00041   /**
00042     * This method takes the "about-to-be-copied" link on the input. Ths link
00043     * is evaluated and possibly processed by the method to produce
00044     * the output link.
00045     *
00046     * Here is the explanation of possible responses:
00047     *
00048     *   ACTION_NEUTRAL : user does not want to intervene into the calle.
00049     *                    The output link does not change.
00050     *
00051     *   ACTION_COPIED  : user has done the copy inside the procedure and provided a valid
00052     *                    value for the output link. This tells the caller to use the output
00053     *                    link set up by the method and do NOT propagate along this link.
00054     *
00055     *   ACTION_ERROR   : an error has happened inside the method. Normally the caller
00056     *                    should stop copying.
00057     */
00058     virtual ActionType action( const ooHandle(ooObj)& theInputH,
00059                                      ooHandle(ooObj)& theOutputH ) = 0;
00060 };
00061 
00062 #endif  // CDBBDB_OBJECT_CLONE_USER_ACTION_HH

Generated on Mon Dec 5 18:22:00 2005 for CDB by doxygen1.3-rc3