00001
#if !defined(__ARGUMENTCONTEXT_HPP)
00002
#define __ARGUMENTCONTEXT_HPP
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
#if !defined(__COMMON_HPP)
00025
#include <Common.hpp>
00026
#endif
00027
00028
#if !defined(__THREADCONTEXT_HPP)
00029
#include <ThreadContext.hpp>
00030
#endif
00031
00032
typedef int (*ArgumentFunctionPtr)(
const int & );
00033
00034 DECLARE_CLASS(
ArgumentContext )
00035
00036
00042 class
ArgumentContext : public CORELINUX(ThreadContext)
00043 {
00044
00045
public:
00046
00047
00048
00049
00050
00052
00053
ArgumentContext( ArgumentFunctionPtr,
int arg=0 )
00054
throw ( CORELINUX( Assertion ) );
00055
00057
00058
ArgumentContext
00059 (
00060 ArgumentFunctionPtr,
00061 CORELINUX(Size),
00062
int arg=0
00063 )
00064
throw ( CORELINUX( Assertion ) );
00065
00067
00068
ArgumentContext(
ArgumentContextCref )
00069
throw ( CORELINUX( Assertion ) );
00070
00072
00073
virtual ~
ArgumentContext(
void );
00074
00075
00076
00077
00078
00088
ArgumentContextRef operator=(
ArgumentContextCref )
00089
throw( CORELINUX( Assertion ) );
00090
00091
00098
bool operator==(
ArgumentContextCref )
const;
00099
00100
00101
00102
00103
00105
00106
const int & getArgument(
void )
const;
00107
00108
00109
00110
00111
00112
00114
00115
void setArgument(
const int & ) ;
00116
00117
00118
protected:
00119
00120
00121
00122
00123
00125
00126
ArgumentContext(
void )
00127
throw ( CORELINUX( Assertion ) );
00128
00129
00130
00131
00133
00134 ArgumentFunctionPtr getArgumentFunction(
void );
00135
00136
private:
00137
00146
static CORELINUX(ThreadContextPtr) argumentContextCreate
00147 (
00148 CORELINUX(ThreadContextRef)
00149 );
00150
00156
static void argumentContextDestroy( CORELINUX(ThreadContextPtr) );
00157
00158
static Int argumentFrame( CORELINUX(ThreadContextPtr) );
00159
00160
00161
private:
00162
00164
00165
int theArgument;
00166 };
00167
00168
00169
#endif
00170
00171
00172
00173
00174
00175
00176
00177
00178