#include "ace/config-all.h"
#include "ace/Exception_Macros.h"
Include dependency graph for CORBA_macros.h:
Go to the source code of this file.
Native C++ exceptions portability macros. | |
The following macros are used to write code portable between platforms with and without native C++ exception support. Their main goal is to hide the presence of the ACE_ENV_TYPE argument, but they collaborate with the ACE_TRY_* macros to emulate the try/catch blocks. | |
#define | ACE_ENV_EMIT_CODE(X) |
Define a macro to emit code only when ACE_ENV_TYPE is used. | |
#define | ACE_ENV_EMIT_CODE2(X, Y) |
Another macro to emit code only when ACE_ENV_TYPE is used. | |
#define | ACE_ENV_EMIT_DUMMY |
Helper macro. | |
#define | ACE_ENV_ARG_DECL |
#define | ACE_ENV_ARG_DECL_WITH_DEFAULTS |
#define | ACE_ENV_ARG_DECL_NOT_USED |
#define | ACE_ENV_SINGLE_ARG_DECL ACE_ENV_EMIT_CODE(ACE_ENV_TYPE &ACE_TRY_ENV) |
#define | ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS |
#define | ACE_ENV_SINGLE_ARG_DECL_NOT_USED ACE_ENV_EMIT_CODE(ACE_ENV_TYPE &) |
Declare a ACE_ENV_TYPE argument for methods which don't use it. | |
#define | ACE_ENV_ARG_PARAMETER |
Use the ACE_ENV_TYPE argument in a nested call. | |
#define | ACE_ENV_SINGLE_ARG_PARAMETER ACE_ENV_EMIT_CODE(ACE_TRY_ENV) |
#define | ACE_ENV_ARG_NOT_USED ACE_ENV_EMIT_CODE(ACE_UNUSED_ARG(ACE_TRY_ENV)) |
Eliminate unused argument warnings about ACE_TRY_ENV. | |
Defines | |
#define | ACE_ENV_POLLUTE_NAMES |
#define | ACE_ENV_TYPE CORBA::Environment |
#define | ACE_TRY_ENV _ACE_CORBA_Environment_variable |
#define | ACE_EXCEPTION_TYPE CORBA::Exception |
#define | ACE_DEFAULT_GET_ENV_METHOD TAO_default_environment |
#define | ACE_ANY_EXCEPTION ex |
#define | ACE_DECLARE_NEW_ENV ACE_ENV_TYPE ACE_TRY_ENV |
#define | ACE_DECLARE_NEW_CORBA_ENV ACE_ENV_TYPE ACE_TRY_ENV |
#define | ACE_ADOPT_CORBA_ENV(ENV) |
#define | ACE_ADOPT_ENV (ENV) |
#define | ACE_CHECK |
#define | ACE_CHECK_RETURN(RETV) |
#define | ACE_THROW_INT(EXCEPTION) throw EXCEPTION |
#define | ACE_THROW(EXCEPTION) throw EXCEPTION |
#define | ACE_THROW_RETURN(EXCEPTION, RETV) throw EXCEPTION |
#define | ACE_TRY |
#define | ACE_TRY_NEW_ENV |
#define | ACE_TRY_EX(LABEL) |
#define | ACE_TRY_CHECK |
#define | ACE_TRY_CHECK_EX(LABEL) |
#define | ACE_TRY_THROW(EXCEPTION) throw EXCEPTION |
#define | ACE_TRY_THROW_EX(EXCEPTION, LABEL) throw EXCEPTION |
#define | ACE_CATCH(EXCEPTION, VAR) |
#define | ACE_CATCHANY ACE_CATCH(ACE_EXCEPTION_TYPE, ACE_ANY_EXCEPTION) |
#define | ACE_CATCHALL |
#define | ACE_RE_THROW throw |
#define | ACE_RE_THROW_EX(LABEL) throw |
#define | ACE_ENDTRY |
#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) |
#define | ACE_ENV_RAISE(ex) (ex)->_raise () |
#define | ACE_PRINT_TAO_EXCEPTION(EX, INFO) EX._tao_print_exception (INFO) |
#define | ACE_PRINT_EXCEPTION(EX, INFO) ACE_PRINT_TAO_EXCEPTION(EX,INFO) |
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.
Aniruddha Gokhale <gokhale@sahyadri.research.bell-labs.com>
Carlos O'Ryan <coryan@uci.edu>, et al.
Definition in file CORBA_macros.h.
|
Definition at line 127 of file CORBA_macros.h. |
|
Definition at line 130 of file CORBA_macros.h. |
|
Definition at line 107 of file CORBA_macros.h. |
|
Value: } \
catch (EXCEPTION & VAR) \
{ \
ACE_UNUSED_ARG (VAR);
Definition at line 190 of file CORBA_macros.h. |
|
Value: } \
catch (...) \
{
Definition at line 199 of file CORBA_macros.h. |
|
Definition at line 196 of file CORBA_macros.h. |
|
Definition at line 134 of file CORBA_macros.h. |
|
Definition at line 137 of file CORBA_macros.h. |
|
Definition at line 119 of file CORBA_macros.h. |
|
Definition at line 112 of file CORBA_macros.h. |
|
Definition at line 102 of file CORBA_macros.h. |
|
Value: } \
} while (0)
Definition at line 213 of file CORBA_macros.h. |
|
Value: ACE_ENV_EMIT_CODE2(ACE_ENV_EMIT_DUMMY, \ ACE_ENV_TYPE &ACE_TRY_ENV)
Its purpose is to provide developers (and users) with a mechanism to write code that is portable to platforms with and without native C++ exceptions. Definition at line 467 of file CORBA_macros.h. |
|
Value: ACE_ENV_EMIT_CODE2(ACE_ENV_EMIT_DUMMY, \ ACE_ENV_TYPE &) Definition at line 489 of file CORBA_macros.h. |
|
Value: ACE_ENV_EMIT_CODE2(ACE_ENV_EMIT_DUMMY, \ ACE_ENV_TYPE &ACE_TRY_ENV = \ ACE_DEFAULT_GET_ENV_METHOD ()) Definition at line 478 of file CORBA_macros.h. |
|
Eliminate unused argument warnings about ACE_TRY_ENV.
Definition at line 521 of file CORBA_macros.h. |
|
Value: ACE_ENV_EMIT_CODE2(ACE_ENV_EMIT_DUMMY, \ ACE_TRY_ENV)
Definition at line 511 of file CORBA_macros.h. |
|
Define a macro to emit code only when ACE_ENV_TYPE is used.
Definition at line 443 of file CORBA_macros.h. |
|
Another macro to emit code only when ACE_ENV_TYPE is used.
Definition at line 450 of file CORBA_macros.h. |
|
Helper macro.
Definition at line 454 of file CORBA_macros.h. |
|
Definition at line 33 of file CORBA_macros.h. |
|
Definition at line 529 of file CORBA_macros.h. |
|
Declare a ACE_ENV_TYPE argument for methods that do not take any other parameters Definition at line 495 of file CORBA_macros.h. |
|
Declare a ACE_ENV_TYPE argument for methods which don't use it.
Definition at line 507 of file CORBA_macros.h. |
|
Value: ACE_ENV_EMIT_CODE(ACE_ENV_TYPE &ACE_TRY_ENV = \ ACE_DEFAULT_GET_ENV_METHOD ()) Definition at line 502 of file CORBA_macros.h. |
|
Use the ACE_ENV_TYPE argument in a nested call, assuming that the called function takes only the ACE_TRY_ENV argument. Definition at line 517 of file CORBA_macros.h. |
|
Definition at line 76 of file CORBA_macros.h. |
|
Definition at line 93 of file CORBA_macros.h. |
|
Value: ACE_Guard< MUTEX > OBJ (LOCK); \ if (OBJ.locked () == 0) ACE_THROW_INT (EXCEPTION); Definition at line 417 of file CORBA_macros.h. |
|
Value: do { POINTER = new CONSTRUCTOR; \ if (POINTER == 0) { errno = ENOMEM; ACE_THROW_INT (EXCEPTION); } \ } while (0) Definition at line 410 of file CORBA_macros.h. |
|
Definition at line 542 of file CORBA_macros.h. |
|
Definition at line 535 of file CORBA_macros.h. |
|
Definition at line 209 of file CORBA_macros.h. |
|
Definition at line 210 of file CORBA_macros.h. |
|
Value: ACE_Read_Guard< MUTEX > OBJ (LOCK); \ if (OBJ.locked () == 0) ACE_THROW_INT (EXCEPTION); Definition at line 421 of file CORBA_macros.h. |
|
Definition at line 145 of file CORBA_macros.h. |
|
Definition at line 140 of file CORBA_macros.h. |
|
Definition at line 157 of file CORBA_macros.h. |
|
Value: do \ { \ try \ { Definition at line 163 of file CORBA_macros.h. |
|
Definition at line 182 of file CORBA_macros.h. |
|
Definition at line 183 of file CORBA_macros.h. |
|
Definition at line 85 of file CORBA_macros.h. |
|
Value: do \ { \ try \ { Definition at line 174 of file CORBA_macros.h. |
|
Value: do \ { \ ACE_ENV_TYPE ACE_TRY_ENV; \ try \ { Definition at line 168 of file CORBA_macros.h. |
|
Definition at line 186 of file CORBA_macros.h. |
|
Definition at line 187 of file CORBA_macros.h. |
|
Value: ACE_Write_Guard< MUTEX > OBJ (LOCK); \ if (OBJ.locked () == 0) ACE_THROW_INT (EXCEPTION); Definition at line 425 of file CORBA_macros.h. |