Main Page   Namespace List   File List   File Members  

step.h

Go to the documentation of this file.
00001 // File: step.h
00002 // Author: Alessio Gianelle <gianelle@pd.infn.it>
00003 // Copyright (c) 2002 EU DataGrid.
00004 // For license conditions see http://www.eu-datagrid.org/license.html
00005 
00006 // $Id: step.h,v 1.2 2002/12/20 14:43:29 gianelle Exp $
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 //  Local Variables:
00102 //  mode: c++
00103 //  End:

Generated on Fri May 14 14:18:13 2004 for CHECKPOINTING API by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002