Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Examples

ArgumentContext.hpp

00001 #if !defined(__ARGUMENTCONTEXT_HPP) 00002 #define __ARGUMENTCONTEXT_HPP 00003 00004 /* 00005 CoreLinux++ 00006 Copyright (C) 2000 CoreLinux Consortium 00007 00008 The CoreLinux++ Library is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU Library General Public License as 00010 published by the Free Software Foundation; either version 2 of the 00011 License, or (at your option) any later version. 00012 00013 The CoreLinux++ Library Library is distributed in the hope that it will 00014 be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Library General Public License for more details. 00017 00018 You should have received a copy of the GNU Library General Public 00019 License along with the GNU C Library; see the file COPYING.LIB. If not, 00020 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00021 Boston, MA 02111-1307, USA. 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 // Constructors and destructor 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 // Operator overloads 00077 // 00078 00088 ArgumentContextRef operator=( ArgumentContextCref ) 00089 throw( CORELINUX( Assertion ) ); 00090 00091 00098 bool operator==( ArgumentContextCref ) const; 00099 00100 // 00101 // Accessors 00102 // 00103 00105 00106 const int & getArgument( void ) const; 00107 00108 00109 // 00110 // Mutators 00111 // 00112 00114 00115 void setArgument( const int & ) ; 00116 00117 00118 protected: 00119 00120 // 00121 // Constructor 00122 // 00123 00125 00126 ArgumentContext( void ) 00127 throw ( CORELINUX( Assertion ) ); 00128 00129 // 00130 // Accessor 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 Common rcs information do not modify 00173 $Author: frankc $ 00174 $Revision: 1.3 $ 00175 $Date: 2000/04/06 12:41:12 $ 00176 $Locker: $ 00177 */ 00178

This is the CoreLinux++ reference manual
Provided by The CoreLinux Consortium