00001 #ifndef CDBBDBSHARED_CLUSTER_P_HH 00002 #define CDBBDBSHARED_CLUSTER_P_HH 00003 00004 // File and Version Information: 00005 // $Id: CdbBdbSClusterP.ddl,v 1.8 2004/08/06 05:54:24 bartoldu Exp $ 00006 00007 #include "BdbUtil/Bdb.hh" 00008 00009 #include "BdbTime/BdbTime.hh" 00010 00011 #include "CdbBase/CdbItr.hh" 00012 00013 #include "CdbBdbShared/CdbBdbSCollectionElementP.hh" 00014 00015 #include <iostream> 00016 00017 //----------------------------------------------- 00018 // Forward Declarations for Persistent Classes -- 00019 //----------------------------------------------- 00020 00021 class CdbBdbSConditionP; 00022 #pragma ooclassref CdbBdbSConditionP "CdbBdbShared/CdbBdbSConditionP_ref.hh" 00023 00024 /// This class represent "cluster of conditions" 00025 /** 00026 */ 00027 class CdbBdbSClusterP : public CdbBdbSCollectionElementP { 00028 00029 friend class CdbBdbSConditionAtClusterPItr; 00030 00031 private: 00032 00033 /// Default constructor (NOT IMPLEMENTED)) 00034 /** 00035 * Also see comments about the special constructor defined above. 00036 */ 00037 CdbBdbSClusterP( ); 00038 00039 public: 00040 00041 /// Normal constructor 00042 /** 00043 * WARNING: Inappropriate values of the parameters will cause the crash 00044 * of the constructor to avoid creating disformed persistent 00045 * data structures. 00046 */ 00047 CdbBdbSClusterP( const char* theName, /**< the name of the cluster */ 00048 d_UShort theId, /**< the identifier of the cluster */ 00049 const char* theDescription, /**< the description of the cluster */ 00050 const BdbTime& theCreationTime /**< the time when the cluster is supposed to be created */ 00051 ); 00052 00053 /// Destructor 00054 /** 00055 */ 00056 virtual ~CdbBdbSClusterP( ); 00057 00058 // Accessors 00059 00060 ooString(32) description( ) const; 00061 BdbTime created ( ) const; 00062 00063 /// Set up an iterator of conditions 00064 /** 00065 */ 00066 CdbStatus iterator( CdbItr< BdbRef(CdbBdbSConditionP) >& theItr /**< the value of the iterator be set up */ 00067 ) const; 00068 00069 /// Dump the contents of the object 00070 /** 00071 */ 00072 virtual void dump( std::ostream& o ) const; 00073 00074 private: 00075 00076 // Data members 00077 00078 ooString(32) _description; 00079 BdbTime _created; 00080 00081 BdbRef(CdbBdbSConditionP) _conditions[] <-> _cluster; 00082 }; 00083 00084 #endif /* CDBBDBSHARED_CLUSTER_P_HH */
1.3-rc3