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  

/BdbUtil/BdbClusteringHint.cc

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 // File and Version Information:
00003 //      $Id: BdbClusteringHint.cc,v 1.9 2000/12/15 05:27:40 becla Exp $
00004 //
00005 // Description:
00006 //      BdbClusteringHint class implementation file. This is the universal 
00007 //  clustering class used by the BaBar persistent classes. It is 
00008 //  customizable via specification of a delegate class.
00009 //
00010 // Environment:
00011 //      Software developed for the BaBar Detector at the SLAC B-Factory.
00012 //
00013 // Author List:
00014 //      David R. Quarrie                Lawrence Berkeley National Laboratory
00015 //
00016 // History:
00017 //
00018 //------------------------------------------------------------------------
00019 //--------------------------
00020 // BaBar Database Headers --
00021 //--------------------------
00022 #ifndef BDB_HH
00023 #include "BdbUtil/Bdb.hh"
00024 #endif
00025 
00026 //-----------------------
00027 // This Class's Header --
00028 //-----------------------
00029 #ifndef BDBCLUSTERINGHINT_HH
00030 #include "BdbUtil/BdbClusteringHint.hh"
00031 #endif
00032 
00033 //-----------------------------------------------------------------------
00034 // Local Macros, Typedefs, Structures, Unions and Forward Declarations --
00035 //-----------------------------------------------------------------------
00036 
00037 static const char rcsid[] = "$Id: BdbClusteringHint.cc,v 1.9 2000/12/15 05:27:40 becla Exp $";
00038 
00039 
00040 
00041 BdbAbsClustHintFactory* BdbClusteringHint::_factory = 0;
00042 
00043 
00044 
00045 //              ----------------------------------------
00046 //              -- Public Function Member Definitions --
00047 //              ----------------------------------------
00048 
00049 //---------------
00050 // Constructor --
00051 //---------------
00052 
00053 BdbClusteringHint::BdbClusteringHint( )
00054 : _delegate( 0 )
00055 {
00056 }
00057 
00058 
00059 BdbClusteringHint::BdbClusteringHint(const BdbClusteringHint& obj)
00060 {
00061     _delegate = 0;
00062     _hint = obj._hint;
00063 }
00064 
00065     
00066 //--------------
00067 // Destructor --
00068 //--------------
00069 
00070 BdbClusteringHint::~BdbClusteringHint( )
00071 {
00072 }
00073 
00074 //-------------
00075 // Selectors --
00076 //-------------
00077 BdbAbsClustHintFactory*
00078 BdbClusteringHint::getClustHintFactory()
00079 {
00080     return _factory;
00081 }
00082 
00083 
00084 BdbAbstractClusteringHint* 
00085 BdbClusteringHint::delegate( ) const
00086 {
00087     return _delegate;
00088 }
00089 
00090 
00091 d_Boolean
00092 BdbClusteringHint::hintIsValid( ) const
00093 {
00094     return ! BdbIsNull(_hint);
00095 }
00096 
00097 
00098 //--------------
00099 // Operations --
00100 //--------------
00101 void
00102 BdbClusteringHint::setClustHintFactory( BdbAbsClustHintFactory* f )
00103 {
00104     _factory = f;
00105 }
00106 
00107 void 
00108 BdbClusteringHint::setDelegate( BdbAbstractClusteringHint* theDelegate )
00109 {
00110     _delegate = theDelegate;
00111 }
00112 
00113 void
00114 BdbClusteringHint::setHint( BdbHandleAny& theHint )
00115 {
00116     _hint = theHint;
00117 }
00118 
00119 void
00120 BdbClusteringHint::setHint( BdbRefAny& theHint )
00121 {
00122     _hint = theHint;
00123 }
00124 
00125 BdbRefAny
00126 BdbClusteringHint::hint( )
00127 {
00128     if ( 0 != _delegate ) {
00129         return _delegate->hint( );
00130     } else { 
00131         return _hint; 
00132     } 
00133 }
00134 
00135 BdbRefAny
00136 BdbClusteringHint::getHint( )
00137 {
00138     return _hint;
00139 }
00140 
00141 BdbRefAny
00142 BdbClusteringHint::resetHint( )
00143 {
00144     ooHandle(ooObj) nullH;
00145     return _hint = nullH;
00146 }
00147 
00148 
00149 
00150 BdbRefAny
00151 BdbClusteringHint::updatedHint( )
00152 {
00153     if ( 0 != _delegate ) {
00154         return _delegate->updatedHint( );
00155     } else { 
00156         return _hint; 
00157     } 
00158 }
00159 
00160 void 
00161 BdbClusteringHint::prepareHint( )
00162 {
00163     if ( 0 != _delegate ) {
00164         _delegate->prepareHint( );
00165     }
00166 }
00167 
00168 
00169 //-------------
00170 // Operators --
00171 //-------------
00172 
00173 const BdbClusteringHint& 
00174 BdbClusteringHint::operator = ( BdbHandleAny& theHint )
00175 {
00176     _hint = theHint;
00177     return *this;
00178 }
00179 
00180 const BdbClusteringHint& 
00181 BdbClusteringHint::operator = ( BdbRefAny& theHint )
00182 {
00183     _hint = theHint;
00184     return *this;
00185 }
00186 

 


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

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