summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2005-10-19 09:34:49 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2005-10-19 09:34:49 +0000
commit5099cf5a8416914b1cce25adb6cef06072461868 (patch)
treee11d85337e27d26d8faa481a8338ee977637dc18
parenta6b8fa1f76f61c39ae6d94ec508c249ce94c90de (diff)
downloadATCD-5099cf5a8416914b1cce25adb6cef06072461868.tar.gz
ChangeLogTag: Wed Oct 19 08:51:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r--TAO/tao/Makefile.am2
-rw-r--r--TAO/tao/Messaging/ExceptionHolder_i.cpp59
-rw-r--r--TAO/tao/Messaging/ExceptionHolder_i.h73
3 files changed, 134 insertions, 0 deletions
diff --git a/TAO/tao/Makefile.am b/TAO/tao/Makefile.am
index 804398922a6..c0e2ed3afde 100644
--- a/TAO/tao/Makefile.am
+++ b/TAO/tao/Makefile.am
@@ -2049,6 +2049,7 @@ libTAO_Messaging_la_SOURCES = \
Messaging/Asynch_Reply_Dispatcher.cpp \
Messaging/Asynch_Timeout_Handler.cpp \
Messaging/Connection_Timeout_Policy_i.cpp \
+ Messaging/ExceptionHolder_i.cpp \
Messaging/ExceptionHolderA.cpp \
Messaging/ExceptionHolderC.cpp \
Messaging/Messaging.cpp \
@@ -2091,6 +2092,7 @@ nobase_include_HEADERS += \
Messaging/Asynch_Timeout_Handler.h \
Messaging/Connection_Timeout_Policy_i.h \
Messaging/ExceptionHolder.pidl \
+ Messaging/ExceptionHolder_i.h \
Messaging/ExceptionHolderA.h \
Messaging/ExceptionHolderC.h \
Messaging/ExceptionHolderC.inl \
diff --git a/TAO/tao/Messaging/ExceptionHolder_i.cpp b/TAO/tao/Messaging/ExceptionHolder_i.cpp
new file mode 100644
index 00000000000..1166f01811e
--- /dev/null
+++ b/TAO/tao/Messaging/ExceptionHolder_i.cpp
@@ -0,0 +1,59 @@
+// -*- C++ -*-
+// $Id$
+
+#include "tao/Messaging/ExceptionHolder_i.h"
+
+ACE_RCSID (Messaging,
+ ExceptionHolder_i,
+ "$Id$")
+
+#if !defined (TAO_HAS_DEPRECATED_EXCEPTION_HOLDER)
+
+#include "tao/Messaging/Messaging.h"
+
+namespace TAO
+{
+ ExceptionHolder::ExceptionHolder (
+ ::CORBA::Boolean is_system_exception,
+ ::CORBA::Boolean byte_order,
+ const ::CORBA::OctetSeq &marshaled_exception,
+ ::TAO::Exception_Data* data,
+ ::CORBA::ULong exceptions_count) :
+ ::OBV_Messaging::ExceptionHolder (),
+ ::CORBA::DefaultValueRefCountBase (),
+ data_ (data),
+ count_ (exceptions_count)
+ {
+ this->is_system_exception (is_system_exception);
+ this->byte_order (byte_order);
+ this->marshaled_exception (marshaled_exception);
+ }
+
+ ExceptionHolder::~ExceptionHolder ()
+ {
+ }
+
+ void ExceptionHolder::raise_exception (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ )
+ {
+ TAO_Messaging_Helper::exception_holder_raise (
+ this->data_,
+ this->count_,
+ this->marshaled_exception ().get_buffer (),
+ this->marshaled_exception ().length (),
+ this->byte_order (),
+ this->is_system_exception ()
+ ACE_ENV_ARG_PARAMETER);
+ }
+
+ void ExceptionHolder::raise_exception_with_list (
+ const ::Dynamic::ExceptionList & ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ )
+ {
+ // todo convert exceptionlist to something we can really use.
+ this->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+}
+
+#endif
diff --git a/TAO/tao/Messaging/ExceptionHolder_i.h b/TAO/tao/Messaging/ExceptionHolder_i.h
new file mode 100644
index 00000000000..590603385dd
--- /dev/null
+++ b/TAO/tao/Messaging/ExceptionHolder_i.h
@@ -0,0 +1,73 @@
+// -*- C++ -*-
+
+//=============================================================================
+/**
+ * @file ExceptionHolder_i.h
+ *
+ * $Id$
+ *
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ */
+//=============================================================================
+
+#ifndef TAO_MESSAGING_EXCEPTIONHOLDER_I_H
+#define TAO_MESSAGING_EXCEPTIONHOLDER_I_H
+#include /**/ "ace/pre.h"
+
+#include "tao/Messaging/messaging_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#if !defined (TAO_HAS_DEPRECATED_EXCEPTION_HOLDER)
+
+#include "tao/Messaging/ExceptionHolderA.h"
+#include "tao/Messaging/ExceptionHolderC.h"
+
+namespace Dynamic
+{
+ class ExceptionList;
+}
+
+namespace Messaging
+{
+ class ReplyHandler;
+}
+
+namespace TAO
+{
+ class Exception_Data;
+
+ class TAO_Messaging_Export ExceptionHolder
+ : public virtual ::OBV_Messaging::ExceptionHolder,
+ public virtual ::CORBA::DefaultValueRefCountBase
+ {
+ public:
+ ExceptionHolder (
+ ::CORBA::Boolean is_system_exception,
+ ::CORBA::Boolean byte_order,
+ const ::CORBA::OctetSeq &marshaled_exception,
+ ::TAO::Exception_Data* data_,
+ ::CORBA::ULong exceptions_count
+ );
+
+ virtual ~ExceptionHolder ();
+
+ virtual void raise_exception (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
+
+ virtual void raise_exception_with_list (
+ const ::Dynamic::ExceptionList & ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ );
+
+ private:
+ TAO::Exception_Data* data_;
+ CORBA::ULong count_;
+ };
+}
+
+#endif
+
+#include /**/ "ace/post.h"
+#endif /* TAO_MESSAGING_EXCEPTIONHOLDER_I_H */
+