Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Exception_Data.h
blob071d6cfd8dc909df24335bdc0539754527f770e3
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Exception_Data.h
7 * @author balachandran Natarajan <bala@dre.vanderbilt.edu>
8 */
9 //=============================================================================
11 #ifndef TAO_EXCEPTION_DATA_H
12 #define TAO_EXCEPTION_DATA_H
13 #include /**/ "ace/pre.h"
15 #include "ace/config-all.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 # pragma once
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 #include "tao/orbconf.h"
23 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
25 namespace CORBA
27 class TypeCode;
28 typedef TypeCode *TypeCode_ptr;
30 class Exception;
33 namespace TAO
35 // Function pointer returning a pointer to CORBA::Exception. This is used to
36 // describe the allocator for user-defined exceptions that are used internally
37 // by the interpreter.
38 typedef CORBA::Exception* (*TAO_Exception_Alloc) ();
40 /**
41 * @struct Exception_Data
43 * @brief Description of a single exception.
45 * The interpreter needs a way to allocate memory to hold the exception
46 * that was raised by the stub. This data structure provides the typecode
47 * for the exception as well as a static function pointer that
48 * does the job of memory allocation.
50 struct Exception_Data
52 /// Repository id of the exception.
53 const char *id;
55 /// The allocator for this exception.
56 TAO_Exception_Alloc alloc;
58 #if TAO_HAS_INTERCEPTORS == 1
59 /// The typecode pointer for this exception.
60 CORBA::TypeCode_ptr tc_ptr;
61 #endif /* TAO_HAS_INTERCEPTORS */
65 TAO_END_VERSIONED_NAMESPACE_DECL
67 #include /**/ "ace/post.h"
68 #endif /*TAO_EXCEPTION_DATA_H*/