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

CdbRooRoRegistryDescriptorR.rdl

Go to the documentation of this file.
00001 #ifndef CDBROOREADONLY_REGISTRY_DESCRIPTOR_R_RDL
00002 #define CDBROOREADONLY_REGISTRY_DESCRIPTOR_R_RDL
00003 
00004 // File and Version Information:
00005 //      $Id: CdbRooRoRegistryDescriptorR.rdl,v 1.3 2004/12/04 00:27:29 gapon Exp $
00006 
00007 #include "CdbRooReadonly/CdbRooRoTimeR.hh"
00008 
00009 #include <string>
00010 
00011 /// A persistent "registry descriptor"
00012 /**
00013   */
00014 class CdbRooRoRegistryDescriptorR {
00015 
00016 public:
00017 
00018     CdbRooRoRegistryDescriptorR( UShort_t           theOriginId             = 0,                        /**< the identifier of the origin */
00019                                  const std::string& theOriginName           = "",                       /**< the name of the origin */
00020                                  const std::string& theDescription          = "",                       /**< the description of the origin */
00021                                  const BdbTime&     theCreatedTime          = BdbTime::minusInfinity,   /**< the time when the origin was supposed to be created */
00022                                  const BdbTime&     theId                   = BdbTime::minusInfinity,   /**< the unique identifier of the distributed CDB */
00023                                  bool               hasLocalCollectionsFlag = false,
00024                                  bool               isMasterFlag            = false,
00025                                  bool               isSlaveFlag             = false,
00026                                  bool               isTestFlag              = false
00027                                ) :
00028         _originId           (theOriginId),
00029         _originName         (theOriginName),
00030         _description        (theDescription),
00031         _created            (theCreatedTime),
00032         _id                 (theId),
00033         _hasLocalCollections(hasLocalCollectionsFlag),
00034         _isMaster           (isMasterFlag),
00035         _isSlave            (isSlaveFlag),
00036         _isTest             (isTestFlag)
00037     { }
00038 
00039     virtual ~CdbRooRoRegistryDescriptorR( ) { }
00040 
00041   // Accessors
00042 
00043     UShort_t originId( ) const { return _originId; }
00044 
00045     const std::string& originName ( ) const { return _originName;  }
00046     const std::string& description( ) const { return _description; }
00047 
00048     BdbTime created( ) const { return _created.getBdbTime( ); }
00049     BdbTime id     ( ) const { return _id.getBdbTime( );      }
00050 
00051     bool hasLocalCollections( ) const { return _hasLocalCollections; }
00052     bool isMaster           ( ) const { return _isMaster; }
00053     bool isSlave            ( ) const { return _isSlave;  }
00054     bool isTest             ( ) const { return _isTest;   }
00055 
00056 private:
00057 
00058     UShort_t _originId;
00059 
00060     std::string _originName;
00061     std::string _description;
00062 
00063     CdbRooRoTimeR _created;
00064     CdbRooRoTimeR _id;
00065 
00066     Bool_t _hasLocalCollections;
00067     Bool_t _isMaster;
00068     Bool_t _isSlave;
00069     Bool_t _isTest;
00070 
00071     ClassDef(CdbRooRoRegistryDescriptorR,1);
00072 };
00073 
00074 #endif /* CDBROOREADONLY_REGISTRY_DESCRIPTOR_R_RDL */

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