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

CdbRooRoRevisionR.rdl

Go to the documentation of this file.
00001 #ifndef CDBROOREADONLY_REVISION_R_RDL
00002 #define CDBROOREADONLY_REVISION_R_RDL
00003 
00004 // File and Version Information:
00005 //      $Id: CdbRooRoRevisionR.rdl,v 1.3 2005/06/23 23:44:47 gapon Exp $
00006 
00007 #include "CdbRooReadonly/CdbRooRoTimeR.hh"
00008 #include "CdbRooReadonly/CdbRooRoViCollectionR.hh"
00009 
00010 #include <string>
00011 
00012 /// The persistent incarnation for a revision
00013 /**
00014   */
00015 class CdbRooRoRevisionR {
00016 
00017 public:
00018 
00019   /// Default constructor
00020   /**
00021     * Is required by the ROOT I/O streamers.
00022     */
00023     CdbRooRoRevisionR( );
00024 
00025   /// Normal constructor
00026 
00027     CdbRooRoRevisionR( const BdbTime&               theId,              /**< The revision identifier */
00028                        const char*                  theName,            /**< The revision name */
00029                        const CdbRooRoViCollectionR& theCollection,      /**< The collection of "visible" intervals */
00030                        const BdbTime&               theCreationTime,    /**< When this revision is created */
00031                        const char*                  theDescription      /**< The revision description */
00032                      );
00033 
00034   /// Normal constructor
00035   /**
00036     * This form of the constructor doesn't take any collection of visible intervals.
00037     */
00038     CdbRooRoRevisionR( const BdbTime& theId,              /**< The revision identifier */
00039                        const char*    theName,            /**< The revision name */
00040                        const BdbTime& theCreationTime,    /**< When this revision is created */
00041                        const char*    theDescription      /**< The revision description */
00042                      );
00043 
00044   // Destructor
00045 
00046     virtual ~CdbRooRoRevisionR( ) { }
00047 
00048   /// Get revision identifier.
00049   /**
00050     * This identifier must be equal or greater of the insertion time of any intervals
00051     * in the revision's collection of 'visible intervals".
00052     *
00053     * The returned value may be equal to "plusInfinity" in case if the
00054     * object was constructed using default constructor ("TOPMOST" revision).
00055     */
00056     BdbTime id( ) const { return _id.getBdbTime( ); }
00057 
00058   /// Get revision name.
00059   /**
00060     * This name is guaranteed to be a non-zero string.
00061     */
00062     const std::string& name( ) const { return _name; }
00063 
00064   /// Get collection of "visible" intervals.
00065   /**
00066     * NOTE: The non-const reference to a collection is returned. It can also be used to modify
00067     *       the collection.
00068     */
00069     CdbRooRoViCollectionR& collection( ) { return _intervals; }
00070 
00071   /// Get collection of "visible" intervals (const reference)
00072 
00073     const CdbRooRoViCollectionR& collection( ) const { return _intervals; }
00074 
00075   /// Get revision creation time
00076   /**
00077     * This time may differ from the revision identifier if the revision is created
00078     * "back in time".
00079     */
00080     BdbTime created( ) const { return _created.getBdbTime( ); }
00081 
00082   /// Get revision name.
00083 
00084     const std::string& description( ) const { return _description; }
00085 
00086     void dump( std::ostream& o ) const;
00087 
00088 private:
00089 
00090   /// The revision's identifiers.
00091 
00092     CdbRooRoTimeR _id;
00093     std::string   _name;
00094 
00095   /// The collection of "visible" intervals
00096 
00097     CdbRooRoViCollectionR _intervals;
00098 
00099   // Additional descriptive information
00100 
00101     CdbRooRoTimeR _created;
00102     std::string   _description;
00103 
00104     ClassDef(CdbRooRoRevisionR,1);
00105 };
00106 
00107 #endif /* CDBROOREADONLY_REVISION_R_RDL */

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