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

CdbBdbSPartitionBaseP.ddl

Go to the documentation of this file.
00001 #ifndef CDBBDBSHARED_PARTITION_BASE_P_HH
00002 #define CDBBDBSHARED_PARTITION_BASE_P_HH
00003 
00004 // File and Version Information:
00005 //      $Id: CdbBdbSPartitionBaseP.ddl,v 1.8 2004/08/06 05:54:25 bartoldu Exp $
00006 
00007 #include "BdbUtil/Bdb.hh"
00008 
00009 #include "CdbBdbShared/CdbBdbSCollectionElementP.hh"
00010 #include "CdbBdbShared/CdbBdbSCell.hh"
00011 
00012 #include <iostream>
00013 
00014 /// A base class for a persistent "partition" class.
00015 /**
00016   * This class is iused in the context of the "PartitionLayout" collection.
00017   */
00018 class CdbBdbSPartitionBaseP : public CdbBdbSCollectionElementP {
00019 
00020 private:
00021 
00022   /// Default constructor (NOT IMPLEMENTED))
00023   /**
00024     * Also see comments about the special constructor defined above.
00025     */
00026     CdbBdbSPartitionBaseP( );
00027 
00028 protected:
00029 
00030   /// Normal constructor
00031   /**
00032     * NOTE: Partitions do not have names.
00033     */
00034     CdbBdbSPartitionBaseP( d_UShort           theId,                /**< the identifier of the partition */
00035                            const char*        theDescription,       /**< the description of the partition */
00036                            const BdbTime&     theCreationTime,      /**< the time when the partition is supposed to be created */
00037                            const CdbBdbSCell& theCell               /**< the cell (area) occupied by the partition in 2-dimension space */
00038                          );
00039 
00040 public:
00041 
00042   /// Destructor
00043   /**
00044     */
00045     virtual ~CdbBdbSPartitionBaseP( );
00046 
00047   // Accessors
00048 
00049     ooString(32) description( ) const;
00050     BdbTime      created    ( ) const;
00051     CdbBdbSCell  cell       ( ) const;
00052 
00053   /// Check if the partition is closed
00054 
00055     bool isClosed( ) const;
00056 
00057   /// Dump the contents of the object
00058   /**
00059     */
00060     virtual void dump( std::ostream& o ) const;
00061 
00062 protected:
00063 
00064   /// Close the partition at specified point of the INSERTION timeline
00065   /**
00066     * The specified time must be strictly greater than the "bottom" insertion time
00067     * of the partition.
00068     */
00069     CdbStatus closeCell( const BdbTime& theTime );
00070 
00071 private:
00072 
00073   // Data members
00074 
00075     ooString(32) _description;
00076     BdbTime      _created;
00077     CdbBdbSCell  _cell;
00078 };
00079 
00080 #endif /* CDBBDBSHARED_PARTITION_BASE_P_HH */

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