UserException.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    UserException.h
00006  *
00007  *  $Id: UserException.h 76593 2007-01-25 19:19:27Z johnnyw $
00008  *
00009  *  CORBA::UserException class header.
00010  *
00011  *  @author DOC Group at Vanderbilt U, Wash U, and UCI
00012  *  @author Ossama Othman <ossama@dre.vanderbilt.edu>
00013  */
00014 //=============================================================================
00015 
00016 #ifndef TAO_USER_EXCEPTION_H
00017 #define TAO_USER_EXCEPTION_H
00018 
00019 #include /**/ "ace/pre.h"
00020 
00021 #include /**/ "tao/TAO_Export.h"
00022 
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif /* ACE_LACKS_PRAGMA_ONCE */
00026 
00027 #include "tao/Exception.h"
00028 
00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00030 
00031 namespace CORBA
00032 {
00033   /**
00034    * @class UserException
00035    *
00036    * @brief Application- or OMG- defined CORBA exception sub-class.
00037    *
00038    * User exceptions can be defined in application OMG IDL or by the
00039    * OMG itself for IDL interfaces and services it defines.
00040    */
00041   class TAO_Export UserException : public Exception
00042   {
00043   public:
00044 
00045     /// Copy constructor.
00046     UserException (UserException const &rhs);
00047 
00048     /// Destructor.
00049     virtual ~UserException (void);
00050 
00051     /// Assignment operator.
00052     UserException &operator= (UserException const &rhs);
00053 
00054     /// The narrow operation.
00055     static UserException *_downcast (CORBA::Exception *exception);
00056 
00057     /// The const version of narrow operation
00058     static const UserException *_downcast (CORBA::Exception const *exception);
00059 
00060     virtual void _raise (void) const = 0;
00061 
00062     virtual CORBA::TypeCode_ptr _tao_type (void) const;
00063 
00064     // = TAO specific extension.
00065 
00066     /// Constructor from a repository id.
00067     UserException (char const *repository_id, char const *local_name);
00068 
00069     /// Returns a string containing information about the exception. This
00070     /// function is not CORBA compliant.
00071     virtual ACE_CString _info (void) const;
00072 
00073   protected:
00074     /// Default constructor.
00075     UserException (void);
00076   };
00077 
00078 }
00079 
00080 TAO_END_VERSIONED_NAMESPACE_DECL
00081 
00082 #if defined (__ACE_INLINE__)
00083 # include "tao/UserException.inl"
00084 #endif /* __ACE_INLINE__ */
00085 
00086 #include /**/"ace/post.h"
00087 
00088 #endif /* TAO_USER_EXCEPTION_H */

Generated on Tue Feb 2 17:37:53 2010 for TAO by  doxygen 1.4.7