00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file ExceptionHolder_i.h 00006 * 00007 * $Id: ExceptionHolder_i.h 78185 2007-04-25 07:40:49Z johnnyw $ 00008 * 00009 * @author Johnny Willemsen <jwillemsen@remedy.nl> 00010 */ 00011 //============================================================================= 00012 00013 #ifndef TAO_MESSAGING_EXCEPTIONHOLDER_I_H 00014 #define TAO_MESSAGING_EXCEPTIONHOLDER_I_H 00015 #include /**/ "ace/pre.h" 00016 00017 #include "tao/Messaging/messaging_export.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 #include "tao/Messaging/ExceptionHolderA.h" 00026 #include "tao/Messaging/ExceptionHolderC.h" 00027 #include "tao/Valuetype/ValueFactory.h" 00028 00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00030 00031 namespace Dynamic 00032 { 00033 class ExceptionList; 00034 } 00035 00036 namespace Messaging 00037 { 00038 class ReplyHandler; 00039 } 00040 00041 namespace TAO 00042 { 00043 struct Exception_Data; 00044 00045 class TAO_Messaging_Export ExceptionHolder 00046 : public virtual ::OBV_Messaging::ExceptionHolder, 00047 public virtual ::CORBA::DefaultValueRefCountBase 00048 { 00049 public: 00050 ExceptionHolder (void); 00051 00052 ExceptionHolder ( 00053 ::CORBA::Boolean is_system_exception, 00054 ::CORBA::Boolean byte_order, 00055 const ::CORBA::OctetSeq &marshaled_exception, 00056 ::TAO::Exception_Data* data, 00057 ::CORBA::ULong exceptions_count, 00058 ACE_Char_Codeset_Translator *char_translator, 00059 ACE_WChar_Codeset_Translator *wchar_translator); 00060 00061 void set_exception_data (::TAO::Exception_Data* data, 00062 ::CORBA::ULong exceptions_count); 00063 00064 virtual void raise_exception (void); 00065 00066 virtual void raise_exception_with_list ( 00067 const ::Dynamic::ExceptionList & exc_list); 00068 00069 virtual CORBA::ValueBase* _copy_value (void); 00070 00071 protected: 00072 00073 virtual ~ExceptionHolder (void); 00074 00075 private: 00076 TAO::Exception_Data* data_; 00077 CORBA::ULong count_; 00078 ACE_Char_Codeset_Translator *char_translator_; 00079 ACE_WChar_Codeset_Translator *wchar_translator_; 00080 }; 00081 00082 /** 00083 * @class ExceptionHolderFactory 00084 * 00085 * @brief OBV factory implementation. 00086 * 00087 * Factory for ExceptionHolder 00088 */ 00089 class TAO_Messaging_Export ExceptionHolderFactory : 00090 public virtual CORBA::ValueFactoryBase 00091 { 00092 public: 00093 virtual CORBA::ValueBase * create_for_unmarshal (void); 00094 }; 00095 00096 } 00097 00098 TAO_END_VERSIONED_NAMESPACE_DECL 00099 00100 #include /**/ "ace/post.h" 00101 #endif /* TAO_MESSAGING_EXCEPTIONHOLDER_I_H */ 00102