Bdb packages | Design docs | Source docs | Guidelines | Recent releases

Search | Site Map .

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

/BdbDomainMgmt/BdbDomainName.hh

Go to the documentation of this file.
00001 #if !defined(BDBDOMAINNAME_HH)
00002 #define BDBDOMAINNAME_HH
00003 //--------------------------------------------------------------------------
00004 // File and Version Information:
00005 //      $Id: BdbDomainName.hh,v 1.1 2001/06/21 21:50:20 patton Exp $
00006 //
00007 // Description:
00008 //      Class BdbDomainName:
00009 //
00010 // Environment:
00011 //      Software developed for the BaBar Detector at the SLAC B-Factory.
00012 //
00013 // Author List:
00014 //      Simon Patton            Stripped from origianl BdbDomain code
00015 //
00016 // Copyright Information:
00017 //      Copyright (C) 1999      LBNL
00018 //
00019 //------------------------------------------------------------------------
00020 
00021 //-------------
00022 // C Headers --
00023 //-------------
00024 extern "C" {
00025            }
00026 
00027 //---------------
00028 // C++ Headers --
00029 //---------------
00030 
00031 //-----------------
00032 // BaBar Headers --
00033 //-----------------
00034 #include "BaBar/BaBar.hh"
00035 
00036 //-------------------------------
00037 // Collaborating Class Headers --
00038 //-------------------------------
00039 
00040 //------------------------------------
00041 // Collaborating Class Declarations --
00042 //------------------------------------
00043 
00044 //----------------------
00045 // Base Class Headers --
00046 //----------------------
00047 
00048 //              ---------------------
00049 //              -- Class Interface --
00050 //              ---------------------
00051 
00052 /**
00053   * The BdbDomainName class is ...
00054   */
00055 class BdbDomainName
00056 {
00057       // friend classes and functions
00058 
00059    public:
00060 
00061       // Typedefs, consts, and enums
00062 
00063       /**
00064        ** Domains
00065        **/
00066       enum Domains { FirstDomain=0 ,
00067                      Conditions=FirstDomain ,
00068                      Events ,
00069                      Spatial , 
00070                      Temporal ,
00071                      Configuration ,
00072                      Ambient ,
00073                      IllegalDomain } ;
00074 
00075       // Constructors and destructor
00076 
00077       /**
00078         * Constructs an instanace of this class.
00079         */
00080       BdbDomainName( Domains domain ) ;
00081 
00082       /**
00083         * Destroys this instance.
00084         */
00085       virtual ~BdbDomainName() ;
00086 
00087       // Selectors (const)
00088 
00089       /**
00090        ** The current domain
00091        **/
00092       Domains domain( ) const;
00093 
00094       /**
00095        ** The name of the current domain
00096        **/
00097       const char* domainName( ) const;
00098 
00099       /**
00100        ** Short name of the current domain
00101        **/
00102       const char* shortDomainName( ) const;
00103 
00104       // Modifiers
00105 
00106       // Static Member Functions
00107 
00108       /**
00109        ** Determine whether the specified domain is valid
00110        **/
00111       static bool isDomainValid   ( Domains    theDomain );
00112 
00113       /**
00114        ** Determine whether the specified domain name is valid
00115        **/
00116       static bool isDomainValid( const char* domainName );
00117 
00118       /**
00119        ** The unique index corresponding to the specified domain name
00120        **/
00121       static Domains domainNr(const char* domainName) ;
00122 
00123       /**
00124        ** The name corresponding to the specified domain
00125        **/
00126       static const char* domainName( Domains theDomain );
00127 
00128       /**
00129        ** Converts short domain name to full domain name
00130        **/
00131       static const char* domainName(const char* shortDomainName);
00132 
00133       /**
00134        ** The shortened form (3 characters) of the specified domain name
00135        **/
00136       static const char* shortDomainName( Domains theDomain );
00137 
00138       /**
00139        ** The shortened form (3 characters) of the specified domain name
00140        **/
00141       static const char* shortDomainName(const char* fullDomainName) ;
00142 
00143    protected:
00144 
00145       // Selectors (const)
00146 
00147       // Modifiers
00148 
00149    private:
00150 
00151       // Constructors
00152       /** stops default */
00153       BdbDomainName() ;
00154 
00155       /** stops default */
00156       BdbDomainName( const BdbDomainName& aRhs ) ;
00157 
00158       // Operators
00159       /** stops default */
00160       const BdbDomainName& operator=( const BdbDomainName& aRhs ) ;
00161 
00162       // Selectors (const)
00163 
00164       // Modifiers
00165 
00166       // Static Member Functions
00167 
00168       // Data Members
00169 
00170       Domains    _domain;
00171 
00172       // Static Data Members
00173 
00174    public:
00175       /** names of each possible Domain */
00176       static const char* DomainNames   [];
00177       /** short form of names for each possible domain */
00178       static const char* ShortDomainNames[];
00179 } ;
00180 
00181 // inline function definitions
00182 
00183 #endif // BDBDOMAINNAME_HH

 


BaBar Public Site | SLAC | News | Links | Who's Who | Contact Us

Page Owner: Jacek Becla
Last Update: October 04, 2002