00001
00002
00003
00004
00005
00006
00007
00017 #ifndef EDG_WORKLOAD_CHECKPOINTING_STEP_H
00018 #define EDG_WORKLOAD_CHECKPOINTING_STEP_H
00019
00020 #include <edg/workload/checkpointing/client/checkpointing_namespace.h>
00021 #include <string>
00022
00023 CHKPT_NAMESPACE_BEGIN {
00024
00028 class Step {
00029
00030 public:
00032 enum step_type {
00033 integer,
00034 label
00035 };
00037
00038
00040 Step( int istep );
00043 Step( const std::string &sstep );
00046 Step( const char *sstep );
00047 Step( const Step &ss );
00048 ~Step( void );
00049
00050
00052
00053
00055 inline bool isLabel( void ) { return( this->s_type == label ); }
00058 inline bool isInteger( void ) { return( this->s_type == integer ); }
00060
00062
00063
00066 int getInteger( void );
00070 const std::string &getLabel( void );
00072
00074
00075
00078 Step &operator=( const Step &that );
00082 inline operator int( void ) { return ( getInteger() ); }
00086 inline operator const std::string &( void ) { return( getLabel() ); }
00088
00089 private:
00090 step_type s_type;
00091 union {
00092 int s_u_istep;
00093 std::string *s_u_sstep;
00094 };
00095 };
00096
00097 } CHKPT_NAMESPACE_END;
00098
00099 #endif // EDG_WORKLOAD_CHECKPOINTING_STEP_H
00100
00101
00102
00103