summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2005-06-10 10:31:01 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2005-06-10 10:31:01 +0000
commit182cf44b6d4b4cc899beebd7db20686287e26d9d (patch)
tree875ba70c8e48fa6603516d4ffbb23ea2b3a2980d /TAO
parent48d2d14c417a484e1c7affde00e1f9eb3ab7ef95 (diff)
downloadATCD-182cf44b6d4b4cc899beebd7db20686287e26d9d.tar.gz
ChangeLogTag: Fri Jun 10 10:21:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO')
-rw-r--r--TAO/docs/libraries.html9
-rw-r--r--TAO/examples/Kokyu_dsrt_schedulers/EDF_Scheduler.cpp1
-rw-r--r--TAO/examples/Kokyu_dsrt_schedulers/FP_Scheduler.cpp1
-rw-r--r--TAO/examples/Kokyu_dsrt_schedulers/Kokyu_DSRT_Schedulers.mpc16
-rw-r--r--TAO/examples/Kokyu_dsrt_schedulers/MIF_Scheduler.cpp1
-rw-r--r--TAO/examples/Kokyu_dsrt_schedulers/MUF_Scheduler.cpp1
-rw-r--r--TAO/orbsvcs/PSS/PSDL_Code_Gen.cpp1
-rw-r--r--TAO/orbsvcs/orbsvcs/RTCosScheduling.mpc4
-rw-r--r--TAO/orbsvcs/orbsvcs/RTCosScheduling/RTCosScheduling_ClientScheduler_i.cpp1
-rw-r--r--TAO/orbsvcs/orbsvcs/RTCosScheduling/RTCosScheduling_ServerScheduler_i.cpp2
-rw-r--r--TAO/tao/Messaging/Asynch_Invocation.cpp4
-rw-r--r--TAO/tao/PICurrent.cpp110
-rw-r--r--TAO/tao/PICurrent.h100
-rw-r--r--TAO/tao/PICurrent.inl63
-rw-r--r--TAO/tao/PICurrent.pidl38
-rw-r--r--TAO/tao/PICurrentA.cpp129
-rw-r--r--TAO/tao/PICurrentC.cpp192
-rw-r--r--TAO/tao/PICurrentC.h247
-rw-r--r--TAO/tao/PICurrentS.h28
-rw-r--r--TAO/tao/PICurrent_Copy_Callback.cpp3
-rw-r--r--TAO/tao/PICurrent_Impl.cpp114
-rw-r--r--TAO/tao/PICurrent_Impl.h145
-rw-r--r--TAO/tao/PICurrent_Impl.inl55
-rw-r--r--TAO/tao/PICurrent_Loader.cpp52
-rw-r--r--TAO/tao/PICurrent_Loader.h63
-rw-r--r--TAO/tao/PICurrent_ORBInitializer.cpp55
-rw-r--r--TAO/tao/PICurrent_ORBInitializer.h80
-rw-r--r--TAO/tao/PortableInterceptor.pidl9
-rw-r--r--TAO/tao/PortableInterceptorA.cpp95
-rw-r--r--TAO/tao/PortableInterceptorC.cpp146
-rw-r--r--TAO/tao/PortableInterceptorC.h149
-rw-r--r--TAO/tao/PortableServer/ServerRequestInfo.h2
-rw-r--r--TAO/tao/Services_Activate.cpp13
-rw-r--r--TAO/tao/Synch_Invocation.cpp4
-rw-r--r--TAO/tao/TAO_Server_Request.h2
-rw-r--r--TAO/tao/TSS_Resources.h2
-rw-r--r--TAO/tao/tao.mpc22
-rw-r--r--TAO/tests/Bug_1693_Test/Bug_1693_Test.mpc2
-rw-r--r--TAO/tests/Bug_1693_Test/client.cpp1
-rw-r--r--TAO/tests/Codec/Codec.mpc2
-rw-r--r--TAO/tests/Codec/client.cpp1
-rw-r--r--TAO/tests/Portable_Interceptors/IORInterceptor/FOO_Client_ORBInitializer.cpp1
-rw-r--r--TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor_ORBInitializer.cpp1
-rw-r--r--TAO/tests/Portable_Interceptors/IORInterceptor/PI_IORInterceptor.mpc8
44 files changed, 1134 insertions, 841 deletions
diff --git a/TAO/docs/libraries.html b/TAO/docs/libraries.html
index 32a969faeaa..d0f0a36d3ce 100644
--- a/TAO/docs/libraries.html
+++ b/TAO/docs/libraries.html
@@ -68,6 +68,15 @@ and the dependencies outlined below are the same. <P>
<td>bidir_giop.mpb</td>
</tr>
<tr align=left>
+ <th>libTAO_CodecFactory.so</th>
+ <td>Support for CodecFactory as outlined by the CORBA
+ spec. Please see $TAO_ROOT/tests/Codec for a simple
+ test case of this feature. Applications need to <code>
+ #include "tao/CodecFactory/CodecFactory.h" </code> within their
+ code to get this feature. </td>
+ <td>codecfactory.mpb</td>
+ </tr>
+ <tr align=left>
<th>libTAO_Domain.so</th>
<td>Support for server side skeletons for the DomainManager
interface. </td>
diff --git a/TAO/examples/Kokyu_dsrt_schedulers/EDF_Scheduler.cpp b/TAO/examples/Kokyu_dsrt_schedulers/EDF_Scheduler.cpp
index 45e9eccb633..47006f901e0 100644
--- a/TAO/examples/Kokyu_dsrt_schedulers/EDF_Scheduler.cpp
+++ b/TAO/examples/Kokyu_dsrt_schedulers/EDF_Scheduler.cpp
@@ -4,6 +4,7 @@
#include "Kokyu_qosC.h"
#include "utils.h"
#include "tao/RTScheduling/Request_Interceptor.h"
+#include "tao/CodecFactory/CodecFactory.h"
#include "tao/ORB_Constants.h"
#include "edf_scheduler_config.h"
diff --git a/TAO/examples/Kokyu_dsrt_schedulers/FP_Scheduler.cpp b/TAO/examples/Kokyu_dsrt_schedulers/FP_Scheduler.cpp
index a3994d8248d..b783adb7fbe 100644
--- a/TAO/examples/Kokyu_dsrt_schedulers/FP_Scheduler.cpp
+++ b/TAO/examples/Kokyu_dsrt_schedulers/FP_Scheduler.cpp
@@ -4,6 +4,7 @@
#include "Kokyu_qosC.h"
#include "utils.h"
#include "tao/ORB_Constants.h"
+#include "tao/CodecFactory/CodecFactory.h"
#include "tao/RTScheduling/Request_Interceptor.h"
FP_Segment_Sched_Param_Policy::FP_Segment_Sched_Param_Policy ()
diff --git a/TAO/examples/Kokyu_dsrt_schedulers/Kokyu_DSRT_Schedulers.mpc b/TAO/examples/Kokyu_dsrt_schedulers/Kokyu_DSRT_Schedulers.mpc
index 1ec2c1a5c61..08334356bca 100644
--- a/TAO/examples/Kokyu_dsrt_schedulers/Kokyu_DSRT_Schedulers.mpc
+++ b/TAO/examples/Kokyu_dsrt_schedulers/Kokyu_DSRT_Schedulers.mpc
@@ -1,23 +1,23 @@
// -*- MPC -*-
// $Id$
-project(Kokyu_DSRT_Schedulers) : orbsvcslib, kokyu, rtscheduling, rtcorba {
+project(Kokyu_DSRT_Schedulers) : orbsvcslib, kokyu, rtscheduling, rtcorba, codecfactory {
sharedname = Kokyu_DSRT_Schedulers
dynamicflags = KOKYU_DSRT_SCHEDULERS_BUILD_DLL
idlflags += -Wb,export_macro=Kokyu_DSRT_Schedulers_Export -Wb,export_include=Kokyu_dsrt_schedulers_export.h
Source_Files {
- FP_Scheduler.cpp
- MUF_Scheduler.cpp
- MIF_Scheduler.cpp
+ FP_Scheduler.cpp
+ MUF_Scheduler.cpp
+ MIF_Scheduler.cpp
Task_Stats.cpp
utils.cpp
- Kokyu_qosC.cpp
- FP_SchedulingC.cpp
+ Kokyu_qosC.cpp
+ FP_SchedulingC.cpp
MUF_SchedulingC.cpp
- MIF_SchedulingC.cpp
+ MIF_SchedulingC.cpp
}
-
+
Header_Files {
Kokyu_dsrt_schedulers_export.h
}
diff --git a/TAO/examples/Kokyu_dsrt_schedulers/MIF_Scheduler.cpp b/TAO/examples/Kokyu_dsrt_schedulers/MIF_Scheduler.cpp
index 4873f12ae51..4a310640d35 100644
--- a/TAO/examples/Kokyu_dsrt_schedulers/MIF_Scheduler.cpp
+++ b/TAO/examples/Kokyu_dsrt_schedulers/MIF_Scheduler.cpp
@@ -4,6 +4,7 @@
#include "Kokyu_qosC.h"
#include "utils.h"
#include "tao/RTScheduling/Request_Interceptor.h"
+#include "tao/CodecFactory/CodecFactory.h"
#include "tao/ORB_Constants.h"
MIF_Sched_Param_Policy::MIF_Sched_Param_Policy ()
diff --git a/TAO/examples/Kokyu_dsrt_schedulers/MUF_Scheduler.cpp b/TAO/examples/Kokyu_dsrt_schedulers/MUF_Scheduler.cpp
index 81b6020bf9f..51871ca350c 100644
--- a/TAO/examples/Kokyu_dsrt_schedulers/MUF_Scheduler.cpp
+++ b/TAO/examples/Kokyu_dsrt_schedulers/MUF_Scheduler.cpp
@@ -4,6 +4,7 @@
#include "Kokyu_qosC.h"
#include "utils.h"
#include "tao/RTScheduling/Request_Interceptor.h"
+#include "tao/CodecFactory/CodecFactory.h"
#include "tao/ORB_Constants.h"
MUF_Sched_Param_Policy::MUF_Sched_Param_Policy ()
diff --git a/TAO/orbsvcs/PSS/PSDL_Code_Gen.cpp b/TAO/orbsvcs/PSS/PSDL_Code_Gen.cpp
index 088c7b41b30..3daefe6e4f9 100644
--- a/TAO/orbsvcs/PSS/PSDL_Code_Gen.cpp
+++ b/TAO/orbsvcs/PSS/PSDL_Code_Gen.cpp
@@ -5,6 +5,7 @@
#include "PSDL_Datastore.h"
#include "tao/OctetSeqC.h"
#include "tao/Any.h"
+#include "tao/CodecFactory/CodecFactory.h"
ACE_RCSID (PSS, PSDL_Code_Gen, "$Id$")
diff --git a/TAO/orbsvcs/orbsvcs/RTCosScheduling.mpc b/TAO/orbsvcs/orbsvcs/RTCosScheduling.mpc
index 7f085c71104..15ef40744ad 100644
--- a/TAO/orbsvcs/orbsvcs/RTCosScheduling.mpc
+++ b/TAO/orbsvcs/orbsvcs/RTCosScheduling.mpc
@@ -1,12 +1,12 @@
// -*- MPC -*-
// $Id$
-project(RTCosScheduling) : orbsvcslib, core, rtportableserver, interceptors {
+project(RTCosScheduling) : orbsvcslib, core, rtportableserver, interceptors, codecfactory {
sharedname = TAO_RTCosScheduling
idlflags += -Gd -Wb,export_macro=TAO_RTCosScheduling_Export -Wb,export_include=orbsvcs/RTCosScheduling/RTCosScheduling_export.h
dynamicflags += TAO_RTCOSSCHEDULING_BUILD_DLL
tagchecks += RTCosScheduling
-
+
IDL_Files {
RTCosScheduling.idl
}
diff --git a/TAO/orbsvcs/orbsvcs/RTCosScheduling/RTCosScheduling_ClientScheduler_i.cpp b/TAO/orbsvcs/orbsvcs/RTCosScheduling/RTCosScheduling_ClientScheduler_i.cpp
index 60f880a8109..15df3752ffe 100644
--- a/TAO/orbsvcs/orbsvcs/RTCosScheduling/RTCosScheduling_ClientScheduler_i.cpp
+++ b/TAO/orbsvcs/orbsvcs/RTCosScheduling/RTCosScheduling_ClientScheduler_i.cpp
@@ -18,6 +18,7 @@
#include "tao/ORB_Core.h"
#include "tao/LocalObject.h"
#include "tao/PortableInterceptorC.h"
+#include "tao/CodecFactory/CodecFactory.h"
namespace TAO
{
diff --git a/TAO/orbsvcs/orbsvcs/RTCosScheduling/RTCosScheduling_ServerScheduler_i.cpp b/TAO/orbsvcs/orbsvcs/RTCosScheduling/RTCosScheduling_ServerScheduler_i.cpp
index e0764d27ccb..5eb65dcd328 100644
--- a/TAO/orbsvcs/orbsvcs/RTCosScheduling/RTCosScheduling_ServerScheduler_i.cpp
+++ b/TAO/orbsvcs/orbsvcs/RTCosScheduling/RTCosScheduling_ServerScheduler_i.cpp
@@ -23,7 +23,7 @@
#include "tao/RTCORBA/Linear_Priority_Mapping.h"
#include "tao/RTCORBA/Priority_Mapping_Manager.h"
#include "tao/RTPortableServer/RTPortableServer.h"
-
+#include "tao/CodecFactory/CodecFactory.h"
namespace TAO {
diff --git a/TAO/tao/Messaging/Asynch_Invocation.cpp b/TAO/tao/Messaging/Asynch_Invocation.cpp
index 5bf1ea0cd8c..b589fe108ca 100644
--- a/TAO/tao/Messaging/Asynch_Invocation.cpp
+++ b/TAO/tao/Messaging/Asynch_Invocation.cpp
@@ -12,6 +12,10 @@
#include "tao/Pluggable_Messaging.h"
#include "tao/ORB_Constants.h"
+#if TAO_HAS_INTERCEPTORS == 1
+# include "PortableInterceptorC.h"
+#endif /*TAO_HAS_INTERCEPTORS */
+
ACE_RCSID (Messaging,
Asynch_Invocation,
"$Id$")
diff --git a/TAO/tao/PICurrent.cpp b/TAO/tao/PICurrent.cpp
index 0a31a936a8d..56802cbfde3 100644
--- a/TAO/tao/PICurrent.cpp
+++ b/TAO/tao/PICurrent.cpp
@@ -76,112 +76,14 @@ TAO::PICurrent::tsc (void)
return &tss->pi_current_;
}
-// ------------------------------------------------------------------
-
-TAO::PICurrent_Impl::PICurrent_Impl (void)
- : slot_table_ (),
- lc_slot_table_ (0),
- copy_callback_ (0),
- destruction_callback_ (0)
-{
-}
-
-TAO::PICurrent_Impl::~PICurrent_Impl (void)
-{
- // Break any existing ties with PICurrent to which our table was
- // logically copied since our table no longer exists once this
- // destructor completes.
- if (this->destruction_callback_ != 0)
- this->destruction_callback_->execute_destruction_callback (0);
-}
-
-
-CORBA::Any *
-TAO::PICurrent_Impl::get_slot (PortableInterceptor::SlotId identifier
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::InvalidSlot))
-{
- // No need to check validity of SlotId. It is validated before this
- // method is invoked.
-
- PICurrent_Impl::Table & table = this->current_slot_table ();
-
- ACE_ASSERT (this->lc_slot_table_ != &this->slot_table_);
-
- CORBA::Any * any = 0;
-
- if (identifier < table.size ())
- {
- ACE_NEW_THROW_EX (any,
- CORBA::Any (table[identifier]), // Make a copy.
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- 0,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK_RETURN (any);
- }
- else
- {
- // In accordance with the Portable Interceptor specification,
- // return an Any with a TCKind of tk_null. A default
- // constructed Any has that TCKind.
- ACE_NEW_THROW_EX (any,
- CORBA::Any,
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- 0,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK_RETURN (any);
- }
-
- return any;
-}
-
-void
-TAO::PICurrent_Impl::set_slot (PortableInterceptor::SlotId identifier,
- const CORBA::Any & data
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::InvalidSlot))
-{
- // No need to check validity of SlotId. It is validated before this
- // method is invoked.
-
- // Perform deep copy of the logically copied slot table, if
- // necessary, before modifying our own slot table.
- if (this->copy_callback_ != 0
- && this->copy_callback_->execute () != 0)
- ACE_THROW (CORBA::INTERNAL ());
-
- // If the slot table array isn't large enough, then increase its
- // size. We're guaranteed not to exceed the number of allocated
- // slots for the reason stated above.
- if (identifier >= this->slot_table_.size ()
- && this->slot_table_.size (identifier + 1) != 0)
- ACE_THROW (CORBA::INTERNAL ());
-
- this->slot_table_[identifier] = CORBA::Any (data);
-}
-
void
-TAO::PICurrent_Impl::execute_destruction_callback (
- TAO::PICurrent_Impl::Table * old_lc_slot_table)
+TAO::PICurrent::check_validity (const PortableInterceptor::SlotId &identifier
+ ACE_ENV_ARG_DECL)
{
- this->lc_slot_table_ = old_lc_slot_table;
+ // No need to acquire a lock for this check. At this point, these
+ // attributes are read only.
+ if (identifier >= this->slot_count_)
+ ACE_THROW (PortableInterceptor::InvalidSlot ());
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-
-template class ACE_Array_Base<CORBA::Any>;
-
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-
-#pragma instantiate ACE_Array_Base<CORBA::Any>
-
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-
#endif /* TAO_HAS_INTERCEPTORS == 1 */
diff --git a/TAO/tao/PICurrent.h b/TAO/tao/PICurrent.h
index 36e1d1f9484..ee6f0b55774 100644
--- a/TAO/tao/PICurrent.h
+++ b/TAO/tao/PICurrent.h
@@ -27,7 +27,7 @@
#include "ace/Array_Base.h"
#include "Any.h"
-#include "PortableInterceptorC.h"
+#include "PICurrentC.h"
#include "LocalObject.h"
#if defined(_MSC_VER)
@@ -127,104 +127,6 @@ namespace TAO
PortableInterceptor::SlotId slot_count_;
};
-
- // ------------------------------------------------------------------
-
- /**
- * @class PICurrent_Impl
- *
- * @brief Implementation of the PortableInterceptor::Current
- * interface.
- *
- * This class implements both the "request scope current" and the
- * "thread scope current" objects as required by Portable
- * Interceptors.
- */
- class TAO_Export PICurrent_Impl
- {
- public:
-
- /// Typedef for the underyling "slot table."
- typedef ACE_Array_Base<CORBA::Any> Table;
-
- /// Constructor.
- PICurrent_Impl (void);
-
- /// Destructor.
- ~PICurrent_Impl (void);
-
- /// Retrieve information stored in the slot table at the given
- /// SlotId.
- CORBA::Any *get_slot (PortableInterceptor::SlotId identifier
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::InvalidSlot));
-
- /// Set information in the slot table at the given SlotId.
- void set_slot (PortableInterceptor::SlotId identifier,
- const CORBA::Any & data
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::InvalidSlot));
-
- /// Set the PICurrent copy callback object responsible for deep
- /// copying the source PICurrent's slot table.
- void copy_callback (PICurrent_Copy_Callback *cb);
-
- /// Set the PICurrent destruction callback object that will be
- /// notified of this object's destruction.
- void destruction_callback (PICurrent_Impl *p);
-
- void execute_destruction_callback (Table *old_lc_slot_table);
-
- /// Return a reference to the underlying slot table.
- Table & slot_table (void);
-
- /// Return a reference to the slot table currently associated
- /// with this PICurrent_Impl object.
- /**
- * @return Logically copied slot table if available, otherwise
- * underlying slot table.
- */
- Table & current_slot_table (void);
-
- /// Logically (shallow) copy the given slot table.
- void lc_slot_table (PICurrent_Impl *p);
-
- /// Return pointer to the logically copied slot table.
- /**
- * @return Zero if no logically copied slot table. Non-zero
- * otherwise.
- */
- Table *lc_slot_table (void) const;
-
- private:
-
- /// Prevent copying through the copy constructor and the assignment
- //operator.
- //@{
- PICurrent_Impl (const PICurrent_Impl &);
- void operator= (const PICurrent_Impl &);
- //@}
-
- private:
-
- /// Array of CORBA::Anys that is the underlying "slot table."
- Table slot_table_;
-
- /// Table that was logically copied from a PICurrent in another
- /// scope, i.e. either the request scope or the thread scope.
- Table *lc_slot_table_;
-
- /// Callback object responsible for performing deep copies of a
- /// PICurrent's slot table.
- PICurrent_Copy_Callback *copy_callback_;
-
- /// PICurrent_Impl object that will be notified of this object's
- /// destruction.
- PICurrent_Impl *destruction_callback_;
-
- };
}
#if defined (__ACE_INLINE__)
diff --git a/TAO/tao/PICurrent.inl b/TAO/tao/PICurrent.inl
index d1fa66ff78a..5f64a548660 100644
--- a/TAO/tao/PICurrent.inl
+++ b/TAO/tao/PICurrent.inl
@@ -15,66 +15,3 @@ TAO::PICurrent::initialize (PortableInterceptor::SlotId sc)
this->slot_count_ = sc;
}
-ACE_INLINE void
-TAO::PICurrent::check_validity (const PortableInterceptor::SlotId &identifier
- ACE_ENV_ARG_DECL)
-{
- // No need to acquire a lock for this check. At this point, these
- // attributes are read only.
- if (identifier >= this->slot_count_)
- ACE_THROW (PortableInterceptor::InvalidSlot ());
-}
-
-// ------------------------------------------------------------------
-
-ACE_INLINE void
-TAO::PICurrent_Impl::copy_callback (TAO::PICurrent_Copy_Callback *cb)
-{
- this->copy_callback_ = cb;
-}
-
-ACE_INLINE void
-TAO::PICurrent_Impl::destruction_callback (TAO::PICurrent_Impl *p)
-{
- this->destruction_callback_ = p;
-}
-
-ACE_INLINE TAO::PICurrent_Impl::Table &
-TAO::PICurrent_Impl::slot_table (void)
-{
- return this->slot_table_;
-}
-
-ACE_INLINE TAO::PICurrent_Impl::Table &
-TAO::PICurrent_Impl::current_slot_table (void)
-{
- return
- this->lc_slot_table_ == 0 ? this->slot_table_ : *this->lc_slot_table_;
-}
-
-ACE_INLINE void
-TAO::PICurrent_Impl::lc_slot_table (TAO::PICurrent_Impl *p)
-{
- if (p != 0)
- {
- Table * t = &p->current_slot_table ();
-
- if (t != this->lc_slot_table_)
- {
- this->lc_slot_table_ = t;
-
- if (this != p)
- p->destruction_callback (this);
- }
- else
- this->lc_slot_table_ = 0;
- }
- else
- this->lc_slot_table_ = 0;
-}
-
-ACE_INLINE TAO::PICurrent_Impl::Table *
-TAO::PICurrent_Impl::lc_slot_table (void) const
-{
- return this->lc_slot_table_;
-}
diff --git a/TAO/tao/PICurrent.pidl b/TAO/tao/PICurrent.pidl
new file mode 100644
index 00000000000..f60324effc1
--- /dev/null
+++ b/TAO/tao/PICurrent.pidl
@@ -0,0 +1,38 @@
+// -*- IDL -*-
+
+/**
+ * @file PICurrent.pidl
+ *
+ * $Id$
+ *
+ * @brief Pre-compiled IDL source for the PortableInterceptor
+ * components in the ORB.
+ *
+ * tao_idl
+ * -o orig -Gp -Gd -Ge 1 -GA -Sc -SS -Sci
+ * -Wb,export_include="tao/TAO_Export.h"
+ * -Wb,export_macro=TAO_Export
+ * -Wb,pre_include="ace/pre.h"
+ * -Wb,post_include="ace/post.h"
+ * PICurrent.pidl
+ */
+
+#ifndef _PI_CURRENT_IDL_
+#define _PI_CURRENT_IDL_
+
+#include <InvalidSlot.pidl>
+#include <PI_Forward.pidl>
+#include <Current.pidl>
+
+module PortableInterceptor {
+
+ typeprefix PortableInterceptor "omg.org";
+
+ local interface Current : CORBA::Current
+ {
+ any get_slot (in SlotId id) raises (InvalidSlot);
+ void set_slot (in SlotId id, in any data) raises (InvalidSlot);
+ };
+};
+
+#endif /* _PI_CURRENT_IDL_ */
diff --git a/TAO/tao/PICurrentA.cpp b/TAO/tao/PICurrentA.cpp
new file mode 100644
index 00000000000..6a256f1cdf8
--- /dev/null
+++ b/TAO/tao/PICurrentA.cpp
@@ -0,0 +1,129 @@
+// -*- C++ -*-
+//
+// $Id$
+
+// **** Code generated by the The ACE ORB (TAO) IDL Compiler ****
+// TAO and the TAO IDL Compiler have been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// and
+// Distributed Object Computing Laboratory
+// University of California at Irvine
+// Irvine, CA
+// USA
+// http://doc.ece.uci.edu/
+// and
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about TAO is available at:
+// http://www.cs.wustl.edu/~schmidt/TAO.html
+
+#include "PICurrentC.h"
+#include "tao/Null_RefCount_Policy.h"
+#include "tao/TypeCode_Constants.h"
+#include "tao/Alias_TypeCode_Static.h"
+#include "tao/Objref_TypeCode_Static.h"
+#include "tao/String_TypeCode_Static.h"
+#include "tao/CDR.h"
+#include "tao/Any.h"
+#include "tao/Any_Impl_T.h"
+
+// TAO_IDL - Generated from
+// be\be_visitor_typecode/objref_typecode.cpp:76
+
+static TAO::TypeCode::Objref<char const *,
+ TAO::Null_RefCount_Policy>
+ _tao_tc_PortableInterceptor_Current (
+ CORBA::tk_local_interface,
+ "IDL:omg.org/PortableInterceptor/Current:1.0",
+ "Current");
+
+namespace PortableInterceptor
+{
+ ::CORBA::TypeCode_ptr const _tc_Current =
+ &_tao_tc_PortableInterceptor_Current;
+}
+
+
+
+// TAO_IDL - Generated from
+// be\be_visitor_interface/any_op_cs.cpp:50
+
+namespace TAO
+{
+ template<>
+ CORBA::Boolean
+ Any_Impl_T<PortableInterceptor::Current>::to_object (
+ CORBA::Object_ptr &_tao_elem
+ ) const
+ {
+ _tao_elem = CORBA::Object::_duplicate (this->value_);
+ return true;
+ }
+}
+
+namespace TAO
+{
+ template<>
+ CORBA::Boolean
+ Any_Impl_T<PortableInterceptor::Current>::marshal_value (TAO_OutputCDR &)
+ {
+ return false;
+ }
+
+ template<>
+ CORBA::Boolean
+ Any_Impl_T<PortableInterceptor::Current>::demarshal_value (TAO_InputCDR &)
+ {
+ return false;
+ }
+}
+
+// Copying insertion.
+void
+operator<<= (
+ CORBA::Any &_tao_any,
+ PortableInterceptor::Current_ptr _tao_elem
+ )
+{
+ PortableInterceptor::Current_ptr _tao_objptr =
+ PortableInterceptor::Current::_duplicate (_tao_elem);
+ _tao_any <<= &_tao_objptr;
+}
+
+// Non-copying insertion.
+void
+operator<<= (
+ CORBA::Any &_tao_any,
+ PortableInterceptor::Current_ptr *_tao_elem
+ )
+{
+ TAO::Any_Impl_T<PortableInterceptor::Current>::insert (
+ _tao_any,
+ PortableInterceptor::Current::_tao_any_destructor,
+ PortableInterceptor::_tc_Current,
+ *_tao_elem
+ );
+}
+
+CORBA::Boolean
+operator>>= (
+ const CORBA::Any &_tao_any,
+ PortableInterceptor::Current_ptr &_tao_elem
+ )
+{
+ return
+ TAO::Any_Impl_T<PortableInterceptor::Current>::extract (
+ _tao_any,
+ PortableInterceptor::Current::_tao_any_destructor,
+ PortableInterceptor::_tc_Current,
+ _tao_elem
+ );
+}
diff --git a/TAO/tao/PICurrentC.cpp b/TAO/tao/PICurrentC.cpp
new file mode 100644
index 00000000000..c1a71eaaddd
--- /dev/null
+++ b/TAO/tao/PICurrentC.cpp
@@ -0,0 +1,192 @@
+// -*- C++ -*-
+//
+// $Id$
+
+// **** Code generated by the The ACE ORB (TAO) IDL Compiler ****
+// TAO and the TAO IDL Compiler have been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// and
+// Distributed Object Computing Laboratory
+// University of California at Irvine
+// Irvine, CA
+// USA
+// http://doc.ece.uci.edu/
+// and
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about TAO is available at:
+// http://www.cs.wustl.edu/~schmidt/TAO.html
+
+// TAO_IDL - Generated from
+// be\be_codegen.cpp:291
+
+
+#include "PICurrentC.h"
+#include "tao/CDR.h"
+#include "ace/OS_NS_string.h"
+
+#if defined (__BORLANDC__)
+#pragma option -w-rvl -w-rch -w-ccc -w-aus -w-sig
+#endif /* __BORLANDC__ */
+
+// TAO_IDL - Generated from
+// be\be_visitor_arg_traits.cpp:69
+
+// Arg traits specializations.
+namespace TAO
+{
+}
+
+
+// TAO_IDL - Generated from
+// be\be_visitor_interface/interface_cs.cpp:60
+
+// Traits specializations for PortableInterceptor::Current.
+
+PortableInterceptor::Current_ptr
+TAO::Objref_Traits<PortableInterceptor::Current>::duplicate (
+ PortableInterceptor::Current_ptr p
+ )
+{
+ return PortableInterceptor::Current::_duplicate (p);
+}
+
+void
+TAO::Objref_Traits<PortableInterceptor::Current>::release (
+ PortableInterceptor::Current_ptr p
+ )
+{
+ CORBA::release (p);
+}
+
+PortableInterceptor::Current_ptr
+TAO::Objref_Traits<PortableInterceptor::Current>::nil (void)
+{
+ return PortableInterceptor::Current::_nil ();
+}
+
+CORBA::Boolean
+TAO::Objref_Traits<PortableInterceptor::Current>::marshal (
+ PortableInterceptor::Current_ptr p,
+ TAO_OutputCDR & cdr
+ )
+{
+ return CORBA::Object::marshal (p, cdr);
+}
+
+PortableInterceptor::Current::Current (void)
+{}
+
+PortableInterceptor::Current::~Current (void)
+{}
+
+void
+PortableInterceptor::Current::_tao_any_destructor (void *_tao_void_pointer)
+{
+ Current *_tao_tmp_pointer =
+ static_cast<Current *> (_tao_void_pointer);
+ CORBA::release (_tao_tmp_pointer);
+}
+
+PortableInterceptor::Current_ptr
+PortableInterceptor::Current::_narrow (
+ CORBA::Object_ptr _tao_objref
+ ACE_ENV_ARG_DECL_NOT_USED
+ )
+{
+ if (CORBA::is_nil (_tao_objref))
+ {
+ return Current::_nil ();
+ }
+
+ Current_ptr proxy =
+ dynamic_cast<Current_ptr> (_tao_objref);
+
+ return Current::_duplicate (proxy);
+}
+
+PortableInterceptor::Current_ptr
+PortableInterceptor::Current::_unchecked_narrow (
+ CORBA::Object_ptr _tao_objref
+ ACE_ENV_ARG_DECL_NOT_USED
+ )
+{
+ if (CORBA::is_nil (_tao_objref))
+ {
+ return Current::_nil ();
+ }
+
+ Current_ptr proxy =
+ dynamic_cast<Current_ptr> (_tao_objref);
+
+ return Current::_duplicate (proxy);
+}
+
+PortableInterceptor::Current_ptr
+PortableInterceptor::Current::_duplicate (Current_ptr obj)
+{
+ if (! CORBA::is_nil (obj))
+ {
+ obj->_add_ref ();
+ }
+
+ return obj;
+}
+
+void
+PortableInterceptor::Current::_tao_release (Current_ptr obj)
+{
+ CORBA::release (obj);
+}
+
+CORBA::Boolean
+PortableInterceptor::Current::_is_a (
+ const char *value
+ ACE_ENV_ARG_DECL_NOT_USED
+ )
+{
+ if (
+ !ACE_OS::strcmp (
+ value,
+ "IDL:omg.org/CORBA/Current:1.0"
+ ) ||
+ !ACE_OS::strcmp (
+ value,
+ "IDL:omg.org/PortableInterceptor/Current:1.0"
+ ) ||
+ !ACE_OS::strcmp (
+ value,
+ "IDL:omg.org/CORBA/LocalObject:1.0"
+ ) ||
+ !ACE_OS::strcmp (
+ value,
+ "IDL:omg.org/CORBA/Object:1.0"
+ )
+ )
+ {
+ return true; // success using local knowledge
+ }
+ else
+ {
+ return false;
+ }
+}
+
+const char* PortableInterceptor::Current::_interface_repository_id (void) const
+{
+ return "IDL:omg.org/PortableInterceptor/Current:1.0";
+}
+
+CORBA::Boolean
+PortableInterceptor::Current::marshal (TAO_OutputCDR &)
+{
+ return false;
+}
diff --git a/TAO/tao/PICurrentC.h b/TAO/tao/PICurrentC.h
new file mode 100644
index 00000000000..e54d5082d55
--- /dev/null
+++ b/TAO/tao/PICurrentC.h
@@ -0,0 +1,247 @@
+// -*- C++ -*-
+//
+// $Id$
+
+// **** Code generated by the The ACE ORB (TAO) IDL Compiler ****
+// TAO and the TAO IDL Compiler have been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// and
+// Distributed Object Computing Laboratory
+// University of California at Irvine
+// Irvine, CA
+// USA
+// http://doc.ece.uci.edu/
+// and
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about TAO is available at:
+// http://www.cs.wustl.edu/~schmidt/TAO.html
+
+// TAO_IDL - Generated from
+// be\be_codegen.cpp:153
+
+#ifndef _TAO_IDL_ORIG_PICURRENTC_H_
+#define _TAO_IDL_ORIG_PICURRENTC_H_
+
+#include /**/ "ace/pre.h"
+
+
+#include "ace/config-all.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "tao/TAO_Export.h"
+#include "tao/ORB.h"
+#include "tao/SystemException.h"
+#include "tao/Environment.h"
+#include "tao/Object.h"
+#include "tao/TypeCode_Constants.h"
+#include "tao/Any.h"
+#include "tao/TypeCode.h"
+#include "tao/Objref_VarOut_T.h"
+
+#include "tao/InvalidSlotC.h"
+#include "tao/PI_ForwardC.h"
+#include "tao/CurrentC.h"
+
+#if defined (TAO_EXPORT_MACRO)
+#undef TAO_EXPORT_MACRO
+#endif
+#define TAO_EXPORT_MACRO TAO_Export
+
+#if defined(_MSC_VER)
+#pragma warning(push)
+#pragma warning(disable:4250)
+#endif /* _MSC_VER */
+
+#if defined (__BORLANDC__)
+#pragma option push -w-rvl -w-rch -w-ccc -w-inl
+#endif /* __BORLANDC__ */
+
+// TAO_IDL - Generated from
+// be\be_visitor_module/module_ch.cpp:48
+
+namespace PortableInterceptor
+{
+
+ // TAO_IDL - Generated from
+ // be\be_interface.cpp:598
+
+#if !defined (_PORTABLEINTERCEPTOR_CURRENT__VAR_OUT_CH_)
+#define _PORTABLEINTERCEPTOR_CURRENT__VAR_OUT_CH_
+
+ class Current;
+ typedef Current *Current_ptr;
+
+ typedef
+ TAO_Objref_Var_T<
+ Current
+ >
+ Current_var;
+
+ typedef
+ TAO_Objref_Out_T<
+ Current
+ >
+ Current_out;
+
+#endif /* end #if !defined */
+
+ // TAO_IDL - Generated from
+ // be\be_visitor_interface/interface_ch.cpp:54
+
+#if !defined (_PORTABLEINTERCEPTOR_CURRENT_CH_)
+#define _PORTABLEINTERCEPTOR_CURRENT_CH_
+
+ class TAO_Export Current
+ : public virtual ::CORBA::Current
+ {
+ public:
+ typedef Current_ptr _ptr_type;
+ typedef Current_var _var_type;
+
+ // The static operations.
+ static Current_ptr _duplicate (Current_ptr obj);
+
+ static void _tao_release (Current_ptr obj);
+
+ static Current_ptr _narrow (
+ CORBA::Object_ptr obj
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ );
+
+ static Current_ptr _unchecked_narrow (
+ CORBA::Object_ptr obj
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ );
+
+ static Current_ptr _nil (void)
+ {
+ return static_cast<Current_ptr> (0);
+ }
+
+ static void _tao_any_destructor (void *);
+
+ // TAO_IDL - Generated from
+ // be\be_visitor_operation/operation_ch.cpp:46
+
+ virtual CORBA::Any * get_slot (
+ ::PortableInterceptor::SlotId id
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException,
+ ::PortableInterceptor::InvalidSlot
+ )) = 0;
+
+ // TAO_IDL - Generated from
+ // be\be_visitor_operation/operation_ch.cpp:46
+
+ virtual void set_slot (
+ ::PortableInterceptor::SlotId id,
+ const ::CORBA::Any & data
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException,
+ ::PortableInterceptor::InvalidSlot
+ )) = 0;
+
+ // TAO_IDL - Generated from
+ // be\be_visitor_interface/interface_ch.cpp:210
+
+ virtual CORBA::Boolean _is_a (
+ const char *type_id
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ );
+
+ virtual const char* _interface_repository_id (void) const;
+ virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
+
+ protected:
+ // Abstract or local interface only.
+ Current (void);
+
+ virtual ~Current (void);
+
+ private:
+ // Private and unimplemented for concrete interfaces.
+ Current (const Current &);
+
+ void operator= (const Current &);
+ };
+
+#endif /* end #if !defined */
+
+ // TAO_IDL - Generated from
+ // be\be_visitor_typecode/typecode_decl.cpp:44
+
+ extern TAO_Export ::CORBA::TypeCode_ptr const _tc_Current;
+
+// TAO_IDL - Generated from
+// be\be_visitor_module/module_ch.cpp:66
+
+} // module PortableInterceptor
+
+// TAO_IDL - Generated from
+// be\be_visitor_traits.cpp:61
+
+// Traits specializations.
+namespace TAO
+{
+
+#if !defined (_PORTABLEINTERCEPTOR_CURRENT__TRAITS_CH_)
+#define _PORTABLEINTERCEPTOR_CURRENT__TRAITS_CH_
+
+ template<>
+ struct TAO_Export Objref_Traits< ::PortableInterceptor::Current>
+ {
+ static ::PortableInterceptor::Current_ptr duplicate (
+ ::PortableInterceptor::Current_ptr
+ );
+ static void release (
+ ::PortableInterceptor::Current_ptr
+ );
+ static ::PortableInterceptor::Current_ptr nil (void);
+ static CORBA::Boolean marshal (
+ ::PortableInterceptor::Current_ptr p,
+ TAO_OutputCDR & cdr
+ );
+ };
+
+#endif /* end #if !defined */
+}
+
+// TAO_IDL - Generated from
+// be\be_visitor_interface/any_op_ch.cpp:52
+
+TAO_Export void operator<<= (CORBA::Any &, PortableInterceptor::Current_ptr); // copying
+TAO_Export void operator<<= (CORBA::Any &, PortableInterceptor::Current_ptr *); // non-copying
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableInterceptor::Current_ptr &);
+
+// TAO_IDL - Generated from
+// be\be_codegen.cpp:955
+
+#if defined(_MSC_VER)
+#pragma warning(pop)
+#endif /* _MSC_VER */
+
+#if defined (__BORLANDC__)
+#pragma option pop
+#endif /* __BORLANDC__ */
+
+#include /**/ "ace/post.h"
+
+#endif /* ifndef */
+
+
diff --git a/TAO/tao/PICurrentS.h b/TAO/tao/PICurrentS.h
new file mode 100644
index 00000000000..17b1360599e
--- /dev/null
+++ b/TAO/tao/PICurrentS.h
@@ -0,0 +1,28 @@
+// -*- C++ -*-
+//
+// $Id$
+
+// **** Code generated by the The ACE ORB (TAO) IDL Compiler ****
+// TAO and the TAO IDL Compiler have been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// and
+// Distributed Object Computing Laboratory
+// University of California at Irvine
+// Irvine, CA
+// USA
+// http://doc.ece.uci.edu/
+// and
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about TAO is available at:
+// http://www.cs.wustl.edu/~schmidt/TAO.html
+
+// Skeleton file generation suppressed with command line option -SS
diff --git a/TAO/tao/PICurrent_Copy_Callback.cpp b/TAO/tao/PICurrent_Copy_Callback.cpp
index 349adcf0c63..bb4b79aa4e5 100644
--- a/TAO/tao/PICurrent_Copy_Callback.cpp
+++ b/TAO/tao/PICurrent_Copy_Callback.cpp
@@ -2,8 +2,7 @@
#if TAO_HAS_INTERCEPTORS == 1
-#include "PICurrent.h"
-
+#include "PICurrent_Impl.h"
ACE_RCSID (tao,
PICurrent_Copy_Callback,
diff --git a/TAO/tao/PICurrent_Impl.cpp b/TAO/tao/PICurrent_Impl.cpp
new file mode 100644
index 00000000000..a201c29ffe8
--- /dev/null
+++ b/TAO/tao/PICurrent_Impl.cpp
@@ -0,0 +1,114 @@
+#include "PICurrent_Impl.h"
+
+#if TAO_HAS_INTERCEPTORS == 1
+
+ACE_RCSID (tao,
+ PICurrent,
+ "$Id$")
+
+
+#if !defined (__ACE_INLINE__)
+# include "PICurrent_Impl.inl"
+#endif /* __ACE_INLINE__ */
+
+#include "TAO_Server_Request.h"
+#include "PICurrent_Copy_Callback.h"
+#include "SystemException.h"
+#include "ace/Log_Msg.h"
+
+TAO::PICurrent_Impl::PICurrent_Impl (void)
+ : slot_table_ (),
+ lc_slot_table_ (0),
+ copy_callback_ (0),
+ destruction_callback_ (0)
+{
+}
+
+TAO::PICurrent_Impl::~PICurrent_Impl (void)
+{
+ // Break any existing ties with PICurrent to which our table was
+ // logically copied since our table no longer exists once this
+ // destructor completes.
+ if (this->destruction_callback_ != 0)
+ this->destruction_callback_->execute_destruction_callback (0);
+}
+
+
+CORBA::Any *
+TAO::PICurrent_Impl::get_slot (PortableInterceptor::SlotId identifier
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ PortableInterceptor::InvalidSlot))
+{
+ // No need to check validity of SlotId. It is validated before this
+ // method is invoked.
+
+ PICurrent_Impl::Table & table = this->current_slot_table ();
+
+ ACE_ASSERT (this->lc_slot_table_ != &this->slot_table_);
+
+ CORBA::Any * any = 0;
+
+ if (identifier < table.size ())
+ {
+ ACE_NEW_THROW_EX (any,
+ CORBA::Any (table[identifier]), // Make a copy.
+ CORBA::NO_MEMORY (
+ CORBA::SystemException::_tao_minor_code (
+ 0,
+ ENOMEM),
+ CORBA::COMPLETED_NO));
+ ACE_CHECK_RETURN (any);
+ }
+ else
+ {
+ // In accordance with the Portable Interceptor specification,
+ // return an Any with a TCKind of tk_null. A default
+ // constructed Any has that TCKind.
+ ACE_NEW_THROW_EX (any,
+ CORBA::Any,
+ CORBA::NO_MEMORY (
+ CORBA::SystemException::_tao_minor_code (
+ 0,
+ ENOMEM),
+ CORBA::COMPLETED_NO));
+ ACE_CHECK_RETURN (any);
+ }
+
+ return any;
+}
+
+void
+TAO::PICurrent_Impl::set_slot (PortableInterceptor::SlotId identifier,
+ const CORBA::Any & data
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ PortableInterceptor::InvalidSlot))
+{
+ // No need to check validity of SlotId. It is validated before this
+ // method is invoked.
+
+ // Perform deep copy of the logically copied slot table, if
+ // necessary, before modifying our own slot table.
+ if (this->copy_callback_ != 0
+ && this->copy_callback_->execute () != 0)
+ ACE_THROW (CORBA::INTERNAL ());
+
+ // If the slot table array isn't large enough, then increase its
+ // size. We're guaranteed not to exceed the number of allocated
+ // slots for the reason stated above.
+ if (identifier >= this->slot_table_.size ()
+ && this->slot_table_.size (identifier + 1) != 0)
+ ACE_THROW (CORBA::INTERNAL ());
+
+ this->slot_table_[identifier] = CORBA::Any (data);
+}
+
+void
+TAO::PICurrent_Impl::execute_destruction_callback (
+ TAO::PICurrent_Impl::Table * old_lc_slot_table)
+{
+ this->lc_slot_table_ = old_lc_slot_table;
+}
+
+#endif /* TAO_HAS_INTERCEPTORS == 1 */
diff --git a/TAO/tao/PICurrent_Impl.h b/TAO/tao/PICurrent_Impl.h
new file mode 100644
index 00000000000..1f3e6d2a6b7
--- /dev/null
+++ b/TAO/tao/PICurrent_Impl.h
@@ -0,0 +1,145 @@
+// -*- C++ -*-
+
+// ===================================================================
+/**
+ * @file PICurrent_Impl.h
+ *
+ * $Id$
+ *
+ * @author Ossama Othman <ossama@dre.vanderbilt.edu>
+ */
+// ===================================================================
+
+#ifndef TAO_PI_CURRENT_IMPL_H
+#define TAO_PI_CURRENT_IMPL_H
+
+#include /**/ "ace/pre.h"
+
+#include "tao/TAO_Export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "orbconf.h"
+
+#if TAO_HAS_INTERCEPTORS == 1
+
+#include "ace/Array_Base.h"
+#include "Any.h"
+#include "PICurrentC.h"
+
+/// Forward declarations.
+class TAO_ORB_Core;
+
+namespace TAO
+{
+ class PICurrent_Copy_Callback;
+ class PICurrent_Impl;
+
+ /**
+ * @class PICurrent_Impl
+ *
+ * @brief Implementation of the PortableInterceptor::Current
+ * interface.
+ *
+ * This class implements both the "request scope current" and the
+ * "thread scope current" objects as required by Portable
+ * Interceptors.
+ */
+ class TAO_Export PICurrent_Impl
+ {
+ public:
+
+ /// Typedef for the underyling "slot table."
+ typedef ACE_Array_Base<CORBA::Any> Table;
+
+ /// Constructor.
+ PICurrent_Impl (void);
+
+ /// Destructor.
+ ~PICurrent_Impl (void);
+
+ /// Retrieve information stored in the slot table at the given
+ /// SlotId.
+ CORBA::Any *get_slot (PortableInterceptor::SlotId identifier
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ PortableInterceptor::InvalidSlot));
+
+ /// Set information in the slot table at the given SlotId.
+ void set_slot (PortableInterceptor::SlotId identifier,
+ const CORBA::Any & data
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ PortableInterceptor::InvalidSlot));
+
+ /// Set the PICurrent copy callback object responsible for deep
+ /// copying the source PICurrent's slot table.
+ void copy_callback (PICurrent_Copy_Callback *cb);
+
+ /// Set the PICurrent destruction callback object that will be
+ /// notified of this object's destruction.
+ void destruction_callback (PICurrent_Impl *p);
+
+ void execute_destruction_callback (Table *old_lc_slot_table);
+
+ /// Return a reference to the underlying slot table.
+ Table & slot_table (void);
+
+ /// Return a reference to the slot table currently associated
+ /// with this PICurrent_Impl object.
+ /**
+ * @return Logically copied slot table if available, otherwise
+ * underlying slot table.
+ */
+ Table & current_slot_table (void);
+
+ /// Logically (shallow) copy the given slot table.
+ void lc_slot_table (PICurrent_Impl *p);
+
+ /// Return pointer to the logically copied slot table.
+ /**
+ * @return Zero if no logically copied slot table. Non-zero
+ * otherwise.
+ */
+ Table *lc_slot_table (void) const;
+
+ private:
+
+ /// Prevent copying through the copy constructor and the assignment
+ //operator.
+ //@{
+ PICurrent_Impl (const PICurrent_Impl &);
+ void operator= (const PICurrent_Impl &);
+ //@}
+
+ private:
+
+ /// Array of CORBA::Anys that is the underlying "slot table."
+ Table slot_table_;
+
+ /// Table that was logically copied from a PICurrent in another
+ /// scope, i.e. either the request scope or the thread scope.
+ Table *lc_slot_table_;
+
+ /// Callback object responsible for performing deep copies of a
+ /// PICurrent's slot table.
+ PICurrent_Copy_Callback *copy_callback_;
+
+ /// PICurrent_Impl object that will be notified of this object's
+ /// destruction.
+ PICurrent_Impl *destruction_callback_;
+
+ };
+}
+
+#if defined (__ACE_INLINE__)
+# include "PICurrent_Impl.inl"
+#endif /* __ACE_INLINE__ */
+
+#endif /* TAO_HAS_INTERCEPTORS == 1 */
+
+#include /**/ "ace/post.h"
+
+#endif /* TAO_PI_CURRENT_IMPL_H */
diff --git a/TAO/tao/PICurrent_Impl.inl b/TAO/tao/PICurrent_Impl.inl
new file mode 100644
index 00000000000..8b708ec7f5a
--- /dev/null
+++ b/TAO/tao/PICurrent_Impl.inl
@@ -0,0 +1,55 @@
+// -*- C++ -*-
+//
+// $Id$
+
+ACE_INLINE void
+TAO::PICurrent_Impl::copy_callback (TAO::PICurrent_Copy_Callback *cb)
+{
+ this->copy_callback_ = cb;
+}
+
+ACE_INLINE void
+TAO::PICurrent_Impl::destruction_callback (TAO::PICurrent_Impl *p)
+{
+ this->destruction_callback_ = p;
+}
+
+ACE_INLINE TAO::PICurrent_Impl::Table &
+TAO::PICurrent_Impl::slot_table (void)
+{
+ return this->slot_table_;
+}
+
+ACE_INLINE TAO::PICurrent_Impl::Table &
+TAO::PICurrent_Impl::current_slot_table (void)
+{
+ return
+ this->lc_slot_table_ == 0 ? this->slot_table_ : *this->lc_slot_table_;
+}
+
+ACE_INLINE void
+TAO::PICurrent_Impl::lc_slot_table (TAO::PICurrent_Impl *p)
+{
+ if (p != 0)
+ {
+ Table * t = &p->current_slot_table ();
+
+ if (t != this->lc_slot_table_)
+ {
+ this->lc_slot_table_ = t;
+
+ if (this != p)
+ p->destruction_callback (this);
+ }
+ else
+ this->lc_slot_table_ = 0;
+ }
+ else
+ this->lc_slot_table_ = 0;
+}
+
+ACE_INLINE TAO::PICurrent_Impl::Table *
+TAO::PICurrent_Impl::lc_slot_table (void) const
+{
+ return this->lc_slot_table_;
+}
diff --git a/TAO/tao/PICurrent_Loader.cpp b/TAO/tao/PICurrent_Loader.cpp
new file mode 100644
index 00000000000..854ff3a92f6
--- /dev/null
+++ b/TAO/tao/PICurrent_Loader.cpp
@@ -0,0 +1,52 @@
+/* -*- C++ -*- */
+
+// =================================================================
+/**
+ * @file PICurrent_Loader.cpp
+ *
+ * $Id$
+ *
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ *
+ */
+// =================================================================
+
+#include "PICurrent_Loader.h"
+#include "PICurrent.h"
+
+#include "tao/ORB.h"
+#include "tao/ORB_Core.h"
+#include "tao/debug.h"
+
+ACE_RCSID (tao,
+ PICurrent_Loader,
+ "$Id$")
+
+CORBA::Object_ptr
+TAO_PICurrent_Loader::create_object (
+ CORBA::ORB_ptr orb,
+ int,
+ ACE_TCHAR *[]
+ ACE_ENV_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ CORBA::Object_ptr obj = CORBA::Object::_nil ();
+ ACE_NEW_RETURN (obj,
+ TAO::PICurrent (orb->orb_core ()),
+ CORBA::Object::_nil ());
+ return obj;
+}
+
+int
+TAO_PICurrent_Loader::Initializer (void)
+{
+ return ACE_Service_Config::process_directive (ace_svc_desc_TAO_PICurrent_Loader);
+}
+
+ACE_STATIC_SVC_DEFINE (TAO_PICurrent_Loader,
+ ACE_TEXT ("PICurrent_Loader"),
+ ACE_SVC_OBJ_T,
+ &ACE_SVC_NAME (TAO_PICurrent_Loader),
+ ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
+ 0)
+ACE_FACTORY_DEFINE (TAO, TAO_PICurrent_Loader)
diff --git a/TAO/tao/PICurrent_Loader.h b/TAO/tao/PICurrent_Loader.h
new file mode 100644
index 00000000000..8c2201ba0ee
--- /dev/null
+++ b/TAO/tao/PICurrent_Loader.h
@@ -0,0 +1,63 @@
+/* -*- C++ -*- */
+
+
+//=============================================================================
+/**
+ * @file PICurrentLoader.h
+ *
+ * $Id$
+ *
+ * @author Johnny Willemsen <jwillemsen@remedy.nl>
+ */
+//=============================================================================
+
+
+#ifndef TAO_PICURRENT_LOADER_H
+#define TAO_PICURRENT_LOADER_H
+
+#include /**/ "ace/pre.h"
+
+#include "TAO_Export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "Object_Loader.h"
+#include "ace/Service_Config.h"
+
+class TAO_Export TAO_PICurrent_Loader
+ : public TAO_Object_Loader
+{
+public:
+ /// Creates a PICurrent and returns it.
+ virtual CORBA::Object_ptr create_object (CORBA::ORB_ptr orb,
+ int argc,
+ ACE_TCHAR *argv []
+ ACE_ENV_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// Used to force the initialization of the ORB code.
+ static int Initializer (void);
+};
+
+ACE_STATIC_SVC_DECLARE (TAO_PICurrent_Loader)
+ACE_FACTORY_DECLARE (TAO, TAO_PICurrent_Loader)
+
+#if defined(ACE_HAS_BROKEN_STATIC_CONSTRUCTORS)
+
+typedef int (*TAO_Module_Initializer) (void);
+
+static TAO_Module_Initializer
+TAO_Requires_PICurrent_Initializer = &TAO_PICurrent_Loader::Initializer;
+
+#else
+
+static int
+TAO_Requires_PICurrent_Initializer = TAO_PICurrent_Loader::Initializer ();
+
+#endif /* ACE_HAS_BROKEN_STATIC_CONSTRUCTORS */
+
+#include /**/ "ace/post.h"
+
+#endif /* TAO_PICURRENT_LOADER_H */
diff --git a/TAO/tao/PICurrent_ORBInitializer.cpp b/TAO/tao/PICurrent_ORBInitializer.cpp
deleted file mode 100644
index f86a18151eb..00000000000
--- a/TAO/tao/PICurrent_ORBInitializer.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-#include "PICurrent_ORBInitializer.h"
-
-#if TAO_HAS_INTERCEPTORS == 1
-
-#include "ORB_Core.h"
-#include "ORBInitInfo.h"
-#include "SystemException.h"
-
-ACE_RCSID (tao,
- PICurrent_ORBInitializer,
- "$Id$")
-
-void
-TAO_PICurrent_ORBInitializer::pre_init (
- PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- TAO_ORBInitInfo_var tao_info =
- TAO_ORBInitInfo::_narrow (info ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- TAO_ORB_Core * orb_core = tao_info->orb_core ();
-
- TAO::PICurrent * tao_pi_current = 0;
- ACE_NEW_THROW_EX (tao_pi_current,
- TAO::PICurrent (orb_core),
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- 0,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK;
-
- PortableInterceptor::Current_var current = tao_pi_current;
-
- info->register_initial_reference ("PICurrent",
- current.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Cache the downcasted pointer in the ORB Core.
- orb_core->pi_current (tao_pi_current);
-}
-
-void
-TAO_PICurrent_ORBInitializer::post_init (
- PortableInterceptor::ORBInitInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
diff --git a/TAO/tao/PICurrent_ORBInitializer.h b/TAO/tao/PICurrent_ORBInitializer.h
deleted file mode 100644
index b94ba1f70d2..00000000000
--- a/TAO/tao/PICurrent_ORBInitializer.h
+++ /dev/null
@@ -1,80 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file PICurrent_ORBInitializer.h
- *
- * $Id$
- *
- * @author Ossama Othman <ossama@uci.edu>
- */
-//=============================================================================
-
-
-#ifndef TAO_PI_CURRENT_ORB_INITIALIZER_H
-#define TAO_PI_CURRENT_ORB_INITIALIZER_H
-
-#include /**/ "ace/pre.h"
-
-#include "TAO_Export.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbconf.h"
-
-#if TAO_HAS_INTERCEPTORS == 1
-
-#include "LocalObject.h"
-#include "ORBInitializerC.h"
-
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-
-/**
- * @class TAO_PICurrent_ORBInitializer
- *
- * @brief ORBInitializer for the PICurrent support.
- *
- * This class simply registers the PICurrent object with the ORB
- * resolve_initial_references() mechanism.
- */
-class TAO_Export TAO_PICurrent_ORBInitializer
- : public virtual PortableInterceptor::ORBInitializer,
- public virtual TAO_Local_RefCounted_Object
-{
-public:
-
- /**
- * @name PortableInterceptor::ORBInitializer Methods
- *
- * Methods required by the PortableInterceptor::ORBInitializer
- * interface.
- */
- //@{
- virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- //@}
-
-};
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_PI_CURRENT_ORB_INITIALIZER_H */
diff --git a/TAO/tao/PortableInterceptor.pidl b/TAO/tao/PortableInterceptor.pidl
index bf336b0cf4f..b753e9bacfe 100644
--- a/TAO/tao/PortableInterceptor.pidl
+++ b/TAO/tao/PortableInterceptor.pidl
@@ -35,7 +35,6 @@
#define _PORTABLE_INTERCEPTOR_IDL_
#include <PI_Forward.pidl>
-#include <Current.pidl>
#include <Messaging_SyncScope.pidl>
#include <ORBInitializer.pidl>
@@ -44,9 +43,9 @@
#include <ClientRequestInfo.pidl>
#include <ServerRequestInfo.pidl>
#include <PolicyFactory.pidl>
-#include <ORBInitInfo.pidl>
#include <ClientRequestInterceptor.pidl>
#include <ServerRequestInterceptor.pidl>
+#include <PICurrent.pidl>
module PortableInterceptor {
@@ -65,12 +64,6 @@ module PortableInterceptor {
const ReplyStatus LOCATION_FORWARD = 3;
const ReplyStatus TRANSPORT_RETRY = 4;
const ReplyStatus UNKNOWN = 5;
-
- local interface Current : CORBA::Current
- {
- any get_slot (in SlotId id) raises (InvalidSlot);
- void set_slot (in SlotId id, in any data) raises (InvalidSlot);
- };
};
#endif /* _PORTABLE_INTERCEPTOR_IDL_ */
diff --git a/TAO/tao/PortableInterceptorA.cpp b/TAO/tao/PortableInterceptorA.cpp
index 9acfbedc2aa..52ad477c487 100644
--- a/TAO/tao/PortableInterceptorA.cpp
+++ b/TAO/tao/PortableInterceptorA.cpp
@@ -29,101 +29,6 @@
#include "tao/Null_RefCount_Policy.h"
#include "tao/TypeCode_Constants.h"
#include "tao/Alias_TypeCode_Static.h"
-#include "tao/Objref_TypeCode_Static.h"
#include "tao/String_TypeCode_Static.h"
#include "tao/CDR.h"
#include "tao/Any.h"
-#include "tao/Any_Impl_T.h"
-
-// TAO_IDL - Generated from
-// be\be_visitor_typecode/objref_typecode.cpp:76
-
-static TAO::TypeCode::Objref<char const *,
- TAO::Null_RefCount_Policy>
- _tao_tc_PortableInterceptor_Current (
- CORBA::tk_local_interface,
- "IDL:omg.org/PortableInterceptor/Current:1.0",
- "Current");
-
-namespace PortableInterceptor
-{
- ::CORBA::TypeCode_ptr const _tc_Current =
- &_tao_tc_PortableInterceptor_Current;
-}
-
-
-
-// TAO_IDL - Generated from
-// be\be_visitor_interface/any_op_cs.cpp:50
-
-namespace TAO
-{
- template<>
- CORBA::Boolean
- Any_Impl_T<PortableInterceptor::Current>::to_object (
- CORBA::Object_ptr &_tao_elem
- ) const
- {
- _tao_elem = CORBA::Object::_duplicate (this->value_);
- return true;
- }
-}
-
-namespace TAO
-{
- template<>
- CORBA::Boolean
- Any_Impl_T<PortableInterceptor::Current>::marshal_value (TAO_OutputCDR &)
- {
- return false;
- }
-
- template<>
- CORBA::Boolean
- Any_Impl_T<PortableInterceptor::Current>::demarshal_value (TAO_InputCDR &)
- {
- return false;
- }
-}
-
-// Copying insertion.
-void
-operator<<= (
- CORBA::Any &_tao_any,
- PortableInterceptor::Current_ptr _tao_elem
- )
-{
- PortableInterceptor::Current_ptr _tao_objptr =
- PortableInterceptor::Current::_duplicate (_tao_elem);
- _tao_any <<= &_tao_objptr;
-}
-
-// Non-copying insertion.
-void
-operator<<= (
- CORBA::Any &_tao_any,
- PortableInterceptor::Current_ptr *_tao_elem
- )
-{
- TAO::Any_Impl_T<PortableInterceptor::Current>::insert (
- _tao_any,
- PortableInterceptor::Current::_tao_any_destructor,
- PortableInterceptor::_tc_Current,
- *_tao_elem
- );
-}
-
-CORBA::Boolean
-operator>>= (
- const CORBA::Any &_tao_any,
- PortableInterceptor::Current_ptr &_tao_elem
- )
-{
- return
- TAO::Any_Impl_T<PortableInterceptor::Current>::extract (
- _tao_any,
- PortableInterceptor::Current::_tao_any_destructor,
- PortableInterceptor::_tc_Current,
- _tao_elem
- );
-}
diff --git a/TAO/tao/PortableInterceptorC.cpp b/TAO/tao/PortableInterceptorC.cpp
index 5769b666206..bbba41a147c 100644
--- a/TAO/tao/PortableInterceptorC.cpp
+++ b/TAO/tao/PortableInterceptorC.cpp
@@ -31,7 +31,6 @@
#include "PortableInterceptorC.h"
#include "tao/CDR.h"
-#include "ace/OS_NS_string.h"
#if defined (__BORLANDC__)
#pragma option -w-rvl -w-rch -w-ccc -w-aus -w-sig
@@ -45,148 +44,3 @@ namespace TAO
{
}
-
-// TAO_IDL - Generated from
-// be\be_visitor_interface/interface_cs.cpp:60
-
-// Traits specializations for PortableInterceptor::Current.
-
-PortableInterceptor::Current_ptr
-TAO::Objref_Traits<PortableInterceptor::Current>::duplicate (
- PortableInterceptor::Current_ptr p
- )
-{
- return PortableInterceptor::Current::_duplicate (p);
-}
-
-void
-TAO::Objref_Traits<PortableInterceptor::Current>::release (
- PortableInterceptor::Current_ptr p
- )
-{
- CORBA::release (p);
-}
-
-PortableInterceptor::Current_ptr
-TAO::Objref_Traits<PortableInterceptor::Current>::nil (void)
-{
- return PortableInterceptor::Current::_nil ();
-}
-
-CORBA::Boolean
-TAO::Objref_Traits<PortableInterceptor::Current>::marshal (
- PortableInterceptor::Current_ptr p,
- TAO_OutputCDR & cdr
- )
-{
- return CORBA::Object::marshal (p, cdr);
-}
-
-PortableInterceptor::Current::Current (void)
-{}
-
-PortableInterceptor::Current::~Current (void)
-{}
-
-void
-PortableInterceptor::Current::_tao_any_destructor (void *_tao_void_pointer)
-{
- Current *_tao_tmp_pointer =
- static_cast<Current *> (_tao_void_pointer);
- CORBA::release (_tao_tmp_pointer);
-}
-
-PortableInterceptor::Current_ptr
-PortableInterceptor::Current::_narrow (
- CORBA::Object_ptr _tao_objref
- ACE_ENV_ARG_DECL_NOT_USED
- )
-{
- if (CORBA::is_nil (_tao_objref))
- {
- return Current::_nil ();
- }
-
- Current_ptr proxy =
- dynamic_cast<Current_ptr> (_tao_objref);
-
- return Current::_duplicate (proxy);
-}
-
-PortableInterceptor::Current_ptr
-PortableInterceptor::Current::_unchecked_narrow (
- CORBA::Object_ptr _tao_objref
- ACE_ENV_ARG_DECL_NOT_USED
- )
-{
- if (CORBA::is_nil (_tao_objref))
- {
- return Current::_nil ();
- }
-
- Current_ptr proxy =
- dynamic_cast<Current_ptr> (_tao_objref);
-
- return Current::_duplicate (proxy);
-}
-
-PortableInterceptor::Current_ptr
-PortableInterceptor::Current::_duplicate (Current_ptr obj)
-{
- if (! CORBA::is_nil (obj))
- {
- obj->_add_ref ();
- }
-
- return obj;
-}
-
-void
-PortableInterceptor::Current::_tao_release (Current_ptr obj)
-{
- CORBA::release (obj);
-}
-
-CORBA::Boolean
-PortableInterceptor::Current::_is_a (
- const char *value
- ACE_ENV_ARG_DECL_NOT_USED
- )
-{
- if (
- !ACE_OS::strcmp (
- value,
- "IDL:omg.org/CORBA/Current:1.0"
- ) ||
- !ACE_OS::strcmp (
- value,
- "IDL:omg.org/PortableInterceptor/Current:1.0"
- ) ||
- !ACE_OS::strcmp (
- value,
- "IDL:omg.org/CORBA/LocalObject:1.0"
- ) ||
- !ACE_OS::strcmp (
- value,
- "IDL:omg.org/CORBA/Object:1.0"
- )
- )
- {
- return true; // success using local knowledge
- }
- else
- {
- return false;
- }
-}
-
-const char* PortableInterceptor::Current::_interface_repository_id (void) const
-{
- return "IDL:omg.org/PortableInterceptor/Current:1.0";
-}
-
-CORBA::Boolean
-PortableInterceptor::Current::marshal (TAO_OutputCDR &)
-{
- return false;
-}
diff --git a/TAO/tao/PortableInterceptorC.h b/TAO/tao/PortableInterceptorC.h
index ffabb20d8bf..bc811a748e7 100644
--- a/TAO/tao/PortableInterceptorC.h
+++ b/TAO/tao/PortableInterceptorC.h
@@ -44,13 +44,8 @@
#include "tao/ORB.h"
#include "tao/SystemException.h"
#include "tao/Environment.h"
-#include "tao/Object.h"
-#include "tao/TypeCode_Constants.h"
-#include "tao/Any.h"
-#include "tao/Objref_VarOut_T.h"
#include "tao/PI_ForwardC.h"
-#include "tao/CurrentC.h"
#include "tao/Messaging_SyncScopeC.h"
#include "tao/ORBInitializerC.h"
#include "tao/ORBInitInfoC.h"
@@ -58,9 +53,9 @@
#include "tao/ClientRequestInfoC.h"
#include "tao/ServerRequestInfoC.h"
#include "tao/PolicyFactoryC.h"
-#include "tao/ORBInitInfoC.h"
#include "tao/ClientRequestInterceptorC.h"
#include "tao/ServerRequestInterceptorC.h"
+#include "tao/PICurrentC.h"
#if defined (TAO_EXPORT_MACRO)
#undef TAO_EXPORT_MACRO
@@ -136,120 +131,6 @@ namespace PortableInterceptor
// be\be_visitor_constant/constant_ch.cpp:52
const PortableInterceptor::ReplyStatus UNKNOWN = 5;
-
- // TAO_IDL - Generated from
- // be\be_interface.cpp:598
-
-#if !defined (_PORTABLEINTERCEPTOR_CURRENT__VAR_OUT_CH_)
-#define _PORTABLEINTERCEPTOR_CURRENT__VAR_OUT_CH_
-
- class Current;
- typedef Current *Current_ptr;
-
- typedef
- TAO_Objref_Var_T<
- Current
- >
- Current_var;
-
- typedef
- TAO_Objref_Out_T<
- Current
- >
- Current_out;
-
-#endif /* end #if !defined */
-
- // TAO_IDL - Generated from
- // be\be_visitor_interface/interface_ch.cpp:54
-
-#if !defined (_PORTABLEINTERCEPTOR_CURRENT_CH_)
-#define _PORTABLEINTERCEPTOR_CURRENT_CH_
-
- class TAO_Export Current
- : public virtual ::CORBA::Current
- {
- public:
- typedef Current_ptr _ptr_type;
- typedef Current_var _var_type;
-
- // The static operations.
- static Current_ptr _duplicate (Current_ptr obj);
-
- static void _tao_release (Current_ptr obj);
-
- static Current_ptr _narrow (
- CORBA::Object_ptr obj
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- );
-
- static Current_ptr _unchecked_narrow (
- CORBA::Object_ptr obj
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- );
-
- static Current_ptr _nil (void)
- {
- return static_cast<Current_ptr> (0);
- }
-
- static void _tao_any_destructor (void *);
-
- // TAO_IDL - Generated from
- // be\be_visitor_operation/operation_ch.cpp:46
-
- virtual CORBA::Any * get_slot (
- ::PortableInterceptor::SlotId id
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- ::PortableInterceptor::InvalidSlot
- )) = 0;
-
- // TAO_IDL - Generated from
- // be\be_visitor_operation/operation_ch.cpp:46
-
- virtual void set_slot (
- ::PortableInterceptor::SlotId id,
- const ::CORBA::Any & data
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException,
- ::PortableInterceptor::InvalidSlot
- )) = 0;
-
- // TAO_IDL - Generated from
- // be\be_visitor_interface/interface_ch.cpp:210
-
- virtual CORBA::Boolean _is_a (
- const char *type_id
- ACE_ENV_ARG_DECL_WITH_DEFAULTS
- );
-
- virtual const char* _interface_repository_id (void) const;
- virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
-
- protected:
- // Abstract or local interface only.
- Current (void);
-
- virtual ~Current (void);
-
- private:
- // Private and unimplemented for concrete interfaces.
- Current (const Current &);
-
- void operator= (const Current &);
- };
-
-#endif /* end #if !defined */
-
- // TAO_IDL - Generated from
- // be\be_visitor_typecode/typecode_decl.cpp:44
-
- extern TAO_Export ::CORBA::TypeCode_ptr const _tc_Current;
// TAO_IDL - Generated from
// be\be_visitor_module/module_ch.cpp:66
@@ -262,37 +143,9 @@ namespace PortableInterceptor
// Traits specializations.
namespace TAO
{
-
-#if !defined (_PORTABLEINTERCEPTOR_CURRENT__TRAITS_CH_)
-#define _PORTABLEINTERCEPTOR_CURRENT__TRAITS_CH_
-
- template<>
- struct TAO_Export Objref_Traits< ::PortableInterceptor::Current>
- {
- static ::PortableInterceptor::Current_ptr duplicate (
- ::PortableInterceptor::Current_ptr
- );
- static void release (
- ::PortableInterceptor::Current_ptr
- );
- static ::PortableInterceptor::Current_ptr nil (void);
- static CORBA::Boolean marshal (
- ::PortableInterceptor::Current_ptr p,
- TAO_OutputCDR & cdr
- );
- };
-
-#endif /* end #if !defined */
}
// TAO_IDL - Generated from
-// be\be_visitor_interface/any_op_ch.cpp:52
-
-TAO_Export void operator<<= (CORBA::Any &, PortableInterceptor::Current_ptr); // copying
-TAO_Export void operator<<= (CORBA::Any &, PortableInterceptor::Current_ptr *); // non-copying
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableInterceptor::Current_ptr &);
-
-// TAO_IDL - Generated from
// be\be_codegen.cpp:955
#if defined(_MSC_VER)
diff --git a/TAO/tao/PortableServer/ServerRequestInfo.h b/TAO/tao/PortableServer/ServerRequestInfo.h
index 813a1487689..6ee3c8f4198 100644
--- a/TAO/tao/PortableServer/ServerRequestInfo.h
+++ b/TAO/tao/PortableServer/ServerRequestInfo.h
@@ -31,6 +31,8 @@
#include "tao/LocalObject.h"
#include "tao/OctetSeqC.h"
#include "tao/TAO_Server_Request.h"
+#include "tao/PIForwardRequestC.h"
+#include "tao/PortableInterceptorC.h"
#if defined(_MSC_VER)
#pragma warning(push)
diff --git a/TAO/tao/Services_Activate.cpp b/TAO/tao/Services_Activate.cpp
index 89e84c04f22..bd5689dc202 100644
--- a/TAO/tao/Services_Activate.cpp
+++ b/TAO/tao/Services_Activate.cpp
@@ -1,8 +1,8 @@
#include "tao/Services_Activate.h"
#include "ace/Dynamic_Service.h"
-ACE_RCSID (tao,
- Services_Activate,
+ACE_RCSID (tao,
+ Services_Activate,
"$Id$")
TAO_Services_Activate::~TAO_Services_Activate (void)
@@ -10,12 +10,3 @@ TAO_Services_Activate::~TAO_Services_Activate (void)
//no-op
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-
-template class ACE_Dynamic_Service<TAO_Services_Activate>;
-
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-
-#pragma instantiate ACE_Dynamic_Service<TAO_Services_Activate>
-
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/tao/Synch_Invocation.cpp b/TAO/tao/Synch_Invocation.cpp
index 6e3675e16ff..e5891e00cc6 100644
--- a/TAO/tao/Synch_Invocation.cpp
+++ b/TAO/tao/Synch_Invocation.cpp
@@ -15,6 +15,10 @@
#include "ORB_Core.h"
#include "Service_Context.h"
+#if TAO_HAS_INTERCEPTORS == 1
+# include "PortableInterceptorC.h"
+#endif /*TAO_HAS_INTERCEPTORS */
+
#include "ace/Auto_Ptr.h"
#include "ace/OS_NS_string.h"
#include "ace/Countdown_Time.h"
diff --git a/TAO/tao/TAO_Server_Request.h b/TAO/tao/TAO_Server_Request.h
index 36ffb35a677..98c499f2331 100644
--- a/TAO/tao/TAO_Server_Request.h
+++ b/TAO/tao/TAO_Server_Request.h
@@ -30,7 +30,7 @@
#include "Service_Context.h"
#if TAO_HAS_INTERCEPTORS == 1
-#include "PICurrent.h"
+#include "PICurrent_Impl.h"
#include "PICurrent_Copy_Callback.h"
#endif /* TAO_HAS_INTERCEPTORS == 1 */
diff --git a/TAO/tao/TSS_Resources.h b/TAO/tao/TSS_Resources.h
index a85d840eb38..39fa2038898 100644
--- a/TAO/tao/TSS_Resources.h
+++ b/TAO/tao/TSS_Resources.h
@@ -17,7 +17,7 @@
#include /**/ "ace/pre.h"
-#include "tao/Policy_Manager.h"
+#include "tao/Policy_Current_Impl.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
diff --git a/TAO/tao/tao.mpc b/TAO/tao/tao.mpc
index 92f6ac1d274..8305c999460 100644
--- a/TAO/tao/tao.mpc
+++ b/TAO/tao/tao.mpc
@@ -37,7 +37,6 @@ project(TAO) : acelib, core, tao_output, taodefaults, pidl, extra_core {
BoundsC.cpp
Cache_Entries.cpp
CDR.cpp
- CDR_Encaps_Codec.cpp
CharSeqA.cpp
CharSeqC.cpp
Cleanup_Func_Registry.cpp
@@ -49,8 +48,6 @@ project(TAO) : acelib, core, tao_output, taodefaults, pidl, extra_core {
ClientRequestInterceptor_Adapter.cpp
ClientRequestInterceptorA.cpp
ClientRequestInterceptorC.cpp
- CodecFactory.cpp
- CodecFactory_ORBInitializer.cpp
Codeset_Manager.cpp
Codeset_Translator_Factory.cpp
Collocated_Invocation.cpp
@@ -201,14 +198,20 @@ project(TAO) : acelib, core, tao_output, taodefaults, pidl, extra_core {
Parser_Registry.cpp
PI_ForwardC.cpp
PICurrent.cpp
+ PICurrentA.cpp
+ PICurrentC.cpp
PICurrent_Copy_Callback.cpp
- PICurrent_ORBInitializer.cpp
+ PICurrent_Impl.cpp
+ PICurrent_Loader.cpp
PIForwardRequestA.cpp
PIForwardRequestC.cpp
Pluggable_Messaging.cpp
Pluggable_Messaging_Utils.cpp
+ Policy_Current.cpp
+ Policy_Current_Impl.cpp
Policy_ForwardA.cpp
Policy_ForwardC.cpp
+ Policy_Manager.cpp
Policy_Set.cpp
Policy_Validator.cpp
PolicyA.cpp
@@ -367,7 +370,6 @@ project(TAO) : acelib, core, tao_output, taodefaults, pidl, extra_core {
Buffer_Allocator_T.h
Buffering_Constraint_Policy.h
Cache_Entries.h
- CDR_Encaps_Codec.h
CDR.h
CharSeqC.h
CharSeqS.h
@@ -380,8 +382,6 @@ project(TAO) : acelib, core, tao_output, taodefaults, pidl, extra_core {
ClientRequestInterceptorC.h
ClientRequestInterceptorS.h
Client_Strategy_Factory.h
- CodecFactory.h
- CodecFactory_ORBInitializer.h
Codeset_Manager.h
Codeset_Translator_Factory.h
Codeset_Translator_Factory_T.h
@@ -555,7 +555,10 @@ project(TAO) : acelib, core, tao_output, taodefaults, pidl, extra_core {
Parser_Registry.h
PICurrent_Copy_Callback.h
PICurrent.h
- PICurrent_ORBInitializer.h
+ PICurrentC.h
+ PICurrentS.h
+ PICurrent_Impl.h
+ PICurrent_Loader.h
PIForwardRequestC.h
PIForwardRequestS.h
PI_ForwardC.h
@@ -566,6 +569,8 @@ project(TAO) : acelib, core, tao_output, taodefaults, pidl, extra_core {
PolicyFactoryS.h
Policy_ForwardC.h
Policy_ForwardS.h
+ Policy_Current.h
+ Policy_Current_Impl.h
Policy_Manager.h
Policy_Set.h
PolicyS.h
@@ -612,7 +617,6 @@ project(TAO) : acelib, core, tao_output, taodefaults, pidl, extra_core {
Services_Activate.h
ServicesC.h
ServicesS.h
- ServicesS_T.h
ShortSeqC.h
ShortSeqS.h
Special_Basic_Arguments.h
diff --git a/TAO/tests/Bug_1693_Test/Bug_1693_Test.mpc b/TAO/tests/Bug_1693_Test/Bug_1693_Test.mpc
index 39f2d1aa2bc..8c4e0b18f2f 100644
--- a/TAO/tests/Bug_1693_Test/Bug_1693_Test.mpc
+++ b/TAO/tests/Bug_1693_Test/Bug_1693_Test.mpc
@@ -1,7 +1,7 @@
// -*- MPC -*-
// $Id$
-project(*Client): taoclient {
+project(*Client): taoclient, codecfactory {
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/Bug_1693_Test/client.cpp b/TAO/tests/Bug_1693_Test/client.cpp
index 604e68bd38c..75adc828ab4 100644
--- a/TAO/tests/Bug_1693_Test/client.cpp
+++ b/TAO/tests/Bug_1693_Test/client.cpp
@@ -1,6 +1,7 @@
// -*- C++ -*-
#include "tao/IOP_CodecC.h"
+#include "tao/CodecFactory/CodecFactory.h"
#include "testC.h"
#include "ace/Log_Msg.h"
diff --git a/TAO/tests/Codec/Codec.mpc b/TAO/tests/Codec/Codec.mpc
index 39f2d1aa2bc..8c4e0b18f2f 100644
--- a/TAO/tests/Codec/Codec.mpc
+++ b/TAO/tests/Codec/Codec.mpc
@@ -1,7 +1,7 @@
// -*- MPC -*-
// $Id$
-project(*Client): taoclient {
+project(*Client): taoclient, codecfactory {
Source_Files {
testC.cpp
client.cpp
diff --git a/TAO/tests/Codec/client.cpp b/TAO/tests/Codec/client.cpp
index 71fb8314592..37c11fe7329 100644
--- a/TAO/tests/Codec/client.cpp
+++ b/TAO/tests/Codec/client.cpp
@@ -1,6 +1,7 @@
// -*- C++ -*-
#include "tao/IOP_CodecC.h"
+#include "tao/CodecFactory/CodecFactory.h"
#include "testC.h"
#include "ace/OS_NS_string.h"
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_Client_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_Client_ORBInitializer.cpp
index 73d2625fff2..f999b2f22bb 100644
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_Client_ORBInitializer.cpp
+++ b/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_Client_ORBInitializer.cpp
@@ -2,6 +2,7 @@
#include "FOO_ClientRequestInterceptor.h"
#include "tao/ORB_Constants.h"
+#include "tao/CodecFactory/CodecFactory.h"
ACE_RCSID (IORInterceptor,
FOO_Client_ORBInitializer,
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor_ORBInitializer.cpp b/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor_ORBInitializer.cpp
index 297ddfd77b4..1930da1d6b0 100644
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor_ORBInitializer.cpp
+++ b/TAO/tests/Portable_Interceptors/IORInterceptor/FOO_IORInterceptor_ORBInitializer.cpp
@@ -4,6 +4,7 @@
#include "FOO_IORInterceptor.h"
#include "tao/ORB_Constants.h"
+#include "tao/CodecFactory/CodecFactory.h"
ACE_RCSID (IORInterceptor,
FOO_IORInterceptor_ORBInitializer,
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/PI_IORInterceptor.mpc b/TAO/tests/Portable_Interceptors/IORInterceptor/PI_IORInterceptor.mpc
index 2ac63846f75..9ca88675e54 100644
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/PI_IORInterceptor.mpc
+++ b/TAO/tests/Portable_Interceptors/IORInterceptor/PI_IORInterceptor.mpc
@@ -1,9 +1,7 @@
// -*- MPC -*-
// $Id$
-project(*Server): taoserver, iorinterceptor {
- requires += interceptors
-
+project(*Server): taoserver, iorinterceptor, codecfactory, interceptors {
Source_Files {
test_i.cpp
FOO_IORInterceptor_ORBInitializer.cpp
@@ -12,9 +10,7 @@ project(*Server): taoserver, iorinterceptor {
}
}
-project(*Client): taoclient {
- requires += interceptors
-
+project(*Client): taoclient, codecfactory, interceptors {
Source_Files {
testC.cpp
FOO_Client_ORBInitializer.cpp