00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file Exception_Data.h 00006 * 00007 * $Id: Exception_Data.h 90386 2010-06-02 13:52:08Z vzykov $ 00008 * 00009 * @author balachandran Natarajan <bala@dre.vanderbilt.edu> 00010 */ 00011 //============================================================================= 00012 00013 #ifndef TAO_EXCEPTION_DATA_H 00014 #define TAO_EXCEPTION_DATA_H 00015 #include /**/ "ace/pre.h" 00016 00017 #include "ace/config-all.h" 00018 00019 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00020 # pragma once 00021 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00022 00023 #include "tao/orbconf.h" 00024 00025 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00026 00027 namespace CORBA 00028 { 00029 class TypeCode; 00030 typedef TypeCode *TypeCode_ptr; 00031 00032 class Exception; 00033 } 00034 00035 namespace TAO 00036 { 00037 // Function pointer returning a pointer to CORBA::Exception. This is used to 00038 // describe the allocator for user-defined exceptions that are used internally 00039 // by the interpreter. 00040 typedef CORBA::Exception* (*TAO_Exception_Alloc) (void); 00041 00042 /** 00043 * @struct Exception_Data 00044 * 00045 * @brief Description of a single exception. 00046 * 00047 * The interpreter needs a way to allocate memory to hold the exception 00048 * that was raised by the stub. This data structure provides the typecode 00049 * for the exception as well as a static function pointer that 00050 * does the job of memory allocation. 00051 */ 00052 struct Exception_Data 00053 { 00054 /// Repository id of the exception. 00055 const char *id; 00056 00057 /// The allocator for this exception. 00058 TAO_Exception_Alloc alloc; 00059 00060 #if TAO_HAS_INTERCEPTORS == 1 00061 /// The typecode pointer for this exception. 00062 CORBA::TypeCode_ptr tc_ptr; 00063 #endif /* TAO_HAS_INTERCEPTORS */ 00064 }; 00065 } 00066 00067 TAO_END_VERSIONED_NAMESPACE_DECL 00068 00069 #include /**/ "ace/post.h" 00070 #endif /*TAO_EXCEPTION_DATA_H*/