ACE  6.1.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Defines
CORBA_macros.h File Reference

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)

Detailed Description

Id:
CORBA_macros.h 91626 2010-09-07 10:59:20Z johnnyw

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.

Define Documentation

#define ACE_GUARD_THROW_EX (   MUTEX,
  OBJ,
  LOCK,
  EXCEPTION 
)
Value:
ACE_Guard< MUTEX > OBJ (LOCK); \
    if (OBJ.locked () == 0) throw EXCEPTION;
#define ACE_NEW_THROW_EX (   POINTER,
  CONSTRUCTOR,
  EXCEPTION 
)
Value:
do { POINTER = new CONSTRUCTOR;                               \
    if (POINTER == 0) { throw EXCEPTION; }                      \
  } while (0)
#define ACE_READ_GUARD_THROW_EX (   MUTEX,
  OBJ,
  LOCK,
  EXCEPTION 
)
Value:
ACE_Read_Guard< MUTEX > OBJ (LOCK); \
    if (OBJ.locked () == 0) throw EXCEPTION;
#define ACE_WRITE_GUARD_THROW_EX (   MUTEX,
  OBJ,
  LOCK,
  EXCEPTION 
)
Value:
ACE_Write_Guard< MUTEX > OBJ (LOCK); \
    if (OBJ.locked () == 0) throw EXCEPTION;