00001 #ifndef CDB_STATUS_HH 00002 #define CDB_STATUS_HH 00003 00004 // File and Version Information: 00005 // $Id: CdbStatus.hh,v 1.7 2004/08/06 05:54:14 bartoldu Exp $ 00006 00007 #include <iosfwd> 00008 00009 /// The "Active Status Object" class 00010 /** 00011 * Objects of this class are returned from those methods of the Condition/DB API 00012 * where it seems appropriate. 00013 */ 00014 class CdbStatus { 00015 00016 friend std::ostream& operator<<( std::ostream& o, const CdbStatus& s ); 00017 00018 private: 00019 00020 /// A constructor 00021 /** 00022 * Initialize an object with specified string. This message will 00023 * be delivered when an object is printed onto the output stream. 00024 */ 00025 CdbStatus( const char* msg ); 00026 00027 public: 00028 00029 static const CdbStatus& Success; 00030 static const CdbStatus& Warning; 00031 static const CdbStatus& Error; 00032 static const CdbStatus& NotImplemented; 00033 static const CdbStatus& NotFound; 00034 static const CdbStatus& IllegalParameters; 00035 static const CdbStatus& ConflictOfParameters; 00036 00037 public: 00038 00039 CdbStatus( const CdbStatus& s = CdbStatus::Success ); 00040 00041 CdbStatus& operator=( const CdbStatus& s ); 00042 00043 bool operator==( const CdbStatus& s ) const; 00044 bool operator!=( const CdbStatus& s ) const; 00045 00046 private: 00047 00048 const char* _myMsg; 00049 }; 00050 00051 /// Definition for the Active Status Object streamer 00052 /** 00053 * The implementation of this global operator is somewhere else. 00054 */ 00055 std::ostream& operator<<( std::ostream& o, const CdbStatus& s ); 00056 00057 #endif // CDB_STATUS_HH
1.3-rc3