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

CdbRevision.hh

Go to the documentation of this file.
00001 #ifndef CDB_REVISION_HH
00002 #define CDB_REVISION_HH
00003 
00004 // File and Version Information:
00005 //      $Id: CdbRevision.hh,v 1.4 2002/09/23 22:33:36 gapon Exp $
00006 
00007 #include "CdbBase/CdbCPtrBase.hh"
00008 #include "CdbBase/CdbRevisionPtrFwd.hh"
00009 #include "CdbBase/CdbConditionPtrFwd.hh"
00010 
00011 #include <string>
00012 
00013 class BdbTime;
00014 
00015 /// The transient abstract class providing an interface to persistent revisions
00016 /**
00017   * The objects of concrete subclasses of this class deliver
00018   * various characteristics of a revision.
00019   */
00020 class CdbRevision {
00021 
00022 friend class CdbCPtrBase< CdbRevision >;    // Who destroys me
00023 
00024 private:
00025 
00026   /// The default constructor (NOT IMPLEMENTED)
00027   /**
00028     * Is disabled...
00029     */
00030     CdbRevision( );
00031 
00032 protected:
00033 
00034   /// The normal constructor.
00035   /**
00036     * More details...
00037     */
00038     CdbRevision( const CdbConditionPtr& thePtr  /**< the back link to the parent object */
00039                );
00040 
00041   /// The copy constructor
00042   /**
00043     * More details...
00044     */
00045     CdbRevision( const CdbRevision& theRevision );
00046 
00047   /// The destructor.
00048   /**
00049     * More details...
00050     */
00051     virtual ~CdbRevision( );
00052 
00053   /// The assignment operator
00054   /**
00055     * More details...
00056     */
00057     CdbRevision& operator=( const CdbRevision& theRevision );
00058 
00059 public:
00060 
00061   /// Return a smart pointer back to the parent object.
00062   /**
00063     * @see CdbCondition
00064     * @see CdbConditionPtr
00065     */
00066     const CdbConditionPtr& parent( ) const;
00067 
00068   /// The revision identifier
00069   /**
00070     * More info...
00071     */
00072     virtual BdbTime id( ) const = 0;
00073 
00074   /// The revision name
00075   /**
00076     * More info...
00077     */
00078     virtual std::string name( ) const = 0;
00079 
00080   /// The time when this revision was created
00081   /**
00082     * Note, that this time can be different from the "timestamp" (the above
00083     * defined identifier) the revision.
00084     */
00085     virtual BdbTime created( ) const = 0;
00086 
00087   /// The revision description
00088   /**
00089     * To explain why this revision was created.
00090     *
00091     * @return a string with the name
00092     */
00093     virtual std::string description( ) const = 0;
00094 
00095 private:
00096 
00097     CdbConditionPtr _myParent;
00098 };
00099 
00100 #endif  // CDB_REVISION_HH

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