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

CdbConfigElement.hh

Go to the documentation of this file.
00001 #ifndef CDB_CONFIG_ELEMENT_HH
00002 #define CDB_CONFIG_ELEMENT_HH
00003 
00004 // File and Version Information:
00005 //      $Id: CdbConfigElement.hh,v 1.3 2002/09/23 22:33:33 gapon Exp $
00006 
00007 #include "CdbBase/CdbRevisionPolicy.hh"
00008 
00009 #include "BdbTime/BdbTime.hh"
00010 
00011 /// Object of this class represent "configuration element"
00012 /**
00013   * More info...
00014   */
00015 class CdbConfigElement {
00016 
00017 public:
00018 
00019   /// Default constructor
00020   /**
00021     */
00022     CdbConfigElement( const BdbTime& theBeginTime = BdbTime::minusInfinity,
00023                       const BdbTime& theEndTime   = BdbTime::plusInfinity ) :
00024         accessIsAllowed(false),
00025         begin          (theBeginTime),
00026         end            (theEndTime)
00027     { }
00028 
00029   /// Normal constructor
00030   /**
00031     */
00032     CdbConfigElement( const CdbRevisionPolicy& thePolicy,
00033                       const BdbTime&           theBeginTime,
00034                       const BdbTime&           theEndTime ) :
00035         accessIsAllowed(true),
00036         policy         (thePolicy),
00037         begin          (theBeginTime),
00038         end            (theEndTime)
00039     { }
00040 
00041   /// Copy constructor
00042   /**
00043     */
00044     CdbConfigElement( const CdbConfigElement& theElement ) :
00045         accessIsAllowed(theElement.accessIsAllowed),
00046         policy         (theElement.policy),
00047         begin          (theElement.begin),
00048         end            (theElement.end)
00049     { }
00050 
00051   /// The destructor
00052   /**
00053     * NOTE: The destructor is NOT virtual because this is an embedded
00054     *       class.
00055     */
00056     ~CdbConfigElement( ) { }
00057 
00058   /// The assignment operator
00059   /**
00060     */
00061     CdbConfigElement& operator=( const CdbConfigElement& theElement )
00062     {
00063         if( this != &theElement ) {
00064             accessIsAllowed = theElement.accessIsAllowed;
00065             policy          = theElement.policy;
00066             begin           = theElement.begin;
00067             end             = theElement.end;
00068         }
00069         return *this;
00070     }
00071 
00072 public:
00073 
00074   // This flag is meant to indicate if the confogiration prohibits
00075   // accessing the database for the specified period of time.
00076 
00077     bool accessIsAllowed;
00078 
00079     CdbRevisionPolicy policy;
00080 
00081     BdbTime begin;
00082     BdbTime end; 
00083 };
00084 
00085 #endif  // CDB_CONFIG_ELEMENT_HH

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