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

CdbBdbSSimpleClusterP.ddl

Go to the documentation of this file.
00001 #ifndef CDBBDBSHARED_SIMPLE_CLUSTER_P_HH
00002 #define CDBBDBSHARED_SIMPLE_CLUSTER_P_HH
00003 
00004 // File and Version Information:
00005 //      $Id: CdbBdbSSimpleClusterP.ddl,v 1.2 2002/09/23 22:41:12 gapon Exp $
00006 
00007 #include "CdbBdbShared/CdbBdbSClusterP.hh"
00008 #include "CdbBdbShared/CdbBdbSIncrementCollection.hh"
00009 
00010 /// A simple cluster of conditions
00011 /**
00012   * A simple cluster of conditions supports "increments".
00013   */
00014 class CdbBdbSSimpleClusterP : public CdbBdbSClusterP {
00015 
00016 private:
00017 
00018   /// Default constructor (IS DISABLED)
00019 
00020     CdbBdbSSimpleClusterP( );
00021 
00022 public:
00023 
00024   /// Normal constructor
00025   /**
00026     * WARNING: Inappropriate values of the parameters will cause the crash
00027     *          of the constructor to avoid creating disformed persistent
00028     *          data structures.
00029     */
00030     CdbBdbSSimpleClusterP( const char*    theName,          /**< the name of the cluster */
00031                            d_UShort       theId,            /**< the identifier of the cluster */
00032                            const char*    theDescription,   /**< the description of the cluster */
00033                            const BdbTime& theCreationTime   /**< the time when the cluster is supposed to be created */
00034                          );
00035 
00036   /// Destructor
00037   /**
00038     */
00039     virtual ~CdbBdbSSimpleClusterP( );
00040 
00041   /// Get the total number of "increments"
00042   /**
00043     */
00044     d_UShort numIncrements( ) const;
00045 
00046   /// Get the specified "increment"
00047   /**
00048     * The method will return CdbStatus::NotFound if the index is not
00049     * in a valid range.
00050     */
00051     CdbStatus increment( d_UShort          theNumber,           /**< the number of the increment in question */
00052                          CdbBdbSIncrement& theIncrement         /**< the value of the increment to be set up */
00053                        ) const;
00054 
00055   /// Create new "increment"
00056   /**
00057     * The method if successfull will increase the number of increments by one.
00058     */
00059     CdbStatus createIncrement( const BdbTime& theSplitTime      /**< the split time for a new incrementhe increment */
00060                              );
00061 
00062 private:
00063 
00064   // This is an embedded class
00065 
00066     CdbBdbSIncrementCollection _increments;
00067 };
00068 
00069 #endif /* CDBBDBSHARED_SIMPLE_CLUSTER_P_HH */

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