opimstate.h
Go to the documentation of this file.00001 #ifndef OPIE_PIM_STATE_H 00002 #define OPIE_PIM_STATE_H 00003 00004 #include <qstring.h> 00005 00011 /* 00012 * in c a simple struct would be enough ;) 00013 * g_new_state(); 00014 * g_do_some_thing( state_t* ); 00015 * ;) 00016 */ 00017 class OPimState { 00018 public: 00019 enum State { 00020 Started = 0, 00021 Postponed, 00022 Finished, 00023 NotStarted, 00024 Undefined 00025 }; 00026 OPimState( int state = Undefined ); 00027 OPimState( const OPimState& ); 00028 ~OPimState(); 00029 00030 bool operator==( const OPimState& ); 00031 OPimState &operator=( const OPimState& ); 00032 void setState( int state); 00033 int state()const; 00034 private: 00035 void deref(); 00036 inline void copyInternally(); 00037 00038 struct Data; 00039 Data* data; 00040 00041 class Private; 00042 Private *d; 00043 }; 00044 00045 00046 #endif
