#include "ace/pre.h"#include "ace/config-all.h"#include "ace/Exception_Macros.h"#include "ace/post.h"Include dependency graph for XML_Macros.h:

This graph shows which files directly or indirectly include 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 ACEXML_ENV_TYPE argument, but they collaborate with the ACEXML_TRY_* macros to emulate the try/catch blocks. | |
| #define | ACEXML_ENV_EMIT_CODE(X) |
| Define a macro to emit code only when ACEXML_ENV_TYPE is used. More... | |
| #define | ACEXML_ENV_EMIT_CODE2(X, Y) |
| Another macro to emit code only when ACEXML_ENV_TYPE is used. More... | |
| #define | ACEXML_ENV_EMIT_DUMMY |
| Helper macro. More... | |
| #define | ACEXML_ENV_ARG_DECL |
| Declare a ACEXML_ENV_TYPE argument as the last argument of a function. More... | |
| #define | ACEXML_ENV_ARG_DECL_NOT_USED |
| Declare a ACEXML_ENV_TYPE argument that is not used by the function definition. More... | |
| #define | ACEXML_ENV_SINGLE_ARG_DECL ACEXML_ENV_EMIT_CODE(ACEXML_ENV_TYPE &ACEXML_TRY_ENV) |
| Declare a ACEXML_ENV_TYPE argument for methods that do not take any other parameters. More... | |
| #define | ACEXML_ENV_SINGLE_ARG_DECL_NOT_USED ACEXML_ENV_EMIT_CODE(ACEXML_ENV_TYPE &) |
| Declare a ACEXML_ENV_TYPE argument for methods which don't use it. More... | |
| #define | ACEXML_ENV_ARG_PARAMETER |
| Use the ACEXML_ENV_TYPE argument in a nested call. More... | |
| #define | ACEXML_ENV_SINGLE_ARG_PARAMETER ACEXML_ENV_EMIT_CODE(ACEXML_TRY_ENV) |
| Use the ACEXML_ENV_TYPE argument in a nested call, assuming that the called function takes only the ACEXML_TRY_ENV argument. More... | |
| #define | ACEXML_ENV_ARG_NOT_USED ACEXML_ENV_EMIT_CODE(ACE_UNUSED_ARG(ACEXML_TRY_ENV)) |
| Eliminate unused argument warnings about ACEXML_TRY_ENV. More... | |
Defines | |
| #define | ACEXML_ENV_TYPE ACEXML_Env |
| #define | ACEXML_TRY_ENV _ACEXML_Env_variable |
| #define | ACEXML_EXCEPTION_TYPE ACEXML_Exception |
| #define | ACEXML_ANY_EXCEPTION ex |
| #define | ACEXML_DECLARE_NEW_ENV ACEXML_ENV_TYPE ACEXML_TRY_ENV |
| #define | ACEXML_ADOPT_ENV (ENV) |
| #define | ACEXML_CHECK |
| #define | ACEXML_CHECK_RETURN(RETV) |
| #define | ACEXML_THROW_R_INT(EXCEPTION) throw EXCEPTION |
| #define | ACEXML_THROW(EXCEPTION) throw EXCEPTION |
| #define | ACEXML_THROW_RETURN(EXCEPTION, RETV) throw EXCEPTION |
| #define | ACEXML_TRY |
| #define | ACEXML_TRY_NEW_ENV |
| #define | ACEXML_TRY_EX(LABEL) |
| #define | ACEXML_TRY_CHECK |
| #define | ACEXML_TRY_CHECK_EX(LABEL) |
| #define | ACEXML_TRY_THROW(EXCEPTION) throw EXCEPTION |
| #define | ACEXML_TRY_THROW_EX(EXCEPTION, LABEL) throw EXCEPTION |
| #define | ACEXML_CATCH(EXCEPTION, VAR) |
| #define | ACEXML_CATCHANY ACEXML_CATCH(ACEXML_EXCEPTION_TYPE, ACEXML_ANY_EXCEPTION) |
| #define | ACEXML_CATCHALL |
| #define | ACEXML_RE_THROW throw |
| #define | ACEXML_RE_THROW_EX(LABEL) throw |
| #define | ACEXML_ENDTRY |
| #define | ACEXML_NEW_THROW_EX(POINTER, CONSTRUCTOR, EXCEPTION) |
| #define | ACEXML_GUARD_THROW_EX(MUTEX, OBJ, LOCK, EXCEPTION) |
| #define | ACEXML_READ_GUARD_THROW_EX(MUTEX, OBJ, LOCK, EXCEPTION) |
| #define | ACEXML_WRITE_GUARD_THROW_EX(MUTEX, OBJ, LOCK, EXCEPTION) |
| #define | ACEXML_ENV_RAISE(ex) (ex)->_raise () |
XML_Macros.h,v 1.2 2002/10/14 00:41:15 kitty Exp
Writing code that is portable between platforms with or without native C++ exceptions is hard. The following macros offer some help on this task.
|
|
|
|
|
|
|
|
Value: } \
catch (EXCEPTION & VAR) \
{ \
ACE_UNUSED_ARG (VAR); |
|
|
Value: } \
catch (...) \
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: } \
} while (0) |
|
|
Value: Declare a ACEXML_ENV_TYPE argument as the last argument of a function.Normally this macro is used as follows:
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. |
|
|
Value: Declare a ACEXML_ENV_TYPE argument that is not used by the function definition.Similar to ACEXML_ENV_ARG_DECL, but the formal parameter name is dropped to avoid warnings about unused parameters |
|
|
Eliminate unused argument warnings about ACEXML_TRY_ENV.
|
|
|
Value: Use the ACEXML_ENV_TYPE argument in a nested call.
|
|
|
Define a macro to emit code only when ACEXML_ENV_TYPE is used.
|
|
|
Another macro to emit code only when ACEXML_ENV_TYPE is used.
|
|
|
Helper macro.
|
|
|
|
|
|
Declare a ACEXML_ENV_TYPE argument for methods that do not take any other parameters.
|
|
|
Declare a ACEXML_ENV_TYPE argument for methods which don't use it.
|
|
|
Use the ACEXML_ENV_TYPE argument in a nested call, assuming that the called function takes only the ACEXML_TRY_ENV argument.
|
|
|
|
|
|
|
|
|
Value: ACE_Guard< MUTEX > OBJ (LOCK); \ if (OBJ.locked () == 0) ACEXML_THROW_R_INT (EXCEPTION); |
|
|
Value: do { POINTER = new CONSTRUCTOR; \
if (POINTER == 0) { errno = ENOMEM; ACEXML_THROW_R_INT (EXCEPTION); } \
} while (0) |
|
|
|
|
|
|
|
|
Value: ACE_Read_Guard< MUTEX > OBJ (LOCK); \ if (OBJ.locked () == 0) ACEXML_THROW_R_INT (EXCEPTION); |
|
|
|
|
|
|
|
|
|
|
|
Value: do \
{ \
try \
{ |
|
|
|
|
|
|
|
|
|
|
|
Value: do \
{ \
try \
{ |
|
|
Value: do \
{ \
ACEXML_ENV_TYPE ACEXML_TRY_ENV; \
try \
{ |
|
|
|
|
|
|
|
|
Value: ACE_Write_Guard< MUTEX > OBJ (LOCK); \ if (OBJ.locked () == 0) ACEXML_THROW_R_INT (EXCEPTION); |
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001