ACE 6.0.5
|
Defines | |
#define | ACE_del_bad_alloc |
#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.
#define ACE_del_bad_alloc |
#define ACE_GUARD_THROW_EX | ( | MUTEX, | |
OBJ, | |||
LOCK, | |||
EXCEPTION | |||
) |
ACE_Guard< MUTEX > OBJ (LOCK); \ if (OBJ.locked () == 0) throw EXCEPTION;
#define ACE_NEW_THROW_EX | ( | POINTER, | |
CONSTRUCTOR, | |||
EXCEPTION | |||
) |
do { POINTER = new CONSTRUCTOR; \ if (POINTER == 0) { throw EXCEPTION; } \ } while (0)
#define ACE_READ_GUARD_THROW_EX | ( | MUTEX, | |
OBJ, | |||
LOCK, | |||
EXCEPTION | |||
) |
ACE_Read_Guard< MUTEX > OBJ (LOCK); \ if (OBJ.locked () == 0) throw EXCEPTION;
#define ACE_WRITE_GUARD_THROW_EX | ( | MUTEX, | |
OBJ, | |||
LOCK, | |||
EXCEPTION | |||
) |
ACE_Write_Guard< MUTEX > OBJ (LOCK); \ if (OBJ.locked () == 0) throw EXCEPTION;