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

CdbBdbSDirectoryNodeP.ddl

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

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