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  

/BdbObjyMgmt/BdbObjyDomainSet.hh

Go to the documentation of this file.
00001 #if !defined(BDBOBJYDOMAINSET_HH)
00002 #define BDBOBJYDOMAINSET_HH
00003 //--------------------------------------------------------------------------
00004 // File and Version Information:
00005 //      $Id: BdbObjyDomainSet.hh,v 1.1 2001/06/21 21:53:34 patton Exp $
00006 //
00007 // Description:
00008 //      Class BdbObjyDomainSet:
00009 //
00010 // Environment:
00011 //      Software developed for the BaBar Detector at the SLAC B-Factory.
00012 //
00013 // Author List:
00014 //      Simon Patton
00015 //
00016 // Copyright Information:
00017 //      Copyright (C) 1999      LBNL
00018 //
00019 //------------------------------------------------------------------------
00020 
00021 //-------------
00022 // C Headers --
00023 //-------------
00024 extern "C" {
00025 #include <sys/types.h>
00026 }
00027 
00028 //---------------
00029 // C++ Headers --
00030 //---------------
00031 
00032 //-----------------
00033 // BaBar Headers --
00034 //-----------------
00035 #include "BaBar/BaBar.hh"
00036 
00037 //-------------------------------
00038 // Collaborating Class Headers --
00039 //-------------------------------
00040 
00041 //------------------------------------
00042 // Collaborating Class Declarations --
00043 //------------------------------------
00044 class BdbObjyDomain ;
00045 
00046 //----------------------
00047 // Base Class Headers --
00048 //----------------------
00049 
00050 //              ---------------------
00051 //              -- Class Interface --
00052 //              ---------------------
00053 
00054 /**
00055   * The BdbObjyDomainSet class is ...
00056   */
00057 class BdbObjyDomainSet
00058 {
00059    public:
00060 
00061       // Typedefs, consts, and enums
00062 
00063       typedef BdbObjyDomain** iterator ;
00064       typedef BdbObjyDomain*const* const_iterator ;
00065 
00066       /**
00067        * Constructs an instanace of this class.
00068        */
00069       BdbObjyDomainSet( size_t initialLength ) ;
00070 
00071       /**
00072        * Destroys this instance.
00073        */
00074       virtual ~BdbObjyDomainSet() ;
00075 
00076       // Selectors (const)
00077 
00078       /**
00079        * @return iterator to first element in set
00080        */
00081       const_iterator begin() const ;
00082 
00083       /**
00084        * @return iterator to one-past-the-end element in set
00085        */
00086       const_iterator end() const ;
00087 
00088       /**
00089        * @return true if set is empty
00090        */
00091       bool empty() const ;
00092 
00093       // Modifiers
00094 
00095       /**
00096        * Add specified BdbObjyDomain into set
00097        */
00098       void insert( BdbObjyDomain* domain ) ;
00099 
00100       /**
00101        * @return true if specified BdbObjyDomain is removed from set
00102        */
00103       bool remove( BdbObjyDomain* domain ) ;
00104 
00105    protected:
00106 
00107       // Selectors (const)
00108 
00109       /**
00110        * @return true if specified domain is in the set
00111        */
00112       bool contains( BdbObjyDomain* domain ) const ;
00113 
00114       // Modifiers
00115 
00116       /**
00117        * @return iterator to first element in set
00118        */
00119       iterator begin() ;
00120 
00121       /**
00122        * @return iterator to one-past-the-end element in set
00123        */
00124       iterator end() ;
00125 
00126    private:
00127 
00128       // Constructors
00129       /** stops default */
00130       BdbObjyDomainSet( const BdbObjyDomainSet& aRhs ) ;
00131 
00132       // Operators
00133       /** stops default */
00134       const BdbObjyDomainSet& operator=( const BdbObjyDomainSet& aRhs ) ;
00135 
00136       // Data Members
00137 
00138       /** Stack of BdbObjyDomains */
00139       BdbObjyDomain** _set ;
00140       /** number of entries in actiation stack */
00141       size_t _depth ;
00142       /** current limit on number of entries in actiation stack */
00143       size_t _length ;
00144 } ;
00145 
00146 // inline function definitions
00147 
00148 #endif // BDBOBJYDOMAINSET_HH

 


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

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