00001
#if !defined(__GATEWAYSEMAPHOREGROUP_HPP)
00002
#define __GATEWAYSEMAPHOREGROUP_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(__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
00126
00127
00128
00129
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
00245
00247
00248
GatewaySemaphoreGroup(
void )
throw(
Assertion );
00249
00251
00252
GatewaySemaphoreGroup(
GatewaySemaphoreGroupCref )
00253
throw(
Assertion );
00254
00255
00256
00257
00258
00260
00261
GatewaySemaphoreGroupRef operator=(
GatewaySemaphoreGroupCref )
00262
throw(
Assertion );
00263
00264
00265
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
00293
00294
00295
00296
00297
00298
00299