CoreLinux++  0.4.32
SemaphoreException.hpp
1 #if !defined (__SEMAPHOREEXCEPTION_HPP)
2 #define __SEMAPHOREEXCEPTION_HPP
3 
4 /*
5  CoreLinux++
6  Copyright (C) 2000 CoreLinux Consortium
7 
8  The CoreLinux++ Library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Library General Public License as
10  published by the Free Software Foundation; either version 2 of the
11  License, or (at your option) any later version.
12 
13  The CoreLinux++ Library Library is distributed in the hope that it will
14  be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Library General Public License for more details.
17 
18  You should have received a copy of the GNU Library General Public
19  License along with the GNU C Library; see the file COPYING.LIB. If not,
20  write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  Boston, MA 02111-1307, USA.
22 */
23 
24 #if !defined(__COMMON_HPP)
25 #include <Common.hpp>
26 #endif
27 
28 namespace corelinux
29 {
30 
31 
32  DECLARE_CLASS( SemaphoreException );
33 
40  {
41 
42  public:
43 
54  (
55  CharCptr why,
56  CharCptr file,
57  LineNum line,
58  Severity severity = Exception::CONTINUABLE,
59  bool outOfMemory = false ,
60  Int errNum = 0
61  );
62 
69 
71 
72  virtual ~SemaphoreException( void );
73 
74  //
75  // Operator overloads
76  //
77 
85 
92  bool operator==( SemaphoreExceptionCref ) const;
93 
94  //
95  // Accessor methods
96  //
97 
98  IntCref getErrNum( void ) const;
99 
100  //
101  // Mutator methods
102  //
103 
104 
105  protected:
106 
116  (
117  CharCptr file,
118  LineNum line,
119  Severity severity = Exception::CONTINUABLE,
120  bool outOfMemory = false ,
121  Int errNum = 0
122  );
123 
130  SemaphoreException( void );
131 
132 
133  private:
134 
135  Int theErrorNumberFromKernel;
136 
137  };
138 
139 }
140 
141 
142 #endif // !defined __SemaphoreEXCEPTION_HPP
143 
144 /*
145  Common rcs information do not modify
146  $Author: prudhomm $
147  $Revision: 1.1 $
148  $Date: 2000/04/23 20:43:13 $
149  $Locker: $
150 */
151 
152 
153 
SemaphoreExceptionRef operator=(SemaphoreExceptionCref)
Assignment operator overload.
Definition: SemaphoreException.cpp:105
SemaphoreException(void)
SemaphoreException must have at least a location.
Definition: SemaphoreException.cpp:73
virtual ~SemaphoreException(void)
Virtual Destructor.
Definition: SemaphoreException.cpp:95
Severity
Exception Severity States.
Definition: Exception.hpp:59
Exception is the base exception class used in the CoreLinux++ libraries.
Definition: Exception.hpp:51
SemaphoreException is the base exception type for Semaphore.
Definition: SemaphoreException.hpp:39
bool operator==(SemaphoreExceptionCref) const
Equality operator overload.
Definition: SemaphoreException.cpp:117

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