00001
00002
00003 #ifndef ASGTOOLS_STATUSCODE_H
00004 #define ASGTOOLS_STATUSCODE_H
00005
00006
00007 #include "AsgTools/AsgToolsConf.h"
00008 #include "AsgTools/Check.h"
00009
00010 #ifdef ASGTOOL_ATHENA
00011
00012 # include "GaudiKernel/StatusCode.h"
00013 #elif defined(ASGTOOL_STANDALONE)
00014
00027 class StatusCode {
00028
00029 public:
00031 enum {
00032 FAILURE = 0,
00033 SUCCESS = 1
00034 };
00035
00037 StatusCode( unsigned long rstat = SUCCESS );
00039 StatusCode( const StatusCode& parent );
00041 ~StatusCode();
00042
00044 StatusCode& operator= ( const StatusCode& rhs );
00046 StatusCode& operator= ( unsigned long code );
00047
00049 bool isSuccess() const;
00051 bool isFailure() const;
00052
00054 operator unsigned long() const;
00055
00057 void setChecked() const { m_checked = true; }
00059 void ignore() const { setChecked(); }
00060
00062 static void enableFailure();
00064 static void disableFailure();
00065
00066 private:
00068 unsigned long m_code;
00070 mutable bool m_checked;
00071
00072 };
00073
00074 #endif // Environment selection
00075 #endif // ASGTOOLS_STATUSCODE_H