|
#define | ACE_NEW_THROW_EX(POINTER, CONSTRUCTOR, EXCEPTION) |
|
#define | ACE_GUARD_THROW_EX(MUTEX, OBJ, LOCK, EXCEPTION) |
|
#define | ACE_READ_GUARD_THROW_EX(MUTEX, OBJ, LOCK, EXCEPTION) |
|
#define | ACE_WRITE_GUARD_THROW_EX(MUTEX, OBJ, LOCK, EXCEPTION) |
|
Writing code that is portable between platforms with or without native C++ exceptions is hard. The following macros offer some help on this task, mostly oriented to making the ORB code and the IDL generated code portable.
- Author
- Nanbor Wang nanbo.nosp@m.r@cs.nosp@m..wust.nosp@m.l.ed.nosp@m.u
-
Aniruddha Gokhale gokha.nosp@m.le@s.nosp@m.ahyad.nosp@m.ri.r.nosp@m.esear.nosp@m.ch.b.nosp@m.ell-l.nosp@m.abs..nosp@m.com
-
Carlos O'Ryan corya.nosp@m.n@uc.nosp@m.i.edu, et al.
◆ ACE_GUARD_THROW_EX
#define ACE_GUARD_THROW_EX |
( |
| MUTEX, |
|
|
| OBJ, |
|
|
| LOCK, |
|
|
| EXCEPTION ) |
Value:
if (!OBJ.locked ()) throw EXCEPTION;
This data structure is meant to be used within a method or function... It performs automatic acquisit...
Definition Guard_T.h:64
◆ ACE_NEW_THROW_EX
#define ACE_NEW_THROW_EX |
( |
| POINTER, |
|
|
| CONSTRUCTOR, |
|
|
| EXCEPTION ) |
Value: do { POINTER = new (std::nothrow) CONSTRUCTOR; \
if (POINTER == nullptr) { throw EXCEPTION; } \
} while (0)
◆ ACE_READ_GUARD_THROW_EX
#define ACE_READ_GUARD_THROW_EX |
( |
| MUTEX, |
|
|
| OBJ, |
|
|
| LOCK, |
|
|
| EXCEPTION ) |
Value:
if (!OBJ.locked ()) throw EXCEPTION;
This class is similar to class ACE_Guard, though it acquires/releases a read lock automatically (natu...
Definition Guard_T.h:183
◆ ACE_WRITE_GUARD_THROW_EX
#define ACE_WRITE_GUARD_THROW_EX |
( |
| MUTEX, |
|
|
| OBJ, |
|
|
| LOCK, |
|
|
| EXCEPTION ) |
Value:
if (!OBJ.locked ()) throw EXCEPTION;
This class is similar to class ACE_Guard, though it acquires/releases a write lock automatically (nat...
Definition Guard_T.h:139