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

MutexSemaphoreGroup.hpp

00001 #if !defined(__MUTEXSEMAPHOREGROUP_HPP) 00002 #define __MUTEXSEMAPHOREGROUP_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 00035 DECLARE_CLASS( MutexSemaphoreGroup ); 00036 00044 class MutexSemaphoreGroup : public SemaphoreGroup 00045 { 00046 public: 00047 00060 MutexSemaphoreGroup( Short, Int Rights = OWNER_ALL ) 00061 throw(Assertion,SemaphoreException); 00062 00085 MutexSemaphoreGroup 00086 ( 00087 Short, 00088 SemaphoreGroupIdentifierCref, 00089 Int , 00090 CreateDisposition disp=FAIL_IF_EXISTS 00091 ) throw(Assertion,SemaphoreException); 00092 00111 MutexSemaphoreGroup 00112 ( 00113 Short, 00114 CharCptr, 00115 Int , 00116 CreateDisposition disp=FAIL_IF_EXISTS 00117 ) throw(Assertion,SemaphoreException); 00118 00119 00121 00122 virtual ~MutexSemaphoreGroup( void ); 00123 00124 // 00125 // Accessors 00126 // 00127 00128 // 00129 // Factory methods 00130 // 00131 00138 virtual AbstractSemaphorePtr createSemaphore( void ) 00139 throw( SemaphoreException ) ; 00140 00147 virtual AbstractSemaphorePtr createLockedSemaphore 00148 ( 00149 bool Recursive = false, 00150 bool Balking = false 00151 ) throw( SemaphoreException ) ; 00152 00170 virtual AbstractSemaphorePtr createSemaphore 00171 ( 00172 SemaphoreIdentifierRef aIdentifier, 00173 CreateDisposition disp = CREATE_OR_REUSE, 00174 bool Recursive = false, 00175 bool Balking = false 00176 ) throw( SemaphoreException ) ; 00177 00196 virtual AbstractSemaphorePtr createLockedSemaphore 00197 ( 00198 SemaphoreIdentifierRef aIdentifier, 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 MutexSemaphoreGroup( void ) throw( Assertion ); 00249 00251 00252 MutexSemaphoreGroup( MutexSemaphoreGroupCref ) 00253 throw( Assertion ); 00254 00255 // 00256 // Operator overloads 00257 // 00258 00260 00261 MutexSemaphoreGroupRef operator=( MutexSemaphoreGroupCref ) 00262 throw( Assertion ); 00263 00265 00266 AbstractSemaphorePtr resolveSemaphore 00267 ( 00268 SemaphoreIdentifierRef aIdentifier, 00269 Short aSemId, 00270 CreateDisposition aDisp, 00271 bool aRecurse, 00272 bool aBalk, 00273 bool aAutoLock = false 00274 ) throw( SemaphoreException ) ; 00275 00276 private: 00277 00279 00280 SemaphoreShares theUsedMap; 00281 00282 }; 00283 } 00284 00285 #endif // if !defined(__MUTEXSEMAPHOREGROUP_HPP) 00286 00287 /* 00288 Common rcs information do not modify 00289 $Author: frankc $ 00290 $Revision: 1.4 $ 00291 $Date: 2000/06/04 22:16:32 $ 00292 $Locker: $ 00293 */ 00294 00295

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