diff options
Diffstat (limited to 'TAO/tao/Exception.h')
-rw-r--r-- | TAO/tao/Exception.h | 60 |
1 files changed, 29 insertions, 31 deletions
diff --git a/TAO/tao/Exception.h b/TAO/tao/Exception.h index a33da901c7b..430b6242339 100644 --- a/TAO/tao/Exception.h +++ b/TAO/tao/Exception.h @@ -39,14 +39,18 @@ #include "ace/iosfwd.h" #include "ace/CORBA_macros.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL class ACE_Allocator; +ACE_END_VERSIONED_NAMESPACE_DECL + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL class TAO_OutputCDR; class TAO_InputCDR; -#if defined (ACE_HAS_PREDEFINED_THREAD_CANCELLED_MACRO) +#if defined (THREAD_CANCELLED) #undef THREAD_CANCELLED -#endif /* ACE_HAS_PREDEFINED_THREAD_CANCELLED_MACRO */ +#endif /* THREAD_CANCELLED */ // This is already done in orbconf.h. But this file is totally // decoupled from its contents that we have to do this here. Including @@ -93,31 +97,24 @@ namespace CORBA * (in the @c TypeCode) that are generated by any OMG-IDL compiler * and available through the Interface Repository. Think of it as a * "globally scoped" name distinguishing each exception. - * - * @todo According to the OMG CORBA C++ Mapping version 1.1, all - * constructors, copy constructors and assignment operators - * should be moved to "protected" section in class - * declarations. Since the current MS Visual C++ 6.0 compiler - * will cause some problems to TAO's exception mechanism, we - * defer doing this until we drop support for MSVC++ 6. - */ + * + * @todo According to the OMG CORBA C++ Mapping version 1.1, + * the copy constructors + * should be moved to "protected" section in class + * declarations. Since the current MS Visual C++ 7.1 compiler + * will cause some problems to TAO's exception mechanism, we + * defer doing this until we drop support for MSVC++ 7.1. Maybe + * there is another solution, have to test that later. + */ class TAO_Export Exception { public: + /// Destructor. + virtual ~Exception (void); /// Copy constructor. Exception (const Exception &src); - /// Assignment operator. - Exception & operator = (const Exception & src); - - /// Construct from a respository id. - Exception (const char *repository_id, - const char *local_name); - - /// Destructor. - virtual ~Exception (void); - // = To throw the exception (when using the standard mapping). virtual void _raise (void) const = 0; @@ -191,6 +188,13 @@ namespace CORBA /// Default constructor. Exception (void); + /// Assignment operator. + Exception & operator = (const Exception & src); + + /// Construct from a respository id. + Exception (const char *repository_id, + const char *local_name); + private: /// Repository Id @@ -213,19 +217,13 @@ namespace CORBA #endif /* (ACE_LACKS_IOSTREAM_TOTALLY) */ } // End CORBA namespace -/** - * @class TAO_Exceptions - * - * @brief This class is a namespace for exception-related static data and - * methods. - */ -class TAO_Export TAO_Exceptions +namespace TAO { -public: - /// Create a CORBA::SystemException given the interface repository ID. - static CORBA::SystemException *create_system_exception (const char *id); -}; + TAO_Export CORBA::SystemException *create_system_exception (const char *id); +} + +TAO_END_VERSIONED_NAMESPACE_DECL #if defined (__ACE_INLINE__) # include "tao/Exception.i" |