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  

/BdbEventStore/BdbTreeCollTFactory.hh

Go to the documentation of this file.
00001 #if !defined(BDBTREECOLLTFACTORY_HH)
00002 #define BDBTREECOLLTFACTORY_HH
00003 //------------------------------------------------------------------------------
00004 // File and Version Information:
00005 //      $Id: BdbTreeCollTFactory.hh,v 1.2 2002/06/04 06:26:21 becla Exp $
00006 //
00007 // Description:
00008 //      Class BdbTreeCollTFactory interface (.hh) file. This file declares the 
00009 //      factory of tree  collections.
00010 //
00011 // Environment:
00012 //      Software developed for the BaBar Detector at the SLAC B-Factory
00013 //
00014 // Author List:
00015 //      Simon Patton            Original Author (source in BdbTreeCollFactory)
00016 //      Jacek Becla             Modified to break dependency between Event Store
00017 //                              and BdbEvent
00018 //
00019 // Copyright Information:
00020 //      Copyright (C) 2002      Stanford Linear Accelerator Center
00021 //
00022 //------------------------------------------------------------------------------
00023 
00024 
00025 //-------------
00026 // C Headers --
00027 //-------------
00028 extern "C" {
00029            }
00030 
00031 //---------------
00032 // C++ Headers --
00033 //---------------
00034 
00035 //-----------------
00036 // BaBar Headers --
00037 //-----------------
00038 #include "BaBar/BaBar.hh"
00039 #include "BdbUtil/Bdb.hh"
00040 
00041 //-------------------------------
00042 // Collaborating Class Headers --
00043 //-------------------------------
00044 #include "BdbEventStore/BdbCollectionTFactory.hh"
00045 
00046 //------------------------------------
00047 // Collaborating Class Declarations --
00048 //------------------------------------
00049 class BdbEventT ;
00050 template< class T > class BdbAbsCollectionT ;
00051 
00052 #include "BdbTrees/BdbTreeNodeP_ref.hh"
00053 
00054 //----------------------
00055 // Base Class Headers --
00056 //----------------------
00057 
00058 //              ---------------------
00059 //              -- Class Interface --
00060 //              ---------------------
00061 
00062 /**
00063   * The BdbTreeCollTFactory class is the implementation of
00064   *   BdbCollectionTFactory for BdbTreeCollectionTs
00065   */
00066 template < class T >
00067 class BdbTreeCollTFactory :
00068    public BdbCollectionTFactory< T >
00069 {
00070       // friend classes and functions
00071 
00072    public:
00073 
00074       // Typedefs, consts, and enums
00075 
00076       // Constructors and destructor
00077 
00078       /**
00079         * Constructs an instanace of this class.
00080         */
00081       BdbTreeCollTFactory( BdbAbstractClusteringHint& theCollectionHint,
00082                           BdbAbstractClusteringHint& theTreeNodeHint ) ;
00083 
00084       /**
00085         * Destroys this instance.
00086         */
00087       virtual ~BdbTreeCollTFactory() ;
00088 
00089       // Selectors (const)
00090 
00091       /**
00092        * @return the name of the type of collection this factory creates
00093        */
00094       virtual const char* typeName() const ;
00095 
00096       /**
00097        * action to take when the collection already exists
00098        */
00099       virtual BdbStatus existsError( const char* theName ) const ;
00100 
00101       /**
00102        * action to take when the collection can not be updated
00103        */
00104       virtual BdbStatus lockError( const BdbRefAny& persObj ) const ;
00105 
00106       /**
00107        * action to take when no name is specfied for a collection
00108        */
00109       virtual BdbStatus nameError() const;
00110 
00111       /**
00112        * action to take when there is an authorization failure
00113        */
00114       virtual BdbStatus authError( const char* theName ) const;
00115 
00116       // Modifiers
00117 
00118       // Static Member Functions
00119 
00120    protected:
00121 
00122       // Selectors (const)
00123 
00124       // Modifiers
00125 
00126    private:
00127 
00128       // Constructors
00129       /** stops default */
00130       BdbTreeCollTFactory() ;
00131 
00132       /** stops default */
00133       BdbTreeCollTFactory( const BdbTreeCollTFactory< T >& aRhs ) ;
00134 
00135       // Operators
00136       /** stops default */
00137       const BdbTreeCollTFactory< T >& operator=( const BdbTreeCollTFactory< T >& aRhs ) ;
00138 
00139       // Selectors (const)
00140 
00141       // Modifiers
00142       /**
00143        * @return the collection created by the factory at the specified
00144        * node
00145        */
00146       virtual BdbAbsCollectionT< T >* createCollectionAtNode( BdbHandleAny& theHint,
00147                                                              BdbHandle( BdbTreeNodeP )& theNode ,
00148                                                              const char* theName ,
00149                                                              d_ULong theInitialSize ) ;
00150 
00151 
00152       // Static Member Functions
00153 
00154       // Data Members
00155 
00156       // Static Data Members
00157 } ;
00158 
00159 // inline function definitions
00160 
00161 #ifdef   BABAR_COMP_INST
00162 #include "BdbEventStore/BdbTreeCollTFactory.cc"
00163 #endif   // BABAR_COMP_INST
00164 
00165 #endif // BDBTREECOLLTFACTORY_HH

 


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

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