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

EventContext.hpp

00001 #if !defined(__EVENTCONTEXT_HPP) 00002 #define __EVENTCONTEXT 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 <corelinux/Common.hpp> 00026 #endif 00027 00028 #if !defined(__THREADCONTEXT_HPP) 00029 #include <corelinux/ThreadContext.hpp> 00030 #endif 00031 00032 #if !defined(__EVENTSEMAPHOREGROUP_HPP) 00033 #include <corelinux/EventSemaphoreGroup.hpp> 00034 #endif 00035 00036 typedef Int (*ArgumentFunctionPtr)( CORELINUX(EventSemaphoreGroupPtr) ); 00037 00038 DECLARE_CLASS( EventContext ) 00039 00040 00046 class EventContext : public CORELINUX(ThreadContext) 00047 { 00048 00049 public: 00050 00051 // 00052 // Constructors and destructor 00053 // 00054 00056 00057 EventContext 00058 ( 00059 ArgumentFunctionPtr, 00060 CORELINUX(EventSemaphoreGroupPtr) 00061 ) 00062 throw ( CORELINUX( Assertion ) ); 00063 00065 00066 EventContext 00067 ( 00068 ArgumentFunctionPtr, 00069 CORELINUX(Size), 00070 CORELINUX(EventSemaphoreGroupPtr) 00071 ) 00072 throw ( CORELINUX( Assertion ) ); 00073 00075 00076 EventContext( EventContextCref ) 00077 throw ( CORELINUX( Assertion ) ); 00078 00080 00081 virtual ~EventContext( void ); 00082 00083 // 00084 // Operator overloads 00085 // 00086 00096 EventContextRef operator=( EventContextCref ) 00097 throw( CORELINUX( Assertion ) ); 00098 00099 00106 bool operator==( EventContextCref ) const; 00107 00108 // 00109 // Accessors 00110 // 00111 00113 00114 CORELINUX(EventSemaphoreGroupPtr) getArgument( void ) const; 00115 00116 00117 // 00118 // Mutators 00119 // 00120 00122 00123 void setArgument( CORELINUX(EventSemaphoreGroupPtr) ) ; 00124 00125 00126 protected: 00127 00128 // 00129 // Constructor 00130 // 00131 00133 00134 EventContext( void ) 00135 throw ( CORELINUX( Assertion ) ); 00136 00137 // 00138 // Accessor 00139 // 00141 00142 ArgumentFunctionPtr getArgumentFunction( void ); 00143 00144 private: 00145 00154 static CORELINUX(ThreadContextPtr) argumentContextCreate 00155 ( 00156 CORELINUX(ThreadContextRef) 00157 ); 00158 00164 static void argumentContextDestroy( CORELINUX(ThreadContextPtr) ); 00165 00166 static Int argumentFrame( CORELINUX(ThreadContextPtr) ); 00167 00168 00169 private: 00170 00172 00173 CORELINUX(EventSemaphoreGroupPtr) theSemaphoreGroup; 00174 }; 00175 00176 00177 #endif 00178 00179 /* 00180 Common rcs information do not modify 00181 $Author: frankc $ 00182 $Revision: 1.2 $ 00183 $Date: 2000/09/10 04:37:32 $ 00184 $Locker: $ 00185 */ 00186

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