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

CdbBdbSRebuildAction.hh

Go to the documentation of this file.
00001 #ifndef CDBBDBSHARED_REBUILD_ACTION_HH
00002 #define CDBBDBSHARED_REBUILD_ACTION_HH
00003 
00004 // File and Version Information:
00005 //      $Id: CdbBdbSRebuildAction.hh,v 1.1 2003/06/27 03:26:22 gapon Exp $
00006 
00007 #include "CdbBdbShared/CdbBdbSOi.hh"
00008 
00009 /// An interface for the user defined "rebuild action" objects
00010 /**
00011   * This interface is used by CdbBdbSMetaDataP:: rebuild() method to determine
00012   * what to do with 'original' intervals found in an input collection when rebuilding
00013   * its metadata object.
00014   *
00015   * Developers are supposed to implement the only virtual method declared
00016   * in this interface.
00017   *
00018   * @see CdbBdbSMetaDataP:: rebuild()
00019   */
00020 class CdbBdbSRebuildAction {
00021 
00022 public:
00023 
00024   /// The action type
00025 
00026     typedef enum { ACTION_COPY = 0,
00027                    ACTION_DO_NOT_COPY,
00028                    ACTION_ERROR
00029     } ActionType;
00030 
00031 public:
00032 
00033   /// The destructor
00034   /**
00035     * The destructor is made virtual to ensure correct destruction of objects
00036     * of inherited classes.
00037     */
00038     virtual ~CdbBdbSRebuildAction( );
00039 
00040   /// Let a user to evaluate the specified interval
00041   /**
00042     * This method is supposed to evaluate the passed interval, modify it
00043     * if needed and return a conclusion what to do with the interval.
00044     *
00045     * Here is the explanation of actions returned by this method:
00046     *
00047     *   ACTION_COPY        : the interval has to be copied into the output collection.
00048     *                        Note that the interval may be modified after calling this method.
00049     *
00050     *   ACTION_DO_NOT_COPY : the interval shoul NOT be copied. The interval is guaranteed
00051     *                        not to be modified if this status is returned.
00052     *
00053     *   ACTION_ERROR       : a error has accured when the method was trying to evaluate
00054     *                        the specified interval. The interval is guaranteed
00055     *                        not to be modified if this status is returned.
00056     */
00057     virtual ActionType userAction( CdbBdbSOi& theInterval ) = 0;
00058 };
00059 
00060 #endif  // CDBBDBSHARED_REBUILD_ACTION_HH

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