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

CdbBdbSNodeP.ddl

Go to the documentation of this file.
00001 #ifndef CDBBDBSHARED_NODE_P_HH
00002 #define CDBBDBSHARED_NODE_P_HH
00003 
00004 // File and Version Information:
00005 //      $Id: CdbBdbSNodeP.ddl,v 1.4 2004/08/06 05:54:25 bartoldu Exp $
00006 
00007 #include "BdbUtil/Bdb.hh"
00008 
00009 #include "CdbBase/CdbCommon.hh"
00010 
00011 #include <iostream>
00012 
00013 /// Base class for the all types of nodes of the "paged" v-array
00014 /**
00015   * The subclasses include both 'dircetory' and 'leaf' nodes.
00016   */
00017 template< typename E >
00018 class CdbBdbSNodeP : public BdbPersObj {
00019 
00020 public:
00021 
00022   // Constructors
00023 
00024     CdbBdbSNodeP( d_ULong theLevel = 0 );
00025 
00026   // Destructor
00027 
00028     virtual ~CdbBdbSNodeP( );
00029 
00030   // Resize the node (including its subnodes if any) to fit specified size
00031 
00032     virtual BdbStatus resize( d_ULong theNewSize,
00033                               d_ULong theNumPerLeaf,
00034                               d_ULong theNumPerDirectory ) = 0;
00035 
00036   // Modify an element at specified location
00037 
00038     virtual void setElementAt( d_ULong  theIndex,
00039                                const E& value,
00040                                d_ULong  theNumPerLeaf,
00041                                d_ULong  theNumPerDirectory ) = 0;
00042 
00043   // Return a copy of an element at specified location
00044 
00045     virtual E elementAt( d_ULong theIndex,
00046                          d_ULong theNumPerLeaf,
00047                          d_ULong theNumPerDirectory ) const = 0;
00048 
00049   /// Dump the node (recursive)
00050   /**
00051     * The detailed dump of the contents is only done if the corresponding
00052     * flass value is "true".
00053     */
00054     virtual void dump( d_ULong  numSpaces,
00055                        std::ostream& o,
00056                        bool     dumpContentsFlag ) const = 0;
00057 
00058 public:
00059 
00060   // The current level of the node
00061 
00062     d_ULong _level;
00063 };
00064 
00065 #ifdef    BABAR_COMP_INST
00066 #include "CdbBdbShared/CdbBdbSNodeP.cc"
00067 #endif /* BABAR_COMP_INST */
00068 
00069 #endif /* CDBBDBSHARED_NODE_P_HH */

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