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

GatewaySemaphoreGroup.hpp

00001 #if !defined(__GATEWAYSEMAPHOREGROUP_HPP) 00002 #define __GATEWAYSEMAPHOREGROUP_HPP 00003 00004 /* 00005 CoreLinux++ 00006 Copyright (C) 1999,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(__SEMAPHOREGROUP_HPP) 00029 #include <SemaphoreGroup.hpp> 00030 #endif 00031 00032 namespace corelinux 00033 { 00034 DECLARE_CLASS( GatewaySemaphoreGroup ); 00035 00044 class GatewaySemaphoreGroup : public SemaphoreGroup 00045 { 00046 public: 00047 00060 GatewaySemaphoreGroup( Short, Int Rights = OWNER_ALL ) 00061 throw(Assertion,SemaphoreException); 00062 00085 GatewaySemaphoreGroup 00086 ( 00087 Short, 00088 SemaphoreGroupIdentifierCref, 00089 Int , 00090 CreateDisposition disp=FAIL_IF_EXISTS 00091 ) throw(Assertion,SemaphoreException); 00092 00111 GatewaySemaphoreGroup 00112 ( 00113 Short, 00114 CharCptr aName, 00115 Int , 00116 CreateDisposition disp=FAIL_IF_EXISTS 00117 ) throw(Assertion,SemaphoreException); 00118 00119 00121 00122 virtual ~GatewaySemaphoreGroup( void ); 00123 00124 // 00125 // Accessors 00126 // 00127 00128 // 00129 // Factory methods 00130 // 00131 00138 virtual AbstractSemaphorePtr createSemaphore( void ) 00139 throw( SemaphoreException ) ; 00140 00148 virtual AbstractSemaphorePtr createCountSemaphore( Count aCount ) 00149 throw( SemaphoreException ) ; 00150 00168 virtual AbstractSemaphorePtr createSemaphore 00169 ( 00170 SemaphoreIdentifierRef aIdentifier, 00171 CreateDisposition disp = CREATE_OR_REUSE, 00172 bool Recursive = false, 00173 bool Balking = false 00174 ) throw( SemaphoreException ) ; 00175 00195 virtual AbstractSemaphorePtr createCountSemaphore 00196 ( 00197 SemaphoreIdentifierRef aIdentifier, 00198 Count aCount, 00199 CreateDisposition disp = CREATE_OR_REUSE, 00200 bool Recursive = false, 00201 bool Balking = false 00202 ) throw( SemaphoreException ) ; 00220 virtual AbstractSemaphorePtr createSemaphore 00221 ( 00222 std::string aName, 00223 CreateDisposition disp = CREATE_OR_REUSE, 00224 bool Recursive=false, 00225 bool Balking = false 00226 ) throw( SemaphoreException ) ; 00227 00228 00239 virtual void destroySemaphore( AbstractSemaphorePtr ) 00240 throw( SemaphoreException ) ; 00241 protected: 00242 00243 // 00244 // Constructors 00245 // 00247 00248 GatewaySemaphoreGroup( void ) throw( Assertion ); 00249 00251 00252 GatewaySemaphoreGroup( GatewaySemaphoreGroupCref ) 00253 throw( Assertion ); 00254 00255 // 00256 // Operator overloads 00257 // 00258 00260 00261 GatewaySemaphoreGroupRef operator=( GatewaySemaphoreGroupCref ) 00262 throw( Assertion ); 00263 00264 // 00265 // GatewayGroup methods 00266 // 00267 00269 00270 AbstractSemaphorePtr resolveSemaphore 00271 ( 00272 SemaphoreIdentifierRef aIdentifier, 00273 Short aSemId, 00274 CreateDisposition aDisp, 00275 bool aRecurse, 00276 bool aBalk, 00277 Count aMaxValue = 1 00278 ) throw( SemaphoreException ) ; 00279 00280 private: 00281 00283 00284 SemaphoreShares theUsedMap; 00285 00286 }; 00287 } 00288 00289 #endif // if !defined(__GATEWAYSEMAPHOREGROUP_HPP) 00290 00291 /* 00292 Common rcs information do not modify 00293 $Author: frankc $ 00294 $Revision: 1.4 $ 00295 $Date: 2000/06/04 22:16:32 $ 00296 $Locker: $ 00297 */ 00298 00299

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