summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-03-04 23:15:20 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-03-04 23:15:20 +0000
commitbf6f160aca86a102694a47dc6f490b90158e4fc8 (patch)
tree3675bf549dc0cf7649bc81f934a25376f72bfa98
parent55b9df75cdae298ca921cff58503782fd67e075b (diff)
downloadATCD-bf6f160aca86a102694a47dc6f490b90158e4fc8.tar.gz
This commit was manufactured by cvs2svn to create branch
'xsc_handler_1'.
-rw-r--r--TAO/CIAO/CCF/CCF/CIDL/CIDL.mpc24
-rw-r--r--TAO/CIAO/CCF/CCF/CodeGenerationKit/CodeGenerationKit.mpc17
-rw-r--r--TAO/CIAO/CCF/CCF/CodeGenerationKit/IndentationIDL.hpp277
-rw-r--r--TAO/CIAO/CCF/CCF/CompilerElements/CompilerElements.mpc17
-rw-r--r--TAO/CIAO/CCF/CCF/IDL2/IDL2.mpc25
-rw-r--r--TAO/CIAO/CCF/CCF/IDL3/IDL3.mpc25
-rw-r--r--TAO/CIAO/CIAO-INSTALL.html199
-rw-r--r--TAO/CIAO/CIDLC/CIDLC.mpc41
-rw-r--r--TAO/CIAO/CIDLC/ExecImplGenerator.cpp187
-rw-r--r--TAO/CIAO/CIDLC/ExecImplHeaderGenerator.cpp1338
-rw-r--r--TAO/CIAO/CIDLC/ExecImplSourceGenerator.cpp1370
-rw-r--r--TAO/CIAO/CIDLC/ExecutorMappingGenerator.cpp2018
-rw-r--r--TAO/CIAO/CIDLC/ServantGenerator.cpp201
-rw-r--r--TAO/CIAO/CIDLC/ServantHeaderGenerator.cpp2272
-rw-r--r--TAO/CIAO/CIDLC/ServantSourceGenerator.cpp3687
-rw-r--r--TAO/CIAO/CIDLC/TypeNameEmitter.cpp1542
-rw-r--r--TAO/CIAO/CIDLC/cidlc.cpp322
-rw-r--r--TAO/CIAO/COPYING111
-rw-r--r--TAO/CIAO/ChangeLog452
-rw-r--r--TAO/CIAO/ChangeLogs/ChangeLog-04b2250
-rw-r--r--TAO/CIAO/DAnCE/RTNodeApplication/NodeApplication_Task.cpp153
-rw-r--r--TAO/CIAO/DAnCE/RTNodeApplication/NodeApplication_Task.h82
-rw-r--r--TAO/CIAO/DAnCE/RTNodeApplication/NodeApplication_Task.inl11
-rw-r--r--TAO/CIAO/DAnCE/RTNodeApplication/README39
-rw-r--r--TAO/CIAO/DAnCE/RTNodeApplication/RTNodeApplication.cpp171
-rw-r--r--TAO/CIAO/DAnCE/RTNodeApplication/RTNodeApplication.mpc13
-rw-r--r--TAO/CIAO/DAnCE/RTNodeApplication/RTServer_Impl.cpp13
-rw-r--r--TAO/CIAO/DAnCE/RTNodeApplication/RTServer_Impl.h78
-rw-r--r--TAO/CIAO/DAnCE/RTNodeApplication/RTServer_Impl.inl13
-rwxr-xr-xTAO/CIAO/DAnCE/RTNodeApplication/senv.sh4
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Hello_Base/Hello_Base.idl21
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Hello_Base/Hello_Base.mpc34
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Hello_Base/Hello_Base_stub_export.h54
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Hello_Base/Hello_Base_svnt_export.h54
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver.cidl17
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver.idl21
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver.mpc58
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_exec.cpp189
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_exec.h126
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_exec_export.h53
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_stub_export.h53
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.cpp.new_impl585
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.cpp.no-connections317
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.cpp.with-connections608
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.h.new_impl356
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.h.no-connections258
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.h.with-connections370
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt_export.h54
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Sender/Sender.cidl17
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Sender/Sender.idl32
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Sender/Sender.mpc103
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Sender/SenderE.idl.new_impl71
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec.cpp207
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec.h194
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_1.cpp145
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_1.h133
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_2.cpp145
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_2.h135
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_export.h54
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_stub_export.h54
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.cpp.new_impl645
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.cpp.no-connections354
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.cpp.with-connections736
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.h.new_impl366
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.h.no-connections275
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.h.with-connections395
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt_export.h54
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Sender/starter.cpp108
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/descriptors/Deployment.xsd776
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/descriptors/Domain.cdd17
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/descriptors/Hello.cdp16
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/descriptors/Hello.cid41
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/descriptors/Hello.cpd13
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/descriptors/Hello.pcd10
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/descriptors/Libraries.iad8
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver.ccd34
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver.cid35
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver.cpd14
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver_Exec.iad29
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver_Stub.iad14
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver_Svnt.iad29
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender.ccd48
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender.cid46
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender.cpd14
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender_Exec.iad29
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender_Stub.iad14
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender_Svnt.iad29
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/descriptors/XMI.xsd35
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/descriptors/hello.dat3
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/descriptors/package.tpd8
-rw-r--r--TAO/CIAO/NEWS191
-rw-r--r--TAO/CIAO/PROBLEM-REPORT-FORM94
-rw-r--r--TAO/CIAO/Release53
-rw-r--r--TAO/CIAO/VERSION11
-rwxr-xr-xTAO/CIAO/bin/replace_dummy_with_dummylabel.sh10
-rw-r--r--TAO/CIAO/ciao/CCM_Core.mpc114
-rw-r--r--TAO/CIAO/ciao/Component_Base.idl788
-rw-r--r--TAO/CIAO/ciao/Container_Base.cpp431
-rw-r--r--TAO/CIAO/ciao/Container_Impl.cpp280
-rw-r--r--TAO/CIAO/ciao/Port_Activator_T.cpp69
-rw-r--r--TAO/CIAO/ciao/Servant_Activator.cpp132
-rw-r--r--TAO/CIAO/ciao/Servant_Activator.h108
-rw-r--r--TAO/CIAO/ciao/ServerActivator_Impl.h266
-rw-r--r--TAO/CIAO/ciao/StandardConfigurator_Impl.h79
-rw-r--r--TAO/CIAO/ciao/Version.h7
-rw-r--r--TAO/CIAO/docs/schema/Modified_Deployment.xsd790
-rw-r--r--TAO/CIAO/docs/tutorial/Hello/hello_exec.cpp114
-rw-r--r--TAO/CIAO/examples/Hello/Hello_Base/Hello_Base.idl26
-rw-r--r--TAO/CIAO/examples/Hello/Hello_Base/Hello_Base.mpc66
-rw-r--r--TAO/CIAO/examples/Hello/Receiver/Receiver.idl30
-rw-r--r--TAO/CIAO/examples/Hello/Receiver/Receiver.mpc109
-rw-r--r--TAO/CIAO/examples/Hello/Sender/New_Sender_svnt.cpp352
-rw-r--r--TAO/CIAO/examples/Hello/Sender/New_Sender_svnt.h273
-rw-r--r--TAO/CIAO/examples/Hello/Sender/Sender.mpc131
-rw-r--r--TAO/CIAO/examples/Hello/step-by-step.html156
-rw-r--r--TAO/CIAO/examples/OEP/BasicSP/BMClosedED/BMClosedED.mpc68
-rw-r--r--TAO/CIAO/examples/OEP/BasicSP/BMClosedED/BMClosedED_exec.cpp198
-rw-r--r--TAO/CIAO/examples/OEP/BasicSP/BMDevice/BMDevice.mpc76
-rw-r--r--TAO/CIAO/examples/OEP/BasicSP/BMDisplay/BMDisplay.mpc68
-rw-r--r--TAO/CIAO/examples/OEP/BasicSP/EC/EC.mpc101
-rw-r--r--TAO/CIAO/examples/OEP/BasicSP/EC/EC_exec.cpp300
-rw-r--r--TAO/CIAO/examples/OEP/BasicSP/EC/EC_exec.h190
-rw-r--r--TAO/CIAO/examples/OEP/Display/GPS/GPS.mpc92
-rw-r--r--TAO/CIAO/examples/OEP/Display/NavDisplay/NavDisplay.mpc68
-rw-r--r--TAO/CIAO/examples/OEP/Display/NavDisplayGUI_exec/DetailView.cpp165
-rw-r--r--TAO/CIAO/examples/OEP/Display/NavDisplayGUI_exec/NavDisplayGUI.mpc44
-rw-r--r--TAO/CIAO/examples/OEP/Display/NavDisplayGUI_exec/NavDisplayGUI_exec.cpp208
-rw-r--r--TAO/CIAO/examples/OEP/Display/NavDisplayGUI_exec/README15
-rw-r--r--TAO/CIAO/examples/OEP/Display/RateGen/RateGen.mpc99
-rw-r--r--TAO/CIAO/examples/OEP/Display/RateGen/RateGen_exec.cpp341
-rw-r--r--TAO/CIAO/examples/OEP/Display/RateGen/RateGen_exec.h187
-rw-r--r--TAO/CIAO/examples/OEP/Display/descriptors/NOTE-win.txt91
-rw-r--r--TAO/CIAO/examples/OEP/Display/descriptors/NOTE.txt140
-rw-r--r--TAO/CIAO/examples/handcrafted/BasicSP_EC/BMClosedED/BMClosedED.mpc66
-rw-r--r--TAO/CIAO/examples/handcrafted/BasicSP_EC/BMDevice/BMDevice.mpc67
-rw-r--r--TAO/CIAO/examples/handcrafted/BasicSP_EC/BMDisplay/BMDisplay.mpc65
-rw-r--r--TAO/CIAO/examples/handcrafted/BasicSP_EC/BasicSP.mpc35
-rw-r--r--TAO/CIAO/examples/handcrafted/BasicSP_EC/EC/EC.mpc75
-rw-r--r--TAO/CIAO/examples/handcrafted/BasicSP_EC2/BMClosedED/BMClosedED.mpc66
-rw-r--r--TAO/CIAO/examples/handcrafted/BasicSP_EC2/BMDevice/BMDevice.mpc67
-rw-r--r--TAO/CIAO/examples/handcrafted/BasicSP_EC2/BMDisplay/BMDisplay.mpc65
-rw-r--r--TAO/CIAO/examples/handcrafted/BasicSP_EC2/BasicSP.mpc35
-rw-r--r--TAO/CIAO/examples/handcrafted/BasicSP_EC2/EC/EC.mpc98
-rw-r--r--TAO/CIAO/examples/handcrafted/BasicSP_EC2/RTEventService/RTEventService.mpc67
-rw-r--r--TAO/CIAO/performance-tests/Benchmark/Multi_Threaded/Multi_Threaded.mpc17
-rw-r--r--TAO/CIAO/performance-tests/Benchmark/RoundTrip/RoundTrip.mpc91
-rw-r--r--TAO/CIAO/performance-tests/Benchmark/RoundTrip/client.cpp183
-rw-r--r--TAO/CIAO/performance-tests/Benchmark/RoundTripClient/RoundTripClient.mpc105
-rw-r--r--TAO/CIAO/performance-tests/Protocols/Controller/Controller.cpp229
-rw-r--r--TAO/CIAO/performance-tests/Protocols/Controller/Controller.mpc8
-rw-r--r--TAO/CIAO/performance-tests/Protocols/Receiver/Receiver.mpc59
-rw-r--r--TAO/CIAO/performance-tests/Protocols/Sender/Sender.mpc60
-rw-r--r--TAO/CIAO/performance-tests/Protocols/Sender/Sender_exec.cpp716
-rw-r--r--TAO/CIAO/rules.ciao.GNU42
-rw-r--r--TAO/CIAO/tests/CIDL/CodeGen/CodeGen.mpc117
-rw-r--r--TAO/CIAO/tests/RTCCM/DiffServ/Controller/Controller.mpc8
-rw-r--r--TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Controller.mpc94
-rw-r--r--TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Pulser.cpp113
-rw-r--r--TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Pulser.h75
-rw-r--r--TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/client.cpp133
-rw-r--r--TAO/CIAO/tests/RTCCM/Priority_Test/Workers/CB_Worker_exec.cpp144
-rw-r--r--TAO/CIAO/tests/RTCCM/Priority_Test/Workers/Worker.mpc80
-rw-r--r--TAO/CIAO/tools/Assembly_Deployer/Deployment_Configuration.cpp125
-rw-r--r--TAO/CIAO/tools/Assembly_Deployer/Deployment_Configuration.h126
-rw-r--r--TAO/CIAO/tools/Daemon/Daemon_Impl.cpp114
-rw-r--r--TAO/CIAO/tools/IDL3_to_IDL2/IDL3_to_IDL2.mpc65
-rw-r--r--TAO/CIAO/tools/IDL3_to_IDL2/TAO_IDL3_TO_IDL2_BE_Export.h40
-rw-r--r--TAO/CIAO/tools/RTComponentServer/RTConfig_Manager.cpp296
-rw-r--r--TAO/CIAO/tools/RTComponentServer/RTConfig_Manager.h163
-rw-r--r--TAO/CIAO/tools/RTComponentServer/RTServer_Impl.cpp264
-rw-r--r--TAO/CIAO/tools/Segment_Timer/Segment_Timer.h42
-rw-r--r--TAO/CIAO/tools/Segment_Timer/Segment_Timer.mpc18
-rw-r--r--TAO/CIAO/tools/XML_Helpers/XML_Utils.cpp235
-rw-r--r--TAO/CIAO/tools/XML_Helpers/XML_Utils.h90
174 files changed, 37354 insertions, 0 deletions
diff --git a/TAO/CIAO/CCF/CCF/CIDL/CIDL.mpc b/TAO/CIAO/CCF/CCF/CIDL/CIDL.mpc
new file mode 100644
index 00000000000..2282230c383
--- /dev/null
+++ b/TAO/CIAO/CCF/CCF/CIDL/CIDL.mpc
@@ -0,0 +1,24 @@
+//$Id$
+
+project(CIDL) {
+ requires += cidl exceptions
+ sharedname =
+ staticname = CIDL
+ includes += $(CIAO_ROOT)/CCF
+ libout = ..
+ Source_Files {
+ .
+ ./SemanticGraph
+ ./Traversal
+ ./SemanticAction
+ ./SemanticAction/Impl
+ }
+
+ specific(vc71) {
+ libs += boost_regex_debug boost_filesystem_debug
+ }
+
+ verbatim(gnuace, top) {
+ include ../../Config.rules
+ }
+}
diff --git a/TAO/CIAO/CCF/CCF/CodeGenerationKit/CodeGenerationKit.mpc b/TAO/CIAO/CCF/CCF/CodeGenerationKit/CodeGenerationKit.mpc
new file mode 100644
index 00000000000..23e1e308ebd
--- /dev/null
+++ b/TAO/CIAO/CCF/CCF/CodeGenerationKit/CodeGenerationKit.mpc
@@ -0,0 +1,17 @@
+//$Id$
+
+project(CodeGenerationKit) {
+ requires += cidl exceptions
+ sharedname =
+ staticname = CodeGenerationKit
+ includes += $(CIAO_ROOT)/CCF
+ libout = ..
+
+ specific(vc71) {
+ libs += boost_regex_debug boost_filesystem_debug
+ }
+
+ verbatim(gnuace, top) {
+ include ../../Config.rules
+ }
+}
diff --git a/TAO/CIAO/CCF/CCF/CodeGenerationKit/IndentationIDL.hpp b/TAO/CIAO/CCF/CCF/CodeGenerationKit/IndentationIDL.hpp
new file mode 100644
index 00000000000..24f9866eac4
--- /dev/null
+++ b/TAO/CIAO/CCF/CCF/CodeGenerationKit/IndentationIDL.hpp
@@ -0,0 +1,277 @@
+// file : CCF/CodeGenerationKit/IndentationIDL.hpp
+// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
+// cvs-id : $Id$
+
+#ifndef CCF_CODE_GENERATION_KIT_INDENTATION_IDL_HPP
+#define CCF_CODE_GENERATION_KIT_INDENTATION_IDL_HPP
+
+#include <deque>
+
+#include "CCF/CodeGenerationKit/IndentationBuffer.hpp"
+
+namespace Indentation
+{
+ template <typename C>
+ class IDL : public Buffer<C>
+ {
+ public:
+ typedef
+ typename Buffer<C>::traits_type
+ traits_type;
+
+ typedef
+ typename Buffer<C>::char_type
+ char_type;
+
+ typedef
+ typename Buffer<C>::int_type
+ int_type;
+
+ typedef
+ typename Buffer<C>::EndOfStream
+ EndOfStream;
+
+ public:
+ IDL (Buffer<C>& out)
+ : out_ (out),
+ indentation_ (0),
+ spaces_ (2),
+ construct_ (OTHER)
+ {
+ }
+
+ virtual
+ ~IDL () throw () {}
+
+ public:
+ virtual int_type
+ put (char_type c) throw (ExH::System::Exception)
+ {
+ int_type result = traits_type::to_int_type (c);
+
+ try
+ {
+ bool defaulting = false;
+ switch (c)
+ {
+ case '\n':
+ {
+ hold_.push_back (c);
+ break;
+ }
+ case '{':
+ {
+ ensure_new_line ();
+ output_indentation ();
+ result = write (c);
+ ensure_new_line ();
+ indentation_++;
+ break;
+ }
+ case '}':
+ {
+ if (indentation_ > 0) indentation_--;
+
+ // Reduce multiple newlines to one.
+ while (hold_.size () > 1)
+ {
+ typename Hold::reverse_iterator i = hold_.rbegin ();
+ if (*i == '\n' && *(i + 1) == '\n') hold_.pop_back ();
+ else break;
+ }
+
+ ensure_new_line ();
+ output_indentation ();
+
+ hold_.push_back (c);
+
+ // result = write (c);
+
+ //ensure_new_line ();
+
+ // Add double newline after '}'.
+ //
+ hold_.push_back ('\n');
+ hold_.push_back ('\n');
+
+
+ break;
+ }
+ case ';':
+ {
+ // Handling '};' case.
+ //
+
+ bool brace (false);
+
+ if (hold_.size () > 1 && hold_.back () == '\n')
+ {
+ bool pop_nl (false);
+
+ for (typename Hold::reverse_iterator
+ i (hold_.rbegin ()), e (hold_.rend ()); i != e; ++i)
+ {
+ if (*i != '\n')
+ {
+ if (*i == '}') brace = pop_nl = true;
+ break;
+ }
+ }
+
+ if (pop_nl) while (hold_.back () == '\n') hold_.pop_back ();
+ }
+
+ output_indentation ();
+ result = write (c);
+
+ if (brace)
+ {
+ hold_.push_back ('\n');
+ hold_.push_back ('\n');
+ }
+
+ if (construct_ != STRING_LITERAL && construct_ != CHAR_LITERAL)
+ {
+ ensure_new_line ();
+ }
+ break;
+ }
+ case '\\':
+ {
+ hold_.push_back (c);
+ break;
+ }
+ case '\"':
+ {
+ if (hold_.empty () || hold_.back () != '\\')
+ {
+ // not escape sequence
+ if (construct_ == STRING_LITERAL) construct_ = OTHER;
+ else construct_ = STRING_LITERAL;
+ }
+
+ defaulting = true;
+ break;
+ }
+ case '\'':
+ {
+ if (hold_.empty () || hold_.back () != '\\')
+ {
+ // not escape sequence
+ if (construct_ == CHAR_LITERAL) construct_ = OTHER;
+ else construct_ = CHAR_LITERAL;
+ }
+
+ defaulting = true;
+ break;
+ }
+ default:
+ {
+ defaulting = true;
+ break;
+ }
+ }
+
+ if (defaulting)
+ {
+ output_indentation ();
+ result = write (c);
+ }
+ }
+ catch (Full const&)
+ {
+ result = traits_type::eof ();
+ }
+
+ return result;
+ }
+
+ virtual void
+ unbuffer () throw (EndOfStream, ExH::System::Exception)
+ {
+ int_type result;
+
+ while (!hold_.empty ())
+ {
+ result = out_.put (hold_.front ());
+
+ //@@ failed
+ if (result == traits_type::eof ())
+ {
+ throw EndOfStream ("unable to flush buffer");
+ }
+
+ hold_.pop_front ();
+ }
+ }
+
+ private:
+ class Full {};
+
+ void
+ ensure_new_line ()
+ {
+ if (hold_.empty () || hold_.back () != '\n')
+ {
+ hold_.push_back ('\n');
+ }
+ }
+
+
+ void
+ output_indentation () throw (Full)
+ {
+ if (!hold_.empty () && hold_.back () == '\n')
+ {
+ for (unsigned long i = 0; i < indentation_ * spaces_; i++)
+ {
+ write (' ');
+ }
+ }
+ }
+
+ int_type
+ write (char_type c) throw (Full)
+ {
+ hold_.push_back (c);
+
+ int_type result (traits_type::eof ());
+
+ while (!hold_.empty ())
+ {
+ result = out_.put (hold_.front ());
+
+ if (result == traits_type::eof ()) throw Full ();
+
+ hold_.pop_front ();
+ }
+
+ return result;
+ }
+
+
+ private:
+ Buffer<C>& out_;
+ unsigned long indentation_;
+ unsigned long spaces_;
+
+ bool suppress_nl_;
+
+ enum Construct
+ {
+ OTHER,
+ STRING_LITERAL,
+ CHAR_LITERAL
+ };
+
+ Construct construct_;
+
+ typedef
+ std::deque<int_type>
+ Hold;
+
+ Hold hold_;
+ };
+}
+
+#endif // CCF_CODE_GENERATION_KIT_INDENTATION_IDL_HPP
diff --git a/TAO/CIAO/CCF/CCF/CompilerElements/CompilerElements.mpc b/TAO/CIAO/CCF/CCF/CompilerElements/CompilerElements.mpc
new file mode 100644
index 00000000000..037d97e2301
--- /dev/null
+++ b/TAO/CIAO/CCF/CCF/CompilerElements/CompilerElements.mpc
@@ -0,0 +1,17 @@
+//$Id$
+
+project(CompilerElements) {
+ requires += cidl exceptions
+ sharedname =
+ staticname = CompilerElements
+ includes += $(CIAO_ROOT)/CCF
+ libout = ..
+
+ specific(vc71) {
+ libs += boost_regex_debug boost_filesystem_debug
+ }
+
+ verbatim(gnuace, top) {
+ include ../../Config.rules
+ }
+}
diff --git a/TAO/CIAO/CCF/CCF/IDL2/IDL2.mpc b/TAO/CIAO/CCF/CCF/IDL2/IDL2.mpc
new file mode 100644
index 00000000000..c56319af393
--- /dev/null
+++ b/TAO/CIAO/CCF/CCF/IDL2/IDL2.mpc
@@ -0,0 +1,25 @@
+//$Id$
+
+project(IDL2) {
+ requires += cidl exceptions
+ sharedname =
+ staticname = IDL2
+ includes += $(CIAO_ROOT)/CCF
+ libout = ..
+ Source_Files {
+ .
+ ./SemanticGraph
+ ./Traversal
+ ./SemanticAction
+ ./SemanticAction/Impl
+
+ }
+
+ specific(vc71) {
+ libs += boost_regex_debug boost_filesystem_debug
+ }
+
+ verbatim(gnuace, top) {
+ include ../../Config.rules
+ }
+}
diff --git a/TAO/CIAO/CCF/CCF/IDL3/IDL3.mpc b/TAO/CIAO/CCF/CCF/IDL3/IDL3.mpc
new file mode 100644
index 00000000000..d6cd8bfe316
--- /dev/null
+++ b/TAO/CIAO/CCF/CCF/IDL3/IDL3.mpc
@@ -0,0 +1,25 @@
+//$Id$
+
+project(IDL3) {
+ requires += cidl exceptions
+ sharedname =
+ staticname = IDL3
+ includes += $(CIAO_ROOT)/CCF
+ libout = ..
+ Source_Files {
+ .
+ ./SemanticGraph
+ ./Traversal
+ ./SemanticAction/Impl
+
+ }
+
+ specific(vc71) {
+ libs += boost_regex_debug boost_filesystem_debug
+ }
+
+ verbatim(gnuace, top) {
+ include ../../Config.rules
+ }
+
+}
diff --git a/TAO/CIAO/CIAO-INSTALL.html b/TAO/CIAO/CIAO-INSTALL.html
new file mode 100644
index 00000000000..3e3944ab08f
--- /dev/null
+++ b/TAO/CIAO/CIAO-INSTALL.html
@@ -0,0 +1,199 @@
+<!-- $Id$ -->
+<HTML>
+<HEAD>
+ <TITLE>Building and Installing CIAO</TITLE>
+ <link rev=made href="mailto:schmidt@cs.wustl.edu">
+</HEAD>
+
+<BODY text = "#000000"
+ link = "#000fff"
+ vlink = "#ff0f0f"
+ bgcolor = "#ffffff">
+
+<HR><P>
+<H3>Building and Installing CIAO</H3>
+
+The first thing you should do to install CIAO is to set the
+environment variable <CODE>CIAO_ROOT</CODE> to be
+<CODE>$TAO_ROOT/CIAO</CODE>. Please refer to the <a
+href="../../ACE-INSTALL.html">ACE installation notes</a> and <a
+href="../TAO-INSTALL.html">TAO installation notes</a> for instructions
+on setting <CODE>$ACE_ROOT</CODE> and <CODE>$TAO_ROOT</CODE>,
+respectively. They are needed since CIAO sits on top of
+ACE+TAO. Compiling ACE+TAO successfully is the <STRONG> first
+</STRONG> requirement for compiling CIAO.
+
+<P>CIAO is divided into several parts, so different
+installation/building rules apply to different parts of CIAO.
+<br>
+<br>
+<font color=#ff0000>IMPORTANT</font>: There are currently
+<font color=#ff0000>TWO</font> CIAO implementations with this
+distribution of the software. The "old" CIAO is designed and implemented
+based on the orginal <a
+href="http://www.omg.org/cgi-bin/doc?formal/02-06-65">
+OMG CCM 3.0 specification</a>, the "new" CIAO is designed and implemented
+based on the new <a
+href="http://www.omg.org/cgi-bin/doc?ptc/2003-07-02"> OMG's Deployment and
+Configuration specification</a>. For a temporary solution, we put the "new"
+CIAO implementation in the <code>$CIAO_ROOT/DAnCE</code> directory, which
+contains the CIAO core, CIAO examples and Deployment and Configuration
+Framework. However, both the "old" one and the "new"
+one have the same modules and structures, which are described as below.
+<br><br>
+(We suggest you use this "new" CIAO instead of the "old" one, since the
+"old" CIAO will not be officially supported soon.)
+
+<OL>
+
+ <LI>CIAO core/examples: This part of CIAO include following directories:
+ <CODE>$CIAO_ROOT/DAnCE/ciao</CODE>, <CODE>$CIAO_ROOT/DAnCE/examples</CODE>.<P>
+
+ <LI>CIDL Compiler: This part of CIAO include
+ <CODE>$CIAO_ROOT/CCF</CODE> and <CODE>$CIAO_ROOT/CIDLC</CODE>.<P>
+
+ <LI>CIAO Deployment and Configuration Framework: This part of CIAO
+ includes all the directories in <CODE>$CIAO_ROOT/DAnCE</CODE> except
+ the ones mentioned above. DAnCE is an
+ implementation of the new <a
+ href="http://www.omg.org/cgi-bin/doc?ptc/2003-07-02"> Deployment and
+ Configuration</a> specification.
+
+ We refer, henceforth, to all pieces as CIAO in general. The above
+ two pieces will be referred specifically by their names as CIDLC and
+ DAnCE though they are part of CIAO.
+
+</OL>
+
+
+<HR>
+<H3>Supported Platforms for CIAO</H3>
+
+<p>CIAO should be usable on all platforms that TAO runs on. Please see
+<a href="../TAO-INSTALL.html"> TAO's installation</a> pages for details<P>
+
+<H3>Supported Platforms for CIDLC</H3>
+<p> CIDLC is supported only on a small subset of platforms. Please
+refer to <a href="CCF/Documentation/Build.html"> this</a> for details
+on how to build CIDLC.
+<p>
+<table width="100%" border=1>
+ <tr><b>For Building CIAO CIDLC Compiler</b></tr>
+ <tr>
+ <td><b>Fully supported, i.e., continually tested and used daily</b></td>
+ <td>Windows 2000/XP (VC 7.1), Linux(GCC 3.2 or higher)
+ </td>
+ </tr>
+
+</table>
+
+<P>If you have <A HREF="../../docs/ACE-porting.html">porting
+questions</A> or have a problem compiling CIAO with TAO and ACE on the
+platforms shown above please send email to either <A
+HREF="news:comp.soft-sys.ace">ACE Newsgroup</A> or the <A
+HREF="mailto:ciao-users@cs.wustl.edu">CIAO mailing list</A> and we'll
+try to help you fix the problems. You can also submit bug reports and
+enhancement requests in our
+<a href="../../docs/usage-bugzilla.html">bug tracking system</a>.<P>
+
+CIAO can be obtained <A
+HREF="http://www.dre.vanderbilt.edu/Download.html">electronically</A>
+via the WWW and ftp. <A
+HREF="http://www.dre.vanderbilt.edu/CIAO">CIAO</A> is bundled
+with the ACE and TAO release. You'll always need the most recent version of
+ACE and TAO because CIAO tracks changes to ACE and TAO very
+closely. <P>
+
+<HR><P>
+<H3>Install CIDL Compiler</H3>
+
+ <P>We suggest you download the binary <CODE>cidlc(exe)</CODE> from
+ <STRONG><A HREF="http://www.dre.vanderbilt.edu/cidlc/binary">here</A></STRONG>
+ if you are using Windows or Linux, or you can build it by yourself.<P>
+
+ <P><a href="../../MPC/README"> MPC</a> is used to build the CIDL
+ compiler on <Strong>Linux</STRONG>. The procedure is outlined
+ below.
+ <P>
+ <UL>
+ <LI> Open up
+ <CODE>$ACE_ROOT/bin/MakeProjectCreator/config/global.features
+ </CODE> and set cidl=1.
+ <LI> Make sure you set cidl=1 in
+ <CODE>$ACE_ROOT/include/makeinclude/platfrom_macros.GNU</CODE>.
+ <LI>Install <code>boost_filesystem</code>, <code>boost_regex</code> and <code>Utility Library</code>. For how to do that please see <a href="./CCF/Documentation/Build.html">Build.html</a>.
+ <LI>In <code>$CIAO_ROOT/CIDLC</code> run <code>$ACE_ROOT/bin/mwc.pl CIDLC.mwc</code>
+ <LI>In <code>$CIAO_ROOT/CIDLC</code> run <code>make</code>.
+ <br>Note: The linking time is a bit long (more than 5 Minutes with an Intel XEON 1.90GHZ CPU, please be patient).
+ </UL>
+
+ <P>There are 2 ways to build the CIDL compiler on <Strong>Windows</STRONG>:<P>
+<OL>
+ <LI>Use the provided Visual Studio solution/project file. For detail please see <a href="./CCF/Documentation/Build.html">Build.html</a><p>
+
+ <LI>Use MPC: (Not supported yet)
+</OL>
+
+<HR><P>
+<H3>Install CIAO core/tools/examples </H3>
+
+ <P>Most of the GNUmakefiles/project files/solution files required to
+ build CIAO are available in the release. If you don't like the
+ configurations used, please feel free to regenerate them using
+ MPC. Please see <a href="../../MPC/README"> this </a> for more
+ details. </p>
+<p>
+
+To build CIAO core/tools/examples:
+
+<OL>
+ <LI>Make sure ACE and TAO are built. <P>
+
+ <LI>Make sure all ACE/TAO/etc. generated libs are in <code>$ACE_ROOT/lib</code>. To build CIAO you will need:
+
+<ul >
+ <li><code>ACE</code></li>
+ <li><code>TAO</code></li>
+ <li><code>TAO_IDL</code></li>
+ <li><code>IFR_Client</code></li>
+ <li><code>IORTable</code></li>
+ <li><code>Valuetype</code></li>
+ <li><code>Security</code></li>
+ <li><code>ACEXML</code></li>
+</ul><p>
+
+ <LI>Make sure you have cidlc or cidlc.exe in <CODE>$CIAO_ROOT\bin</CODE> with the right permission setting (executable).<p>
+
+ <LI>Generate the Makefile/Solution/Project files and build<P>
+ For the supported build tools please see <a href="http://downloads.ociweb.com/MPC/MakeProjectCreator.pdf">MPC manual</a>.<P>
+ You have to execute the MPC command in the following directories if you only want to build the examples and have a peek at CIAO:
+ <UL>
+ <LI> <code>$CIAO_ROOT/DAnCE/
+ </UL><P>
+
+
+ On <STRONG>Linux</STRONG>: do <code>$ACE_ROOT/bin/mwc.pl</code> at the locations specified above then <code>make</code>.<P>
+
+ On <STRONG>Windows/VC6</STRONG>: do <code>%ACE_ROOT%/bin/mwc.pl -type vc6</code> at the locations specified above then Open the workspace file and build.<P>
+
+ On <STRONG>Windows/VC71</STRONG>: do <code>%ACE_ROOT%/bin/mwc.pl -type vc71</code> at the locations specified above then Open the solution file and build.<P>
+
+ <Strong>Note:</Strong> You can run <code>mwc.pl</code> at <code>$CIAO_ROOT</code> as long as you don't intend to build CIDL compiler with MPC. If this is the case(default), you can run the mwc.pl command with proper augment once then you can do <code>make</code> at <code>$CIAO_ROOT</code> (Linux) or open the workspace/solution file at <code>$CIAO_ROOT</code> (Windows) to build.
+</OL>
+
+ <STRONG> Building CIAO quickly </STRONG>: You can build CIAO
+ quickly by doing the following:
+ <LI> Remove all the GNUmakefiles or project files that are shipped
+ with the release. </LI>
+ <LI> Open up <CODE> $CIAO_ROOT/CIAOTAO.mwc </CODE>.
+ <LI> Run <CODE>$ACE_ROOT/bin/mwc.pl CIAOTAO.mwc</CODE> from <CODE>
+ $CIAO_ROOT </CODE>. </LI>
+ <LI> Type 'make' </LI>
+This will build all the required ACE+TAO libraries including CIAO
+libraries and tools.
+<P><HR><P>
+Back to the <A HREF="http://www.cs.wustl.edu/~schmidt/CIAO.html">CIAO</A> home page.
+
+<!--#include virtual="/~schmidt/cgi-sig.html" -->
+</BODY>
+</HTML>
diff --git a/TAO/CIAO/CIDLC/CIDLC.mpc b/TAO/CIAO/CIDLC/CIDLC.mpc
new file mode 100644
index 00000000000..fd669339955
--- /dev/null
+++ b/TAO/CIAO/CIDLC/CIDLC.mpc
@@ -0,0 +1,41 @@
+//$Id$
+
+project(CIDLC) {
+ requires += cidl exceptions
+ exename = cidlc
+ includes += .. ../CCF
+ after += IDL2 IDL3 CIDL CodeGenerationKit CompilerElements
+ install = ../bin
+ libpaths += $(CIAO_ROOT)/CCF/CCF ../../../lib
+ libs += CIDL IDL3 IDL2 CodeGenerationKit CompilerElements
+ Source_Files {
+ ExecutorMappingGenerator.cpp
+ DescriptorGenerator.cpp
+ ExecImplGenerator.cpp
+ ExecImplHeaderGenerator.cpp
+ ExecImplSourceGenerator.cpp
+ ExecutorMappingGenerator.cpp
+ RepositoryIdGenerator.cpp
+ SizeTypeCalculator.cpp
+ ServantGenerator.cpp
+ ServantHeaderGenerator.cpp
+ ServantSourceGenerator.cpp
+ TypeNameEmitter.cpp
+ Literals.cpp
+ cidlc.cpp
+ }
+
+ specific(vc71) {
+ libs += boost_regex_debug boost_filesystem_debug
+ }
+
+ verbatim(gnuace, top) {
+ include ../CCF/Config.rules
+ }
+
+ verbatim(gnuace, local) {
+ LIBS += $(BOOST_LD_FLAGS) \
+ -lboost_regex \
+ -lboost_filesystem
+ }
+}
diff --git a/TAO/CIAO/CIDLC/ExecImplGenerator.cpp b/TAO/CIAO/CIDLC/ExecImplGenerator.cpp
new file mode 100644
index 00000000000..e68bc5a6206
--- /dev/null
+++ b/TAO/CIAO/CIDLC/ExecImplGenerator.cpp
@@ -0,0 +1,187 @@
+// file : CIDLC/ExecImplGenerator.cpp
+// author : Jeff Parsons <j.parsons@vanderbilt.edu>
+// cvs-id : $Id$
+
+#include "ExecImplGenerator.hpp"
+#include "ExecImplHeaderGenerator.hpp"
+#include "ExecImplSourceGenerator.hpp"
+
+#include "CCF/CodeGenerationKit/Regex.hpp"
+#include "CCF/CodeGenerationKit/IndentationCxx.hpp"
+#include "CCF/CodeGenerationKit/IndentationImplanter.hpp"
+
+using namespace CCF;
+using namespace CIDL;
+using namespace SemanticGraph;
+using namespace Traversal;
+
+using std::string;
+using std::ostream;
+
+namespace
+{
+ // On some platforms toupper can be something else than a
+ // function.
+ int
+ upcase (int c)
+ {
+ return toupper (c);
+ }
+}
+
+ExecImplGenerator::ExecImplGenerator (CommandLine const& cl)
+ : cl_ (cl),
+ file_name_ (""),
+ export_macro_ ("")
+{
+}
+
+void ExecImplGenerator::options (CL::Description& d)
+{
+ d.add_option (CL::OptionDescription (
+ "exec-hdr-file-suffix",
+ "suffix",
+ "Use provided suffix instead of default \'_exec.h\' "
+ "when constructing name of executor implementation file.",
+ true));
+
+ d.add_option (CL::OptionDescription (
+ "exec-hdr-file-regex",
+ "regex",
+ "Use provided regular expression when constructing "
+ "name of executor implementation file.",
+ true));
+ d.add_option (CL::OptionDescription (
+ "exec-src-file-suffix",
+ "suffix",
+ "Use provided suffix instead of default \'_exec.cpp\' "
+ "when constructing name of executor implementation file.",
+ true));
+
+ d.add_option (CL::OptionDescription (
+ "exec-src-file-regex",
+ "regex",
+ "Use provided regular expression when constructing "
+ "name of executor implementation file.",
+ true));
+ d.add_option (CL::OptionDescription (
+ "exec-export-macro",
+ "macro",
+ "Replace default executor DLL export macro "
+ "with provided macro.",
+ true));
+ d.add_option (CL::OptionDescription (
+ "exec-export-include",
+ "file",
+ "Replace default executor export include file "
+ "with provided file.",
+ true));
+}
+
+
+void ExecImplGenerator::generate (SemanticGraph::TranslationUnit& u,
+ fs::path const& file)
+{
+ // Generate files
+ compute_export_macro (file);
+
+ {
+ fs::ofstream hdr_ofs;
+ ostream& hdr_os = configure_stream ("exec-hdr-file-suffix",
+ "_exec.h",
+ "exec-hdr-file-regex",
+ hdr_ofs);
+
+ Indentation::Implanter<Indentation::Cxx> header_guard (hdr_os);
+
+
+ ExecImplHeaderEmitter hdr_emitter (hdr_os,
+ cl_,
+ export_macro_,
+ file);
+ hdr_emitter.generate (u);
+ }
+
+ {
+ fs::ofstream src_ofs;
+ ostream& src_os = configure_stream ("exec-src-file-suffix",
+ "_exec.cpp",
+ "exec-src-file-regex",
+ src_ofs);
+
+ Indentation::Implanter<Indentation::Cxx> header_guard (src_os);
+
+ ExecImplSourceEmitter src_emitter (src_os,
+ cl_,
+ export_macro_,
+ file);
+ src_emitter.generate (u);
+ }
+}
+
+void
+ExecImplGenerator::compute_export_macro (const fs::path& file_path)
+{
+ if (!file_path.empty ())
+ {
+ file_name_ = file_path.leaf ();
+ }
+
+ export_macro_ = cl_.get_value ("exec-export-macro", "");
+
+ if (export_macro_.empty () && !file_name_.empty ())
+ {
+ // Modify a copy of the filename string.
+ export_macro_ = file_name_;
+
+
+ // Convert filename string to upper case.
+ transform (export_macro_.begin (),
+ export_macro_.end (),
+ export_macro_.begin (),
+ upcase);
+
+ // Replace the suffix.
+ export_macro_ =
+ regex::perl_s (export_macro_,
+ "/(\\.(IDL|CIDL|CDL))?$/_EXEC_Export/");
+
+ // Replace any remaining '.' in the string with '_'.
+ export_macro_ = regex::perl_s (export_macro_,
+ "/\\./_/");
+ }
+}
+
+ostream&
+ExecImplGenerator::configure_stream (string const& suffix_option,
+ string const& default_suffix,
+ string const& regex_option,
+ fs::ofstream& ofs)
+{
+ if (! file_name_.empty ())
+ {
+ string file_suffix = cl_.get_value (suffix_option,
+ default_suffix);
+ string file_expr =
+ cl_.get_value (regex_option,
+ "/(\\.(idl|cidl|cdl))?$/" + file_suffix + "/");
+
+ string file_name = regex::perl_s (file_name_, file_expr);
+
+ fs::path file_path (file_name);
+
+ ofs.open (file_path, std::ios_base::out);
+
+ if (!ofs.is_open ())
+ {
+ cerr << file_name
+ << ": error: unable to open file in write mode"
+ << endl;
+ }
+ }
+
+ return ofs.is_open ()
+ ? static_cast<ostream&> (ofs)
+ : static_cast<ostream&> (std::cout);
+}
+
diff --git a/TAO/CIAO/CIDLC/ExecImplHeaderGenerator.cpp b/TAO/CIAO/CIDLC/ExecImplHeaderGenerator.cpp
new file mode 100644
index 00000000000..4a0be5b4282
--- /dev/null
+++ b/TAO/CIAO/CIDLC/ExecImplHeaderGenerator.cpp
@@ -0,0 +1,1338 @@
+// file : CIDLC/ExecImplHeaderGenerator.cpp
+// author : Jeff Parsons <j.parsons@vanderbilt.edu>
+// cvs-id : $Id$
+
+#include "ExecImplHeaderGenerator.hpp"
+#include "TypeNameEmitter.hpp"
+#include "Literals.hpp"
+
+#include <ostream>
+
+#include "CCF/CodeGenerationKit/Regex.hpp"
+
+using std::endl;
+
+using namespace StringLiterals;
+using namespace CCF::CIDL;
+using namespace CCF::CIDL::SemanticGraph;
+
+namespace
+{
+ // On some platforms toupper can be something other than a
+ // function.
+ int
+ upcase (int c)
+ {
+ return std::toupper (c);
+ }
+}
+
+namespace
+{
+ class Context
+ {
+ public:
+ Context (std::ostream& os,
+ string export_macro)
+ : os_ (os),
+ export_macro_ (export_macro)
+ {
+ }
+
+ std::ostream&
+ os ()
+ {
+ return os_;
+ }
+
+ string
+ export_macro ()
+ {
+ return export_macro_;
+ }
+
+ private:
+ std::ostream& os_;
+ string export_macro_;
+ };
+
+ class EmitterBase
+ {
+ public:
+ EmitterBase (Context& c)
+ : ctx (c),
+ os (ctx.os ())
+ {
+ }
+
+ protected:
+ Context& ctx;
+ std::ostream& os;
+ };
+
+ struct ModuleEmitter : Traversal::Module, EmitterBase
+ {
+ ModuleEmitter (Context& c)
+ : EmitterBase (c)
+ {
+ }
+
+ virtual void
+ pre (Type& t)
+ {
+ os << endl
+ << "namespace " << t.name () << "{";
+ }
+
+ virtual void
+ post (Type&)
+ {
+ os << "}";
+ }
+ };
+
+ struct CompositionEmitter : Traversal::Composition, EmitterBase
+ {
+ CompositionEmitter (Context& c)
+ : EmitterBase (c)
+ {
+ }
+
+ virtual void
+ pre (Type& t)
+ {
+ os << endl
+ << "namespace " << t.name () << "{";
+ }
+
+ virtual void
+ post (Type&)
+ {
+ os << "}";
+ }
+ };
+
+ struct OperationEmitter : Traversal::Operation, EmitterBase
+ {
+ OperationEmitter (Context& c)
+ : EmitterBase (c)
+ {}
+
+ virtual void
+ pre (Type&)
+ {
+ os << "virtual ";
+ }
+
+ virtual void
+ name (Type& o)
+ {
+ os << endl << o.name ();
+ }
+
+ virtual void
+ receives_pre (Type&)
+ {
+ os << " (" << endl;
+ }
+
+ virtual void
+ receives_none (Type&)
+ {
+ os << " (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl;
+ }
+
+ virtual void
+ receives_post (Type&)
+ {
+ os << endl << STRS[ENV_HDR] << ")" << endl;
+ }
+
+ virtual void
+ raises_pre (Type&)
+ {
+ os << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl;
+ }
+
+ virtual void
+ raises_none (Type&)
+ {
+ os << STRS[EXCP_SNGL];
+ }
+
+ virtual void
+ raises_post (Type&)
+ {
+ os << "))";
+ }
+
+ virtual void
+ post (Type&)
+ {
+ os << ";" << endl;
+ }
+
+ virtual void
+ comma (Type&)
+ {
+ os << "," << endl;
+ }
+ };
+
+ // For generating parameter names.
+ template <typename T>
+ struct ParameterEmitter : T
+ {
+ ParameterEmitter (std::ostream& os_)
+ : os (os_)
+ {}
+
+ virtual void
+ name (typename T::Type& p)
+ {
+ os << " " << p.name ();
+ }
+
+ private:
+ std::ostream& os;
+ };
+
+ // Generic scoped typename emitter used by various other emitters.
+ struct TypeNameEmitter : Traversal::Type
+ {
+ TypeNameEmitter (std::ostream& os_)
+ : os (os_)
+ {}
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ os << t.scoped_name ();
+ }
+
+ private:
+ std::ostream& os;
+ };
+
+ // Generic local typename emitter used by various other emitters.
+ struct SimpleTypeNameEmitter : Traversal::Type
+ {
+ SimpleTypeNameEmitter (std::ostream& os_)
+ : os (os_)
+ {}
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ os << t.name ();
+ }
+
+ private:
+ std::ostream& os;
+ };
+
+ // Generate name of type's enclosing scope.
+ struct EnclosingTypeNameEmitter : Traversal::Type
+ {
+ EnclosingTypeNameEmitter (std::ostream& os_)
+ : os (os_)
+ {}
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ os << t.scoped_name ().scope_name ();
+ }
+
+ private:
+ std::ostream& os;
+ };
+
+ // Emits typename minus the leading double colon.
+ struct StrippedTypeNameEmitter : Traversal::Type
+ {
+ StrippedTypeNameEmitter (std::ostream& os_)
+ : os (os_)
+ {}
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ ScopedName scoped (t.scoped_name ());
+ os << Name (scoped.begin () + 1, scoped.end ());
+ }
+
+ private:
+ std::ostream& os;
+ };
+
+ // Generates operations associated with attributes.
+ // @@@ (JP) Need to support exceptions.
+ struct AttributeEmitter : Traversal::ReadWriteAttribute,
+ EmitterBase
+ {
+ AttributeEmitter (Context& c)
+ : EmitterBase (c),
+ write_type_name_emitter_ (c.os ()),
+ read_type_name_emitter_ (c.os ())
+ {
+ write_belongs_.node_traverser (write_type_name_emitter_);
+ read_belongs_.node_traverser (read_type_name_emitter_);
+ }
+
+ virtual void traverse (SemanticGraph::ReadWriteAttribute& a)
+ {
+ os << "virtual ";
+
+ Traversal::ReadWriteAttribute::belongs (a, read_belongs_);
+
+ os << endl
+ << a.name () << " (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_SNGL] << ";" << endl;
+
+ os << "virtual void" << endl
+ << a.name () << " (" << endl;
+
+ Traversal::ReadWriteAttribute::belongs (a, write_belongs_);
+
+ os << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_SNGL] << ";" << endl;
+ }
+
+ private:
+ INArgTypeNameEmitter write_type_name_emitter_;
+ ReturnTypeNameEmitter read_type_name_emitter_;
+ Traversal::Belongs write_belongs_;
+ Traversal::Belongs read_belongs_;
+ };
+
+ // Generates operations associated with readonly attributes.
+ // @@@ (JP) Need to support exceptions.
+ struct ReadOnlyAttributeEmitter : Traversal::ReadAttribute,
+ EmitterBase
+ {
+ ReadOnlyAttributeEmitter (Context& c)
+ : EmitterBase (c),
+ read_type_name_emitter_ (c.os ())
+ {
+ read_belongs_.node_traverser (read_type_name_emitter_);
+ }
+
+ virtual void traverse (SemanticGraph::ReadAttribute& a)
+ {
+ os << "virtual ";
+
+ Traversal::ReadAttribute::belongs (a, read_belongs_);
+
+ os << endl
+ << a.name () << " (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_SNGL] << ";" << endl;
+ }
+
+ private:
+ ReturnTypeNameEmitter read_type_name_emitter_;
+ Traversal::Belongs read_belongs_;
+ };
+
+ struct InterfaceEmitter : Traversal::UnconstrainedInterface,
+ EmitterBase
+ {
+ InterfaceEmitter (Context& c)
+ : EmitterBase (c)
+ {}
+
+ bool
+ add (UnconstrainedInterface& i)
+ {
+ return interfaces_.insert (&i).second;
+ }
+
+ virtual void
+ traverse (UnconstrainedInterface& i)
+ {
+ if (add (i))
+ {
+ Traversal::UnconstrainedInterface::traverse (i);
+ }
+ }
+
+ private:
+ std::set<UnconstrainedInterface*> interfaces_;
+ };
+
+ struct FacetEmitter : Traversal::UnconstrainedInterface,
+ EmitterBase
+ {
+ FacetEmitter (Context& c)
+ : EmitterBase (c)
+ {
+ }
+
+ virtual void
+ traverse (UnconstrainedInterface& i)
+ {
+ if (i.context ().count ("facet_impl_hdr_gen")) return;
+
+ os << "class " << ctx.export_macro () << " "
+ << i.name () << "_exec_i" << endl
+ << ": public virtual " << i.scoped_name ().scope_name ()
+ << "::CCM_" << i.name () << "," << endl
+ << "public virtual TAO_Local_RefCounted_Object" << endl
+ << "{"
+ << "public:" << endl
+ << i.name () << "_exec_i (void);"
+ << "virtual ~" << i.name () << "_exec_i (void);" << endl
+ << "// Operations from " << i.scoped_name () << endl << endl;
+
+ {
+ InterfaceEmitter interface_emitter (ctx);
+
+ Traversal::Defines defines_;
+ Traversal::Inherits inherits_;
+ interface_emitter.edge_traverser (defines_);
+ interface_emitter.edge_traverser (inherits_);
+
+ AttributeEmitter attribute_emitter (ctx);
+ ReadOnlyAttributeEmitter read_only_attribute_emitter (ctx);
+ defines_.node_traverser (attribute_emitter);
+ defines_.node_traverser (read_only_attribute_emitter);
+
+ OperationEmitter operation_emitter (ctx);
+ defines_.node_traverser (operation_emitter);
+ inherits_.node_traverser (interface_emitter);
+
+ Traversal::Receives receives;
+ Traversal::Belongs returns;
+ Traversal::Raises raises;
+ operation_emitter.edge_traverser (receives);
+ operation_emitter.edge_traverser (returns);
+ operation_emitter.edge_traverser (raises);
+
+ ParameterEmitter<Traversal::InParameter> in_param (os);
+ ParameterEmitter<Traversal::InOutParameter> inout_param (os);
+ ParameterEmitter<Traversal::OutParameter> out_param (os);
+ receives.node_traverser (in_param);
+ receives.node_traverser (inout_param);
+ receives.node_traverser (out_param);
+
+ ReturnTypeNameEmitter return_type_emitter (os);
+ TypeNameEmitter type_name_emitter (os);
+ returns.node_traverser (return_type_emitter);
+ raises.node_traverser (type_name_emitter);
+
+ Traversal::Belongs in_belongs, inout_belongs, out_belongs;
+ in_param.edge_traverser (in_belongs);
+ inout_param.edge_traverser (inout_belongs);
+ out_param.edge_traverser (out_belongs);
+
+ INArgTypeNameEmitter in_arg_emitter (os);
+ INOUTArgTypeNameEmitter inout_arg_emitter (os);
+ OUTArgTypeNameEmitter out_arg_emitter (os);
+ in_belongs.node_traverser (in_arg_emitter);
+ inout_belongs.node_traverser (inout_arg_emitter);
+ out_belongs.node_traverser (out_arg_emitter);
+
+ inherits (i, inherits_);
+ names (i, defines_);
+ }
+
+ os << "};";
+
+ i.context ().set ("facet_impl_hdr_gen", true);
+ }
+ };
+
+ struct ExecPortsEmitter : Traversal::ConsumerData,
+ Traversal::ProviderData,
+ EmitterBase
+ {
+ ExecPortsEmitter (Context& c)
+ : EmitterBase (c),
+ enclosing_type_name_emitter_ (c.os ()),
+ simple_type_name_emitter_ (c.os ()),
+ type_name_emitter_ (c.os ())
+ {
+ enclosing_belongs_.node_traverser (enclosing_type_name_emitter_);
+ simple_belongs_.node_traverser (simple_type_name_emitter_);
+ belongs_.node_traverser (type_name_emitter_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Provider& p)
+ {
+ os << "virtual ";
+
+ Traversal::ProviderData::belongs (p, enclosing_belongs_);
+
+ os << "::CCM_";
+
+ Traversal::ProviderData::belongs (p, simple_belongs_);
+
+ os << "_ptr" << endl
+ << "get_" << p.name () << " (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_SNGL] << ";" << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Consumer& c)
+ {
+ // @@@ (JP) May need to generate this for the eventtype's ancestors
+ // as well (the spec is vague on this point). If so, we need the
+ // CIDL compiler to support valuetype/eventtype inheritance.
+ os << "virtual void" << endl
+ << "push_" << c.name () << " (" << endl;
+
+ Traversal::ConsumerData::belongs (c, belongs_);
+
+ os << " *ev" << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_SNGL] << ";" << endl;
+ }
+
+ private:
+ EnclosingTypeNameEmitter enclosing_type_name_emitter_;
+ SimpleTypeNameEmitter simple_type_name_emitter_;
+ TypeNameEmitter type_name_emitter_;
+ Traversal::Belongs enclosing_belongs_;
+ Traversal::Belongs simple_belongs_;
+ Traversal::Belongs belongs_;
+ };
+
+ struct ComponentExecImplEmitter : Traversal::Component, EmitterBase
+ {
+ ComponentExecImplEmitter (Context& c, ComponentExecutor& exec)
+ : EmitterBase (c),
+ exec_ (exec)
+ {
+ }
+
+ virtual void
+ pre (Type& t)
+ {
+ // Generate the facet executor class(es) first.
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits component_inherits;
+ component_inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+ component_emitter.edge_traverser (component_inherits);
+
+ Traversal::Provider provider;
+ defines.node_traverser (provider);
+
+ Traversal::Belongs belongs;
+ provider.edge_traverser (belongs);
+
+ FacetEmitter facet_emitter (ctx);
+ belongs.node_traverser (facet_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << "class " << ctx.export_macro () << " "
+ << t.name () << "_exec_i" << endl
+ << ": public virtual " << exec_.name () << "," << endl
+ << "public virtual TAO_Local_RefCounted_Object" << endl
+ << "{"
+ << "public:" << endl
+ << t.name () << "_exec_i (void);"
+ << "virtual ~" << t.name () << "_exec_i (void);" << endl;
+
+ os << "// Supported or inherited operations." << endl << endl;
+
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits component_inherits;
+ component_inherits.node_traverser (component_emitter);
+
+ Traversal::Supports supports_;
+ component_emitter.edge_traverser (component_inherits);
+ component_emitter.edge_traverser (supports_);
+ InterfaceEmitter interface_emitter (ctx);
+ supports_.node_traverser (interface_emitter);
+
+ Traversal::Defines defines;
+ Traversal::Inherits interface_inherits;
+ interface_emitter.edge_traverser (defines);
+ interface_emitter.edge_traverser (interface_inherits);
+
+ AttributeEmitter attribute_emitter (ctx);
+ ReadOnlyAttributeEmitter read_only_attribute_emitter (ctx);
+ defines.node_traverser (attribute_emitter);
+ defines.node_traverser (read_only_attribute_emitter);
+
+ OperationEmitter operation_emitter (ctx);
+ defines.node_traverser (operation_emitter);
+ interface_inherits.node_traverser (interface_emitter);
+
+ Traversal::Receives receives;
+ Traversal::Belongs returns;
+ Traversal::Raises raises;
+ operation_emitter.edge_traverser (receives);
+ operation_emitter.edge_traverser (returns);
+ operation_emitter.edge_traverser (raises);
+
+ ParameterEmitter<Traversal::InParameter> in_param (os);
+ ParameterEmitter<Traversal::InOutParameter> inout_param (os);
+ ParameterEmitter<Traversal::OutParameter> out_param (os);
+ receives.node_traverser (in_param);
+ receives.node_traverser (inout_param);
+ receives.node_traverser (out_param);
+
+ ReturnTypeNameEmitter return_type_emitter (os);
+ TypeNameEmitter type_name_emitter (os);
+ returns.node_traverser (return_type_emitter);
+ raises.node_traverser (type_name_emitter);
+
+ Traversal::Belongs in_belongs, inout_belongs, out_belongs;
+ in_param.edge_traverser (in_belongs);
+ inout_param.edge_traverser (inout_belongs);
+ out_param.edge_traverser (out_belongs);
+
+ INArgTypeNameEmitter in_arg_emitter (os);
+ INOUTArgTypeNameEmitter inout_arg_emitter (os);
+ OUTArgTypeNameEmitter out_arg_emitter (os);
+ in_belongs.node_traverser (in_arg_emitter);
+ inout_belongs.node_traverser (inout_arg_emitter);
+ out_belongs.node_traverser (out_arg_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << "// Attribute operations." << endl << endl;
+
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits component_inherits;
+ component_inherits.node_traverser (component_emitter);
+
+ component_emitter.edge_traverser (component_inherits);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+
+ AttributeEmitter attribute_emitter (ctx);
+ ReadOnlyAttributeEmitter read_only_attribute_emitter (ctx);
+ defines.node_traverser (attribute_emitter);
+ defines.node_traverser (read_only_attribute_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << "// Port operations." << endl << endl;
+
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits component_inherits;
+ component_inherits.node_traverser (component_emitter);
+
+ component_emitter.edge_traverser (component_inherits);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+
+ ExecPortsEmitter exec_ports_emitter (ctx);
+ defines.node_traverser (exec_ports_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << "// Operations from Components::SessionComponent" << endl << endl;
+
+ os << "virtual void" << endl
+ << "set_session_context (" << endl
+ << STRS[COMP_SC] << "_ptr ctx" << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_CE] << "));" << endl;
+
+ os << "virtual void" << endl
+ << "ciao_preactivate (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_CE] << "));" << endl;
+
+ os << "virtual void" << endl
+ << "ciao_postactivate (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_CE] << "));" << endl;
+
+ os << "virtual void" << endl
+ << "ccm_activate (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_CE] << "));" << endl;
+
+ os << "virtual void" << endl
+ << "ccm_passivate (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_CE] << "));" << endl;
+
+ os << "virtual void" << endl
+ << "ccm_remove (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_CE] << "));" << endl;
+ }
+
+ virtual void
+ post (Type& t)
+ {
+ os << "protected:" << endl
+ << "CIAO_GLUE"
+ << regex::perl_s (t.scoped_name ().scope_name ().str (),
+ "/::/_/")
+ << "::" << t.name () << "_Context *context_;" << endl
+ << "};";
+ }
+
+ private:
+ ComponentExecutor& exec_;
+ };
+
+ struct ComponentExecutorEmitter : Traversal::ComponentExecutor, EmitterBase
+ {
+ ComponentExecutorEmitter (Context& c)
+ : EmitterBase (c)
+ {
+ }
+
+ virtual void
+ implements (Type& i)
+ {
+ Traversal::ComponentExecutor component_executor;
+
+ Traversal::Implements implements;
+ component_executor.edge_traverser (implements);
+
+ ComponentExecImplEmitter component_exec_impl_emitter (ctx, i);
+ implements.node_traverser (component_exec_impl_emitter);
+
+ component_executor.traverse (i);
+ }
+ };
+
+ // HomeFactory and HomeFinder are tied to Operation in
+ // the front end. Since we want to treat them differently
+ // than regular operations in a home (we want to generate
+ // base class factory operations returning the base component,
+ // for example), we use this class for regular home operations
+ // that overrides HomeFactory and HomeFinder traversals
+ // to do nothing.
+ struct HomeOperationEmitter : OperationEmitter,
+ Traversal::HomeFactory,
+ Traversal::HomeFinder
+ {
+ HomeOperationEmitter (Context& c)
+ : OperationEmitter (c)
+ {}
+
+ virtual void
+ traverse (SemanticGraph::HomeFactory&)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::HomeFinder&)
+ {
+ }
+ };
+
+ struct FactoryOperationEmitter : Traversal::HomeFactory,
+ Traversal::Home,
+ EmitterBase
+ {
+ FactoryOperationEmitter (Context& c)
+ : EmitterBase (c)
+ {}
+
+ virtual void
+ pre (SemanticGraph::HomeFactory&)
+ {
+ os << "virtual ";
+ }
+
+ virtual void
+ returns (SemanticGraph::HomeFactory&)
+ {
+ os << STRS[COMP_EC] << "_ptr" << endl;
+ }
+
+ virtual void
+ name (SemanticGraph::HomeFactory& hf)
+ {
+ os << hf.name ();
+ }
+
+ virtual void
+ receives_none (SemanticGraph::HomeFactory&)
+ {
+ os << " (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl;
+ }
+
+ virtual void
+ receives_pre (SemanticGraph::HomeFactory&)
+ {
+ os << " (" << endl;
+ }
+
+ virtual void
+ receives_post (SemanticGraph::HomeFactory&)
+ {
+ os << endl << STRS[ENV_HDR] << ")" << endl;
+ }
+
+ virtual void
+ raises_none (SemanticGraph::HomeFactory&)
+ {
+ os << STRS[EXCP_SNGL];
+ }
+
+ virtual void
+ raises_pre (SemanticGraph::HomeFactory&)
+ {
+ os << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl;
+ }
+
+ virtual void
+ raises_post (SemanticGraph::HomeFactory&)
+ {
+ os << "))";
+ }
+
+ virtual void
+ post (SemanticGraph::HomeFactory&)
+ {
+ os << ";" << endl;
+ }
+
+ virtual void
+ comma (SemanticGraph::HomeFactory&)
+ {
+ os << "," << endl;
+ }
+ };
+
+ struct FinderOperationEmitter : Traversal::HomeFinder,
+ EmitterBase
+ {
+ FinderOperationEmitter (Context& c)
+ : EmitterBase (c)
+ {}
+
+ virtual void
+ pre (SemanticGraph::HomeFinder&)
+ {
+ os << "virtual ";
+ }
+
+ virtual void
+ returns (SemanticGraph::HomeFinder&)
+ {
+ os << STRS[COMP_EC] << "_ptr" << endl;
+ }
+
+ virtual void
+ name (SemanticGraph::HomeFinder& t)
+ {
+ os << t.name ();
+ }
+
+ virtual void
+ receives_none (SemanticGraph::HomeFinder&)
+ {
+ os << " (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl;
+ }
+
+ virtual void
+ receives_pre (SemanticGraph::HomeFinder&)
+ {
+ os << " (" << endl;
+ }
+
+ virtual void
+ receives_post (SemanticGraph::HomeFinder&)
+ {
+ os << endl << STRS[ENV_HDR] << ")" << endl;
+ }
+
+ virtual void
+ raises_none (SemanticGraph::HomeFinder&)
+ {
+ os << STRS[EXCP_SNGL];
+ }
+
+ virtual void
+ raises_pre (SemanticGraph::HomeFinder&)
+ {
+ os << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl;
+ }
+
+ virtual void
+ raises_post (SemanticGraph::HomeFinder&)
+ {
+ os << "))";
+ }
+
+ virtual void
+ post (SemanticGraph::HomeFinder&)
+ {
+ os << ";" << endl << endl;
+ }
+
+ virtual void
+ comma (SemanticGraph::HomeFinder&)
+ {
+ os << "," << endl;
+ }
+ };
+
+ struct HomeExecImplEmitter : Traversal::Home, EmitterBase
+ {
+ HomeExecImplEmitter (Context& c, HomeExecutor& exec)
+ : EmitterBase (c),
+ exec_ (exec)
+ {
+ }
+
+ virtual void
+ pre (Type& t)
+ {
+ os << "class " << ctx.export_macro () << " "
+ << t.name () << "_exec_i" << endl
+ << ": public virtual " << exec_.name () << "," << endl
+ << "public virtual TAO_Local_RefCounted_Object" << endl
+ << "{"
+ << "public:" << endl
+ << t.name () << "_exec_i (void);"
+ << "virtual ~" << t.name () << "_exec_i (void);" << endl;
+
+ os << "// Supported or inherited operations." << endl << endl;
+
+ {
+ Traversal::Home home_emitter;
+
+ Traversal::Inherits home_inherits;
+ home_inherits.node_traverser (home_emitter);
+
+ Traversal::Supports supports_;
+ home_emitter.edge_traverser (home_inherits);
+ home_emitter.edge_traverser (supports_);
+ InterfaceEmitter interface_emitter (ctx);
+ supports_.node_traverser (interface_emitter);
+
+ Traversal::Defines defines;
+ Traversal::Inherits interface_inherits;
+ interface_emitter.edge_traverser (defines);
+ interface_emitter.edge_traverser (interface_inherits);
+
+ AttributeEmitter attribute_emitter (ctx);
+ ReadOnlyAttributeEmitter read_only_attribute_emitter (ctx);
+ defines.node_traverser (attribute_emitter);
+ defines.node_traverser (read_only_attribute_emitter);
+
+ OperationEmitter operation_emitter (ctx);
+ defines.node_traverser (operation_emitter);
+ interface_inherits.node_traverser (interface_emitter);
+
+ Traversal::Receives receives;
+ Traversal::Belongs returns;
+ Traversal::Raises raises;
+ operation_emitter.edge_traverser (receives);
+ operation_emitter.edge_traverser (returns);
+ operation_emitter.edge_traverser (raises);
+
+ ParameterEmitter<Traversal::InParameter> in_param (os);
+ ParameterEmitter<Traversal::InOutParameter> inout_param (os);
+ ParameterEmitter<Traversal::OutParameter> out_param (os);
+ receives.node_traverser (in_param);
+ receives.node_traverser (inout_param);
+ receives.node_traverser (out_param);
+
+ ReturnTypeNameEmitter return_type_emitter (os);
+ TypeNameEmitter type_name_emitter (os);
+ returns.node_traverser (return_type_emitter);
+ raises.node_traverser (type_name_emitter);
+
+ Traversal::Belongs in_belongs, inout_belongs, out_belongs;
+ in_param.edge_traverser (in_belongs);
+ inout_param.edge_traverser (inout_belongs);
+ out_param.edge_traverser (out_belongs);
+
+ INArgTypeNameEmitter in_arg_emitter (os);
+ INOUTArgTypeNameEmitter inout_arg_emitter (os);
+ OUTArgTypeNameEmitter out_arg_emitter (os);
+ in_belongs.node_traverser (in_arg_emitter);
+ inout_belongs.node_traverser (inout_arg_emitter);
+ out_belongs.node_traverser (out_arg_emitter);
+
+ home_emitter.traverse (t);
+ }
+
+ os << "// Home operations." << endl << endl;
+
+ {
+ Traversal::Home home_emitter;
+
+ Traversal::Inherits home_inherits;
+ home_inherits.node_traverser (home_emitter);
+
+ Traversal::Defines defines;
+ home_emitter.edge_traverser (defines);
+ home_emitter.edge_traverser (home_inherits);
+
+ HomeOperationEmitter home_operation_emitter (ctx);
+ defines.node_traverser (home_operation_emitter);
+
+ Traversal::Receives receives;
+ Traversal::Belongs returns;
+ Traversal::Raises raises;
+ home_operation_emitter.edge_traverser (receives);
+ home_operation_emitter.edge_traverser (returns);
+ home_operation_emitter.edge_traverser (raises);
+
+ ParameterEmitter<Traversal::InParameter> in_param (os);
+ ParameterEmitter<Traversal::InOutParameter> inout_param (os);
+ ParameterEmitter<Traversal::OutParameter> out_param (os);
+ receives.node_traverser (in_param);
+ receives.node_traverser (inout_param);
+ receives.node_traverser (out_param);
+
+ ReturnTypeNameEmitter return_type_emitter (os);
+ TypeNameEmitter type_name_emitter (os);
+ returns.node_traverser (return_type_emitter);
+ raises.node_traverser (type_name_emitter);
+
+ Traversal::Belongs in_belongs, inout_belongs, out_belongs;
+ in_param.edge_traverser (in_belongs);
+ inout_param.edge_traverser (inout_belongs);
+ out_param.edge_traverser (out_belongs);
+
+ INArgTypeNameEmitter in_arg_emitter (os);
+ INOUTArgTypeNameEmitter inout_arg_emitter (os);
+ OUTArgTypeNameEmitter out_arg_emitter (os);
+ in_belongs.node_traverser (in_arg_emitter);
+ inout_belongs.node_traverser (inout_arg_emitter);
+ out_belongs.node_traverser (out_arg_emitter);
+
+ home_emitter.traverse (t);
+ }
+
+ // Generate home factory operations. This is a separate traversal
+ // stack because we want to generate the factory operations
+ // of ancestors with the return type of the base component.
+ os << "// Factory and finder operations." << endl << endl;
+
+ {
+ Traversal::Home home_emitter;
+
+ Traversal::Inherits inherits;
+ home_emitter.edge_traverser (inherits);
+ inherits.node_traverser (home_emitter);
+
+ Traversal::Defines defines;
+ home_emitter.edge_traverser (defines);
+
+ FactoryOperationEmitter factory_operation_emitter (ctx);
+ FinderOperationEmitter finder_operation_emitter (ctx);
+ defines.node_traverser (factory_operation_emitter);
+ defines.node_traverser (finder_operation_emitter);
+
+ Traversal::Receives receives;
+ Traversal::Belongs returns;
+ Traversal::Raises raises;
+ factory_operation_emitter.edge_traverser (receives);
+ factory_operation_emitter.edge_traverser (returns);
+ factory_operation_emitter.edge_traverser (raises);
+ finder_operation_emitter.edge_traverser (receives);
+ finder_operation_emitter.edge_traverser (returns);
+ finder_operation_emitter.edge_traverser (raises);
+
+ ParameterEmitter<Traversal::InParameter> in_param (os);
+ ParameterEmitter<Traversal::InOutParameter> inout_param (os);
+ ParameterEmitter<Traversal::OutParameter> out_param (os);
+ receives.node_traverser (in_param);
+ receives.node_traverser (inout_param);
+ receives.node_traverser (out_param);
+
+ ReturnTypeNameEmitter return_type_emitter (os);
+ TypeNameEmitter type_name_emitter (os);
+ returns.node_traverser (return_type_emitter);
+ raises.node_traverser (type_name_emitter);
+
+ Traversal::Belongs in_belongs, inout_belongs, out_belongs;
+ in_param.edge_traverser (in_belongs);
+ inout_param.edge_traverser (inout_belongs);
+ out_param.edge_traverser (out_belongs);
+
+ INArgTypeNameEmitter in_arg_emitter (os);
+ INOUTArgTypeNameEmitter inout_arg_emitter (os);
+ OUTArgTypeNameEmitter out_arg_emitter (os);
+ in_belongs.node_traverser (in_arg_emitter);
+ inout_belongs.node_traverser (inout_arg_emitter);
+ out_belongs.node_traverser (out_arg_emitter);
+
+ home_emitter.traverse (t);
+ }
+
+ os << "// Attribute operations." << endl << endl;
+
+ {
+ Traversal::Home home_emitter;
+
+ Traversal::Inherits home_inherits;
+ home_inherits.node_traverser (home_emitter);
+
+ home_emitter.edge_traverser (home_inherits);
+
+ Traversal::Defines defines;
+ home_emitter.edge_traverser (defines);
+
+ AttributeEmitter attribute_emitter (ctx);
+ ReadOnlyAttributeEmitter read_only_attribute_emitter (ctx);
+ defines.node_traverser (attribute_emitter);
+ defines.node_traverser (read_only_attribute_emitter);
+
+ home_emitter.traverse (t);
+ }
+
+ os << "// Implicit operations." << endl << endl
+ << "virtual " << STRS[COMP_EC] << "_ptr" << endl
+ << "create (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_CE] << "));" << endl;
+ }
+
+ virtual void
+ post (Type& t)
+ {
+ os << "};";
+
+ os << "extern \"C\" " << ctx.export_macro ()
+ << " ::Components::HomeExecutorBase_ptr" << endl
+ << "create" << t.name () << "_Impl (void);" << endl;
+ }
+
+ private:
+ HomeExecutor& exec_;
+ };
+
+ struct HomeExecutorEmitter : Traversal::HomeExecutor, EmitterBase
+ {
+ HomeExecutorEmitter (Context& c)
+ : EmitterBase (c)
+ {
+ }
+
+ virtual void
+ implements (Type& i)
+ {
+ Traversal::HomeExecutor home_executor;
+
+ Traversal::Implements implements;
+ home_executor.edge_traverser (implements);
+
+ HomeExecImplEmitter home_exec_impl_emitter (ctx, i);
+ implements.node_traverser (home_exec_impl_emitter);
+
+ home_executor.traverse (i);
+ }
+ };
+}
+
+ExecImplHeaderEmitter::ExecImplHeaderEmitter (std::ostream& os_,
+ CommandLine const& cl,
+ string export_macro,
+ fs::path const& file)
+ : os (os_),
+ cl_ (cl),
+ export_macro_ (export_macro),
+ file_ (file)
+{}
+
+void
+ExecImplHeaderEmitter::pre (TranslationUnit&)
+{
+ os << COPYRIGHT;
+
+ string file_name ("");
+
+ if (!file_.empty ())
+ {
+ file_name = file_.leaf ();
+ }
+
+ string uc_file_name = file_name;
+
+ std::transform (uc_file_name.begin (),
+ uc_file_name.end (),
+ uc_file_name.begin (),
+ upcase);
+
+ string uc_file_suffix = cl_.get_value ("exec-hdr-file-suffix",
+ "_exec.h");
+
+ std::transform (uc_file_suffix.begin (),
+ uc_file_suffix.end (),
+ uc_file_suffix.begin (),
+ upcase);
+
+ string guard =
+ "CIAO_"
+ + regex::perl_s (uc_file_name,
+ "/(\\.(IDL|CIDL|CDL))?$/" + uc_file_suffix + "/");
+
+ // Replace any remaining '.' with '_'.
+ guard = regex::perl_s (guard, "/\\./_/");
+
+ os << "#ifndef " << guard << endl
+ << "#define " << guard << endl << endl
+ << "#include /**/ \"ace/pre.h\"" << endl << endl;
+
+ string file_suffix = cl_.get_value ("svnt-hdr-file-suffix",
+ "_svnt.h");
+
+ string svnt_file_name = regex::perl_s (file_name,
+ "/(\\.(idl|cidl|cdl))?$/"
+ + file_suffix
+ + "/");
+
+ os << "#include \"" << svnt_file_name << "\"" << endl << endl;
+
+ os << "#if !defined (ACE_LACKS_PRAGMA_ONCE)" << endl
+ << "# pragma once" << endl
+ << "#endif /* ACE_LACKS_PRAGMA_ONCE */" << endl << endl;
+
+ string default_export_include =
+ regex::perl_s (file_name,
+ "/(\\.(idl|cidl|cdl))?$/_exec_export.h/");
+
+ string export_include = cl_.get_value ("exec-export-include",
+ default_export_include);
+
+ if (!export_include.empty ())
+ {
+ os << "#include \"" << export_include << "\"" << endl;
+ }
+
+ os << "#include \"tao/LocalObject.h\"" << endl;
+}
+
+void
+ExecImplHeaderEmitter::generate (TranslationUnit& u)
+{
+ pre (u);
+
+ Context c (os, export_macro_);
+
+ Traversal::TranslationUnit unit;
+
+ // Layer 1
+ //
+ Traversal::ContainsPrincipal contains_principal;
+ unit.edge_traverser (contains_principal);
+
+ //--
+ Traversal::TranslationRegion principal_region;
+ contains_principal.node_traverser (principal_region);
+
+ // Layer 2
+ //
+ Traversal::ContainsRoot contains_root;
+ principal_region.edge_traverser (contains_root);
+
+ //--
+ Traversal::Root root;
+ contains_root.node_traverser (root);
+
+ // Layer 3
+ //
+ Traversal::Defines defines;
+ root.edge_traverser (defines);
+
+ //--
+ ModuleEmitter module (c);
+ CompositionEmitter composition (c);
+ defines.node_traverser (module);
+ defines.node_traverser (composition);
+
+ // Layer 4
+ //
+ composition.edge_traverser (defines);
+ module.edge_traverser (defines);
+
+ //--
+ ComponentExecutorEmitter component_executor (c);
+ HomeExecutorEmitter home_executor (c);
+ defines.node_traverser (component_executor);
+ defines.node_traverser (home_executor);
+
+ // Layer 5
+ //
+ Traversal::Implements implements;
+ component_executor.edge_traverser (implements);
+ home_executor.edge_traverser (implements);
+
+ unit.traverse (u);
+
+ post (u);
+}
+
+void
+ExecImplHeaderEmitter::post (TranslationUnit&)
+{
+ if (file_.empty ()) return;
+
+ string uc_file_name = file_.leaf ();
+
+ std::transform (uc_file_name.begin (),
+ uc_file_name.end (),
+ uc_file_name.begin (),
+ upcase);
+
+ string uc_file_suffix = cl_.get_value ("exec-hdr-file-suffix",
+ "_exec.h");
+
+ std::transform (uc_file_suffix.begin (),
+ uc_file_suffix.end (),
+ uc_file_suffix.begin (),
+ upcase);
+
+ string guard =
+ "CIAO_"
+ + regex::perl_s (uc_file_name,
+ "/(\\.(IDL|CIDL))?$/" + uc_file_suffix + "/");
+
+ guard = regex::perl_s (guard, "/\\./_/");
+
+ os << "#include /**/ \"ace/post.h\"" << endl << endl
+ << "#endif /* " << guard << " */"
+ << endl << endl;
+}
+
diff --git a/TAO/CIAO/CIDLC/ExecImplSourceGenerator.cpp b/TAO/CIAO/CIDLC/ExecImplSourceGenerator.cpp
new file mode 100644
index 00000000000..85b7f241e1a
--- /dev/null
+++ b/TAO/CIAO/CIDLC/ExecImplSourceGenerator.cpp
@@ -0,0 +1,1370 @@
+// file : CIDLC/ExecImplSourceGenerator.cpp
+// author : Jeff Parsons <j.parsons@vanderbilt.edu>
+// cvs-id : $Id$
+
+#include "ExecImplSourceGenerator.hpp"
+#include "Literals.hpp"
+#include "TypeNameEmitter.hpp"
+
+#include "CCF/CodeGenerationKit/Regex.hpp"
+
+#include <ostream>
+
+using namespace CCF::CIDL;
+using namespace CCF::CIDL::SemanticGraph;
+using namespace StringLiterals;
+
+namespace
+{
+ class Context
+ {
+ public:
+ Context (std::ostream& os,
+ string export_macro)
+ : os_ (os),
+ export_macro_ (export_macro)
+ {
+ }
+
+ std::ostream&
+ os ()
+ {
+ return os_;
+ }
+
+ string
+ export_macro ()
+ {
+ return export_macro_;
+ }
+
+ private:
+ std::ostream& os_;
+ string export_macro_;
+ };
+
+ class EmitterBase
+ {
+ public:
+ EmitterBase (Context& c)
+ : ctx (c),
+ os (ctx.os ())
+ {
+ }
+
+ protected:
+ Context& ctx;
+ std::ostream& os;
+ };
+
+ struct ModuleEmitter : Traversal::Module, EmitterBase
+ {
+ ModuleEmitter (Context& c)
+ : EmitterBase (c)
+ {
+ }
+
+ virtual void
+ pre (Type& t)
+ {
+ os << endl
+ << "namespace " << t.name () << "{";
+ }
+
+ virtual void
+ post (Type&)
+ {
+ os << "}";
+ }
+ };
+
+ struct CompositionEmitter : Traversal::Composition, EmitterBase
+ {
+ CompositionEmitter (Context& c)
+ : EmitterBase (c)
+ {
+ }
+
+ virtual void
+ pre (Type& t)
+ {
+ os << endl
+ << "namespace " << t.name () << "{";
+ }
+
+ virtual void
+ post (Type&)
+ {
+ os << "}";
+ }
+ };
+
+ template <typename T>
+ struct OperationEmitter : Traversal::Operation, EmitterBase
+ {
+ OperationEmitter (Context& c, T& scope)
+ : EmitterBase (c),
+ scope_ (scope)
+ {}
+
+ virtual void
+ name (Type& o)
+ {
+ os << endl
+ << scope_.name () << "_exec_i::" << o.name ();
+ }
+
+ virtual void
+ receives_pre (Type&)
+ {
+ os << " (" << endl;
+ }
+
+ virtual void
+ receives_none (Type&)
+ {
+ os << " (" << endl
+ << STRS[ENV_SNGL_SRC_NOTUSED] << ")" << endl;
+ }
+
+ virtual void
+ receives_post (Type&)
+ {
+ os << endl << STRS[ENV_SRC_NOTUSED] << ")" << endl;
+ }
+
+ virtual void
+ raises_pre (Type&)
+ {
+ os << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl;
+ }
+
+ virtual void
+ raises_none (Type&)
+ {
+ os << STRS[EXCP_SNGL];
+ }
+
+ virtual void
+ raises_post (Type&)
+ {
+ os << "))";
+ }
+
+ virtual void
+ post (Type& o)
+ {
+ os << "{"
+ << STRS[YCH] << endl;
+
+ Traversal::Operation operation_emitter;
+
+ Traversal::Belongs returns;
+ operation_emitter.edge_traverser (returns);
+
+ NullReturnEmitter return_emitter (os);
+ returns.node_traverser (return_emitter);
+
+ operation_emitter.traverse (o);
+
+ os << "}";
+ }
+
+ virtual void
+ comma (Type&)
+ {
+ os << "," << endl;
+ }
+
+ protected:
+ T& scope_;
+ };
+
+ // For generating parameter names.
+ template <typename T>
+ struct ParameterEmitter : T
+ {
+ ParameterEmitter (std::ostream& os_)
+ : os (os_)
+ {}
+
+ virtual void
+ name (typename T::Type& p)
+ {
+ os << " /* " << p.name () << " */";
+ }
+
+ private:
+ std::ostream& os;
+ };
+
+ // Generic scoped typename emitter used by various other emitters.
+ struct TypeNameEmitter : Traversal::Type
+ {
+ TypeNameEmitter (std::ostream& os_)
+ : os (os_)
+ {}
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ os << t.scoped_name ();
+ }
+
+ private:
+ std::ostream& os;
+ };
+
+ // Generic local typename emitter used by various other emitters.
+ struct SimpleTypeNameEmitter : Traversal::Type
+ {
+ SimpleTypeNameEmitter (std::ostream& os_)
+ : os (os_)
+ {}
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ os << t.name ();
+ }
+
+ private:
+ std::ostream& os;
+ };
+
+ // Generate name of type's enclosing scope.
+ struct EnclosingTypeNameEmitter : Traversal::Type
+ {
+ EnclosingTypeNameEmitter (std::ostream& os_)
+ : os (os_)
+ {}
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ os << t.scoped_name ().scope_name ();
+ }
+
+ private:
+ std::ostream& os;
+ };
+
+ // Emits typename minus the leading double colon.
+ struct StrippedTypeNameEmitter : Traversal::Type
+ {
+ StrippedTypeNameEmitter (std::ostream& os_)
+ : os (os_)
+ {}
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ ScopedName scoped (t.scoped_name ());
+ os << Name (scoped.begin () + 1, scoped.end ());
+ }
+
+ private:
+ std::ostream& os;
+ };
+
+ // Generates operations associated with attributes.
+ // @@@ (JP) Need to support exceptions.
+ template <typename T>
+ struct AttributeEmitter : Traversal::ReadWriteAttribute,
+ EmitterBase
+ {
+ AttributeEmitter (Context& c, T& scope)
+ : EmitterBase (c),
+ scope_ (scope),
+ write_type_name_emitter_ (c.os ()),
+ read_type_name_emitter_ (c.os ()),
+ return_emitter_ (c.os ())
+ {
+ write_belongs_.node_traverser (write_type_name_emitter_);
+ read_belongs_.node_traverser (read_type_name_emitter_);
+ return_belongs_.node_traverser (return_emitter_);
+ }
+
+ virtual void traverse (SemanticGraph::ReadWriteAttribute& a)
+ {
+ Traversal::ReadWriteAttribute::belongs (a, read_belongs_);
+
+ os << endl
+ << scope_.name () << "_exec_i::" << a.name ()
+ << " (" << endl
+ << STRS[ENV_SNGL_SRC_NOTUSED] << ")" << endl
+ << STRS[EXCP_SNGL] << endl
+ << "{"
+ << STRS[YCH] << endl;
+
+ Traversal::ReadWriteAttribute::belongs (a, return_belongs_);
+
+ os << "}";
+
+ os << "void" << endl
+ << scope_.name () << "_exec_i::" << a.name ()
+ << " (" << endl;
+
+ Traversal::ReadWriteAttribute::belongs (a, write_belongs_);
+
+ os << " /* " << a.name () << " */" << endl
+ << STRS[ENV_SRC_NOTUSED] << ")" << endl
+ << STRS[EXCP_SNGL] << endl
+ << "{"
+ << STRS[YCH]
+ << "}";
+ }
+
+ protected:
+ T& scope_;
+
+ private:
+ INArgTypeNameEmitter write_type_name_emitter_;
+ ReturnTypeNameEmitter read_type_name_emitter_;
+ NullReturnEmitter return_emitter_;
+ Traversal::Belongs write_belongs_;
+ Traversal::Belongs read_belongs_;
+ Traversal::Belongs return_belongs_;
+ };
+
+ // Generates operations associated with readonly attributes.
+ // @@@ (JP) Need to support exceptions.
+ template <typename T>
+ struct ReadOnlyAttributeEmitter : Traversal::ReadAttribute,
+ EmitterBase
+ {
+ ReadOnlyAttributeEmitter (Context& c, T& scope)
+ : EmitterBase (c),
+ scope_ (scope),
+ read_type_name_emitter_ (c.os ()),
+ return_emitter_ (c.os ())
+ {
+ read_belongs_.node_traverser (read_type_name_emitter_);
+ return_belongs_.node_traverser (return_emitter_);
+ }
+
+ virtual void traverse (SemanticGraph::ReadAttribute& a)
+ {
+ Traversal::ReadAttribute::belongs (a, read_belongs_);
+
+ os << endl
+ << scope_.name () << "_exec_i::" << a.name ()
+ << " (" << endl
+ << STRS[ENV_SNGL_SRC_NOTUSED] << ")" << endl
+ << STRS[EXCP_SNGL] << endl
+ << "{"
+ << STRS[YCH] << endl;
+
+ Traversal::ReadAttribute::belongs (a, return_belongs_);
+
+ os << "}";
+ }
+
+ protected:
+ T& scope_;
+
+ private:
+ ReturnTypeNameEmitter read_type_name_emitter_;
+ NullReturnEmitter return_emitter_;
+ Traversal::Belongs read_belongs_;
+ Traversal::Belongs return_belongs_;
+ };
+
+ struct InterfaceEmitter : Traversal::UnconstrainedInterface,
+ EmitterBase
+ {
+ InterfaceEmitter (Context& c)
+ : EmitterBase (c)
+ {}
+
+ bool
+ add (UnconstrainedInterface& i)
+ {
+ return interfaces_.insert (&i).second;
+ }
+
+ virtual void
+ traverse (UnconstrainedInterface& i)
+ {
+ if (add (i))
+ {
+ Traversal::UnconstrainedInterface::traverse (i);
+ }
+ }
+
+ private:
+ std::set<UnconstrainedInterface*> interfaces_;
+ };
+
+ struct FacetEmitter : Traversal::UnconstrainedInterface,
+ EmitterBase
+ {
+ FacetEmitter (Context& c)
+ : EmitterBase (c)
+ {
+ }
+
+ virtual void
+ traverse (UnconstrainedInterface& i)
+ {
+ if (i.context ().count ("facet_impl_src_gen")) return;
+
+ os << STRS[SEP] << endl
+ << "// Facet Executor Implementation Class: "
+ << i.name () << "_exec_i" << endl
+ << STRS[SEP] << endl << endl;
+
+ os << i.name () << "_exec_i::"
+ << i.name () << "_exec_i (void)" << endl
+ << "{"
+ << "}"
+ << i.name () << "_exec_i::~"
+ << i.name () << "_exec_i (void)" << endl
+ << "{"
+ << "}"
+ << "// Operations from " << i.scoped_name () << endl << endl;
+
+ {
+ InterfaceEmitter interface_emitter (ctx);
+
+ Traversal::Defines defines_;
+ Traversal::Inherits inherits_;
+ interface_emitter.edge_traverser (defines_);
+ interface_emitter.edge_traverser (inherits_);
+
+ AttributeEmitter<UnconstrainedInterface> attribute_emitter (ctx, i);
+ ReadOnlyAttributeEmitter<UnconstrainedInterface> read_only_attribute_emitter (ctx, i);
+ defines_.node_traverser (attribute_emitter);
+ defines_.node_traverser (read_only_attribute_emitter);
+
+ OperationEmitter<UnconstrainedInterface> operation_emitter (ctx, i);
+ defines_.node_traverser (operation_emitter);
+ inherits_.node_traverser (interface_emitter);
+
+ Traversal::Receives receives;
+ Traversal::Belongs returns;
+ Traversal::Raises raises;
+ operation_emitter.edge_traverser (receives);
+ operation_emitter.edge_traverser (returns);
+ operation_emitter.edge_traverser (raises);
+
+ ParameterEmitter<Traversal::InParameter> in_param (os);
+ ParameterEmitter<Traversal::InOutParameter> inout_param (os);
+ ParameterEmitter<Traversal::OutParameter> out_param (os);
+ receives.node_traverser (in_param);
+ receives.node_traverser (inout_param);
+ receives.node_traverser (out_param);
+
+ ReturnTypeNameEmitter return_type_emitter (os);
+ TypeNameEmitter type_name_emitter (os);
+ returns.node_traverser (return_type_emitter);
+ raises.node_traverser (type_name_emitter);
+
+ Traversal::Belongs in_belongs, inout_belongs, out_belongs;
+ in_param.edge_traverser (in_belongs);
+ inout_param.edge_traverser (inout_belongs);
+ out_param.edge_traverser (out_belongs);
+
+ INArgTypeNameEmitter in_arg_emitter (os);
+ INOUTArgTypeNameEmitter inout_arg_emitter (os);
+ OUTArgTypeNameEmitter out_arg_emitter (os);
+ in_belongs.node_traverser (in_arg_emitter);
+ inout_belongs.node_traverser (inout_arg_emitter);
+ out_belongs.node_traverser (out_arg_emitter);
+
+ inherits (i, inherits_);
+ names (i, defines_);
+ }
+
+ i.context ().set ("facet_impl_src_gen", true);
+ }
+ };
+
+ struct ExecPortsEmitter : Traversal::ConsumerData,
+ Traversal::ProviderData,
+ EmitterBase
+ {
+ ExecPortsEmitter (Context& c, SemanticGraph::Component& scope)
+ : EmitterBase (c),
+ enclosing_type_name_emitter_ (c.os ()),
+ simple_type_name_emitter_ (c.os ()),
+ type_name_emitter_ (c.os ()),
+ scope_ (scope)
+ {
+ enclosing_belongs_.node_traverser (enclosing_type_name_emitter_);
+ simple_belongs_.node_traverser (simple_type_name_emitter_);
+ belongs_.node_traverser (type_name_emitter_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Provider& p)
+ {
+ Traversal::ProviderData::belongs (p, enclosing_belongs_);
+
+ os << "::CCM_";
+
+ Traversal::ProviderData::belongs (p, simple_belongs_);
+
+ os << "_ptr" << endl
+ << scope_.name () << "_exec_i::get_"
+ << p.name () << " (" << endl
+ << STRS[ENV_SNGL_SRC_NOTUSED] << ")" << endl
+ << STRS[EXCP_SNGL] << endl
+ << "{"
+ << STRS[YCH] << endl
+ << "return ";
+
+ Traversal::ProviderData::belongs (p, enclosing_belongs_);
+
+ os << "::CCM_";
+
+ Traversal::ProviderData::belongs (p, simple_belongs_);
+
+ os << "::_nil ();" << endl
+ << "}";
+ }
+
+ virtual void
+ traverse (SemanticGraph::Consumer& c)
+ {
+ // @@@ (JP) May need to generate this for the eventtype's ancestors
+ // as well (the spec is vague on this point). If so, we need the
+ // CIDL compiler to support valuetype/eventtype inheritance.
+ os << "void" << endl
+ << scope_.name () << "_exec_i::push_"
+ << c.name () << " (" << endl;
+
+ Traversal::ConsumerData::belongs (c, belongs_);
+
+ os << " * /* ev */" << endl
+ << STRS[ENV_SRC_NOTUSED] << ")" << endl
+ << STRS[EXCP_SNGL] << endl
+ << "{"
+ << STRS[YCH] << endl
+ << "}";
+ }
+
+ private:
+ EnclosingTypeNameEmitter enclosing_type_name_emitter_;
+ SimpleTypeNameEmitter simple_type_name_emitter_;
+ TypeNameEmitter type_name_emitter_;
+ Traversal::Belongs enclosing_belongs_;
+ Traversal::Belongs simple_belongs_;
+ Traversal::Belongs belongs_;
+ SemanticGraph::Component& scope_;
+ };
+
+ struct ComponentExecImplEmitter : Traversal::Component, EmitterBase
+ {
+ ComponentExecImplEmitter (Context& c)
+ : EmitterBase (c)
+ {
+ }
+
+ virtual void
+ pre (Type& t)
+ {
+ // Generate the facet executor class(es) first.
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits component_inherits;
+ component_inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+ component_emitter.edge_traverser (component_inherits);
+
+ Traversal::Provider provider;
+ defines.node_traverser (provider);
+
+ Traversal::Belongs belongs;
+ provider.edge_traverser (belongs);
+
+ FacetEmitter facet_emitter (ctx);
+ belongs.node_traverser (facet_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << STRS[SEP] << endl
+ << "// Component Executor Implementation Class: "
+ << t.name () << "_exec_i" << endl
+ << STRS[SEP] << endl << endl;
+
+ os << t.name () << "_exec_i::"
+ << t.name () << "_exec_i (void)" << endl
+ << "{"
+ << "}"
+ << t.name () << "_exec_i::~"
+ << t.name () << "_exec_i (void)" << endl
+ << "{"
+ << "}";
+
+ os << "// Supported or inherited operations." << endl << endl;
+
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits component_inherits;
+ component_inherits.node_traverser (component_emitter);
+
+ Traversal::Supports supports_;
+ component_emitter.edge_traverser (component_inherits);
+ component_emitter.edge_traverser (supports_);
+ InterfaceEmitter interface_emitter (ctx);
+ supports_.node_traverser (interface_emitter);
+
+ Traversal::Defines defines;
+ Traversal::Inherits interface_inherits;
+ interface_emitter.edge_traverser (defines);
+ interface_emitter.edge_traverser (interface_inherits);
+
+ AttributeEmitter<SemanticGraph::Component> attribute_emitter (ctx, t);
+ ReadOnlyAttributeEmitter<SemanticGraph::Component> read_only_attribute_emitter (ctx, t);
+ defines.node_traverser (attribute_emitter);
+ defines.node_traverser (read_only_attribute_emitter);
+
+ OperationEmitter<SemanticGraph::Component> operation_emitter (ctx, t);
+ defines.node_traverser (operation_emitter);
+ interface_inherits.node_traverser (interface_emitter);
+
+ Traversal::Receives receives;
+ Traversal::Belongs returns;
+ Traversal::Raises raises;
+ operation_emitter.edge_traverser (receives);
+ operation_emitter.edge_traverser (returns);
+ operation_emitter.edge_traverser (raises);
+
+ ParameterEmitter<Traversal::InParameter> in_param (os);
+ ParameterEmitter<Traversal::InOutParameter> inout_param (os);
+ ParameterEmitter<Traversal::OutParameter> out_param (os);
+ receives.node_traverser (in_param);
+ receives.node_traverser (inout_param);
+ receives.node_traverser (out_param);
+
+ ReturnTypeNameEmitter return_type_emitter (os);
+ TypeNameEmitter type_name_emitter (os);
+ returns.node_traverser (return_type_emitter);
+ raises.node_traverser (type_name_emitter);
+
+ Traversal::Belongs in_belongs, inout_belongs, out_belongs;
+ in_param.edge_traverser (in_belongs);
+ inout_param.edge_traverser (inout_belongs);
+ out_param.edge_traverser (out_belongs);
+
+ INArgTypeNameEmitter in_arg_emitter (os);
+ INOUTArgTypeNameEmitter inout_arg_emitter (os);
+ OUTArgTypeNameEmitter out_arg_emitter (os);
+ in_belongs.node_traverser (in_arg_emitter);
+ inout_belongs.node_traverser (inout_arg_emitter);
+ out_belongs.node_traverser (out_arg_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << "// Attribute operations." << endl << endl;
+
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits component_inherits;
+ component_inherits.node_traverser (component_emitter);
+
+ component_emitter.edge_traverser (component_inherits);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+
+ AttributeEmitter<SemanticGraph::Component> attribute_emitter (ctx, t);
+ ReadOnlyAttributeEmitter<SemanticGraph::Component> read_only_attribute_emitter (ctx, t);
+ defines.node_traverser (attribute_emitter);
+ defines.node_traverser (read_only_attribute_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << "// Port operations." << endl << endl;
+
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits component_inherits;
+ component_inherits.node_traverser (component_emitter);
+
+ component_emitter.edge_traverser (component_inherits);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+
+ ExecPortsEmitter exec_ports_emitter (ctx, t);
+ defines.node_traverser (exec_ports_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << "// Operations from Components::SessionComponent" << endl << endl;
+
+ os << "void" << endl
+ << t.name () << "_exec_i::set_session_context (" << endl
+ << STRS[COMP_SC] << "_ptr ctx" << endl
+ << STRS[ENV_SRC] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_CE] << "))" << endl
+ << "{"
+ << "this->context_ =" << endl
+ << "CIAO_GLUE"
+ << regex::perl_s (t.scoped_name ().scope_name ().str (),
+ "/::/_/")
+ << "::" << t.name () << "_Context::_narrow (" << endl
+ << "ctx" << endl
+ << STRS[ENV_ARG] <<");"
+ << "ACE_CHECK;" << endl;
+
+ os << "if (this->context_ == 0)" << endl
+ << "{"
+ << "ACE_THROW (CORBA::INTERNAL ());"
+ << "}"
+ << "}";
+
+ os << "void" << endl
+ << t.name () << "_exec_i::ciao_preactivate (" << endl
+ << STRS[ENV_SNGL_SRC_NOTUSED] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_CE] << "))" << endl
+ << "{"
+ << STRS[YCH]
+ << "}";
+
+ os << "void" << endl
+ << t.name () << "_exec_i::ciao_postactivate (" << endl
+ << STRS[ENV_SNGL_SRC_NOTUSED] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_CE] << "))" << endl
+ << "{"
+ << STRS[YCH]
+ << "}";
+
+ os << "void" << endl
+ << t.name () << "_exec_i::ccm_activate (" << endl
+ << STRS[ENV_SNGL_SRC_NOTUSED] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_CE] << "))" << endl
+ << "{"
+ << STRS[YCH]
+ << "}";
+
+ os << "void" << endl
+ << t.name () << "_exec_i::ccm_passivate (" << endl
+ << STRS[ENV_SNGL_SRC_NOTUSED] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_CE] << "))" << endl
+ << "{"
+ << STRS[YCH]
+ << "}";
+
+ os << "void" << endl
+ << t.name () << "_exec_i::ccm_remove (" << endl
+ << STRS[ENV_SNGL_SRC_NOTUSED] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_CE] << "))" << endl
+ << "{"
+ << STRS[YCH]
+ << "}";
+ }
+
+ virtual void
+ post (Type&)
+ {
+ }
+ };
+
+ // HomeFactory and HomeFinder are tied to Operation in
+ // the front end. Since we want to treat them differently
+ // than regular operations in a home (we want to generate
+ // base class factory operations returning the base component,
+ // for example), we use this class for regular home operations
+ // that overrides HomeFactory and HomeFinder traversals
+ // to do nothing.
+ struct HomeOperationEmitter : OperationEmitter<SemanticGraph::Home>,
+ Traversal::HomeFactory,
+ Traversal::HomeFinder
+ {
+ HomeOperationEmitter (Context& c, SemanticGraph::Home& scope)
+ : OperationEmitter<SemanticGraph::Home> (c, scope)
+ {}
+
+ virtual void
+ traverse (SemanticGraph::HomeFactory&)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::HomeFinder&)
+ {
+ }
+ };
+
+ struct FactoryOperationEmitter : Traversal::HomeFactory,
+ EmitterBase
+ {
+ FactoryOperationEmitter (Context& c, SemanticGraph::Home& scope)
+ : EmitterBase (c),
+ enclosing_type_name_emitter_ (c.os ()),
+ simple_type_name_emitter_ (c.os ()),
+ scope_ (scope)
+ {
+ enclosing_returns_.node_traverser (enclosing_type_name_emitter_);
+ simple_returns_.node_traverser (simple_type_name_emitter_);
+ }
+
+ virtual void
+ returns (SemanticGraph::HomeFactory&)
+ {
+ os << STRS[COMP_EC] << "_ptr" << endl;
+ }
+
+ virtual void
+ name (SemanticGraph::HomeFactory& hf)
+ {
+ os << scope_.name () << "_exec_i::" << hf.name ();
+ }
+
+ virtual void
+ receives_none (SemanticGraph::HomeFactory&)
+ {
+ os << " (" << endl
+ << STRS[ENV_SNGL_SRC_NOTUSED] << ")" << endl;
+ }
+
+ virtual void
+ receives_pre (SemanticGraph::HomeFactory&)
+ {
+ os << " (" << endl;
+ }
+
+ virtual void
+ receives_post (SemanticGraph::HomeFactory&)
+ {
+ os << endl << STRS[ENV_SRC_NOTUSED] << ")" << endl;
+ }
+
+ virtual void
+ raises_none (SemanticGraph::HomeFactory&)
+ {
+ os << STRS[EXCP_SNGL];
+ }
+
+ virtual void
+ raises_pre (SemanticGraph::HomeFactory&)
+ {
+ os << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl;
+ }
+
+ virtual void
+ raises_post (SemanticGraph::HomeFactory&)
+ {
+ os << "))";
+ }
+
+ virtual void
+ post (SemanticGraph::HomeFactory& hf)
+ {
+ os << "{"
+ << STRS[YCH] << endl
+ << "return ";
+
+ Traversal::HomeFactory::returns (hf, enclosing_returns_);
+
+ os << "::CCM_";
+
+ Traversal::HomeFactory::returns (hf, simple_returns_);
+
+ os << "::_nil ();"
+ << "}";
+ }
+
+ virtual void
+ comma (SemanticGraph::HomeFactory&)
+ {
+ os << "," << endl;
+ }
+
+ private:
+ EnclosingTypeNameEmitter enclosing_type_name_emitter_;
+ SimpleTypeNameEmitter simple_type_name_emitter_;
+ Traversal::Returns enclosing_returns_;
+ Traversal::Returns simple_returns_;
+ SemanticGraph::Home& scope_;
+ };
+
+ struct FinderOperationEmitter : Traversal::HomeFinder,
+ EmitterBase
+ {
+ FinderOperationEmitter (Context& c, SemanticGraph::Home& scope)
+ : EmitterBase (c),
+ enclosing_type_name_emitter_ (c.os ()),
+ simple_type_name_emitter_ (c.os ()),
+ scope_ (scope)
+ {
+ enclosing_returns_.node_traverser (enclosing_type_name_emitter_);
+ simple_returns_.node_traverser (simple_type_name_emitter_);
+ }
+
+ virtual void
+ returns (SemanticGraph::HomeFinder&)
+ {
+ os << STRS[COMP_EC] << "_ptr" << endl;
+ }
+
+ virtual void
+ name (SemanticGraph::HomeFinder& hf)
+ {
+ os << scope_.name () << "_exec_i::" << hf.name ();
+ }
+
+ virtual void
+ receives_none (SemanticGraph::HomeFinder&)
+ {
+ os << " (" << endl
+ << STRS[ENV_SNGL_SRC_NOTUSED] << ")" << endl;
+ }
+
+ virtual void
+ receives_pre (SemanticGraph::HomeFinder&)
+ {
+ os << " (" << endl;
+ }
+
+ virtual void
+ receives_post (SemanticGraph::HomeFinder&)
+ {
+ os << endl << STRS[ENV_SRC_NOTUSED] << ")" << endl;
+ }
+
+ virtual void
+ raises_none (SemanticGraph::HomeFinder&)
+ {
+ os << STRS[EXCP_SNGL];
+ }
+
+ virtual void
+ raises_pre (SemanticGraph::HomeFinder&)
+ {
+ os << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl;
+ }
+
+ virtual void
+ raises_post (SemanticGraph::HomeFinder&)
+ {
+ os << "))";
+ }
+
+ virtual void
+ post (SemanticGraph::HomeFinder& hf)
+ {
+ os << "{"
+ << STRS[YCH] << endl
+ << "return ";
+
+ Traversal::HomeFinder::returns (hf, enclosing_returns_);
+
+ os << "::CCM_";
+
+ Traversal::HomeFinder::returns (hf, simple_returns_);
+
+ os << "::_nil ();"
+ << "}";
+ }
+
+ virtual void
+ comma (SemanticGraph::HomeFinder&)
+ {
+ os << "," << endl;
+ }
+
+ private:
+ EnclosingTypeNameEmitter enclosing_type_name_emitter_;
+ SimpleTypeNameEmitter simple_type_name_emitter_;
+ Traversal::Returns enclosing_returns_;
+ Traversal::Returns simple_returns_;
+ SemanticGraph::Home& scope_;
+ };
+
+ struct HomeExecImplEmitter : Traversal::Home, EmitterBase
+ {
+ HomeExecImplEmitter (Context& c)
+ : EmitterBase (c)
+ {
+ }
+
+ virtual void
+ pre (Type& t)
+ {
+ os << STRS[SEP] << endl
+ << "// Home Executor Implementation Class: "
+ << t.name () << "_exec_i" << endl
+ << STRS[SEP] << endl << endl;
+
+ os << t.name () << "_exec_i::"
+ << t.name () << "_exec_i (void)" << endl
+ << "{"
+ << "}"
+ << t.name () << "_exec_i::~"
+ << t.name () << "_exec_i (void)" << endl
+ << "{"
+ << "}";
+
+ os << "// Supported or inherited operations." << endl << endl;
+
+ {
+ Traversal::Home home_emitter;
+
+ Traversal::Inherits home_inherits;
+ home_inherits.node_traverser (home_emitter);
+
+ Traversal::Supports supports_;
+ home_emitter.edge_traverser (home_inherits);
+ home_emitter.edge_traverser (supports_);
+ InterfaceEmitter interface_emitter (ctx);
+ supports_.node_traverser (interface_emitter);
+
+ Traversal::Defines defines;
+ Traversal::Inherits interface_inherits;
+ interface_emitter.edge_traverser (defines);
+ interface_emitter.edge_traverser (interface_inherits);
+
+ AttributeEmitter<SemanticGraph::Home> attribute_emitter (ctx, t);
+ ReadOnlyAttributeEmitter<SemanticGraph::Home> read_only_attribute_emitter (ctx, t);
+ defines.node_traverser (attribute_emitter);
+ defines.node_traverser (read_only_attribute_emitter);
+
+ OperationEmitter<SemanticGraph::Home> operation_emitter (ctx, t);
+ defines.node_traverser (operation_emitter);
+ interface_inherits.node_traverser (interface_emitter);
+
+ Traversal::Receives receives;
+ Traversal::Belongs returns;
+ Traversal::Raises raises;
+ operation_emitter.edge_traverser (receives);
+ operation_emitter.edge_traverser (returns);
+ operation_emitter.edge_traverser (raises);
+
+ ParameterEmitter<Traversal::InParameter> in_param (os);
+ ParameterEmitter<Traversal::InOutParameter> inout_param (os);
+ ParameterEmitter<Traversal::OutParameter> out_param (os);
+ receives.node_traverser (in_param);
+ receives.node_traverser (inout_param);
+ receives.node_traverser (out_param);
+
+ ReturnTypeNameEmitter return_type_emitter (os);
+ TypeNameEmitter type_name_emitter (os);
+ returns.node_traverser (return_type_emitter);
+ raises.node_traverser (type_name_emitter);
+
+ Traversal::Belongs in_belongs, inout_belongs, out_belongs;
+ in_param.edge_traverser (in_belongs);
+ inout_param.edge_traverser (inout_belongs);
+ out_param.edge_traverser (out_belongs);
+
+ INArgTypeNameEmitter in_arg_emitter (os);
+ INOUTArgTypeNameEmitter inout_arg_emitter (os);
+ OUTArgTypeNameEmitter out_arg_emitter (os);
+ in_belongs.node_traverser (in_arg_emitter);
+ inout_belongs.node_traverser (inout_arg_emitter);
+ out_belongs.node_traverser (out_arg_emitter);
+
+ home_emitter.traverse (t);
+ }
+
+ os << "// Home operations." << endl << endl;
+
+ {
+ Traversal::Home home_emitter;
+
+ Traversal::Inherits home_inherits;
+ home_inherits.node_traverser (home_emitter);
+
+ Traversal::Defines defines;
+ home_emitter.edge_traverser (defines);
+ home_emitter.edge_traverser (home_inherits);
+
+ HomeOperationEmitter home_operation_emitter (ctx, t);
+ defines.node_traverser (home_operation_emitter);
+
+ Traversal::Receives receives;
+ Traversal::Belongs returns;
+ Traversal::Raises raises;
+ home_operation_emitter.edge_traverser (receives);
+ home_operation_emitter.edge_traverser (returns);
+ home_operation_emitter.edge_traverser (raises);
+
+ ParameterEmitter<Traversal::InParameter> in_param (os);
+ ParameterEmitter<Traversal::InOutParameter> inout_param (os);
+ ParameterEmitter<Traversal::OutParameter> out_param (os);
+ receives.node_traverser (in_param);
+ receives.node_traverser (inout_param);
+ receives.node_traverser (out_param);
+
+ ReturnTypeNameEmitter return_type_emitter (os);
+ TypeNameEmitter type_name_emitter (os);
+ returns.node_traverser (return_type_emitter);
+ raises.node_traverser (type_name_emitter);
+
+ Traversal::Belongs in_belongs, inout_belongs, out_belongs;
+ in_param.edge_traverser (in_belongs);
+ inout_param.edge_traverser (inout_belongs);
+ out_param.edge_traverser (out_belongs);
+
+ INArgTypeNameEmitter in_arg_emitter (os);
+ INOUTArgTypeNameEmitter inout_arg_emitter (os);
+ OUTArgTypeNameEmitter out_arg_emitter (os);
+ in_belongs.node_traverser (in_arg_emitter);
+ inout_belongs.node_traverser (inout_arg_emitter);
+ out_belongs.node_traverser (out_arg_emitter);
+
+ home_emitter.traverse (t);
+ }
+
+ // Generate home factory operations. This is a separate traversal
+ // stack because we want to generate the factory operations
+ // of ancestors with the return type of the base component.
+ os << "// Factory and finder operations." << endl << endl;
+
+ {
+ Traversal::Home home_emitter;
+
+ Traversal::Inherits inherits;
+ home_emitter.edge_traverser (inherits);
+ inherits.node_traverser (home_emitter);
+
+ Traversal::Defines defines;
+ home_emitter.edge_traverser (defines);
+
+ FactoryOperationEmitter factory_operation_emitter (ctx, t);
+ FinderOperationEmitter finder_operation_emitter (ctx, t);
+ defines.node_traverser (factory_operation_emitter);
+ defines.node_traverser (finder_operation_emitter);
+
+ Traversal::Receives receives;
+ Traversal::Belongs returns;
+ Traversal::Raises raises;
+ factory_operation_emitter.edge_traverser (receives);
+ factory_operation_emitter.edge_traverser (returns);
+ factory_operation_emitter.edge_traverser (raises);
+ finder_operation_emitter.edge_traverser (receives);
+ finder_operation_emitter.edge_traverser (returns);
+ finder_operation_emitter.edge_traverser (raises);
+
+ ParameterEmitter<Traversal::InParameter> in_param (os);
+ ParameterEmitter<Traversal::InOutParameter> inout_param (os);
+ ParameterEmitter<Traversal::OutParameter> out_param (os);
+ receives.node_traverser (in_param);
+ receives.node_traverser (inout_param);
+ receives.node_traverser (out_param);
+
+ ReturnTypeNameEmitter return_type_emitter (os);
+ TypeNameEmitter type_name_emitter (os);
+ returns.node_traverser (return_type_emitter);
+ raises.node_traverser (type_name_emitter);
+
+ Traversal::Belongs in_belongs, inout_belongs, out_belongs;
+ in_param.edge_traverser (in_belongs);
+ inout_param.edge_traverser (inout_belongs);
+ out_param.edge_traverser (out_belongs);
+
+ INArgTypeNameEmitter in_arg_emitter (os);
+ INOUTArgTypeNameEmitter inout_arg_emitter (os);
+ OUTArgTypeNameEmitter out_arg_emitter (os);
+ in_belongs.node_traverser (in_arg_emitter);
+ inout_belongs.node_traverser (inout_arg_emitter);
+ out_belongs.node_traverser (out_arg_emitter);
+
+ home_emitter.traverse (t);
+ }
+
+ os << "// Attribute operations." << endl << endl;
+
+ {
+ Traversal::Home home_emitter;
+
+ Traversal::Inherits home_inherits;
+ home_inherits.node_traverser (home_emitter);
+
+ home_emitter.edge_traverser (home_inherits);
+
+ Traversal::Defines defines;
+ home_emitter.edge_traverser (defines);
+
+ AttributeEmitter<SemanticGraph::Home> attribute_emitter (ctx, t);
+ ReadOnlyAttributeEmitter<SemanticGraph::Home> read_only_attribute_emitter (ctx, t);
+ defines.node_traverser (attribute_emitter);
+ defines.node_traverser (read_only_attribute_emitter);
+
+ home_emitter.traverse (t);
+ }
+
+ os << "// Implicit operations." << endl << endl
+ << STRS[COMP_EC] << "_ptr" << endl
+ << t.name () << "_exec_i::create (" << endl
+ << STRS[ENV_SNGL_SRC] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_CE] << "))" << endl
+ << "{"
+ << STRS[COMP_EC] << "_ptr retval =" << endl
+ << STRS[COMP_EC] << "::_nil ();" << endl
+ << "ACE_NEW_THROW_EX (" << endl
+ << "retval," << endl;
+
+ Traversal::Home home_emitter;
+
+ Traversal::Manages manages_;
+ home_emitter.edge_traverser (manages_);
+
+ SimpleTypeNameEmitter manages_emitter (os);
+ manages_.node_traverser (manages_emitter);
+
+ home_emitter.traverse (t);
+
+ os << "_exec_i," << endl
+ << "CORBA::NO_MEMORY ());"
+ << "ACE_CHECK_RETURN (" << STRS[COMP_EC]
+ << "::_nil ());" << endl
+ << "return retval;"
+ << "}";
+ }
+
+ virtual void
+ post (Type& t)
+ {
+ os << "extern \"C\" " << ctx.export_macro ()
+ << " ::Components::HomeExecutorBase_ptr" << endl
+ << "create" << t.name () << "_Impl (void)" << endl
+ << "{"
+ << "::Components::HomeExecutorBase_ptr retval =" << endl
+ << "::Components::HomeExecutorBase::_nil ();" << endl
+ << "ACE_NEW_RETURN (" << endl
+ << "retval," << endl
+ << t.name () << "_exec_i," << endl
+ << "::Components::HomeExecutorBase::_nil ());" << endl
+ << "return retval;"
+ << "}";
+ }
+ };
+}
+
+ExecImplSourceEmitter::ExecImplSourceEmitter (std::ostream& os_,
+ CommandLine const& cl,
+ string export_macro,
+ fs::path const& file)
+ : os (os_),
+ cl_ (cl),
+ export_macro_ (export_macro),
+ file_ (file)
+{}
+
+void
+ExecImplSourceEmitter::pre (TranslationUnit&)
+{
+ os << COPYRIGHT;
+
+ string file_name ("");
+
+ if (! file_.empty ())
+ {
+ file_name = file_.leaf ();
+ }
+
+ string file_suffix = cl_.get_value ("exec-hdr-file-suffix",
+ "_exec.h");
+
+ file_name = regex::perl_s (file_name,
+ "/(\\.(idl|cidl|cdl))?$/"
+ + file_suffix
+ + "/");
+
+ os << "#include \"" << file_name << "\"" << endl
+ << "#include \"ciao/CIAO_common.h\"" << endl;
+}
+
+void
+ExecImplSourceEmitter::generate (TranslationUnit& u)
+{
+ pre (u);
+
+ Context c (os, export_macro_);
+
+ Traversal::TranslationUnit unit;
+
+ // Layer 1
+ //
+ Traversal::ContainsPrincipal contains_principal;
+ unit.edge_traverser (contains_principal);
+
+ //--
+ Traversal::TranslationRegion principal_region;
+ contains_principal.node_traverser (principal_region);
+
+ // Layer 2
+ //
+ Traversal::ContainsRoot contains_root;
+ principal_region.edge_traverser (contains_root);
+
+ //--
+ Traversal::Root root;
+ contains_root.node_traverser (root);
+
+ // Layer 3
+ //
+ Traversal::Defines defines;
+ root.edge_traverser (defines);
+
+ //--
+ ModuleEmitter module (c);
+ CompositionEmitter composition (c);
+ defines.node_traverser (module);
+ defines.node_traverser (composition);
+
+ // Layer 4
+ //
+ composition.edge_traverser (defines);
+ module.edge_traverser (defines);
+
+ //--
+ Traversal::ComponentExecutor component_executor;
+ Traversal::HomeExecutor home_executor;
+ defines.node_traverser (component_executor);
+ defines.node_traverser (home_executor);
+
+ // Layer 5
+ //
+ Traversal::Implements implements;
+ component_executor.edge_traverser (implements);
+ home_executor.edge_traverser (implements);
+
+ //--
+ ComponentExecImplEmitter component_exec_impl_emitter (c);
+ HomeExecImplEmitter home_exec_impl_emitter (c);
+ implements.node_traverser (component_exec_impl_emitter);
+ implements.node_traverser (home_exec_impl_emitter);
+
+ unit.traverse (u);
+
+ post (u);
+}
+
+void
+ExecImplSourceEmitter::post (TranslationUnit&)
+{
+}
+
diff --git a/TAO/CIAO/CIDLC/ExecutorMappingGenerator.cpp b/TAO/CIAO/CIDLC/ExecutorMappingGenerator.cpp
new file mode 100644
index 00000000000..a160c24d90d
--- /dev/null
+++ b/TAO/CIAO/CIDLC/ExecutorMappingGenerator.cpp
@@ -0,0 +1,2018 @@
+// file : CIDLC/ExecutorMappingGenerator.cpp
+// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
+// cvs-id : $Id$
+
+#include "ExecutorMappingGenerator.hpp"
+#include "Literals.hpp"
+
+#include <set>
+#include <ostream>
+#include <fstream>
+
+#include "CCF/CIDL/SemanticGraph.hpp"
+#include "CCF/CIDL/Traversal.hpp"
+
+#include "CCF/CodeGenerationKit/Regex.hpp"
+#include "CCF/CodeGenerationKit/IndentationIDL.hpp"
+#include "CCF/CodeGenerationKit/IndentationImplanter.hpp"
+
+using std::string;
+using std::ostream;
+using std::endl;
+
+using namespace StringLiterals;
+using namespace CCF::CIDL;
+using namespace CCF::CIDL::SemanticGraph;
+
+namespace
+{
+ class Context
+ {
+ public:
+ Context (TranslationUnit& tu)
+ : tu_ (tu)
+ {
+ }
+
+ TranslationUnit&
+ tu () const
+ {
+ return tu_;
+ }
+
+ public:
+ bool
+ add (Home& h)
+ {
+ return homes_.insert (&h).second;
+ }
+
+ bool
+ add (Component& c)
+ {
+ return components_.insert (&c).second;
+ }
+
+ bool
+ add (UnconstrainedInterface& i)
+ {
+ return interfaces_.insert (std::make_pair(&i, true)).second;
+ }
+
+ bool
+ add (Composition& c)
+ {
+ return compositions_.insert (&c).second;
+ }
+
+ public:
+ bool
+ find (Home& h) const
+ {
+ return homes_.find (&h) != homes_.end ();
+ }
+
+ bool
+ find (Component& c) const
+ {
+ return components_.find (&c) != components_.end ();
+ }
+
+ bool
+ find (UnconstrainedInterface& i) const
+ {
+ return interfaces_.find (&i) != interfaces_.end ();
+ }
+
+ // The next two functions help to keep track of forward
+ // declarations for LEM. The non-const version should be
+ // used in emitter (note that it changed the flag to false).
+ // The const version should be used in module re-opener.
+ //
+ bool
+ find_fwd (UnconstrainedInterface& i)
+ {
+ Interfaces::iterator it (interfaces_.find (&i));
+
+ if (it == interfaces_.end ()) return false;
+
+ if (it->second)
+ {
+ it->second = false;
+ return true;
+ }
+
+ return false;
+ }
+
+ bool
+ find_fwd (UnconstrainedInterface& i) const
+ {
+ Interfaces::const_iterator it (interfaces_.find (&i));
+
+ return it != interfaces_.end () && it->second;
+ }
+
+ bool
+ find (Composition& c) const
+ {
+ return compositions_.find (&c) != compositions_.end ();
+ }
+
+ private:
+ typedef std::set<Home*> Homes;
+ typedef std::set<Component*> Components;
+ typedef std::map<UnconstrainedInterface*, bool> Interfaces;
+ typedef std::set<Composition*> Compositions;
+
+ TranslationUnit& tu_;
+
+ Homes homes_;
+ Components components_;
+ Interfaces interfaces_;
+ Compositions compositions_;
+ };
+
+ class Traverser
+ {
+ protected:
+ Traverser (Context& c)
+ : ctx (c)
+ {
+ }
+
+ Context& ctx;
+ };
+
+ struct Collector : Traverser
+ {
+ protected:
+ Collector (Context& c)
+ : Traverser (c)
+ {
+ }
+
+ bool
+ exist (ScopedName const& name)
+ {
+ return !ctx.tu ().lookup (name).empty ();
+ }
+ };
+
+ //
+ //
+ //
+ struct ComponentCollector : Traversal::Component, Collector
+ {
+ ComponentCollector (Context& c)
+ : Collector (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ SimpleName name (c.name ());
+ ScopedName scope (c.scoped_name ().scope_name ());
+
+ ScopedName monolith (scope, "CCM_" + name);
+ ScopedName context (scope, "CCM_" + name + "_Context");
+
+ // Check if mapping has already been provided.
+ //
+ if (exist (context) || exist (monolith)) return;
+
+ if(ctx.add (c))
+ {
+ // Collect inherited components and provides interfaces.
+ //
+ Traversal::Component::traverse (c);
+ }
+ }
+ };
+
+
+ //
+ //
+ //
+ struct HomeCollector : Traversal::Home, Collector
+ {
+ HomeCollector (Context& c)
+ : Collector (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& h)
+ {
+ SimpleName name (h.name ());
+ ScopedName scope (h.scoped_name ().scope_name ());
+
+ ScopedName main (scope, "CCM_" + name);
+ ScopedName expl (scope, "CCM_" + name + "Explicit");
+ ScopedName impl (scope, "CCM_" + name + "Implicit");
+
+ // Check if mapping has already been provided.
+ //
+ if (exist (main) || exist (expl) || exist (impl)) return;
+
+ if(ctx.add (h))
+ {
+ // Note that I don't go after components that inherited home manages
+ // because it will be handled by component inheritance tree.
+ //
+ Traversal::Home::traverse (h);
+ }
+ }
+ };
+
+
+ //
+ //
+ //
+ struct InterfaceCollector : Traversal::UnconstrainedInterface, Collector
+ {
+ InterfaceCollector (Context& c)
+ : Collector (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& i)
+ {
+ SimpleName name (i.name ());
+ ScopedName scope (i.scoped_name ().scope_name ());
+
+ ScopedName mapping (scope, "CCM_" + name);
+
+ // Check if mapping has already been provided.
+ //
+ if (exist (mapping)) return;
+
+ // Add to the list if it's not already there.
+ //
+ ctx.add (i);
+ }
+ };
+
+ struct CompositionCollector : Traversal::Composition, Collector
+ {
+ CompositionCollector (Context& c)
+ : Collector (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ // Add to the list if it's not already there.
+ //
+ if (ctx.add (c))
+ {
+ Traversal::Composition::traverse (c);
+ }
+ }
+ };
+
+ struct Emitter : Traverser
+ {
+ protected:
+ Emitter (Context& c, ostream& os_)
+ : Traverser (c), os (os_)
+ {
+ }
+
+ protected:
+ ostream& os;
+ };
+
+
+ //
+ //
+ //
+ struct TypeNameEmitter : Traversal::FundamentalType,
+ Traversal::Type,
+ Emitter
+ {
+ TypeNameEmitter (Context& c, ostream& os)
+ : Emitter (c, os)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::FundamentalType& t)
+ {
+ os << t.name ();
+ }
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ os << t.scoped_name ();
+ }
+ };
+
+
+ struct NameMangler : Traversal::Nameable, Emitter
+ {
+ NameMangler (Context& c,
+ ostream& os,
+ string const& prefix,
+ string const& suffix = "")
+ : Emitter (c, os), prefix_ (prefix), suffix_ (suffix)
+ {
+ }
+
+ virtual void
+ traverse (Type& t)
+ {
+ ScopedName n (t.scoped_name ());
+ os << n.scope_name () << "::" << prefix_ << n.simple_name () << suffix_;
+ }
+
+ private:
+ string prefix_, suffix_;
+ };
+
+
+ //
+ //
+ //
+ struct ComponentEmitter : Traversal::Component, Emitter
+ {
+ protected:
+ ComponentEmitter (Context& c, ostream& os)
+ : Emitter (c, os)
+ {
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ if (ctx.find (c))
+ {
+ Component::traverse (c);
+ }
+ }
+ };
+
+ struct AttributeEmitter : Traversal::ReadAttribute,
+ Traversal::ReadWriteAttribute,
+ Emitter
+ {
+ AttributeEmitter (Context& c, ostream& os)
+ : Emitter (c, os)
+ {
+ }
+
+ // ReadAttribute
+ //
+ virtual void
+ pre (SemanticGraph::ReadAttribute& )
+ {
+ os << "readonly attribute ";
+ }
+
+ virtual void
+ name (SemanticGraph::ReadAttribute& a)
+ {
+ os << " " << a.name ();
+ }
+
+ virtual void
+ post (SemanticGraph::ReadAttribute&)
+ {
+ os << ";";
+ }
+
+ // ReadWriteAttribute
+ //
+ virtual void
+ pre (SemanticGraph::ReadWriteAttribute& )
+ {
+ os << "attribute ";
+ }
+
+ virtual void
+ name (SemanticGraph::ReadWriteAttribute& a)
+ {
+ os << " " << a.name ();
+ }
+
+ virtual void
+ post (SemanticGraph::ReadWriteAttribute&)
+ {
+ os << ";";
+ }
+ };
+
+
+ // MonolithEmitter generates what spec calls 'Monolithic Component
+ // Executor'.
+ //
+ struct MonolithEmitter : ComponentEmitter
+ {
+ MonolithEmitter (Context& c, ostream& os)
+ : ComponentEmitter (c, os),
+ monolith_name_emitter (c, os, "CCM_"),
+ attribute (c, os),
+ consumer (c, os),
+ provider (c, os),
+ type_name_emitter (c, os)
+ {
+ edge_traverser (inherits);
+ edge_traverser (defines);
+
+ inherits.node_traverser (monolith_name_emitter);
+
+ defines.node_traverser (attribute);
+ defines.node_traverser (consumer);
+ defines.node_traverser (provider);
+
+ attribute.edge_traverser (belongs);
+ consumer.edge_traverser (belongs);
+ provider.edge_traverser (provider_belongs);
+
+ belongs.node_traverser (type_name_emitter);
+ provider_belongs.node_traverser (monolith_name_emitter);
+ }
+
+ virtual void
+ pre (Type&)
+ {
+ os << "local interface ";
+ }
+
+ virtual void
+ name (Type& c)
+ {
+ os << "CCM_" << c.name ();
+ }
+
+ virtual void
+ inherits_pre (Type&)
+ {
+ os << " : ";
+ }
+
+ virtual void
+ inherits_none (Type&)
+ {
+ os << " : " << STRS[COMP_EC];
+ }
+
+ virtual void
+ supports_pre (Type&)
+ {
+ os << ", ";
+ }
+
+ virtual void
+ names_pre (Type&)
+ {
+ os << "{";
+ }
+
+ virtual void
+ names_post (Type&)
+ {
+ os << "}";
+ }
+
+ virtual void
+ post (Type&)
+ {
+ os << ";";
+ }
+
+ virtual void
+ comma (Type&)
+ {
+ os << ", ";
+ }
+
+ private:
+ struct Consumer : Traversal::ConsumerSet, Emitter
+ {
+ Consumer (Context& c, ostream& os)
+ : Emitter (c, os)
+ {
+ }
+
+ virtual void
+ returns (Type&)
+ {
+ os << "void";
+ }
+
+ virtual void
+ name (Type& c)
+ {
+ os << " push_" << c.name ();
+ }
+
+ virtual void
+ receives_pre (Type&)
+ {
+ os << " (in ";
+ }
+
+ virtual void
+ receives_post (Type&)
+ {
+ os << " e)";
+ }
+
+ virtual void
+ post (Type&)
+ {
+ os << ";";
+ }
+ };
+
+
+ struct Provider : Traversal::ProviderGet, Emitter
+ {
+ Provider (Context& c, ostream& os)
+ : Emitter (c, os)
+ {
+ }
+
+ virtual void
+ name (Type& c)
+ {
+ os << " get_" << c.name ();
+ }
+
+ virtual void
+ receives_pre (Type&)
+ {
+ os << " (";
+ }
+
+ virtual void
+ receives_post (Type&)
+ {
+ os << ")";
+ }
+
+ virtual void
+ post (Type&)
+ {
+ os << ";";
+ }
+ };
+
+ Traversal::Inherits inherits;
+ Traversal::Defines defines;
+
+ NameMangler monolith_name_emitter;
+
+ AttributeEmitter attribute;
+ Consumer consumer;
+ Provider provider;
+
+ Traversal::Belongs belongs;
+ Traversal::Belongs provider_belongs;
+
+ TypeNameEmitter type_name_emitter;
+ };
+
+
+ // ContextEmitter generates component context interface.
+ //
+ //
+ struct ContextPortEmitter : Traversal::MultiUserGet,
+ Traversal::SingleUserGet,
+ Traversal::PublisherSet,
+ Traversal::EmitterSet,
+ Emitter
+ {
+ ContextPortEmitter (Context& c, ostream& os)
+ : Emitter (c, os)
+ {
+ }
+
+
+ // MultiUser.
+ //
+ virtual void
+ returns (SemanticGraph::MultiUser& u)
+ {
+ Component& c (dynamic_cast<Component&>((*u.named_begin ())->scope ()));
+ os << c.scoped_name () << "::" << u.name () << "Connections";
+ }
+
+ virtual void
+ name (SemanticGraph::MultiUser& u)
+ {
+ os << " get_connections_" << u.name ();
+ }
+
+ virtual void
+ receives_pre (SemanticGraph::MultiUser&)
+ {
+ os << " (";
+ }
+
+ virtual void
+ receives_post (SemanticGraph::MultiUser&)
+ {
+ os << ")";
+ }
+
+ virtual void
+ post (SemanticGraph::MultiUser&)
+ {
+ os << ";";
+ }
+
+
+ // SingleUser.
+ //
+ virtual void
+ name (SemanticGraph::SingleUser& u)
+ {
+ os << " get_connection_" << u.name ();
+ }
+
+ virtual void
+ receives_pre (SemanticGraph::SingleUser&)
+ {
+ os << " (";
+ }
+
+ virtual void
+ receives_post (SemanticGraph::SingleUser&)
+ {
+ os << ")";
+ }
+
+ virtual void
+ post (SemanticGraph::SingleUser&)
+ {
+ os << ";";
+ }
+
+ // Publisher.
+ //
+ virtual void
+ returns (SemanticGraph::Publisher&)
+ {
+ os << "void";
+ }
+
+ virtual void
+ name (SemanticGraph::Publisher& p)
+ {
+ os << " push_" << p.name ();
+ }
+
+ virtual void
+ receives_pre (SemanticGraph::Publisher&)
+ {
+ os << " (in ";
+ }
+
+ virtual void
+ receives_post (SemanticGraph::Publisher&)
+ {
+ os << " e)";
+ }
+
+ virtual void
+ post (SemanticGraph::Publisher&)
+ {
+ os << ";";
+ }
+
+
+ // Emitter.
+ //
+ virtual void
+ returns (SemanticGraph::Emitter&)
+ {
+ os << "void";
+ }
+
+ virtual void
+ name (SemanticGraph::Emitter& e)
+ {
+ os << " push_" << e.name ();
+ }
+
+ virtual void
+ receives_pre (SemanticGraph::Emitter&)
+ {
+ os << " (in ";
+ }
+
+ virtual void
+ receives_post (SemanticGraph::Emitter&)
+ {
+ os << " e)";
+ }
+
+ virtual void
+ post (SemanticGraph::Emitter&)
+ {
+ os << ";";
+ }
+ };
+
+
+ struct ContextEmitter : ComponentEmitter
+ {
+ ContextEmitter (Context& c, ostream& os)
+ : ComponentEmitter (c, os), name_emitter (c, os, "CCM_", "_Context")
+ {
+ edge_traverser (inherits);
+ inherits.node_traverser (name_emitter);
+ }
+
+ virtual void
+ pre (Type&)
+ {
+ os << "local interface ";
+ }
+
+ virtual void
+ name (Type& c)
+ {
+ os << "CCM_" << c.name () << "_Context";
+ }
+
+ virtual void
+ inherits_pre (Type&)
+ {
+ os << " : ";
+ }
+
+ virtual void
+ inherits_none (Type&)
+ {
+ //@@ should be os << " : ::Components::CCMContext";
+ os << " : " << STRS[COMP_SC];
+ }
+
+ virtual void
+ names_pre (Type&)
+ {
+ os << "{";
+ }
+
+ virtual void
+ names_post (Type&)
+ {
+ os << "}";
+ }
+
+ virtual void
+ post (Type&)
+ {
+ os << ";";
+ }
+
+ private:
+ Traversal::Inherits inherits;
+ NameMangler name_emitter;
+ };
+
+
+ //
+ //
+ //
+ struct HomeEmitter : Traversal::Home, Emitter
+ {
+ HomeEmitter (Context& c, ostream& os)
+ : Emitter (c, os)
+ {
+ }
+
+ virtual void
+ traverse (Type& h)
+ {
+ if (ctx.find (h))
+ {
+ Home::traverse (h);
+ }
+ }
+ };
+
+
+ // HomeExplicitEmitter generates home explicit interface
+ //
+ //
+ struct ExplicitPortEmitter : AttributeEmitter,
+ Traversal::Operation,
+ Traversal::HomeFactory,
+ Traversal::HomeFinder
+ {
+ ExplicitPortEmitter (Context& c, ostream& os)
+ : AttributeEmitter (c, os)
+ {
+ }
+
+ // Operation.
+ //
+
+ virtual void
+ name (SemanticGraph::Operation& o)
+ {
+ os << " " << o.name ();
+ }
+
+ virtual void
+ receives_pre (SemanticGraph::Operation&)
+ {
+ os << " (";
+ }
+
+ virtual void
+ receives_post (SemanticGraph::Operation&)
+ {
+ os << ")";
+ }
+
+ virtual void
+ receives_none (SemanticGraph::Operation&)
+ {
+ os << " ()";
+ }
+
+ virtual void
+ raises_pre (SemanticGraph::Operation&)
+ {
+ os << " raises (";
+ }
+
+ virtual void
+ raises_post (SemanticGraph::Operation&)
+ {
+ os << ")";
+ }
+
+ virtual void
+ post (SemanticGraph::Operation&)
+ {
+ os << ";";
+ }
+
+ virtual void
+ comma (SemanticGraph::Operation&)
+ {
+ os << ", ";
+ }
+
+
+ // HomeFactory.
+ //
+
+ virtual void
+ returns (SemanticGraph::HomeFactory&)
+ {
+ os << STRS[COMP_EC] << " ";
+ }
+
+ virtual void
+ name (SemanticGraph::HomeFactory& hf)
+ {
+ os << " " << hf.name ();
+ }
+
+ virtual void
+ receives_pre (SemanticGraph::HomeFactory&)
+ {
+ os << " (";
+ }
+
+ virtual void
+ receives_post (SemanticGraph::HomeFactory&)
+ {
+ os << ")";
+ }
+
+ virtual void
+ receives_none (SemanticGraph::HomeFactory&)
+ {
+ os << " ()";
+ }
+
+ virtual void
+ raises_pre (SemanticGraph::HomeFactory&)
+ {
+ os << " raises (";
+ }
+
+ virtual void
+ raises_post (SemanticGraph::HomeFactory&)
+ {
+ os << ")";
+ }
+
+ virtual void
+ post (SemanticGraph::HomeFactory&)
+ {
+ os << ";";
+ }
+
+ virtual void
+ comma (SemanticGraph::HomeFactory&)
+ {
+ os << ", ";
+ }
+
+ // HomeFinder.
+ //
+
+ virtual void
+ returns (SemanticGraph::HomeFinder&)
+ {
+ os << STRS[COMP_EC] << " ";
+ }
+
+ virtual void
+ name (SemanticGraph::HomeFinder& hf)
+ {
+ os << " " << hf.name ();
+ }
+
+ virtual void
+ receives_pre (SemanticGraph::HomeFinder&)
+ {
+ os << " (";
+ }
+
+ virtual void
+ receives_post (SemanticGraph::HomeFinder&)
+ {
+ os << ")";
+ }
+
+ virtual void
+ receives_none (SemanticGraph::HomeFinder&)
+ {
+ os << " ()";
+ }
+
+ virtual void
+ raises_pre (SemanticGraph::HomeFinder&)
+ {
+ os << " raises (";
+ }
+
+ virtual void
+ raises_post (SemanticGraph::HomeFinder&)
+ {
+ os << ")";
+ }
+
+ virtual void
+ post (SemanticGraph::HomeFinder&)
+ {
+ os << ";";
+ }
+
+ virtual void
+ comma (SemanticGraph::HomeFinder&)
+ {
+ os << ", ";
+ }
+ };
+
+ struct ParameterEmitter : Traversal::InParameter,
+ Traversal::OutParameter,
+ Traversal::InOutParameter,
+ public Emitter
+ {
+ ParameterEmitter (Context& c, ostream& os)
+ : Emitter (c, os)
+ {
+ }
+
+ virtual void
+ pre (InParameter&)
+ {
+ os << endl << "in ";
+ }
+
+ virtual void
+ pre (OutParameter&)
+ {
+ os << endl << "out ";
+ }
+
+ virtual void
+ pre (InOutParameter&)
+ {
+ os << endl << "inout ";
+ }
+
+ virtual void
+ name (InParameter& p)
+ {
+ os << " " << p.name ();
+ }
+
+ virtual void
+ name (OutParameter& p)
+ {
+ os << " " << p.name ();
+ }
+
+ virtual void
+ name (InOutParameter& p)
+ {
+ os << " " << p.name ();
+ }
+ };
+
+ struct HomeExplicitEmitter : HomeEmitter
+ {
+ HomeExplicitEmitter (Context& c, ostream& os)
+ : HomeEmitter (c, os), name_emitter (c, os, "CCM_", "Explicit")
+ {
+ edge_traverser (inherits);
+ inherits.node_traverser (name_emitter);
+ }
+
+ virtual void
+ pre (Type&)
+ {
+ os << "local interface ";
+ }
+
+ virtual void
+ name (Type& h)
+ {
+ os << "CCM_" << h.name () << "Explicit";
+ }
+
+ virtual void
+ inherits_pre (Type&)
+ {
+ os << " : ";
+ }
+
+ virtual void
+ inherits_none (Type&)
+ {
+ os << " : ::Components::HomeExecutorBase";
+ }
+
+ virtual void
+ supports_pre (Type&)
+ {
+ os << ", ";
+ }
+
+ virtual void
+ names_pre (Type&)
+ {
+ os << "{";
+ }
+
+ virtual void
+ names_post (Type&)
+ {
+ os << "}";
+ }
+
+ virtual void
+ post (Type&)
+ {
+ os << ";";
+ }
+
+ virtual void
+ comma (Type&)
+ {
+ os << ", ";
+ }
+
+ private:
+ Traversal::Inherits inherits;
+ NameMangler name_emitter;
+ };
+
+
+ // HomeImplicitEmitter generates home implicit interface
+ //
+ //
+ struct HomeImplicitEmitter : HomeEmitter
+ {
+ HomeImplicitEmitter (Context& c, ostream& os)
+ : HomeEmitter (c, os)
+ {
+ }
+
+ virtual void
+ pre (Type&)
+ {
+ os << "local interface ";
+ }
+
+ virtual void
+ name (Type& h)
+ {
+ os << "CCM_" << h.name () << "Implicit";
+ }
+
+ virtual void
+ names (Type&)
+ {
+ os << "{"
+ << STRS[COMP_EC] << " "
+ << "create () raises (" << STRS[EXCP_CE] << ");"
+ << "}";
+ }
+
+ virtual void
+ post (Type&)
+ {
+ os << ";";
+ }
+ };
+
+
+ // HomeMainEmitter generates home main interface
+ //
+ //
+ struct HomeMainEmitter : HomeEmitter
+ {
+ HomeMainEmitter (Context& c, ostream& os)
+ : HomeEmitter (c, os)
+ {
+ }
+
+ virtual void
+ pre (Type&)
+ {
+ os << "local interface ";
+ }
+
+ virtual void
+ name (Type& h)
+ {
+ os << "CCM_" << h.name ();
+ }
+
+ virtual void
+ inherits (Type& h)
+ {
+ os << " : "
+ << "CCM_" << h.name () << "Explicit, "
+ << "CCM_" << h.name () << "Implicit";
+ }
+
+ virtual void
+ names (Type&)
+ {
+ os << "{}";
+ }
+
+ virtual void
+ post (Type&)
+ {
+ os << ";";
+ }
+ };
+
+ //
+ //
+ //
+ struct ModuleEmitter : Traversal::Module, Emitter
+ {
+ ModuleEmitter (Context& c, ostream& os)
+ : Emitter (c, os)
+ {
+ }
+
+ virtual void
+ traverse (Type& m)
+ {
+ if (has_elements (m))
+ {
+ Traversal::Module::traverse (m);
+ }
+ }
+
+ virtual void
+ pre (Type&)
+ {
+ os << "module ";
+ }
+
+ virtual void
+ name (Type& m)
+ {
+ os << m.name ();
+ }
+
+ virtual void
+ names_pre (Type&)
+ {
+ os << "{";
+ }
+
+ virtual void
+ names_post (Type&)
+ {
+ os << "}";
+ }
+
+ virtual void
+ post (Type&)
+ {
+ os << ";";
+ }
+
+ private:
+
+ template <typename T>
+ struct Finder : T
+ {
+ Finder (Context& c, bool& r)
+ : ctx (c), r_ (r)
+ {
+ }
+
+ virtual void
+ traverse (typename T::Type& t)
+ {
+ if (ctx.find (t)) r_ = true;
+ }
+
+ private:
+ Context& ctx;
+ bool& r_;
+ };
+
+
+ struct InterfaceFwdFinder : Traversal::UnconstrainedInterface
+ {
+ InterfaceFwdFinder (Context const& c, bool& r)
+ : ctx (c), r_ (r)
+ {
+ }
+
+ virtual void
+ traverse (Type& i)
+ {
+ // Make sure we use const version of find_fwd.
+ //
+ if (ctx.find_fwd (i)) r_ = true;
+ }
+
+ private:
+ Context const& ctx;
+ bool& r_;
+ };
+
+ bool
+ has_elements (Type& m)
+ {
+ bool r (false);
+
+ Traversal::Module module;
+ Traversal::Defines defines;
+ Traversal::Mentions mentions;
+
+ module.edge_traverser (defines);
+ module.edge_traverser (mentions);
+
+ //@@ MSVC bug: interface is considered to be an alias for a struct.
+ //
+ Finder<Traversal::Composition> composition (ctx, r);
+ Finder<Traversal::UnconstrainedInterface> interface_ (ctx, r);
+ InterfaceFwdFinder interface_fwd (ctx, r);
+ Finder<Traversal::Component> component (ctx, r);
+ Finder<Traversal::Home> home (ctx, r);
+
+ defines.node_traverser (module);
+ defines.node_traverser (composition);
+ defines.node_traverser (interface_);
+ defines.node_traverser (component);
+ defines.node_traverser (home);
+
+ mentions.node_traverser (interface_fwd);
+
+ module.traverse (m);
+
+ return r;
+ }
+ };
+
+ //
+ //
+ //
+ struct InterfaceFwdEmitter : Traversal::UnconstrainedInterface, Emitter
+ {
+ InterfaceFwdEmitter (Context& c, ostream& os)
+ : Emitter (c, os)
+ {
+ }
+
+ virtual void
+ traverse (Type& i)
+ {
+ if (ctx.find_fwd (i))
+ {
+ os << "local interface CCM_" << i.name () << ";";
+ }
+ }
+ };
+
+ //
+ //
+ //
+ struct InterfaceEmitter : Traversal::UnconstrainedInterface, Emitter
+ {
+ InterfaceEmitter (Context& c, ostream& os)
+ : Emitter (c, os)
+ {
+ }
+
+ virtual void
+ traverse (Type& i)
+ {
+ if (ctx.find (i))
+ {
+ // No need to emit forward declarations anymore.
+ //
+ ctx.find_fwd (i);
+
+ Traversal::UnconstrainedInterface::traverse (i);
+ }
+ }
+
+ virtual void
+ pre (Type&)
+ {
+ os << "local interface ";
+ }
+
+ virtual void
+ name (Type& i)
+ {
+ os << "CCM_" << i.name ();
+ }
+
+ virtual void
+ inherits (Type& i)
+ {
+ os << " : " << i.name ();
+ }
+
+ virtual void
+ names_pre (Type&)
+ {
+ os << "{";
+ }
+
+ virtual void
+ names_post (Type&)
+ {
+ os << "}";
+ }
+
+ virtual void
+ post (Type&)
+ {
+ os << ";";
+ }
+ };
+
+
+ //
+ //
+ //
+ struct CompositionEmitter : Traversal::Composition, Emitter
+ {
+ CompositionEmitter (Context& c, ostream& os)
+ : Emitter (c, os)
+ {
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ if (ctx.find (c))
+ {
+ Traversal::Composition::traverse (c);
+ }
+ }
+
+ virtual void
+ pre (Type&)
+ {
+ os << "module ";
+ }
+
+ virtual void
+ name (Type& m)
+ {
+ os << m.name ();
+ }
+
+ virtual void
+ names_pre (Type&)
+ {
+ os << "{";
+ }
+
+ virtual void
+ names_post (Type&)
+ {
+ os << "}";
+ }
+
+ virtual void
+ post (Type&)
+ {
+ os << ";";
+ }
+ };
+
+
+ struct ComponentContextEmitter : Traversal::ComponentExecutor, Emitter
+ {
+ ComponentContextEmitter (Context& c, ostream& os)
+ : Emitter (c, os),
+ name_emitter_ (c, os, "CCM_", "_Context")
+ {
+ implements_traverser_.node_traverser (name_emitter_);
+ }
+
+ virtual void
+ pre (Type& i)
+ {
+ //@@ This code temporarily generates typedef. Should be changed
+ // when we have proper C++ generated code.
+ //
+ // os << "local interface ";
+ os << "typedef ";
+ Traversal::ComponentExecutor::implements (i, implements_traverser_);
+ }
+
+ virtual void
+ name (Type& i)
+ {
+ //@@ need to check if spec prescribes this name.
+ //
+ os << " " << i.name () << "_Context;";
+ }
+
+ virtual void
+ implements (Type&)
+ {
+ // os << " : ";
+
+ // Traversal::ComponentExecutor::implements (i, implements_traverser_);
+
+ // os << ", "
+ // << STRS[COMP_SC];
+ }
+
+ virtual void
+ post (Type&)
+ {
+ // os << "{};";
+ }
+
+ private:
+ NameMangler name_emitter_;
+ Traversal::Implements implements_traverser_;
+ };
+
+
+ struct ComponentExecutorEmitter : Traversal::ComponentExecutor, Emitter
+ {
+ ComponentExecutorEmitter (Context& c, ostream& os)
+ : Emitter (c, os),
+ name_emitter_ (c, os, "CCM_")
+ {
+ implements_traverser_.node_traverser (name_emitter_);
+ }
+
+ virtual void
+ pre (Type&)
+ {
+ os << "local interface ";
+ }
+
+ virtual void
+ name (Type& i)
+ {
+ os << i.name ();
+ }
+
+ virtual void
+ implements (Type& i)
+ {
+ os << " : ";
+
+ Traversal::ComponentExecutor::implements (i, implements_traverser_);
+
+ os << ", "
+ << "::Components::SessionComponent";
+ }
+
+ virtual void
+ post (Type&)
+ {
+ os << "{};";
+ }
+
+ private:
+ NameMangler name_emitter_;
+ Traversal::Implements implements_traverser_;
+ };
+
+
+ struct HomeExecutorEmitter : Traversal::HomeExecutor, Emitter
+ {
+ HomeExecutorEmitter (Context& c, ostream& os)
+ : Emitter (c, os),
+ name_emitter_ (c, os, "CCM_")
+ {
+ implements_traverser_.node_traverser (name_emitter_);
+ }
+
+ virtual void
+ pre (Type&)
+ {
+ os << "local interface ";
+ }
+
+ virtual void
+ name (Type& i)
+ {
+ os << i.name ();
+ }
+
+ virtual void
+ implements (Type& i)
+ {
+ os << " : ";
+
+ Traversal::HomeExecutor::implements (i, implements_traverser_);
+ }
+
+ virtual void
+ post (Type&)
+ {
+ os << "{};";
+ }
+
+ private:
+ NameMangler name_emitter_;
+ Traversal::Implements implements_traverser_;
+ };
+
+ //
+ //
+ //
+ struct IncludesEmitter : Traversal::QuoteIncludes,
+ Traversal::BracketIncludes,
+ Emitter
+ {
+ IncludesEmitter (Context& c, ostream& os)
+ : Emitter (c, os)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::QuoteIncludes& qi)
+ {
+ os << "#include \"" << qi.file ().string () << "\"" << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::BracketIncludes& bi)
+ {
+ os << "#include <" << bi.file ().string () << ">" << endl;
+ }
+ };
+}
+
+void ExecutorMappingGenerator::
+options (CL::Description& d)
+{
+ d.add_option (CL::OptionDescription (
+ "lem-file-suffix",
+ "suffix",
+ "Use provided suffix instead of default \'E\' "
+ "when constructing name of local executor mapping file.",
+ true));
+
+ d.add_option (CL::OptionDescription (
+ "lem-file-regex",
+ "regex",
+ "Use provided regular expression when constructing "
+ "name of local executor mapping file.",
+ true));
+
+ d.add_option (CL::OptionDescription (
+ "lem-force-all",
+ "Force generation of local executor mapping for all IDL "
+ "types including those not used (directly or inderectly) "
+ "by compositions. This option is useful for generating a "
+ "common portion of local executor mapping used by more "
+ "than one component or composition.",
+ true));
+}
+
+
+void ExecutorMappingGenerator::
+generate (CommandLine const& cl,
+ TranslationUnit& tu,
+ fs::path const& file_path)
+{
+ fs::ofstream ofs;
+
+ string file_name (file_path.empty () ? "" : file_path.leaf ());
+
+ if (!file_name.empty ())
+ {
+ string file_name (file_path.leaf ());
+
+ string suffix (cl.get_value ("lem-file-suffix", "E.idl"));
+
+ string expr (cl.get_value (
+ "lem-file-regex",
+ "/(\\.(idl|cidl|cdl))?$/" + suffix + "/"));
+
+ string lem_file_name (regex::perl_s (file_name, expr));
+
+ fs::path lem_file_path (lem_file_name);
+
+ ofs.open (lem_file_path, std::ios_base::out);
+
+ if (!ofs.is_open ())
+ {
+ cerr << lem_file_name << ": error: unable to open in write mode"
+ << endl;
+ return;
+ }
+ }
+
+ ostream& os = ofs.is_open ()
+ ? static_cast<ostream&> (ofs)
+ : static_cast<ostream&> (std::cout);
+
+ // Dump file header.
+ //
+ os << COPYRIGHT;
+
+ // Set auto-indentation for os.
+ //
+ Indentation::Implanter<Indentation::IDL> guard (os);
+
+ Context ctx (tu);
+
+ if (cl.get_value ("lem-force-all", false))
+ {
+ Traversal::TranslationUnit unit;
+
+ // Layer 1
+ //
+ Traversal::ContainsPrincipal contains_principal;
+
+ unit.edge_traverser (contains_principal);
+
+ //--
+ Traversal::TranslationRegion region;
+
+ contains_principal.node_traverser (region);
+
+
+ // Layer 2
+ //
+ Traversal::ContainsRoot contains_root;
+ region.edge_traverser (contains_root);
+
+ //--
+ Traversal::Root root;
+ contains_root.node_traverser (root);
+
+
+ // Layer 3
+ //
+ Traversal::Defines defines;
+ root.edge_traverser (defines);
+
+ //--
+ Traversal::Module module;
+ HomeCollector home (ctx);
+ ComponentCollector component (ctx);
+ InterfaceCollector interface_ (ctx);
+
+ defines.node_traverser (module);
+ defines.node_traverser (home);
+ defines.node_traverser (component);
+ defines.node_traverser (interface_);
+
+ // Layer 4
+ //
+ Traversal::Defines component_defines;
+ Traversal::Inherits component_inherits;
+ Traversal::Inherits home_inherits;
+
+ module.edge_traverser (defines);
+
+ home.edge_traverser (home_inherits);
+ component.edge_traverser (component_defines);
+ component.edge_traverser (component_inherits);
+
+ //--
+
+ Traversal::Provider provider;
+
+ component_defines.node_traverser (provider);
+ component_inherits.node_traverser (component);
+ home_inherits.node_traverser (home);
+
+
+ // Layer 5
+ //
+ Traversal::Belongs provider_belongs;
+ provider.edge_traverser (provider_belongs);
+
+ //
+ provider_belongs.node_traverser (interface_);
+
+ // end
+
+ unit.traverse (tu);
+ }
+ else
+ {
+ Traversal::TranslationUnit unit;
+
+ // Layer 1
+ //
+ Traversal::ContainsPrincipal contains_principal;
+
+ unit.edge_traverser (contains_principal);
+
+ //--
+ Traversal::TranslationRegion region;
+
+ contains_principal.node_traverser (region);
+
+
+ // Layer 2
+ //
+ Traversal::ContainsRoot contains_root;
+ Traversal::Includes includes;
+
+ region.edge_traverser (contains_root);
+ region.edge_traverser (includes);
+
+ //--
+ Traversal::Root root;
+
+ contains_root.node_traverser (root);
+ includes.node_traverser (region);
+
+
+ // Layer 3
+ //
+ Traversal::Defines defines;
+ root.edge_traverser (defines);
+
+ //--
+ Traversal::Module module;
+ CompositionCollector composition (ctx);
+
+ defines.node_traverser (module);
+ defines.node_traverser (composition);
+
+
+ // Layer 4
+ //
+ Traversal::Defines composition_defines;
+
+ module.edge_traverser (defines);
+ composition.edge_traverser (composition_defines);
+
+ //--
+ Traversal::ComponentExecutor component_executor;
+ Traversal::HomeExecutor home_executor;
+
+ composition_defines.node_traverser (component_executor);
+ composition_defines.node_traverser (home_executor);
+
+ // Layer 5
+ //
+ Traversal::Implements component_executor_implements;
+ Traversal::Implements home_executor_implements;
+
+ component_executor.edge_traverser (component_executor_implements);
+ home_executor.edge_traverser (home_executor_implements);
+
+ //--
+ ComponentCollector component (ctx);
+ HomeCollector home (ctx);
+
+ component_executor_implements.node_traverser (component);
+ home_executor_implements.node_traverser (home);
+
+
+ // Layer 6
+ //
+ Traversal::Defines component_defines;
+ Traversal::Inherits component_inherits;
+ Traversal::Inherits home_inherits;
+
+ component.edge_traverser (component_defines);
+ component.edge_traverser (component_inherits);
+ home.edge_traverser (home_inherits);
+
+ //--
+
+ Traversal::Provider provider;
+
+ component_defines.node_traverser (provider);
+ component_inherits.node_traverser (component);
+ home_inherits.node_traverser (home);
+
+
+ // Layer 7
+ //
+ Traversal::Belongs provider_belongs;
+ provider.edge_traverser (provider_belongs);
+
+ //
+ InterfaceCollector interface_ (ctx);
+
+ provider_belongs.node_traverser (interface_);
+
+
+ // end
+
+ unit.traverse (tu);
+ }
+
+ {
+ if (cl.get_value ("lem-force-all", false) && !file_name.empty ())
+ {
+ os << "#include \"" << file_name << '\"' << endl;
+ }
+
+
+ Traversal::TranslationUnit unit;
+
+ // Layer 1
+ //
+ Traversal::ContainsPrincipal contains_principal;
+
+ unit.edge_traverser (contains_principal);
+
+ //--
+ Traversal::TranslationRegion principal_region;
+
+ contains_principal.node_traverser (principal_region);
+
+
+ // Layer 2
+ //
+ Traversal::TranslationRegion included_region;
+
+ // Inclusion handling is somewhat tricky because we want
+ // to print only top-level #include's.
+ //
+
+ Traversal::ContainsRoot contains_root;
+ Traversal::QuoteIncludes quote_includes;
+ Traversal::BracketIncludes bracket_includes;
+ IncludesEmitter includes_emitter (ctx, os);
+
+
+ principal_region.edge_traverser (includes_emitter);
+ principal_region.edge_traverser (quote_includes);
+ principal_region.edge_traverser (bracket_includes);
+ principal_region.edge_traverser (contains_root);
+
+ included_region.edge_traverser (quote_includes);
+ included_region.edge_traverser (bracket_includes);
+ included_region.edge_traverser (contains_root);
+
+
+ //--
+ Traversal::Root root;
+
+ contains_root.node_traverser (root);
+ quote_includes.node_traverser (included_region);
+ bracket_includes.node_traverser (included_region);
+
+
+ // Layer 3
+ //
+ Traversal::Defines defines;
+ Traversal::Mentions mentions;
+ root.edge_traverser (defines);
+ root.edge_traverser (mentions);
+
+ //--
+ ModuleEmitter module (ctx, os);
+
+ CompositionEmitter composition (ctx, os);
+
+ InterfaceEmitter interface_ (ctx, os);
+ InterfaceFwdEmitter interface_fwd (ctx, os);
+
+ MonolithEmitter component_monolith (ctx, os);
+ ContextEmitter component_context (ctx, os);
+
+ HomeImplicitEmitter home_implicit (ctx, os);
+ HomeExplicitEmitter home_explicit (ctx, os);
+ HomeMainEmitter home_main (ctx, os);
+
+ defines.node_traverser (module);
+
+ defines.node_traverser (composition);
+
+ defines.node_traverser (interface_);
+ mentions.node_traverser (interface_fwd);
+
+ defines.node_traverser (component_monolith);
+ defines.node_traverser (component_context);
+
+ defines.node_traverser (home_implicit);
+ defines.node_traverser (home_explicit);
+ defines.node_traverser (home_main);
+
+ // Layer 4
+ //
+
+ Traversal::Supports supports;
+
+ Traversal::Defines composition_defines;
+
+ Traversal::Defines component_context_defines;
+
+ Traversal::Defines home_explicit_defines;
+
+ module.edge_traverser (defines);
+ module.edge_traverser (mentions);
+
+ composition.edge_traverser (composition_defines);
+
+ component_monolith.edge_traverser (supports);
+ component_context.edge_traverser (component_context_defines);
+
+ home_explicit.edge_traverser (supports);
+ home_explicit.edge_traverser (home_explicit_defines);
+
+ //--
+ TypeNameEmitter type (ctx, os);
+
+ ComponentContextEmitter session_component_context (ctx, os);
+ ComponentExecutorEmitter session_component_executor (ctx, os);
+ HomeExecutorEmitter session_home_executor (ctx, os);
+
+ ContextPortEmitter port_context (ctx, os);
+ ExplicitPortEmitter port_explicit (ctx, os);
+
+ supports.node_traverser (type);
+
+ composition_defines.node_traverser (session_component_context);
+ composition_defines.node_traverser (session_component_executor);
+ composition_defines.node_traverser (session_home_executor);
+
+ component_context_defines.node_traverser (port_context);
+
+ home_explicit_defines.node_traverser (port_explicit);
+
+
+ // Layer 5
+ //
+ Traversal::Belongs belongs;
+ Traversal::Receives receives;
+ Traversal::Raises raises;
+
+ port_context.edge_traverser (belongs);
+ port_explicit.edge_traverser (belongs);
+ port_explicit.edge_traverser (raises);
+
+ port_explicit.edge_traverser (receives);
+
+ //--
+ ParameterEmitter parameter (ctx, os);
+
+ belongs.node_traverser (type);
+ receives.node_traverser (parameter);
+ raises.node_traverser (type);
+
+ // Layer 6
+ //
+ parameter.edge_traverser (belongs);
+
+
+ // end
+
+ unit.traverse (tu);
+ }
+}
diff --git a/TAO/CIAO/CIDLC/ServantGenerator.cpp b/TAO/CIAO/CIDLC/ServantGenerator.cpp
new file mode 100644
index 00000000000..832795ee5b5
--- /dev/null
+++ b/TAO/CIAO/CIDLC/ServantGenerator.cpp
@@ -0,0 +1,201 @@
+// file : CIDLC/ServantGenerator.cpp
+// author : Jeff Parsons <j.parsons@vanderbilt.edu>
+// cvs-id : $Id$
+
+#include "ServantGenerator.hpp"
+#include "ServantHeaderGenerator.hpp"
+#include "ServantSourceGenerator.hpp"
+
+#include "CCF/CodeGenerationKit/Regex.hpp"
+#include "CCF/CodeGenerationKit/IndentationCxx.hpp"
+#include "CCF/CodeGenerationKit/IndentationImplanter.hpp"
+
+using namespace CCF;
+using namespace CIDL;
+using namespace SemanticGraph;
+using namespace Traversal;
+
+using std::string;
+using std::ostream;
+
+namespace
+{
+ // On some platforms toupper can be something else than a
+ // function.
+ int
+ upcase (int c)
+ {
+ return toupper (c);
+ }
+}
+
+ServantGenerator::ServantGenerator (CommandLine const& cl)
+ : cl_ (cl),
+ file_name_ (""),
+ export_macro_ ("")
+{
+}
+
+void ServantGenerator::options (CL::Description& d)
+{
+ d.add_option (CL::OptionDescription (
+ "svnt-hdr-file-suffix",
+ "suffix",
+ "Use provided suffix instead of default \'_svnt.h\' "
+ "when constructing name of servant file.",
+ true));
+
+ d.add_option (CL::OptionDescription (
+ "svnt-hdr-file-regex",
+ "regex",
+ "Use provided regular expression when constructing "
+ "name of servant file.",
+ true));
+ d.add_option (CL::OptionDescription (
+ "svnt-src-file-suffix",
+ "suffix",
+ "Use provided suffix instead of default \'_svnt.cpp\' "
+ "when constructing name of servant file.",
+ true));
+
+ d.add_option (CL::OptionDescription (
+ "svnt-src-file-regex",
+ "regex",
+ "Use provided regular expression when constructing "
+ "name of servant file.",
+ true));
+ d.add_option (CL::OptionDescription (
+ "svnt-export-macro",
+ "macro",
+ "Replace default servant DLL export macro "
+ "with provided ,acro.",
+ true));
+ d.add_option (CL::OptionDescription (
+ "svnt-export-include",
+ "file",
+ "Replace default servant export include file "
+ "with provided file.",
+ true));
+ d.add_option (CL::OptionDescription (
+ "suppress-register-factory",
+ "",
+ "Suppress generation of code to register eventtype "
+ "factories for event sinks.",
+ true));
+}
+
+
+void ServantGenerator::generate (SemanticGraph::TranslationUnit& u,
+ fs::path const& file)
+{
+ // Generate files
+ compute_export_macro (file);
+
+ {
+ fs::ofstream hdr_ofs;
+ ostream& hdr_os = configure_stream ("svnt-hdr-file-suffix",
+ "_svnt.h",
+ "svnt-hdr-file-regex",
+ hdr_ofs);
+
+ Indentation::Implanter<Indentation::Cxx> header_guard (hdr_os);
+
+
+ ServantHeaderEmitter hdr_emitter (hdr_os,
+ cl_,
+ export_macro_,
+ file);
+ hdr_emitter.generate (u);
+ }
+
+ {
+ fs::ofstream src_ofs;
+ ostream& src_os = configure_stream ("svnt-src-file-suffix",
+ "_svnt.cpp",
+ "svnt-src-file-regex",
+ src_ofs);
+
+ Indentation::Implanter<Indentation::Cxx> header_guard (src_os);
+
+ ServantSourceEmitter src_emitter (src_os,
+ cl_,
+ export_macro_,
+ file);
+ src_emitter.generate (u);
+ }
+}
+
+void
+ServantGenerator::compute_export_macro (const fs::path& file_path)
+{
+ if (!file_path.empty ())
+ {
+ file_name_ = file_path.leaf ();
+ }
+
+ export_macro_ = cl_.get_value ("svnt-export-macro", "");
+
+ if (export_macro_.empty () && !file_name_.empty ())
+ {
+ // Modify a copy of the filename string.
+ export_macro_ = file_name_;
+
+ // Convert filename string to upper case.
+ transform (export_macro_.begin (),
+ export_macro_.end (),
+ export_macro_.begin (),
+ upcase);
+
+ // Replace the suffix.
+ export_macro_ =
+ regex::perl_s (export_macro_,
+ "/(\\.(IDL|CIDL|CDL))?$/_SVNT_Export/");
+
+ // Replace any remaining '.' in the string with '_'.
+ export_macro_ = regex::perl_s (export_macro_,
+ "/\\./_/");
+ }
+}
+
+
+
+ostream&
+ServantGenerator::configure_stream (string const& suffix_option,
+ string const& default_suffix,
+ string const& regex_option,
+ fs::ofstream& ofs)
+{
+ if (! file_name_.empty ())
+ {
+ string file_suffix = cl_.get_value (suffix_option,
+ default_suffix);
+ string file_expr =
+ cl_.get_value (regex_option,
+ "/(\\.(idl|cidl|cdl))?$/" + file_suffix + "/");
+
+ string file_name = regex::perl_s (file_name_, file_expr);
+
+ fs::path file_path (file_name);
+
+ ofs.open (file_path, std::ios_base::out);
+
+ if (!ofs.is_open ())
+ {
+ cerr << file_name
+ << ": error: unable to open file in write mode"
+ << endl;
+ }
+ }
+
+ return ofs.is_open ()
+ ? static_cast<ostream&> (ofs)
+ : static_cast<ostream&> (std::cout);
+}
+
+
+/*
+ * Local Variables:
+ * mode: C++
+ * c-basic-offset: 2
+ * End:
+ */
diff --git a/TAO/CIAO/CIDLC/ServantHeaderGenerator.cpp b/TAO/CIAO/CIDLC/ServantHeaderGenerator.cpp
new file mode 100644
index 00000000000..c8fe1b94155
--- /dev/null
+++ b/TAO/CIAO/CIDLC/ServantHeaderGenerator.cpp
@@ -0,0 +1,2272 @@
+// file : CIDLC/ServantHeaderGenerator.cpp
+// author : Jeff Parsons <j.parsons@vanderbilt.edu>
+// cvs-id : $Id$
+
+#include "ServantHeaderGenerator.hpp"
+#include "TypeNameEmitter.hpp"
+#include "Literals.hpp"
+
+#include <ostream>
+
+#include "CCF/CodeGenerationKit/Regex.hpp"
+
+using std::endl;
+using std::string;
+
+using namespace StringLiterals;
+using namespace CCF::CIDL;
+using namespace CCF::CIDL::SemanticGraph;
+
+using std::string;
+
+namespace
+{
+ // On some platforms toupper can be something other than a
+ // function.
+ int
+ upcase (int c)
+ {
+ return std::toupper (c);
+ }
+}
+
+namespace
+{
+ class Context
+ {
+ public:
+ Context (std::ostream& os,
+ string export_macro)
+ : os_ (os),
+ export_macro_ (export_macro)
+ {
+ }
+
+ std::ostream&
+ os ()
+ {
+ return os_;
+ }
+
+ string
+ export_macro ()
+ {
+ return export_macro_;
+ }
+
+ private:
+ std::ostream& os_;
+ string export_macro_;
+ };
+
+ class EmitterBase
+ {
+ public:
+ EmitterBase (Context& c)
+ : ctx (c),
+ os (ctx.os ())
+ {
+ }
+
+ protected:
+ Context& ctx;
+ std::ostream& os;
+ };
+
+ struct OperationEmitter : Traversal::Operation, EmitterBase
+ {
+ OperationEmitter (Context& c)
+ : EmitterBase (c)
+ {}
+
+ virtual void
+ pre (Type&)
+ {
+ os << "virtual ";
+ }
+
+ virtual void
+ name (Type& o)
+ {
+ os << endl << o.name ();
+ }
+
+ virtual void
+ receives_pre (Type&)
+ {
+ os << " (" << endl;
+ }
+
+ virtual void
+ receives_none (Type&)
+ {
+ os << " (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl;
+ }
+
+ virtual void
+ receives_post (Type&)
+ {
+ os << endl << STRS[ENV_HDR] << ")" << endl;
+ }
+
+ virtual void
+ raises_pre (Type&)
+ {
+ os << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl;
+ }
+
+ virtual void
+ raises_none (Type&)
+ {
+ os << STRS[EXCP_SNGL];
+ }
+
+ virtual void
+ raises_post (Type&)
+ {
+ os << "))";
+ }
+
+ virtual void
+ post (Type&)
+ {
+ os << ";" << endl << endl;
+ }
+
+ virtual void
+ comma (Type&)
+ {
+ os << "," << endl;
+ }
+ };
+
+ // For generating parameter names.
+ template <typename T>
+ struct ParameterEmitter : T
+ {
+ ParameterEmitter (std::ostream& os_)
+ : os (os_)
+ {}
+
+ virtual void
+ name (typename T::Type& p)
+ {
+ os << " " << p.name ();
+ }
+
+ private:
+ std::ostream& os;
+ };
+
+ // Generic scoped typename emitter used by various other emitters.
+ struct TypeNameEmitter : Traversal::Type
+ {
+ TypeNameEmitter (std::ostream& os_)
+ : os (os_)
+ {}
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ os << t.scoped_name ();
+ }
+
+ private:
+ std::ostream& os;
+ };
+
+ // Generic local typename emitter used by various other emitters.
+ struct SimpleTypeNameEmitter : Traversal::Type
+ {
+ SimpleTypeNameEmitter (std::ostream& os_)
+ : os (os_)
+ {}
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ os << t.name ();
+ }
+
+ private:
+ std::ostream& os;
+ };
+
+ // Generate name of type's enclosing scope.
+ struct EnclosingTypeNameEmitter : Traversal::Type
+ {
+ EnclosingTypeNameEmitter (std::ostream& os_)
+ : os (os_)
+ {}
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ os << t.scoped_name ().scope_name ();
+ }
+
+ private:
+ std::ostream& os;
+ };
+
+ // Emits typename minus the leading double colon.
+ struct StrippedTypeNameEmitter : Traversal::Type
+ {
+ StrippedTypeNameEmitter (std::ostream& os_)
+ : os (os_)
+ {}
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ ScopedName scoped (t.scoped_name ());
+ os << Name (scoped.begin () + 1, scoped.end ());
+ }
+
+ private:
+ std::ostream& os;
+ };
+
+ // Generates operations associated with attributes.
+ // @@@ (JP) Need to support exceptions.
+ struct AttributeEmitter : Traversal::ReadWriteAttribute,
+ EmitterBase
+ {
+ AttributeEmitter (Context& c)
+ : EmitterBase (c),
+ write_type_name_emitter_ (c.os ()),
+ read_type_name_emitter_ (c.os ())
+ {
+ write_belongs_.node_traverser (write_type_name_emitter_);
+ read_belongs_.node_traverser (read_type_name_emitter_);
+ }
+
+ virtual void traverse (SemanticGraph::ReadWriteAttribute& a)
+ {
+ os << "virtual ";
+
+ Traversal::ReadWriteAttribute::belongs (a, read_belongs_);
+
+ os << endl
+ << a.name () << " (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_SNGL] << ";" << endl << endl;
+
+ os << "virtual void" << endl
+ << a.name () << " (" << endl;
+
+ Traversal::ReadWriteAttribute::belongs (a, write_belongs_);
+
+ os << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_SNGL] << ";" << endl << endl;
+ }
+
+ private:
+ INArgTypeNameEmitter write_type_name_emitter_;
+ ReturnTypeNameEmitter read_type_name_emitter_;
+ Traversal::Belongs write_belongs_;
+ Traversal::Belongs read_belongs_;
+ };
+
+ // Generates operations associated with readonly attributes.
+ // @@@ (JP) Need to support exceptions.
+ struct ReadOnlyAttributeEmitter : Traversal::ReadAttribute,
+ EmitterBase
+ {
+ ReadOnlyAttributeEmitter (Context& c)
+ : EmitterBase (c),
+ read_type_name_emitter_ (c.os ())
+ {
+ read_belongs_.node_traverser (read_type_name_emitter_);
+ }
+
+ virtual void traverse (SemanticGraph::ReadAttribute& a)
+ {
+ os << "virtual ";
+
+ Traversal::ReadAttribute::belongs (a, read_belongs_);
+
+ os << endl
+ << a.name () << " (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_SNGL] << ";" << endl << endl;
+ }
+
+ private:
+ ReturnTypeNameEmitter read_type_name_emitter_;
+ Traversal::Belongs read_belongs_;
+ };
+
+ struct InterfaceEmitter : Traversal::Interface,
+ EmitterBase
+ {
+ InterfaceEmitter (Context& c)
+ : EmitterBase (c)
+ {}
+
+ bool
+ add (Interface& i)
+ {
+ return interfaces_.insert (&i).second;
+ }
+
+ virtual void
+ traverse (Interface& i)
+ {
+ if (add (i))
+ {
+ Traversal::Interface::traverse (i);
+ }
+ }
+
+ private:
+ std::set<Interface*> interfaces_;
+ };
+
+ struct FacetEmitter : Traversal::UnconstrainedInterface,
+ EmitterBase
+ {
+ FacetEmitter (Context& c)
+ : EmitterBase (c)
+ {
+ }
+
+ virtual void
+ traverse (UnconstrainedInterface& i)
+ {
+ if (i.context ().count ("facet_hdr_gen")) return;
+
+ ScopedName scoped (i.scoped_name ());
+ Name stripped (scoped.begin () + 1, scoped.end ());
+
+ // Open a namespace.
+ os << STRS[GLUE_NS]
+ << regex::perl_s (i.scoped_name ().scope_name ().str (),
+ "/::/_/")
+ << "{"
+ << "template <typename T>" << endl
+ << "class " << i.name () << "_Servant_T" << endl
+ << ": public virtual POA_" << stripped << "," << endl
+ << STRS[INH_RCSB] << endl
+ << "{"
+ << "public:" << endl
+ << i.name () << "_Servant_T (" << endl
+ << i.scoped_name ().scope_name () << "::CCM_" << i.name ()
+ << "_ptr executor," << endl
+ << "::Components::CCMContext_ptr ctx);" << endl
+ << "virtual ~" << i.name () << "_Servant_T (void);" << endl;
+
+ {
+ InterfaceEmitter interface_emitter (ctx);
+
+ Traversal::Defines defines_;
+ Traversal::Inherits inherits_;
+ interface_emitter.edge_traverser (defines_);
+ interface_emitter.edge_traverser (inherits_);
+
+ AttributeEmitter attribute_emitter (ctx);
+ ReadOnlyAttributeEmitter read_only_attribute_emitter (ctx);
+ defines_.node_traverser (attribute_emitter);
+ defines_.node_traverser (read_only_attribute_emitter);
+
+ OperationEmitter operation_emitter (ctx);
+ defines_.node_traverser (operation_emitter);
+ inherits_.node_traverser (interface_emitter);
+
+ Traversal::Receives receives;
+ Traversal::Belongs returns;
+ Traversal::Raises raises;
+ operation_emitter.edge_traverser (receives);
+ operation_emitter.edge_traverser (returns);
+ operation_emitter.edge_traverser (raises);
+
+ ParameterEmitter<Traversal::InParameter> in_param (os);
+ ParameterEmitter<Traversal::InOutParameter> inout_param (os);
+ ParameterEmitter<Traversal::OutParameter> out_param (os);
+ receives.node_traverser (in_param);
+ receives.node_traverser (inout_param);
+ receives.node_traverser (out_param);
+
+ ReturnTypeNameEmitter return_type_emitter (os);
+ TypeNameEmitter type_name_emitter (os);
+ returns.node_traverser (return_type_emitter);
+ raises.node_traverser (type_name_emitter);
+
+ Traversal::Belongs in_belongs, inout_belongs, out_belongs;
+ in_param.edge_traverser (in_belongs);
+ inout_param.edge_traverser (inout_belongs);
+ out_param.edge_traverser (out_belongs);
+
+ INArgTypeNameEmitter in_arg_emitter (os);
+ INOUTArgTypeNameEmitter inout_arg_emitter (os);
+ OUTArgTypeNameEmitter out_arg_emitter (os);
+ in_belongs.node_traverser (in_arg_emitter);
+ inout_belongs.node_traverser (inout_arg_emitter);
+ out_belongs.node_traverser (out_arg_emitter);
+
+ inherits (i, inherits_);
+ names (i, defines_);
+ }
+
+ os << "// Get component implementation." << endl
+ << "virtual CORBA::Object_ptr" << endl
+ << "_get_component (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_SNGL] << ";" << endl
+ << endl
+ << "protected:" << endl
+ << "// Facet executor." << endl
+ << i.scoped_name ().scope_name ()<< "::CCM_" << i.name ()
+ << "_var executor_;" << endl
+ << "// Context object." << endl
+ << "::Components::CCMContext_var ctx_;" << endl
+ << "};";
+
+ os << "typedef " << ctx.export_macro () << " "
+ << i.name () << "_Servant_T<int> "
+ << i.name () << "_Servant;";
+
+ // Close the CIAO_GLUE namespace.
+ os << "}";
+
+ i.context ().set ("facet_hdr_gen", true);
+ }
+ };
+
+ struct ContextEmitter : Traversal::Component, EmitterBase
+ {
+ ContextEmitter (Context& c)
+ : EmitterBase (c)
+ {}
+
+ // Nested classes used by this emitter.
+ private:
+ struct PortsEmitterPublic : Traversal::EmitterData,
+ Traversal::SingleUserData,
+ Traversal::MultiUserData,
+ Traversal::PublisherData,
+ EmitterBase
+ {
+ PortsEmitterPublic (Context& c)
+ : EmitterBase (c),
+ type_name_emitter_ (c.os ())
+ {
+ belongs_.node_traverser (type_name_emitter_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Emitter& e)
+ {
+ os << "virtual void" << endl
+ << "push_" << e.name ()
+ << " (" << endl;
+
+ Traversal::EmitterData::belongs (e, belongs_);
+
+ os << "ev" << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_SNGL] << ";" << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::SingleUser& u)
+ {
+ os << "virtual ";
+
+ Traversal::SingleUserData::belongs (u, belongs_);
+
+ os << endl
+ << "get_connection_" << u.name ()
+ << " (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_SNGL] << ";" << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::MultiUser& u)
+ {
+ os << "virtual " << u.scoped_name () << "Connections *" << endl
+ << "get_connections_" << u.name ()
+ << " (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_SNGL] << ";" << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Publisher& p)
+ {
+ os << "virtual void" << endl
+ << "push_" << p.name ()
+ << " (" << endl;
+
+ Traversal::PublisherData::belongs (p, belongs_);
+
+ os << "ev" << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_SNGL] << ";" << endl;
+ }
+
+ private:
+ INArgTypeNameEmitter type_name_emitter_;
+ Traversal::Belongs belongs_;
+ };
+
+ struct PortsEmitterProtected : Traversal::EmitterData,
+ Traversal::SingleUserData,
+ Traversal::MultiUserData,
+ Traversal::PublisherData,
+ EmitterBase
+ {
+ PortsEmitterProtected (Context& c)
+ : EmitterBase (c),
+ type_name_emitter_ (c.os ())
+ {
+ belongs_.node_traverser (type_name_emitter_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Emitter& e)
+ {
+ os << "virtual void" << endl
+ << "connect_" << e.name () << " (" << endl;
+
+ Traversal::EmitterData::belongs (e, belongs_);
+
+ os << "Consumer_ptr c" << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_AC] << "));" << endl << endl;
+
+ os << "virtual ";
+
+ Traversal::EmitterData::belongs (e, belongs_);
+
+ os << "Consumer_ptr" << endl
+ << "disconnect_" << e.name () << " (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_NC] << "));" << endl << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::SingleUser& u)
+ {
+ os << "virtual void" << endl
+ << "connect_" << u.name () << " (" << endl;
+
+ Traversal::SingleUserData::belongs (u, belongs_);
+
+ os << "_ptr" << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_AC] << "," << endl
+ << STRS[EXCP_IC] << "));" << endl << endl;
+
+ os << "virtual ";
+
+ Traversal::SingleUserData::belongs (u, belongs_);
+
+ os << "_ptr" << endl
+ << "disconnect_" << u.name () << " (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_NC] << "));" << endl << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::MultiUser& u)
+ {
+ os << "virtual ::Components::Cookie *" << endl
+ << "connect_" << u.name () << " (" << endl;
+
+ Traversal::MultiUserData::belongs (u, belongs_);
+
+ os << "_ptr" << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_ECL] << "," << endl
+ << STRS[EXCP_IC] << "));" << endl << endl;
+
+ os << "virtual ";
+
+ Traversal::MultiUserData::belongs (u, belongs_);
+
+ os << "_ptr" << endl
+ << "disconnect_" << u.name () << " (" << endl
+ << "::Components::Cookie * ck" << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_IC] << "));" << endl << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Publisher& p)
+ {
+ os << "virtual " << STRS[COMP_CK] << " *" << endl
+ << "subscribe_" << p.name () << " (" << endl;
+
+ Traversal::PublisherData::belongs (p, belongs_);
+
+ os << "Consumer_ptr c" << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_ECL] << "));" << endl << endl;
+
+ os << "virtual ";
+
+ Traversal::PublisherData::belongs (p, belongs_);
+
+ os << "Consumer_ptr" << endl
+ << "unsubscribe_" << p.name () << " (" << endl
+ << STRS[COMP_CK] << " *ck" << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_IC] << "));" << endl << endl;
+ }
+
+ private:
+ TypeNameEmitter type_name_emitter_;
+ Traversal::Belongs belongs_;
+ };
+
+ struct PortsEmitterMembers : Traversal::EmitterData,
+ Traversal::SingleUserData,
+ Traversal::MultiUserData,
+ Traversal::PublisherData,
+ EmitterBase
+ {
+ PortsEmitterMembers (Context& c)
+ : EmitterBase (c),
+ type_name_emitter_ (c.os ())
+ {
+ belongs_.node_traverser (type_name_emitter_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Emitter& e)
+ {
+ Traversal::EmitterData::belongs (e, belongs_);
+
+ os << "Consumer_var" << endl
+ << "ciao_emits_" << e.name () << "_consumer_;"
+ << endl << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::SingleUser& u)
+ {
+ os << "// Simplex " << u.name () << " connection." << endl;
+
+ Traversal::SingleUserData::belongs (u, belongs_);
+
+ os << "_var" << endl
+ << "ciao_uses_" << u.name () << "_;" << endl << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::MultiUser& u)
+ {
+ os << "// Multiplex " << u.name () << " connection." << endl
+ << "ACE_Active_Map_Manager<" << endl;
+
+ Traversal::MultiUserData::belongs (u, belongs_);
+
+ os << "_var>" << endl
+ << "ciao_uses_" << u.name () << "_;" << endl << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Publisher& p)
+ {
+ os << "ACE_Active_Map_Manager<" << endl;
+
+ Traversal::PublisherData::belongs (p, belongs_);
+
+ os << "Consumer_var>" << endl
+ << "ciao_publishes_" << p.name () << "_map_;"
+ << endl << endl;
+ }
+
+ private:
+ TypeNameEmitter type_name_emitter_;
+ Traversal::Belongs belongs_;
+ };
+
+ public:
+ virtual void
+ pre (Type& t)
+ {
+ // CIAO has facet classes outside the context and servant classes.
+ // We launch it here to generate the classes at the top of the file,
+ // like the original hand-crafted examples, for easier checking.
+ // This can be moved later to ServantEmitter::pre() or out on its own.
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits component_inherits;
+ component_inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+ component_emitter.edge_traverser (component_inherits);
+
+ Traversal::Provider provider;
+ defines.node_traverser (provider);
+
+ Traversal::Belongs belongs;
+ provider.edge_traverser (belongs);
+
+ FacetEmitter facet_emitter (ctx);
+ belongs.node_traverser (facet_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << STRS[GLUE_NS]
+ << regex::perl_s (t.scoped_name ().scope_name ().str (), "/::/_/")
+ << "{";
+
+ os << "class " << t.name () << "_Servant;" << endl;
+
+ os << "class " << ctx.export_macro () << " " << t.name ()
+ << "_Context" << endl
+ << " : public virtual CIAO::Context_Impl<" << endl
+ << " " << t.scoped_name ().scope_name () << "::CCM_"
+ << t.name () << "_Context," << endl
+ << " " << t.name () << "_Servant," << endl
+ << " " << t.scoped_name () << "," << endl
+ << " " << t.scoped_name () << "_var" << endl
+ << " >" << endl
+ << "{"
+ << "public:" << endl;
+
+ os << "// We will allow the servant glue code we generate to "
+ << "access our state." << endl
+ << "friend class " << t.name () << "_Servant;" << endl;
+
+ os << "/// Hack for VC6." << endl
+ << "typedef CIAO::Context_Impl<" << endl
+ << " " << t.scoped_name ().scope_name () << "::CCM_"
+ << t.name () << "_Context," << endl
+ << " " << t.name () << "_Servant," << endl
+ << " " << t.scoped_name () << "," << endl
+ << " " << t.scoped_name () << "_var" << endl
+ << " > ctx_svnt_base;" << endl;
+
+ os << t.name () << "_Context (" << endl
+ << "::Components::CCMHome_ptr home," << endl
+ << "::CIAO::Session_Container *c," << endl
+ << t.name () << "_Servant *sv);" << endl;
+
+ os << "virtual ~" << t.name () << "_Context (void);"
+ << endl;
+
+ os << "// Operations for " << t.name () << " receptacles"
+ << " and event sources," << endl
+ << "// defined in " << t.scoped_name ().scope_name () << "::CCM_"
+ << t.name () << "_Context."
+ << endl << endl;
+
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits component_inherits;
+ component_inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+ component_emitter.edge_traverser (component_inherits);
+
+ PortsEmitterPublic ports_emitter (ctx);
+ defines.node_traverser (ports_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << "// CIAO-specific." << endl << endl;
+
+ os << "static " << t.name () << "_Context *" << endl
+ << "_narrow (" << endl
+ << STRS[COMP_SC] << "_ptr p" << endl
+ << STRS[ENV_HDR] << ");" << endl;
+
+ os << "protected:" << endl
+ << "// Methods that manage this component's connections"
+ << " and consumers." << endl << endl;
+
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits component_inherits;
+ component_inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+ component_emitter.edge_traverser (component_inherits);
+
+ PortsEmitterProtected ports_emitter (ctx);
+ defines.node_traverser (ports_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << "protected:" << endl;
+
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits component_inherits;
+ component_inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+ component_emitter.edge_traverser (component_inherits);
+
+ PortsEmitterMembers ports_emitter (ctx);
+ defines.node_traverser (ports_emitter);
+
+ component_emitter.traverse (t);
+ }
+ }
+
+ virtual void
+ post (Type&)
+ {
+ // Component context class closer.
+ os << "};";
+
+ // Namespace closer.
+ os << "}";
+ }
+ };
+
+ struct ServantEmitter : Traversal::Component, EmitterBase
+ {
+ ServantEmitter (Context& c)
+ : EmitterBase (c)
+ {}
+
+ // Nested classes used by this emitter.
+ private:
+ struct PortsEmitterPublic : Traversal::EmitterData,
+ Traversal::SingleUserData,
+ Traversal::MultiUserData,
+ Traversal::PublisherData,
+ Traversal::ConsumerData,
+ Traversal::ProviderData,
+ EmitterBase
+ {
+ PortsEmitterPublic (Context& c)
+ : EmitterBase (c),
+ type_name_emitter_ (c.os ()),
+ simple_type_name_emitter_ (c.os ()),
+ stripped_type_name_emitter_ (c.os ())
+ {
+ belongs_.node_traverser (type_name_emitter_);
+ simple_belongs_.node_traverser (simple_type_name_emitter_);
+ stripped_belongs_.node_traverser (stripped_type_name_emitter_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Provider& p)
+ {
+ os << "virtual ";
+
+ Traversal::ProviderData::belongs (p, belongs_);
+
+ os << "_ptr" << endl
+ << "provide_" << p.name () << " (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_SNGL] << ";" << endl << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::SingleUser& u)
+ {
+ os << "virtual void" << endl
+ << "connect_" << u.name () << " (" << endl;
+
+ Traversal::SingleUserData::belongs (u, belongs_);
+
+ os << "_ptr c" << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_AC] << "," << endl
+ << STRS[EXCP_IC] << "));" << endl << endl;
+
+ os << "virtual ";
+
+ Traversal::SingleUserData::belongs (u, belongs_);
+
+ os << "_ptr" << endl
+ << "disconnect_" << u.name () << " (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_NC] << "));" << endl << endl;
+
+ os << "virtual ";
+
+ Traversal::SingleUserData::belongs (u, belongs_);
+
+ os << "_ptr" << endl
+ << "get_connection_" << u.name () << " (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_SNGL] << ";" << endl << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::MultiUser& u)
+ {
+ os << "virtual ::Components::Cookie *" << endl
+ << "connect_" << u.name () << " (" << endl;
+
+ Traversal::MultiUserData::belongs (u, belongs_);
+
+ os << "_ptr c" << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_ECL] << "," << endl
+ << STRS[EXCP_IC] << "));" << endl << endl;
+
+ os << "virtual ";
+
+ Traversal::MultiUserData::belongs (u, belongs_);
+
+ os << "_ptr" << endl
+ << "disconnect_" << u.name () << " (" << endl
+ << "::Components::Cookie * ck" << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_IC] << "));" << endl << endl;
+
+ os << "virtual " << u.scoped_name () << "Connections *" << endl
+ << "get_connections_" << u.name () << " (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_SNGL] << ";" << endl << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Consumer& c)
+ {
+ os << "// Servant class for the " << c.name ()
+ << " consumer." << endl
+ << "class " << ctx.export_macro () << " ";
+
+ Traversal::ConsumerData::belongs (c, simple_belongs_);
+
+ os << "Consumer_"
+ << c.name () << "_Servant" << endl
+ << ": public virtual POA_";
+
+ Traversal::ConsumerData::belongs (c, stripped_belongs_);
+
+ os << "Consumer," << endl
+ << STRS[INH_RCSB] << endl
+ << "{"
+ << "public:" << endl;
+
+ Traversal::ConsumerData::belongs (c, simple_belongs_);
+
+ os << "Consumer_" << c.name () << "_Servant (" << endl
+ << c.scoped_name ().scope_name ().scope_name () << "::CCM_"
+ << c.scoped_name ().scope_name ().simple_name () << "_ptr executor,"
+ << endl
+ << c.scoped_name ().scope_name ().scope_name () << "::CCM_"
+ << c.scoped_name ().scope_name ().simple_name ()
+ << "_Context_ptr c);" << endl << endl;
+
+ os << "virtual ~";
+
+ Traversal::ConsumerData::belongs (c, simple_belongs_);
+
+ os << "Consumer_"
+ << c.name () << "_Servant (void);" << endl << endl;
+
+ // @@@ (JP) May need to generate this for the eventtype's ancestors
+ // as well (the spec is vague on this point). If so, we need the
+ // CIDL compiler to support valuetype/eventtype inheritance.
+ os << "virtual void" << endl
+ << "push_";
+
+ Traversal::ConsumerData::belongs (c, simple_belongs_);
+
+ os << " (" << endl;
+
+ Traversal::ConsumerData::belongs (c, belongs_);
+
+ os << " *evt" << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_SNGL] << ";" << endl << endl;
+
+ os << "// Inherited from " << STRS[COMP_ECB] << "." << endl
+ << "virtual void" << endl
+ << "push_event (::Components::EventBase *ev" << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_BET] << "));" << endl << endl;
+
+ os << "// Get component implementation." << endl
+ << "virtual CORBA::Object_ptr" << endl
+ << "_get_component (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_SNGL] << ";" << endl << endl;
+
+ os << "protected:" << endl
+ << c.scoped_name ().scope_name ().scope_name () << "::CCM_"
+ << c.scoped_name ().scope_name ().simple_name ()
+ << "_var" << endl
+ << "executor_;" << endl << endl;
+
+ os << c.scoped_name ().scope_name ().scope_name () << "::CCM_"
+ << c.scoped_name ().scope_name ().simple_name ()
+ << "_Context_var" << endl
+ << "ctx_;" << endl << endl;
+
+ os << "};";
+
+ os << "virtual ";
+
+ Traversal::ConsumerData::belongs (c, belongs_);
+
+ os << "Consumer_ptr" << endl
+ << "get_consumer_" << c.name () << " (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_SNGL] << ";" << endl << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Emitter& e)
+ {
+ os << "virtual void" << endl
+ << "connect_" << e.name () << " (" << endl;
+
+ Traversal::EmitterData::belongs (e, belongs_);
+
+ os << "Consumer_ptr c" << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_AC] << "));" << endl << endl;
+
+ os << "virtual ";
+
+ Traversal::EmitterData::belongs (e, belongs_);
+
+ os << "Consumer_ptr" << endl
+ << "disconnect_" << e.name () << " (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_NC] << "));" << endl << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Publisher& p)
+ {
+ os << "virtual " << STRS[COMP_CK] << " *" << endl
+ << "subscribe_" << p.name () << " (" << endl;
+
+ Traversal::PublisherData::belongs (p, belongs_);
+
+ os << "Consumer_ptr c" << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_ECL] << "));" << endl << endl;
+
+ os << "virtual ";
+
+ Traversal::PublisherData::belongs (p, belongs_);
+
+ os << "Consumer_ptr" << endl
+ << "unsubscribe_" << p.name () << " (" << endl
+ << STRS[COMP_CK] << " *ck" << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_IC] << "));" << endl << endl;
+ }
+
+ private:
+ TypeNameEmitter type_name_emitter_;
+ SimpleTypeNameEmitter simple_type_name_emitter_;
+ StrippedTypeNameEmitter stripped_type_name_emitter_;
+ Traversal::Belongs belongs_;
+ Traversal::Belongs simple_belongs_;
+ Traversal::Belongs stripped_belongs_;
+ };
+
+ struct PortsEmitterProtected : Traversal::ConsumerData,
+ Traversal::ProviderData,
+ EmitterBase
+ {
+ PortsEmitterProtected (Context& c)
+ : EmitterBase (c),
+ type_name_emitter_ (c.os ())
+ {
+ belongs_.node_traverser (type_name_emitter_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Provider& p)
+ {
+ Traversal::ProviderData::belongs (p, belongs_);
+
+ os << "_var" << endl
+ << "provide_" << p.name () << "_;" << endl << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Consumer& c)
+ {
+ Traversal::ConsumerData::belongs (c, belongs_);
+
+ os << "Consumer_var" << endl
+ << "consumes_" << c.name () << "_;" << endl << endl;
+ }
+
+ private:
+ TypeNameEmitter type_name_emitter_;
+ Traversal::Belongs belongs_;
+ };
+
+ struct PortsEmitterPrivate : Traversal::EmitterData,
+ Traversal::SingleUserData,
+ Traversal::MultiUserData,
+ Traversal::PublisherData,
+ Traversal::ConsumerData,
+ Traversal::ProviderData,
+ EmitterBase
+ {
+ PortsEmitterPrivate (Context& c)
+ : EmitterBase (c),
+ type_name_emitter_ (c.os ()),
+ simple_type_name_emitter_ (c.os ()),
+ stripped_type_name_emitter_ (c.os ())
+ {
+ belongs_.node_traverser (type_name_emitter_);
+ simple_belongs_.node_traverser (simple_type_name_emitter_);
+ stripped_belongs_.node_traverser (stripped_type_name_emitter_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Provider& p)
+ {
+ os << "::CORBA::Object_ptr" << endl
+ << "provide_" << p.name () << "_i (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_SNGL] << ";" << endl << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::SingleUser&)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::MultiUser&)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Consumer& c)
+ {
+ os << "::Components::EventConsumerBase_ptr" << endl
+ << "get_consumer_" << c.name () << "_i (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_SNGL] << ";" << endl << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Emitter&)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Publisher&)
+ {
+ }
+
+ private:
+ TypeNameEmitter type_name_emitter_;
+ SimpleTypeNameEmitter simple_type_name_emitter_;
+ StrippedTypeNameEmitter stripped_type_name_emitter_;
+ Traversal::Belongs belongs_;
+ Traversal::Belongs simple_belongs_;
+ Traversal::Belongs stripped_belongs_;
+ };
+
+ public:
+ virtual void
+ pre (Type& t)
+ {
+ os << STRS[GLUE_NS]
+ << regex::perl_s (t.scoped_name ().scope_name ().str (), "/::/_/")
+ << "{";
+
+ ScopedName scoped (t.scoped_name ());
+ Name stripped (scoped.begin () + 1, scoped.end ());
+
+ os << "class " << ctx.export_macro () << " " << t.name ()
+ << "_Servant" << endl
+ << " : public virtual CIAO::Servant_Impl<" << endl
+ << " POA_" << stripped << "," << endl
+ << " " << t.scoped_name ().scope_name () << "::CCM_"
+ << t.name () << "," << endl
+ << " " << t.scoped_name ().scope_name () << "::CCM_"
+ << t.name () << "_var," << endl
+ << " " << t.name () << "_Context" << endl
+ << " >" << endl
+ << "{"
+ << "public:" << endl;
+
+ os << "/// Hack for VC6." << endl
+ << "typedef CIAO::Servant_Impl<" << endl
+ << " POA_" << stripped << "," << endl
+ << " " << t.scoped_name ().scope_name () << "::CCM_"
+ << t.name () << "," << endl
+ << " " << t.scoped_name ().scope_name () << "::CCM_"
+ << t.name () << "_var," << endl
+ << " " << t.name () << "_Context" << endl
+ << " > comp_svnt_base;" << endl << endl;
+
+ os << t.name () << "_Servant (" << endl
+ << t.scoped_name ().scope_name () << "::CCM_" << t.name ()
+ << "_ptr executor," << endl
+ << "::Components::CCMHome_ptr home," << endl
+ << "::CIAO::Session_Container *c);" << endl << endl;
+
+ os << "virtual ~" << t.name () << "_Servant (void);"
+ << endl << endl;
+
+ os << "virtual void" << endl
+ << "set_attributes (" << endl
+ << "const ::Components::ConfigValues &descr" << endl
+ << STRS[ENV_SRC] << ");" << endl << endl;
+
+ os << "// Supported operations." << endl << endl;
+
+ // Generate operations for all supported interfaces.
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits component_inherits;
+ component_inherits.node_traverser (component_emitter);
+
+ Traversal::Supports supports_;
+ component_emitter.edge_traverser (component_inherits);
+ component_emitter.edge_traverser (supports_);
+ InterfaceEmitter interface_emitter (ctx);
+ supports_.node_traverser (interface_emitter);
+
+ Traversal::Defines defines;
+ Traversal::Inherits interface_inherits;
+ interface_emitter.edge_traverser (defines);
+ interface_emitter.edge_traverser (interface_inherits);
+
+ AttributeEmitter attribute_emitter (ctx);
+ ReadOnlyAttributeEmitter read_only_attribute_emitter (ctx);
+ defines.node_traverser (attribute_emitter);
+ defines.node_traverser (read_only_attribute_emitter);
+
+ OperationEmitter operation_emitter (ctx);
+ defines.node_traverser (operation_emitter);
+ interface_inherits.node_traverser (interface_emitter);
+
+ Traversal::Receives receives;
+ Traversal::Belongs returns;
+ Traversal::Raises raises;
+ operation_emitter.edge_traverser (receives);
+ operation_emitter.edge_traverser (returns);
+ operation_emitter.edge_traverser (raises);
+
+ ParameterEmitter<Traversal::InParameter> in_param (os);
+ ParameterEmitter<Traversal::InOutParameter> inout_param (os);
+ ParameterEmitter<Traversal::OutParameter> out_param (os);
+ receives.node_traverser (in_param);
+ receives.node_traverser (inout_param);
+ receives.node_traverser (out_param);
+
+ ReturnTypeNameEmitter return_type_emitter (os);
+ TypeNameEmitter type_name_emitter (os);
+ returns.node_traverser (return_type_emitter);
+ raises.node_traverser (type_name_emitter);
+
+ Traversal::Belongs in_belongs, inout_belongs, out_belongs;
+ in_param.edge_traverser (in_belongs);
+ inout_param.edge_traverser (inout_belongs);
+ out_param.edge_traverser (out_belongs);
+
+ INArgTypeNameEmitter in_arg_emitter (os);
+ INOUTArgTypeNameEmitter inout_arg_emitter (os);
+ OUTArgTypeNameEmitter out_arg_emitter (os);
+ in_belongs.node_traverser (in_arg_emitter);
+ inout_belongs.node_traverser (inout_arg_emitter);
+ out_belongs.node_traverser (out_arg_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << "// Public port operations." << endl << endl;
+
+ // Generate public operations for ports, and nested classes for
+ // event consumers.
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits component_inherits;
+ component_inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (component_inherits);
+ component_emitter.edge_traverser (defines);
+
+ PortsEmitterPublic ports_emitter (ctx);
+ defines.node_traverser (ports_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ // Generate operations for component attributes.
+ os << "// Component attribute operations." << endl << endl;
+
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits component_inherits;
+ component_inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+ component_emitter.edge_traverser (component_inherits);
+
+ AttributeEmitter attribute_emitter (ctx);
+ ReadOnlyAttributeEmitter read_only_attribute_emitter (ctx);
+ defines.node_traverser (attribute_emitter);
+ defines.node_traverser (read_only_attribute_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << "// Operations for Receptacles interface." << endl << endl;
+
+ os << "virtual " << STRS[COMP_CK] << " *" << endl
+ << "connect (" << endl
+ << "const char *name," << endl
+ << "CORBA::Object_ptr connection" << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_IN] << "," << endl
+ << STRS[EXCP_IC] << "," << endl
+ << STRS[EXCP_AC] << "," << endl
+ << STRS[EXCP_ECL] << "));" << endl << endl;
+
+ os << "virtual CORBA::Object_ptr" << endl
+ << "disconnect (" << endl
+ << "const char *name," << endl
+ << STRS[COMP_CK] << " *ck" << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_IN] << "," << endl
+ << STRS[EXCP_IC] << "," << endl
+ << STRS[EXCP_CR] << "," << endl
+ << STRS[EXCP_NC] << "));" << endl << endl;
+
+ os << "// Operations for Events interface." << endl << endl;
+
+ os << "virtual " << STRS[COMP_CK] << " *" << endl
+ << "subscribe (" << endl
+ << "const char *publisher_name," << endl
+ << STRS[COMP_ECB] << "_ptr subscriber" << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_IN] << "," << endl
+ << STRS[EXCP_IC] << "," << endl
+ << STRS[EXCP_ECL] << "));" << endl << endl;
+
+ os << "virtual " << STRS[COMP_ECB] << "_ptr" << endl
+ << "unsubscribe (" << endl
+ << "const char *publisher_name," << endl
+ << STRS[COMP_CK] << " *ck" << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_IN] << "," << endl
+ << STRS[EXCP_IC] << "));" << endl << endl;
+
+ os << "virtual void" << endl
+ << "connect_consumer (" << endl
+ << "const char *emitter_name," << endl
+ << STRS[COMP_ECB] << "_ptr consumer" << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_IN] << "," << endl
+ << STRS[EXCP_AC] << "," << endl
+ << STRS[EXCP_IC] << "));" << endl << endl;
+
+ os << "// CIAO specific operations on the servant " << endl
+ << "CORBA::Object_ptr" << endl
+ << "get_facet_executor (const char *name" << endl
+ << STRS[ENV_HDR] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS]<< "));" << endl << endl;
+
+ os << "private:" << endl << endl;
+
+ // Generate protected operations for facets and event sinks.
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits component_inherits;
+ component_inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+ component_emitter.edge_traverser (component_inherits);
+
+ PortsEmitterProtected ports_emitter (ctx);
+ defines.node_traverser (ports_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << "private:" << endl << endl
+ << "void" << endl
+ << "populate_port_tables (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl
+ << STRS[EXCP_SNGL] << ";" << endl << endl;
+
+ // Generate private operations for ports.
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits component_inherits;
+ component_inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+ component_emitter.edge_traverser (component_inherits);
+
+ PortsEmitterPrivate ports_emitter (ctx);
+ defines.node_traverser (ports_emitter);
+
+ component_emitter.traverse (t);
+ }
+ }
+
+ virtual void
+ post (Type&)
+ {
+ // Component servant class closer.
+ os << "};";
+
+ // Namespace closer.
+ os << "}";
+ }
+ };
+
+ struct HomeEmitter : Traversal::Home, EmitterBase
+ {
+ HomeEmitter (Context& c)
+ : EmitterBase (c),
+ type_name_emitter_ (c.os ()),
+ simple_type_name_emitter_ (c.os ()),
+ enclosing_type_name_emitter_ (c.os ())
+ {
+ manages_.node_traverser (type_name_emitter_);
+ simple_manages_.node_traverser (simple_type_name_emitter_);
+ enclosing_manages_.node_traverser (enclosing_type_name_emitter_);
+ }
+
+ // Nested classes used by this emitter.
+ private:
+ // HomeFactory and HomeFinder are tied to Operation in
+ // the front end. Since we want to treat them differently
+ // than regular operations in a home (we want to generate
+ // base class factory operations returning the base component,
+ // for example), we use this class for regular home operations
+ // that overrides HomeFactory and HomeFinder traversals
+ // to do nothing.
+ struct HomeOperationEmitter : OperationEmitter,
+ Traversal::HomeFactory,
+ Traversal::HomeFinder
+ {
+ HomeOperationEmitter (Context& c)
+ : OperationEmitter (c)
+ {}
+
+ virtual void
+ traverse (SemanticGraph::HomeFactory&)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::HomeFinder&)
+ {
+ }
+ };
+
+ struct FactoryOperationEmitter : Traversal::HomeFactory,
+ EmitterBase
+ {
+ FactoryOperationEmitter (Context& c)
+ : EmitterBase (c)
+ {}
+
+ virtual void
+ pre (SemanticGraph::HomeFactory&)
+ {
+ os << "virtual ";
+ }
+
+ virtual void
+ returns (SemanticGraph::HomeFactory& t)
+ {
+ ReturnTypeNameEmitter returns_emitter (os);
+ Traversal::Returns returns_;
+ returns_.node_traverser (returns_emitter);
+
+ Traversal::HomeFactory::returns (t, returns_);
+
+ os << endl;
+ }
+
+ virtual void
+ name (SemanticGraph::HomeFactory& t)
+ {
+ os << t.name ();
+ }
+
+ virtual void
+ receives_none (SemanticGraph::HomeFactory&)
+ {
+ os << " (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl;
+ }
+
+ virtual void
+ receives_pre (SemanticGraph::HomeFactory&)
+ {
+ os << " (" << endl;
+ }
+
+ virtual void
+ receives_post (SemanticGraph::HomeFactory&)
+ {
+ os << endl << STRS[ENV_HDR] << ")" << endl;
+ }
+
+ virtual void
+ raises_none (SemanticGraph::HomeFactory&)
+ {
+ os << STRS[EXCP_SNGL];
+ }
+
+ virtual void
+ raises_pre (SemanticGraph::HomeFactory&)
+ {
+ os << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl;
+ }
+
+ virtual void
+ raises_post (SemanticGraph::HomeFactory&)
+ {
+ os << "))";
+ }
+
+ virtual void
+ post (SemanticGraph::HomeFactory&)
+ {
+ os << ";" << endl << endl;
+ }
+
+ virtual void
+ comma (SemanticGraph::HomeFactory&)
+ {
+ os << "," << endl;
+ }
+ };
+
+ struct FinderOperationEmitter : Traversal::HomeFinder,
+ EmitterBase
+ {
+ FinderOperationEmitter (Context& c)
+ : EmitterBase (c),
+ returns_emitter_ (c.os ())
+ {
+ returns_.node_traverser (returns_emitter_);
+ }
+
+ virtual void
+ pre (SemanticGraph::HomeFinder&)
+ {
+ os << "virtual ";
+ }
+
+ virtual void
+ returns (SemanticGraph::HomeFinder& t)
+ {
+ Traversal::HomeFinder::returns (t, returns_);
+
+ os << endl;
+ }
+
+ virtual void
+ name (SemanticGraph::HomeFinder& t)
+ {
+ os << t.name ();
+ }
+
+ virtual void
+ receives_none (SemanticGraph::HomeFinder&)
+ {
+ os << " (" << endl
+ << STRS[ENV_SNGL_HDR] << ")" << endl;
+ }
+
+ virtual void
+ receives_pre (SemanticGraph::HomeFinder&)
+ {
+ os << " (" << endl;
+ }
+
+ virtual void
+ receives_post (SemanticGraph::HomeFinder&)
+ {
+ os << endl << STRS[ENV_HDR] << ")" << endl;
+ }
+
+ virtual void
+ raises_none (SemanticGraph::HomeFinder&)
+ {
+ os << STRS[EXCP_SNGL];
+ }
+
+ virtual void
+ raises_pre (SemanticGraph::HomeFinder&)
+ {
+ os << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl;
+ }
+
+ virtual void
+ raises_post (SemanticGraph::HomeFinder&)
+ {
+ os << "))";
+ }
+
+ virtual void
+ post (SemanticGraph::HomeFinder&)
+ {
+ os << ";" << endl << endl;
+ }
+
+ virtual void
+ comma (SemanticGraph::HomeFinder&)
+ {
+ os << "," << endl;
+ }
+
+ private:
+ ReturnTypeNameEmitter returns_emitter_;
+ Traversal::Returns returns_;
+ };
+
+ public:
+ virtual void pre (Type& t)
+ {
+ os << STRS[GLUE_NS]
+ << regex::perl_s (t.scoped_name ().scope_name ().str (), "/::/_/")
+ << "{";
+
+ ScopedName scoped (t.scoped_name ());
+ Name stripped (scoped.begin () + 1, scoped.end ());
+
+ os << "class " << ctx.export_macro () << " " << t.name ()
+ << "_Servant" << endl
+ << " : public virtual CIAO::Home_Servant_Impl<" << endl
+ << " POA_" << stripped << "," << endl
+ << " " << t.scoped_name ().scope_name () << "::CCM_"
+ << t.name () << "," << endl
+ << " " << t.scoped_name ().scope_name () << "::CCM_"
+ << t.name () << "_var," << endl
+ << " ";
+
+ Traversal::Home::manages (t, manages_);
+
+ os << "," << endl
+ << " ";
+
+ Traversal::Home::manages (t, manages_);
+
+ os << "_var," << endl
+ << " ";
+
+ Traversal::Home::manages (t, enclosing_manages_);
+
+ os << "::CCM_";
+
+ Traversal::Home::manages (t, simple_manages_);
+
+ os << "," << endl
+ << " ";
+
+ Traversal::Home::manages (t, enclosing_manages_);
+
+ os << "::CCM_";
+
+ Traversal::Home::manages (t, simple_manages_);
+
+ os << "_var," << endl
+ << " ";
+
+ Traversal::Home::manages (t, simple_manages_);
+
+ os << "_Servant" << endl
+ << " >" << endl
+ << "{"
+ << "public:" << endl
+ << "/// Hack for VC6." << endl
+ << "typedef CIAO::Home_Servant_Impl<" << endl
+ << " POA_" << stripped << "," << endl
+ << " " << t.scoped_name ().scope_name () << "::CCM_"
+ << t.name () << "," << endl
+ << " " << t.scoped_name ().scope_name () << "::CCM_"
+ << t.name () << "_var," << endl
+ << " ";
+
+ Traversal::Home::manages (t, manages_);
+
+ os << "," << endl
+ << " ";
+
+ Traversal::Home::manages (t, manages_);
+
+ os << "_var," << endl
+ << " ";
+
+ Traversal::Home::manages (t, enclosing_manages_);
+
+ os << "::CCM_";
+
+ Traversal::Home::manages (t, simple_manages_);
+
+ os << "," << endl
+ << " ";
+
+ Traversal::Home::manages (t, enclosing_manages_);
+
+ os << "::CCM_";
+
+ Traversal::Home::manages (t, simple_manages_);
+
+ os << "_var," << endl
+ << " ";
+
+ Traversal::Home::manages (t, simple_manages_);
+
+ os << "_Servant" << endl
+ << " > home_svnt_base;" << endl << endl;
+
+ os << t.name () << "_Servant (" << endl
+ << t.scoped_name ().scope_name () << "::CCM_" << t.name ()
+ << "_ptr exe," << endl
+ << "::CIAO::Session_Container *c);" << endl << endl;
+
+ os << "virtual ~" << t.name () << "_Servant (void);"
+ << endl << endl;
+
+ // Generate home operations.
+ os << "// Home operations." << endl << endl;
+
+ {
+ Traversal::Home home_emitter;
+
+ Traversal::Inherits home_inherits;
+ home_inherits.node_traverser (home_emitter);
+
+ Traversal::Defines defines;
+ home_emitter.edge_traverser (defines);
+ home_emitter.edge_traverser (home_inherits);
+
+ HomeOperationEmitter home_operation_emitter (ctx);
+ defines.node_traverser (home_operation_emitter);
+
+ Traversal::Receives receives;
+ Traversal::Belongs returns;
+ Traversal::Raises raises;
+ home_operation_emitter.edge_traverser (receives);
+ home_operation_emitter.edge_traverser (returns);
+ home_operation_emitter.edge_traverser (raises);
+
+ ParameterEmitter<Traversal::InParameter> in_param (os);
+ ParameterEmitter<Traversal::InOutParameter> inout_param (os);
+ ParameterEmitter<Traversal::OutParameter> out_param (os);
+ receives.node_traverser (in_param);
+ receives.node_traverser (inout_param);
+ receives.node_traverser (out_param);
+
+ ReturnTypeNameEmitter return_type_emitter (os);
+ TypeNameEmitter type_name_emitter (os);
+ returns.node_traverser (return_type_emitter);
+ raises.node_traverser (type_name_emitter);
+
+ Traversal::Belongs in_belongs, inout_belongs, out_belongs;
+ in_param.edge_traverser (in_belongs);
+ inout_param.edge_traverser (inout_belongs);
+ out_param.edge_traverser (out_belongs);
+
+ INArgTypeNameEmitter in_arg_emitter (os);
+ INOUTArgTypeNameEmitter inout_arg_emitter (os);
+ OUTArgTypeNameEmitter out_arg_emitter (os);
+ in_belongs.node_traverser (in_arg_emitter);
+ inout_belongs.node_traverser (inout_arg_emitter);
+ out_belongs.node_traverser (out_arg_emitter);
+
+ home_emitter.traverse (t);
+ }
+
+ // Generate home factory operations. This is a separate traversal
+ // stack because we want to generate the factory operations
+ // of ancestors with the return type of the base component.
+ os << "// Home factory and finder operations." << endl << endl;
+
+ {
+ Traversal::Home home_emitter;
+
+ Traversal::Inherits inherits;
+ home_emitter.edge_traverser (inherits);
+ inherits.node_traverser (home_emitter);
+
+ Traversal::Defines defines;
+ home_emitter.edge_traverser (defines);
+
+ FactoryOperationEmitter factory_operation_emitter (ctx);
+ FinderOperationEmitter finder_operation_emitter (ctx);
+ defines.node_traverser (factory_operation_emitter);
+ defines.node_traverser (finder_operation_emitter);
+
+ Traversal::Receives receives;
+ Traversal::Belongs returns;
+ Traversal::Raises raises;
+ factory_operation_emitter.edge_traverser (receives);
+ factory_operation_emitter.edge_traverser (returns);
+ factory_operation_emitter.edge_traverser (raises);
+ finder_operation_emitter.edge_traverser (receives);
+ finder_operation_emitter.edge_traverser (returns);
+ finder_operation_emitter.edge_traverser (raises);
+
+ ParameterEmitter<Traversal::InParameter> in_param (os);
+ ParameterEmitter<Traversal::InOutParameter> inout_param (os);
+ ParameterEmitter<Traversal::OutParameter> out_param (os);
+ receives.node_traverser (in_param);
+ receives.node_traverser (inout_param);
+ receives.node_traverser (out_param);
+
+ ReturnTypeNameEmitter return_type_emitter (os);
+ TypeNameEmitter type_name_emitter (os);
+ returns.node_traverser (return_type_emitter);
+ raises.node_traverser (type_name_emitter);
+
+ Traversal::Belongs in_belongs, inout_belongs, out_belongs;
+ in_param.edge_traverser (in_belongs);
+ inout_param.edge_traverser (inout_belongs);
+ out_param.edge_traverser (out_belongs);
+
+ INArgTypeNameEmitter in_arg_emitter (os);
+ INOUTArgTypeNameEmitter inout_arg_emitter (os);
+ OUTArgTypeNameEmitter out_arg_emitter (os);
+ in_belongs.node_traverser (in_arg_emitter);
+ inout_belongs.node_traverser (inout_arg_emitter);
+ out_belongs.node_traverser (out_arg_emitter);
+
+ home_emitter.traverse (t);
+ }
+
+ // Generate operations for home attributes.
+ os << "// Attribute operations." << endl << endl;
+
+ {
+ Traversal::Home home_emitter;
+
+ Traversal::Inherits home_inherits;
+ home_inherits.node_traverser (home_emitter);
+
+ Traversal::Defines defines;
+ home_emitter.edge_traverser (defines);
+ home_emitter.edge_traverser (home_inherits);
+
+ AttributeEmitter attribute_emitter (ctx);
+ ReadOnlyAttributeEmitter read_only_attribute_emitter (ctx);
+ defines.node_traverser (attribute_emitter);
+ defines.node_traverser (read_only_attribute_emitter);
+
+ home_emitter.traverse (t);
+ }
+
+ // Generate operations for all supported interfaces.
+ {
+ Traversal::Home home_emitter;
+
+ Traversal::Inherits home_inherits;
+ home_inherits.node_traverser (home_emitter);
+
+ Traversal::Supports supports_;
+ home_emitter.edge_traverser (supports_);
+ home_emitter.edge_traverser (home_inherits);
+
+ InterfaceEmitter interface_emitter (ctx);
+ supports_.node_traverser (interface_emitter);
+
+ Traversal::Defines defines;
+ Traversal::Inherits inherits;
+ interface_emitter.edge_traverser (defines);
+ interface_emitter.edge_traverser (inherits);
+
+ AttributeEmitter attribute_emitter (ctx);
+ ReadOnlyAttributeEmitter read_only_attribute_emitter (ctx);
+ defines.node_traverser (attribute_emitter);
+ defines.node_traverser (read_only_attribute_emitter);
+
+ OperationEmitter operation_emitter (ctx);
+ defines.node_traverser (operation_emitter);
+ inherits.node_traverser (interface_emitter);
+
+ Traversal::Receives receives;
+ Traversal::Belongs returns;
+ Traversal::Raises raises;
+ operation_emitter.edge_traverser (receives);
+ operation_emitter.edge_traverser (returns);
+ operation_emitter.edge_traverser (raises);
+
+ ParameterEmitter<Traversal::InParameter> in_param (os);
+ ParameterEmitter<Traversal::InOutParameter> inout_param (os);
+ ParameterEmitter<Traversal::OutParameter> out_param (os);
+ receives.node_traverser (in_param);
+ receives.node_traverser (inout_param);
+ receives.node_traverser (out_param);
+
+ ReturnTypeNameEmitter return_type_emitter (os);
+ TypeNameEmitter type_name_emitter (os);
+ returns.node_traverser (return_type_emitter);
+ raises.node_traverser (type_name_emitter);
+
+ Traversal::Belongs in_belongs, inout_belongs, out_belongs;
+ in_param.edge_traverser (in_belongs);
+ inout_param.edge_traverser (inout_belongs);
+ out_param.edge_traverser (out_belongs);
+
+ INArgTypeNameEmitter in_arg_emitter (os);
+ INOUTArgTypeNameEmitter inout_arg_emitter (os);
+ OUTArgTypeNameEmitter out_arg_emitter (os);
+ in_belongs.node_traverser (in_arg_emitter);
+ inout_belongs.node_traverser (inout_arg_emitter);
+ out_belongs.node_traverser (out_arg_emitter);
+
+ home_emitter.traverse (t);
+ }
+
+ // Home servant class closer.
+ os << "};";
+
+ os << "extern \"C\" " << ctx.export_macro ()
+ << " ::PortableServer::Servant" << endl
+ << "create" << t.name () << "_Servant (" << endl
+ << "::Components::HomeExecutorBase_ptr p," << endl
+ << "CIAO::Session_Container *c" << endl
+ << STRS[ENV_HDR] << ");" << endl;
+ }
+
+ virtual void post (Type&)
+ {
+ // Namespace closer.
+ os << "}";
+ }
+
+ private:
+ TypeNameEmitter type_name_emitter_;
+ SimpleTypeNameEmitter simple_type_name_emitter_;
+ EnclosingTypeNameEmitter enclosing_type_name_emitter_;
+ Traversal::Manages manages_;
+ Traversal::Manages simple_manages_;
+ Traversal::Manages enclosing_manages_;
+ };
+
+ struct CompositionEmitter : Traversal::Composition, EmitterBase
+ {
+ CompositionEmitter (Context& c)
+ : EmitterBase (c)
+ {
+ }
+
+ virtual void
+ pre (Type& t)
+ {
+ os << endl
+ << "namespace " << t.name () << "{";
+ }
+
+ virtual void
+ post (Type&)
+ {
+ os << "}";
+ }
+ };
+
+ struct IncludesEmitter : Traversal::QuoteIncludes,
+ Traversal::BracketIncludes,
+ EmitterBase
+ {
+ IncludesEmitter (Context& c)
+ : EmitterBase (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::QuoteIncludes& qi)
+ {
+ os << "#include \""
+ << regex::perl_s (qi.file ().string (),
+ "/(\\.(idl|cidl|cdl))?$/S.h/")
+ << "\""
+ << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::BracketIncludes& bi)
+ {
+ os << "#include \""
+ << regex::perl_s (bi.file ().string (),
+ "/(\\.(idl|cidl|cdl))?$/S.h/")
+ << "\""
+ << endl;
+ }
+ };
+}
+
+ServantHeaderEmitter::ServantHeaderEmitter (std::ostream& os_,
+ CommandLine const& cl,
+ string export_macro,
+ fs::path const& file)
+ : os (os_),
+ cl_ (cl),
+ export_macro_ (export_macro),
+ file_ (file)
+{}
+
+void
+ServantHeaderEmitter::pre (TranslationUnit&)
+{
+ os << COPYRIGHT;
+
+ string file_name ("");
+
+ if (!file_.empty ())
+ {
+ file_name = file_.leaf ();
+ }
+
+ string uc_file_name = file_name;
+
+ std::transform (uc_file_name.begin (),
+ uc_file_name.end (),
+ uc_file_name.begin (),
+ upcase);
+
+ string uc_file_suffix = cl_.get_value ("svnt-hdr-file-suffix",
+ "_svnt.h");
+
+ std::transform (uc_file_suffix.begin (),
+ uc_file_suffix.end (),
+ uc_file_suffix.begin (),
+ upcase);
+
+ string guard =
+ "CIAO_GLUE_SESSION_"
+ + regex::perl_s (uc_file_name,
+ "/(\\.(IDL|CIDL|CDL))?$/" + uc_file_suffix + "/");
+
+ // Replace any remaining '.' with '_'.
+ guard = regex::perl_s (guard, "/\\./_/");
+
+ os << "#ifndef " << guard << endl
+ << "#define " << guard << endl << endl
+ << "#include /**/ \"ace/pre.h\"" << endl << endl;
+
+ string export_include = cl_.get_value ("export-include", "");
+
+ if (!export_include.empty ())
+ {
+ os << "#include \"" << export_include << "\"" << endl << endl;
+ }
+
+ // Get the suffix for the executor IDL file and strip off the
+ // trailing .idl.
+ // @@@ (JP) I guess it's a safe assumption that the tail of the
+ // suffix will be .idl.
+ string suffix = cl_.get_value ("lem-file-suffix", "E.idl");
+ suffix = regex::perl_s (suffix,
+ "/(\\.idl)?$//");
+
+ // @@@ (JP) No way of knowing if the IDL compiler had command line
+ // option(s) to change C.h and/or S.h. We could add command line options
+ // to the CIDL compiler for them, but the user will have to make sure
+ // they are in synch with the IDL compiler's options.
+ os << "#include \""
+ << regex::perl_s (file_name,
+ "/(\\.(idl|cidl|cdl))?$/" + suffix + "C.h/")
+ << "\""
+ << endl << endl;
+
+ os << "#if !defined (ACE_LACKS_PRAGMA_ONCE)" << endl
+ << "# pragma once" << endl
+ << "#endif /* ACE_LACKS_PRAGMA_ONCE */" << endl << endl;
+
+ os << "#include \"ciao/Container_Base.h\"" << endl
+ << "#include \"ciao/Servant_Impl_T.h\"" << endl
+ << "#include \"ciao/Context_Impl_T.h\"" << endl
+ << "#include \"ciao/Home_Servant_Impl_T.h\"" << endl
+ << "#include \"ace/Active_Map_Manager_T.h\"" << endl << endl;
+}
+
+void
+ServantHeaderEmitter::generate (TranslationUnit& u)
+{
+ pre (u);
+
+ Context c (os, export_macro_);
+
+ Traversal::TranslationUnit unit;
+
+ // Layer 1
+ //
+ Traversal::ContainsPrincipal contains_principal;
+ unit.edge_traverser (contains_principal);
+
+ //--
+ Traversal::TranslationRegion principal_region;
+ contains_principal.node_traverser (principal_region);
+
+ // Layer 2
+ //
+ Traversal::TranslationRegion included_region;
+
+ // Inclusion handling is somewhat tricky because we want
+ // to print only top-level #includes.
+
+ Traversal::ContainsRoot contains_root;
+ Traversal::QuoteIncludes quote_includes;
+ Traversal::BracketIncludes bracket_includes;
+ IncludesEmitter includes_emitter (c);
+
+ principal_region.edge_traverser (includes_emitter);
+ principal_region.edge_traverser (quote_includes);
+ principal_region.edge_traverser (bracket_includes);
+ principal_region.edge_traverser (contains_root);
+
+ included_region.edge_traverser (quote_includes);
+ included_region.edge_traverser (bracket_includes);
+ included_region.edge_traverser (contains_root);
+
+ //--
+ Traversal::Root root;
+
+ contains_root.node_traverser (root);
+ quote_includes.node_traverser (included_region);
+ bracket_includes.node_traverser (included_region);
+
+ // Layer 3
+ //
+ Traversal::Defines defines;
+ root.edge_traverser (defines);
+
+ //--
+ Traversal::Module module;
+ CompositionEmitter composition (c);
+ defines.node_traverser (module);
+ defines.node_traverser (composition);
+
+ // Layer 4
+ //
+ Traversal::Defines composition_defines;
+ composition.edge_traverser (composition_defines);
+
+ module.edge_traverser (defines);
+
+ //--
+ Traversal::ComponentExecutor component_executor;
+ Traversal::HomeExecutor home_executor;
+ composition_defines.node_traverser (component_executor);
+ composition_defines.node_traverser (home_executor);
+
+ // Layer 5
+ //
+ Traversal::Implements implements;
+ component_executor.edge_traverser (implements);
+ home_executor.edge_traverser (implements);
+
+ //--
+ ContextEmitter context_emitter (c);
+ ServantEmitter servant_emitter (c);
+ HomeEmitter home_emitter (c);
+ implements.node_traverser (context_emitter);
+ implements.node_traverser (servant_emitter);
+ implements.node_traverser (home_emitter);
+
+ unit.traverse (u);
+
+ post (u);
+}
+
+void
+ServantHeaderEmitter::post (TranslationUnit&)
+{
+ if (file_.empty ()) return;
+
+ string uc_file_name = file_.leaf ();
+
+ std::transform (uc_file_name.begin (),
+ uc_file_name.end (),
+ uc_file_name.begin (),
+ upcase);
+
+ string uc_file_suffix = cl_.get_value ("svnt-hdr-file-suffix",
+ "_svnt.h");
+
+ std::transform (uc_file_suffix.begin (),
+ uc_file_suffix.end (),
+ uc_file_suffix.begin (),
+ upcase);
+
+ string guard =
+ "CIAO_GLUE_SESSION_"
+ + regex::perl_s (uc_file_name,
+ "/(\\.(IDL|CIDL|CDL))?$/" + uc_file_suffix + "/");
+
+ guard = regex::perl_s (guard, "/\\./_/");
+
+ os << "#include /**/ \"ace/post.h\"" << endl << endl
+ << "#endif /* " << guard << " */"
+ << endl << endl;
+}
diff --git a/TAO/CIAO/CIDLC/ServantSourceGenerator.cpp b/TAO/CIAO/CIDLC/ServantSourceGenerator.cpp
new file mode 100644
index 00000000000..dc46541e2c1
--- /dev/null
+++ b/TAO/CIAO/CIDLC/ServantSourceGenerator.cpp
@@ -0,0 +1,3687 @@
+// file : CIDLC/ServantSourceGenerator.cpp
+// author : Jeff Parsons <j.parsons@vanderbilt.edu>
+// cvs-id : $Id$
+
+#include "ServantSourceGenerator.hpp"
+#include "Literals.hpp"
+#include "TypeNameEmitter.hpp"
+
+#include "CCF/CodeGenerationKit/Regex.hpp"
+
+#include <ostream>
+
+using namespace CCF::CIDL;
+using namespace CCF::CIDL::SemanticGraph;
+using namespace StringLiterals;
+
+using std::string;
+
+namespace
+{
+ class Context
+ {
+ public:
+ Context (std::ostream& os,
+ string export_macro,
+ CommandLine const& cl)
+ : os_ (os),
+ export_macro_ (export_macro),
+ cl_ (cl)
+ {
+ }
+
+ std::ostream&
+ os ()
+ {
+ return os_;
+ }
+
+ string
+ export_macro ()
+ {
+ return export_macro_;
+ }
+
+ CommandLine const&
+ cl ()
+ {
+ return cl_;
+ }
+
+ private:
+ std::ostream& os_;
+ string export_macro_;
+ CommandLine const& cl_;
+ };
+
+ class EmitterBase
+ {
+ public:
+ EmitterBase (Context& c)
+ : ctx (c),
+ os (ctx.os ())
+ {
+ }
+
+ protected:
+ Context& ctx;
+ std::ostream& os;
+ };
+
+ struct OperationExecEmitter : Traversal::Operation,
+ EmitterBase
+ {
+ OperationExecEmitter (Context& c)
+ : EmitterBase (c)
+ {}
+
+ virtual void
+ name (Type& o)
+ {
+ os << o.name ();
+ }
+
+ virtual void
+ receives_pre (Type&)
+ {
+ os << " (" << endl;
+ }
+
+ virtual void
+ receives_none (Type&)
+ {
+ os << " (" << endl
+ << STRS[ENV_SNGL_ARG] << ");";
+ }
+
+ virtual void
+ receives_post (Type&)
+ {
+ os << endl << STRS[ENV_ARG] << ");";
+ }
+
+ /// If we don't do this, the comma() method just below
+ /// gets used not only with the arguments, but also
+ /// in raises(). Even though we are not generating the
+ /// exception list here, the front end iterator still
+ /// executes, and picks up the overridden comma(). So
+ /// we override raises() itself to do nothing.
+ virtual void
+ raises (Type&)
+ {
+ }
+
+ virtual void
+ comma (Type&)
+ {
+ os << "," << endl;
+ }
+ };
+
+ struct OpExecReturnEmitter : Traversal::Type,
+ Traversal::Void
+ {
+ OpExecReturnEmitter (std::ostream& os_)
+ : os (os_)
+ {}
+
+ virtual void
+ traverse (Void&)
+ {
+ os << "this->executor_->";
+ }
+
+ virtual void
+ traverse (SemanticGraph::Type&)
+ {
+ os << "return this->executor_->";
+ }
+
+ private:
+ std::ostream& os;
+ };
+
+ // For generating parameter names.
+ template <typename T>
+ struct ParameterEmitter : T
+ {
+ ParameterEmitter (std::ostream& os_)
+ : os (os_)
+ {}
+
+ virtual void
+ name (typename T::Type& p)
+ {
+ os << " " << p.name ();
+ }
+
+ private:
+ std::ostream& os;
+ };
+
+ // For generating parameter names in operation delegation.
+ template <typename T>
+ struct ParameterExecEmitter : T
+ {
+ ParameterExecEmitter (std::ostream& os_)
+ : os (os_)
+ {}
+
+ virtual void
+ name (typename T::Type& p)
+ {
+ os << p.name ();
+ }
+
+ private:
+ std::ostream& os;
+ };
+
+ template <typename T>
+ struct OperationEmitter : Traversal::Operation, EmitterBase
+ {
+ OperationEmitter (Context& c, T& scope)
+ : EmitterBase (c),
+ scope_ (scope)
+ {}
+
+ virtual void
+ name (Type& o)
+ {
+ os << endl
+ << scope_.name () << "_Servant::" << o.name ();
+ }
+
+ virtual void
+ receives_pre (Type&)
+ {
+ os << " (" << endl;
+ }
+
+ virtual void
+ receives_none (Type&)
+ {
+ os << " (" << endl
+ << STRS[ENV_SNGL_SRC] << ")" << endl;
+ }
+
+ virtual void
+ receives_post (Type&)
+ {
+ os << endl << STRS[ENV_SRC] << ")" << endl;
+ }
+
+ virtual void
+ raises_pre (Type&)
+ {
+ os << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl;
+ }
+
+ virtual void
+ raises_none (Type&)
+ {
+ os << STRS[EXCP_SNGL];
+ }
+
+ virtual void
+ raises_post (Type&)
+ {
+ os << "))";
+ }
+
+ virtual void
+ post (Type& o)
+ {
+ os << "{";
+
+ OperationExecEmitter operation_emitter (ctx);
+
+ Traversal::Receives receives;
+ Traversal::Belongs returns;
+ operation_emitter.edge_traverser (receives);
+ operation_emitter.edge_traverser (returns);
+
+ ParameterExecEmitter<Traversal::Parameter> param (os);
+ receives.node_traverser (param);
+
+ OpExecReturnEmitter return_emitter (os);
+ returns.node_traverser (return_emitter);
+
+ operation_emitter.traverse (o);
+
+ os << "}";
+ }
+
+ virtual void
+ comma (Type&)
+ {
+ os << "," << endl;
+ }
+
+ protected:
+ T& scope_;
+ };
+
+ // Generic scoped typename emitter used by various other emitters.
+ struct TypeNameEmitter : Traversal::Type
+ {
+ TypeNameEmitter (std::ostream& os_)
+ : os (os_)
+ {}
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ os << t.scoped_name ();
+ }
+
+ private:
+ std::ostream& os;
+ };
+
+ // Generic local typename emitter used by various other emitters.
+ struct SimpleTypeNameEmitter : Traversal::Type
+ {
+ SimpleTypeNameEmitter (std::ostream& os_)
+ : os (os_)
+ {}
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ os << t.name ();
+ }
+
+ private:
+ std::ostream& os;
+ };
+
+ // Generate name of type's enclosing scope.
+ struct EnclosingTypeNameEmitter : Traversal::Type
+ {
+ EnclosingTypeNameEmitter (std::ostream& os_)
+ : os (os_)
+ {}
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ os << t.scoped_name ().scope_name ();
+ }
+
+ private:
+ std::ostream& os;
+ };
+
+ struct RepoIdEmitter : Traversal::Type
+ {
+ RepoIdEmitter (std::ostream& os_)
+ : os (os_)
+ {}
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ os << "\"" << t.context ().get<string> (STRS[REPO_ID]) << "\"";
+ }
+
+ private:
+ std::ostream& os;
+ };
+
+ struct ConsumerRepoIdEmitter : Traversal::Type
+ {
+ ConsumerRepoIdEmitter (std::ostream& os_)
+ : os (os_)
+ {}
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ string holder (t.context ().get<string> (STRS[REPO_ID]));
+ os << "\"" << holder.substr (0, holder.rfind (':'))
+ << "Consumer:1.0\"";
+ }
+
+ private:
+ std::ostream& os;
+ };
+
+ struct InterfaceEmitter : Traversal::Interface,
+ EmitterBase
+ {
+ InterfaceEmitter (Context& c)
+ : EmitterBase (c)
+ {}
+
+ bool
+ add (Interface& i)
+ {
+ return interfaces_.insert (&i).second;
+ }
+
+ virtual void
+ traverse (Interface& i)
+ {
+ if (add (i))
+ {
+ Traversal::Interface::traverse (i);
+ }
+ }
+
+ private:
+ std::set<Interface*> interfaces_;
+ };
+
+ // Generates operations associated with attributes.
+ // @@@ (JP) Need to support exceptions.
+ template <typename T>
+ struct AttributeEmitter : Traversal::ReadWriteAttribute,
+ EmitterBase
+ {
+ AttributeEmitter (Context& c, T& scope)
+ : EmitterBase (c),
+ scope_ (scope),
+ write_type_name_emitter_ (c.os ()),
+ read_type_name_emitter_ (c.os ())
+ {
+ write_belongs_.node_traverser (write_type_name_emitter_);
+ read_belongs_.node_traverser (read_type_name_emitter_);
+ }
+
+ virtual void name (SemanticGraph::ReadWriteAttribute& a)
+ {
+ os << scope_.name () << "_Servant::" << a.name ();
+ }
+
+ virtual void traverse (SemanticGraph::ReadWriteAttribute& a)
+ {
+ // Does nothing here, overridden for facet attributes.
+ this->pre (a);
+
+ Traversal::ReadWriteAttribute::belongs (a, read_belongs_);
+
+ os << endl;
+
+ // Overridden for facet attributes.
+ this->name (a);
+
+ os << " (" << endl
+ << STRS[ENV_SNGL_SRC] << ")" << endl
+ << STRS[EXCP_SNGL] << endl
+ << "{"
+ << "return this->executor_->" << a.name () << " (" << endl
+ << STRS[ENV_SNGL_ARG] << ");" << endl
+ << "}";
+
+ // Does nothing here, overridden for facet attributes.
+ this->pre (a);
+
+ os << "void" << endl;
+
+ // Overridden for facet attributes.
+ this->name (a);
+
+ os << " (" << endl;
+
+ Traversal::ReadWriteAttribute::belongs (a, write_belongs_);
+
+ os << " " << a.name () << endl
+ << STRS[ENV_SRC] << ")" << endl
+ << STRS[EXCP_SNGL] << endl
+ << "{"
+ << "this->executor_->" << a.name () << " (" << endl
+ << a.name () << endl
+ << STRS[ENV_ARG] << ");" << endl
+ << "}";
+ }
+
+ protected:
+ T& scope_;
+
+ private:
+ INArgTypeNameEmitter write_type_name_emitter_;
+ ReturnTypeNameEmitter read_type_name_emitter_;
+ Traversal::Belongs write_belongs_;
+ Traversal::Belongs read_belongs_;
+ };
+
+ // Generates operations associated with readonly attributes.
+ // @@@ (JP) Need to support exceptions.
+ template <typename T>
+ struct ReadOnlyAttributeEmitter : Traversal::ReadAttribute,
+ EmitterBase
+ {
+ ReadOnlyAttributeEmitter (Context& c, T& scope)
+ : EmitterBase (c),
+ scope_ (scope),
+ read_type_name_emitter_ (c.os ())
+ {
+ read_belongs_.node_traverser (read_type_name_emitter_);
+ }
+
+ virtual void name (SemanticGraph::ReadAttribute& a)
+ {
+ os << scope_.name () << "_Servant::" << a.name ();
+ }
+
+ virtual void traverse (SemanticGraph::ReadAttribute& a)
+ {
+ // Does nothing here, overridden for facet attributes.
+ this->pre (a);
+
+ Traversal::ReadAttribute::belongs (a, read_belongs_);
+
+ os << endl;
+
+ // Overridden for facet attributes.
+ this->name (a);
+
+ os << " (" << endl
+ << STRS[ENV_SNGL_SRC] << ")" << endl
+ << STRS[EXCP_SNGL] << endl
+ << "{"
+ << "return this->executor_->" << a.name () << " (" << endl
+ << STRS[ENV_SNGL_ARG] << ");" << endl
+ << "}";
+ }
+
+ protected:
+ T& scope_;
+
+ private:
+ ReturnTypeNameEmitter read_type_name_emitter_;
+ Traversal::Belongs read_belongs_;
+ };
+
+ struct FacetEmitter : Traversal::UnconstrainedInterface,
+ EmitterBase
+ {
+ FacetEmitter (Context& c)
+ : EmitterBase (c)
+ {
+ }
+
+ struct FacetOperationEmitter
+ : OperationEmitter<SemanticGraph::UnconstrainedInterface>
+ {
+ FacetOperationEmitter (Context& c,
+ SemanticGraph::UnconstrainedInterface& i)
+ : OperationEmitter<SemanticGraph::UnconstrainedInterface> (c, i)
+ {}
+
+ virtual void
+ pre (Type&)
+ {
+ os << "template <typename T>" << endl;
+ }
+
+ virtual void
+ name (Type& o)
+ {
+ os << endl
+ << scope_.name () << "_Servant_T<T>::" << o.name ();
+ }
+ };
+
+ struct FacetAttributeEmitter
+ : AttributeEmitter<SemanticGraph::Interface>
+ {
+ FacetAttributeEmitter (Context& c, SemanticGraph::Interface& i)
+ : AttributeEmitter<SemanticGraph::Interface> (c, i)
+ {}
+
+ virtual void
+ pre (SemanticGraph::ReadWriteAttribute&)
+ {
+ os << "template <typename T>" << endl;
+ }
+
+ virtual void
+ name (SemanticGraph::ReadWriteAttribute& a)
+ {
+ os << scope_.name () << "_Servant_T<T>::" << a.name ();
+ }
+ };
+
+ struct FacetReadOnlyAttributeEmitter
+ : ReadOnlyAttributeEmitter<SemanticGraph::Interface>
+ {
+ FacetReadOnlyAttributeEmitter (Context& c, SemanticGraph::Interface& i)
+ : ReadOnlyAttributeEmitter<SemanticGraph::Interface> (c, i)
+ {}
+
+ virtual void
+ pre (SemanticGraph::ReadAttribute&)
+ {
+ os << "template <typename T>" << endl;
+ }
+
+ virtual void
+ name (SemanticGraph::ReadAttribute& a)
+ {
+ os << scope_.name () << "_Servant_T<T>::" << a.name ();
+ }
+ };
+
+ virtual void
+ traverse (UnconstrainedInterface& i)
+ {
+ if (i.context ().count ("facet_src_gen")) return;
+
+ // Open a namespace.
+ os << STRS[GLUE_NS]
+ << regex::perl_s (i.scoped_name ().scope_name ().str (),
+ "/::/_/")
+ << "{";
+
+ os << "template <typename T>" << endl
+ << i.name () << "_Servant_T<T>::" << i.name ()
+ << "_Servant_T (" << endl
+ << i.scoped_name ().scope_name () << "::CCM_" << i.name ()
+ << "_ptr executor," << endl
+ << "::Components::CCMContext_ptr c)" << endl
+ << ": executor_ (" << i.scoped_name ().scope_name () << "::CCM_"
+ << i.name () << "::_duplicate (executor))," << endl
+ << "ctx_ (::Components::CCMContext::_duplicate (c))" << endl
+ << "{"
+ << "}";
+
+ os << "template <typename T>" << endl
+ << i.name () << "_Servant_T<T>::~" << i.name ()
+ << "_Servant_T (void)" << endl
+ << "{"
+ << "}";
+
+ {
+ InterfaceEmitter interface_emitter (ctx);
+
+ Traversal::Defines defines_;
+ Traversal::Inherits inherits_;
+ interface_emitter.edge_traverser (defines_);
+ interface_emitter.edge_traverser (inherits_);
+
+ FacetAttributeEmitter attribute_emitter (ctx, i);
+ FacetReadOnlyAttributeEmitter read_only_attribute_emitter (ctx, i);
+ defines_.node_traverser (attribute_emitter);
+ defines_.node_traverser (read_only_attribute_emitter);
+
+ FacetOperationEmitter operation_emitter (ctx, i);
+ defines_.node_traverser (operation_emitter);
+ inherits_.node_traverser (interface_emitter);
+
+ Traversal::Receives receives;
+ Traversal::Belongs returns;
+ Traversal::Raises raises;
+ operation_emitter.edge_traverser (receives);
+ operation_emitter.edge_traverser (returns);
+ operation_emitter.edge_traverser (raises);
+
+ ParameterEmitter<Traversal::InParameter> in_param (os);
+ ParameterEmitter<Traversal::InOutParameter> inout_param (os);
+ ParameterEmitter<Traversal::OutParameter> out_param (os);
+ receives.node_traverser (in_param);
+ receives.node_traverser (inout_param);
+ receives.node_traverser (out_param);
+
+ ReturnTypeNameEmitter return_type_emitter (os);
+ TypeNameEmitter type_name_emitter (os);
+ returns.node_traverser (return_type_emitter);
+ raises.node_traverser (type_name_emitter);
+
+ Traversal::Belongs in_belongs, inout_belongs, out_belongs;
+ in_param.edge_traverser (in_belongs);
+ inout_param.edge_traverser (inout_belongs);
+ out_param.edge_traverser (out_belongs);
+
+ INArgTypeNameEmitter in_arg_emitter (os);
+ INOUTArgTypeNameEmitter inout_arg_emitter (os);
+ OUTArgTypeNameEmitter out_arg_emitter (os);
+ in_belongs.node_traverser (in_arg_emitter);
+ inout_belongs.node_traverser (inout_arg_emitter);
+ out_belongs.node_traverser (out_arg_emitter);
+
+ inherits (i, inherits_);
+ names (i, defines_);
+ }
+
+ os << "template <typename T>" << endl
+ << "CORBA::Object_ptr" << endl
+ << i.name () << "_Servant_T<T>::_get_component (" << endl
+ << STRS[ENV_SNGL_SRC] << ")" << endl
+ << "ACE_THROW_SPEC ((CORBA::SystemException))" << endl
+ << "{"
+ << STRS[COMP_SC] << "_var sc =" << endl
+ << STRS[COMP_SC] << "::_narrow (" << endl
+ << "this->ctx_.in ()" << endl
+ << STRS[ENV_ARG] << ");"
+ << "ACE_CHECK_RETURN (CORBA::Object::_nil ());" << endl
+ << "if (! CORBA::is_nil (sc.in ()))" << endl
+ << "{"
+ << "return sc->get_CCM_object (" << endl
+ << STRS[ENV_SNGL_ARG] << ");" << endl
+ << "}"
+ << "::Components::EntityContext_var ec =" << endl
+ << "::Components::EntityContext::_narrow (" << endl
+ << "this->ctx_.in ()" << endl
+ << STRS[ENV_ARG] << ");"
+ << "ACE_CHECK_RETURN (CORBA::Object::_nil ());" << endl
+ << "if (! CORBA::is_nil (ec.in ()))" << endl
+ << "{"
+ << "return ec->get_CCM_object (" << endl
+ << STRS[ENV_SNGL_ARG] << ");" << endl
+ << "}"
+ << "ACE_THROW_RETURN (CORBA::INTERNAL (), 0);" << endl
+ << "}" << endl;
+
+ // Close the CIAO_GLUE namespace.
+ os << "}";
+
+ i.context ().set ("facet_src_gen", true);
+ }
+ };
+
+ struct ContextEmitter : Traversal::Component, EmitterBase
+ {
+ ContextEmitter (Context& c)
+ : EmitterBase (c)
+ {}
+
+ // Nested classes used by ContextEmitter.
+ private:
+ struct ContextPortsEmitter : Traversal::SingleUserData,
+ Traversal::MultiUserData,
+ Traversal::PublisherData,
+ Traversal::EmitterData,
+ EmitterBase
+ {
+ ContextPortsEmitter (Context& c, SemanticGraph::Component& scope)
+ : EmitterBase (c),
+ type_name_emitter_ (c.os ()),
+ simple_type_name_emitter_ (c.os ()),
+ scope_ (scope)
+ {
+ belongs_.node_traverser (type_name_emitter_);
+ simple_belongs_.node_traverser (simple_type_name_emitter_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::SingleUser& u)
+ {
+ Traversal::SingleUserData::belongs (u, belongs_);
+
+ os << "_ptr" << endl
+ << scope_.name () << "_Context::get_connection_"
+ << u.name () << " (" << endl
+ << STRS[ENV_SNGL_SRC_NOTUSED] << ")" << endl
+ << STRS[EXCP_SNGL] << endl
+ << "{"
+ << "return ";
+
+ Traversal::SingleUserData::belongs (u, belongs_);
+
+ os << "::_duplicate (" << endl
+ << "this->ciao_uses_" << u.name ()
+ << "_.in ());" << endl
+ << "}";
+
+ os << "void" << endl
+ << scope_.name () << "_Context::connect_"
+ << u.name () << " (" << endl;
+
+ Traversal::SingleUserData::belongs (u, belongs_);
+
+ os << "_ptr c" << endl
+ << STRS[ENV_SRC] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_AC] << "," << endl
+ << STRS[EXCP_IC] << "))" << endl
+ << "{"
+ << "if (!CORBA::is_nil (this->ciao_uses_"
+ << u.name () << "_.in ()))" << endl
+ << "{"
+ << "ACE_THROW (" << STRS[EXCP_AC] << " ());" << endl
+ << "}"
+ << "if (CORBA::is_nil (c))" << endl
+ << "{"
+ << "ACE_THROW (" << STRS[EXCP_IC] << " ());" << endl
+ << "}"
+ << "this->ciao_uses_" << u.name () << "_ =" << endl;
+
+ Traversal::SingleUserData::belongs (u, belongs_);
+
+ os << "::_duplicate (c);" << endl
+ << "}";
+
+ Traversal::SingleUserData::belongs (u, belongs_);
+
+ os << "_ptr" << endl
+ << scope_.name () << "_Context::disconnect_"
+ << u.name () << " (" << endl
+ << STRS[ENV_SNGL_SRC] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_NC] << "))" << endl
+ << "{"
+ << "if (CORBA::is_nil (this->ciao_uses_"
+ << u.name () << "_.in ()))" << endl
+ << "{"
+ << "ACE_THROW_RETURN (" << endl
+ << STRS[EXCP_NC] << " ()," << endl;
+
+ Traversal::SingleUserData::belongs (u, belongs_);
+
+ os << "::_nil ());" << endl
+ << "}"
+ << "return this->ciao_uses_" << u.name ()
+ << "_._retn ();" << endl
+ << "}";
+ }
+
+ virtual void
+ traverse (SemanticGraph::MultiUser& u)
+ {
+ os << u.scoped_name () << "Connections *" << endl
+ << scope_.name () << "_Context::get_connections_"
+ << u.name () << " (" << endl
+ << STRS[ENV_SNGL_SRC] << ")" << endl
+ << STRS[EXCP_SNGL] << endl
+ << "{"
+ << u.scoped_name () << "Connections *tmp_retv = 0;"
+ << "ACE_NEW_THROW_EX (" << endl
+ << "tmp_retv," << endl
+ << u.scoped_name () << "Connections (" << endl
+ << "this->ciao_uses_"
+ << u.name () << "_.current_size ())," << endl
+ << "CORBA::NO_MEMORY ());" << endl << endl
+ << u.scoped_name () << "Connections_var retv"
+ << " = tmp_retv;" << endl
+ << "retv->length (this->ciao_uses_" << u.name ()
+ << "_.current_size ());" << endl;
+
+ os << "CORBA::ULong i = 0;" << endl;
+
+ os << "for (ACE_Active_Map_Manager< " << endl;
+
+ Traversal::MultiUserData::belongs (u, belongs_);
+
+ os << "_var>::iterator iter =" << endl
+ << " this->ciao_uses_" << u.name () << "_.begin ();"
+ << " iter != this->ciao_uses_" << u.name () << "_.end ();"
+ << " ++iter)" << endl
+ << "{"
+ << "ACE_Active_Map_Manager< " << endl;
+
+ Traversal::MultiUserData::belongs (u, belongs_);
+
+ os << "_var>::ENTRY & entry = *iter;" << endl
+ << "retv[i].objref = ";
+
+ Traversal::MultiUserData::belongs (u, belongs_);
+
+ os << "::_narrow (" << endl
+ << "entry.int_id_.in ()" << endl
+ << STRS[ENV_ARG] << ");"
+ << "ACE_CHECK_RETURN (0);" << endl;
+
+ os << "ACE_NEW_THROW_EX (" << endl
+ << "retv[i].ck," << endl
+ << "CIAO::Map_Key_Cookie (entry.ext_id_)," << endl
+ << "CORBA::NO_MEMORY ());" << endl
+ << "++i;" << endl
+ << "}";
+
+ os << "return retv._retn ();" << endl
+ << "}";
+
+ os << STRS[COMP_CK] << " *" << endl
+ << scope_.name () << "_Context::connect_"
+ << u.name () << " (" << endl;
+
+ Traversal::MultiUserData::belongs (u, belongs_);
+
+ os << "_ptr c" << endl
+ << STRS[ENV_SRC] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_ECL] << "," << endl
+ << STRS[EXCP_IC] << "))" << endl
+ << "{"
+ << "if (CORBA::is_nil (c))" << endl
+ << "{"
+ << "ACE_THROW_RETURN (" << STRS[EXCP_IC] << " (), 0);" << endl
+ << "}";
+
+ Traversal::MultiUserData::belongs (u, belongs_);
+
+ os << "_var conn = ";
+
+ Traversal::MultiUserData::belongs (u, belongs_);
+
+ os << "::_duplicate (c);"
+ << "ACE_Active_Map_Manager_Key key;" << endl;
+
+ os << "if (this->ciao_uses_" << u.name ()
+ << "_.bind (conn.in (), key) == -1)" << endl
+ << "{"
+ << "ACE_THROW_RETURN (" << STRS[EXCP_IC] << " (), 0);" << endl
+ << "}";
+
+ os << "conn._retn ();" << endl;
+
+ os << STRS[COMP_CK] << " * ck = 0;"
+ << "ACE_NEW_THROW_EX (" << endl
+ << "ck," << endl
+ << "CIAO::Map_Key_Cookie (key)," << endl
+ << "CORBA::NO_MEMORY ());" << endl;
+
+
+ os << "return ck;" << endl
+ << "}";
+
+ Traversal::MultiUserData::belongs (u, belongs_);
+
+ os << "_ptr" << endl
+ << scope_.name () << "_Context::disconnect_"
+ << u.name () << " (" << endl
+ << STRS[COMP_CK] << " * ck" << endl
+ << STRS[ENV_SRC] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_IC] << "))" << endl
+ << "{";
+
+ Traversal::MultiUserData::belongs (u, belongs_);
+
+ os << "_var retv;"
+ << "ACE_Active_Map_Manager_Key key;" << endl;
+
+ os << "if (ck == 0 || ! CIAO::Map_Key_Cookie::extract (ck, key))"
+ << endl
+ << "{"
+ << "ACE_THROW_RETURN (" << endl
+ << STRS[EXCP_IC] << " ()," << endl;
+
+ Traversal::MultiUserData::belongs (u, belongs_);
+
+ os << "::_nil ());" << endl
+ << "}";
+
+ os << "if (this->ciao_uses_" << u.name ()
+ << "_.unbind (key, retv) != 0)" << endl
+ << "{"
+ << "ACE_THROW_RETURN (" << endl
+ << STRS[EXCP_IC] << " ()," << endl;
+
+ Traversal::MultiUserData::belongs (u, belongs_);
+
+ os << "::_nil ());" << endl
+ << "}";
+
+ os << "return retv._retn ();" << endl
+ << "}";
+ }
+
+ virtual void
+ traverse (SemanticGraph::Publisher& p)
+ {
+ os << "void" << endl
+ << scope_.name () << "_Context::push_"
+ << p.name () << " (" << endl;
+
+ Traversal::PublisherData::belongs (p, belongs_);
+
+ os << " *ev" << endl
+ << STRS[ENV_SRC] << ")" << endl
+ << STRS[EXCP_SNGL] << endl
+ << "{"
+ << "ACE_Active_Map_Manager< " << endl; //@@ gcc bug
+
+ Traversal::PublisherData::belongs (p, belongs_);
+
+ os << "Consumer_var>::iterator end =" << endl
+ << "this->ciao_publishes_" << p.name ()
+ << "_map_.end ();" << endl
+ << "for (ACE_Active_Map_Manager< " << endl; //@@ gcc bug
+
+ Traversal::PublisherData::belongs (p, belongs_);
+
+ os << "Consumer_var>::iterator iter =" << endl
+ << "this->ciao_publishes_" << p.name ()
+ << "_map_.begin ();"
+ << "iter != end;"
+ << "++iter)" << endl
+ << "{"
+ << "ACE_Active_Map_Manager< " << endl; //@@ gcc bug
+
+ Traversal::PublisherData::belongs (p, belongs_);
+
+ os << "Consumer_var>::ENTRY &entry = *iter;" << endl;
+
+ Traversal::PublisherData::belongs (p, belongs_);
+
+ os << "Consumer_var c =" << endl;
+
+ Traversal::PublisherData::belongs (p, belongs_);
+
+ os << "Consumer::_narrow (" << endl
+ << "entry.int_id_.in ()" << endl
+ << STRS[ENV_ARG] << ");"
+ << "ACE_CHECK;" << endl
+ << "entry.int_id_->push_";
+
+ Traversal::PublisherData::belongs (p, simple_belongs_);
+
+ os << " (" << endl
+ << "ev" << endl
+ << STRS[ENV_ARG] << ");"
+ << "ACE_CHECK;" << endl
+ << "}"
+ << "}";
+
+ os << STRS[COMP_CK] << " *" << endl
+ << scope_.name () << "_Context::subscribe_"
+ << p.name () << " (" << endl;
+
+ Traversal::PublisherData::belongs (p, belongs_);
+
+ os << "Consumer_ptr c" << endl
+ << STRS[ENV_SRC] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_ECL] << "))" << endl
+ << "{"
+ << "if (CORBA::is_nil (c))" << endl
+ << "{"
+ << "ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0);" << endl
+ << "}";
+
+ Traversal::PublisherData::belongs (p, belongs_);
+
+ os<< "Consumer_var sub =" << endl;
+
+ Traversal::PublisherData::belongs (p, belongs_);
+
+ os << "Consumer::_duplicate (c);" << endl
+ << "ACE_Active_Map_Manager_Key key;"
+ << "this->ciao_publishes_" << p.name ()
+ << "_map_.bind (sub.in (), key);"
+ << "sub._retn ();" << endl
+ << STRS[COMP_CK] << " * retv = 0;"
+ << "ACE_NEW_THROW_EX (" << endl
+ << "retv," << endl
+ << "::CIAO::Map_Key_Cookie (key)," << endl
+ << "CORBA::NO_MEMORY ());" << endl
+ << "return retv;" << endl
+ << "}";
+
+ Traversal::PublisherData::belongs (p, belongs_);
+
+ os << "Consumer_ptr" << endl
+ << scope_.name () << "_Context::unsubscribe_"
+ << p.name () << " (" << endl
+ << STRS[COMP_CK] << " *ck" << endl
+ << STRS[ENV_SRC] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_IC] << "))" << endl
+ << "{";
+
+ Traversal::PublisherData::belongs (p, belongs_);
+
+ os<< "Consumer_var retv;"
+ << "ACE_Active_Map_Manager_Key key;" << endl
+ << "if (ck == 0 || ::CIAO::Map_Key_Cookie::extract (ck, key) == false)"
+ << endl
+ << "{"
+ << "ACE_THROW_RETURN (" << endl
+ << STRS[EXCP_IC] << " ()," << endl;
+
+ Traversal::PublisherData::belongs (p, belongs_);
+
+ os << "Consumer::_nil ());" << endl
+ << "}"
+ << "if (this->ciao_publishes_" << p.name ()
+ << "_map_.unbind (key, retv) != 0)" << endl
+ << "{"
+ << "ACE_THROW_RETURN (" << endl
+ << STRS[EXCP_IC] << " ()," << endl;
+
+ Traversal::PublisherData::belongs (p, belongs_);
+
+ os << "Consumer::_nil ());" << endl
+ << "}"
+ << "return retv._retn ();" << endl
+ << "}";
+ }
+
+ virtual void
+ traverse (SemanticGraph::Emitter& e)
+ {
+ os << "void" << endl
+ << scope_.name () << "_Context::push_"
+ << e.name () << " (" << endl;
+
+ Traversal::EmitterData::belongs (e, belongs_);
+
+ os << " *ev" << endl
+ << STRS[ENV_SRC] << ")" << endl
+ << STRS[EXCP_SNGL] << endl
+ << "{"
+ << "this->ciao_emits_" << e.name ()
+ << "_consumer_->push_";
+
+ Traversal::EmitterData::belongs (e, simple_belongs_);
+
+ os << " (" << endl
+ << "ev" << endl
+ << STRS[ENV_ARG] << ");" << endl
+ << "}";
+
+ os << "void" << endl
+ << scope_.name () << "_Context::connect_"
+ << e.name () << " (" << endl;
+
+ Traversal::EmitterData::belongs (e, belongs_);
+
+ os << "Consumer_ptr c" << endl
+ << STRS[ENV_SRC] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_AC] << "))" << endl
+ << "{"
+ << "if (CORBA::is_nil (c))" << endl
+ << "{"
+ << "ACE_THROW (CORBA::BAD_PARAM ());" << endl
+ << "}" << endl
+ << "if (! CORBA::is_nil (this->ciao_emits_" << e.name ()
+ << "_consumer_.in ()))" << endl
+ << "{"
+ << "ACE_THROW (" << STRS[EXCP_AC] << " ());" << endl
+ << "}" << endl
+ << "this->ciao_emits_" << e.name ()
+ << "_consumer_ = " << endl;
+
+ Traversal::EmitterData::belongs (e, belongs_);
+
+ os << "Consumer::_duplicate (c);" << endl
+ << "}";
+
+ Traversal::EmitterData::belongs (e, belongs_);
+
+ os << "Consumer_ptr" << endl
+ << scope_.name () << "_Context::disconnect_"
+ << e.name () << " (" << endl
+ << STRS[ENV_SNGL_SRC] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_NC] << "))" << endl
+ << "{"
+ << "if (CORBA::is_nil (this->ciao_emits_" << e.name ()
+ << "_consumer_.in ()))" << endl
+ << "{"
+ << "ACE_THROW_RETURN (" << endl
+ << STRS[EXCP_NC] << " ()," << endl;
+
+ Traversal::EmitterData::belongs (e, belongs_);
+
+ os << "Consumer::_nil ());" << endl
+ << "}" << endl
+ << "return this->ciao_emits_" << e.name ()
+ << "_consumer_._retn ();" << endl
+ << "}";
+ }
+
+ private:
+ TypeNameEmitter type_name_emitter_;
+ SimpleTypeNameEmitter simple_type_name_emitter_;
+ Traversal::Belongs belongs_;
+ Traversal::Belongs simple_belongs_;
+ SemanticGraph::Component& scope_;
+ };
+
+ public:
+ virtual void
+ pre (Type& t)
+ {
+ // CIAO has facet classes outside the context and servant classes.
+ // We launch it here to generate the classes at the top of the file,
+ // like the original hand-crafted examples, for easier checking.
+ // This can be moved later to ServantEmitter::pre() or out on its own.
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits inherits;
+ inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+ component_emitter.edge_traverser (inherits);
+
+ Traversal::Provider provider;
+ defines.node_traverser (provider);
+
+ Traversal::Belongs belongs;
+ provider.edge_traverser (belongs);
+
+ FacetEmitter facet_emitter (ctx);
+ belongs.node_traverser (facet_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << STRS[GLUE_NS]
+ << regex::perl_s (t.scoped_name ().scope_name ().str (), "/::/_/")
+ << "{";
+
+ os << t.name () << "_Context::"
+ << t.name () << "_Context (" << endl
+ << "::Components::CCMHome_ptr home," << endl
+ << "::CIAO::Session_Container *c," << endl
+ << t.name () << "_Servant *sv)" << endl
+ << " : ACE_NESTED_CLASS (CIAO, Context_Impl_Base (home, c)), " << endl
+ << " ctx_svnt_base (home, c, sv)" << endl
+ << "{"
+ << "}";
+
+ os << t.name () << "_Context::~"
+ << t.name () << "_Context (void)" << endl
+ << "{"
+ << "}";
+
+ os << "// Operations for " << t.name () << " receptacles"
+ << " and event sources," << endl
+ << "// defined in " << t.scoped_name ().scope_name () << "::CCM_"
+ << t.name () << "_Context."
+ << endl << endl;
+
+ // Generate Context class operations for receptacles and event sources.
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits inherits;
+ inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+ component_emitter.edge_traverser (inherits);
+
+ ContextPortsEmitter ports_emitter (ctx, t);
+ defines.node_traverser (ports_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << "// CIAO-specific." << endl << endl;
+
+ os << t.name () << "_Context *" << endl
+ << t.name () << "_Context::_narrow (" << endl
+ << STRS[COMP_SC] << "_ptr p" << endl
+ << STRS[ENV_SRC_NOTUSED] << ")" << endl
+ << "{"
+ << "return dynamic_cast<" << t.name () << "_Context *> (p);"
+ << endl
+ << "}";
+ }
+
+ virtual void
+ post (Type&)
+ {
+ // Namespace closer.
+ os << "}";
+ }
+ };
+
+ struct ServantEmitter : Traversal::Component, EmitterBase
+ {
+ ServantEmitter (Context& c)
+ : EmitterBase (c)
+ {}
+
+ // Nested classes used by ServantEmitter.
+ private:
+ struct NavigationEmitsEmitter : Traversal::EmitterData,
+ EmitterBase
+ {
+ NavigationEmitsEmitter (Context& c)
+ : EmitterBase (c),
+ type_name_emitter_ (c.os ())
+ {
+ belongs_.node_traverser (type_name_emitter_);
+ }
+
+ virtual void
+ traverse (Type& t)
+ {
+ os << "if (ACE_OS::strcmp (emitter_name, \""
+ << t.name () << "\") == 0)" << endl
+ << "{";
+
+ Traversal::EmitterData::belongs (t, belongs_);
+
+ os << "Consumer_var _ciao_consumer =" << endl;
+
+ Traversal::EmitterData::belongs (t, belongs_);
+
+ os << "Consumer::_narrow (" << endl
+ << "consumer" << endl
+ << STRS[ENV_ARG] << ");"
+ << "ACE_CHECK;" << endl
+ << "if (::CORBA::is_nil (_ciao_consumer.in ()))" << endl
+ << "{"
+ << "ACE_THROW (" << STRS[EXCP_IC] << " ());"
+ << endl
+ << "}"
+ << "this->connect_" << t.name ()
+ << " (" << endl
+ << "_ciao_consumer.in ()" << endl
+ << STRS[ENV_ARG] << ");" << endl
+ << "return;"
+ << "}";
+ }
+
+ private:
+ TypeNameEmitter type_name_emitter_;
+ Traversal::Belongs belongs_;
+ };
+
+ struct NavigationGetFacetExecEmitter : Traversal::ProviderData,
+ EmitterBase
+ {
+ NavigationGetFacetExecEmitter (Context& c)
+ : EmitterBase (c)
+ {}
+
+ virtual void
+ traverse (Type& t)
+ {
+ os << "if (ACE_OS::strcmp (name, \""
+ << t.name () << "\") == 0)" << endl
+ << "{"
+ << "return this->executor_->get_" << t.name ()
+ << " (" << STRS[ENV_SNGL_ARG] << ");" << endl
+ << "}";
+ }
+ };
+
+ struct PublishesEmitter : Traversal::PublisherData,
+ EmitterBase
+ {
+ PublishesEmitter (Context& c, SemanticGraph::Component& scope)
+ : EmitterBase (c),
+ type_name_emitter_ (c.os ()),
+ scope_ (scope)
+ {
+ belongs_.node_traverser (type_name_emitter_);
+ }
+
+ virtual void
+ traverse (Type& p)
+ {
+ os << STRS[COMP_CK] << " *" << endl
+ << scope_.name ()
+ << "_Servant::subscribe_" << p.name () << " (" << endl;
+
+ Traversal::PublisherData::belongs (p, belongs_);
+
+ os << "Consumer_ptr c" << endl
+ << STRS[ENV_SRC] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_ECL] << "))" << endl
+ << "{"
+ << "return this->context_->subscribe_" << p.name ()
+ << " (" << endl
+ << "c" << endl
+ << STRS[ENV_ARG] << ");" << endl
+ << "}";
+
+ Traversal::PublisherData::belongs (p, belongs_);
+
+ os << "Consumer_ptr" << endl
+ << scope_.name ()
+ << "_Servant::unsubscribe_" << p.name () << " (" << endl
+ << STRS[COMP_CK] << " *ck" << endl
+ << STRS[ENV_SRC] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_IC] << "))" << endl
+ << "{"
+ << "return this->context_->unsubscribe_"
+ << p.name () << " (" << endl
+ << "ck" << endl
+ << STRS[ENV_ARG] << ");" << endl
+ << "}";
+ }
+
+ private:
+ TypeNameEmitter type_name_emitter_;
+ Traversal::Belongs belongs_;
+ SemanticGraph::Component& scope_;
+ };
+
+ struct UsesConnectEmitter : Traversal::SingleUserData,
+ Traversal::MultiUserData,
+ EmitterBase
+ {
+ UsesConnectEmitter (Context& c)
+ : EmitterBase (c),
+ type_name_emitter_ (c.os ())
+ {
+ belongs_.node_traverser (type_name_emitter_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::SingleUser& u)
+ {
+ os << "if (ACE_OS::strcmp (name, \""
+ << u.name () << "\") == 0)" << endl
+ << "{";
+
+ Traversal::SingleUserData::belongs (u, belongs_);
+
+ os << "_var _ciao_conn =" << endl;
+
+ Traversal::SingleUserData::belongs (u, belongs_);
+
+ os << "::_narrow (" << endl
+ << "connection" << endl
+ << STRS[ENV_ARG] << ");"
+ << "ACE_CHECK_RETURN (0);" << endl
+ << "if (::CORBA::is_nil (_ciao_conn.in ()))" << endl
+ << "{"
+ << "ACE_THROW_RETURN (" << STRS[EXCP_IC] << " (), 0);"
+ << endl
+ << "}"
+ << "// Simplex connect." << endl
+ << "this->connect_" << u.name () << " (" << endl
+ << "_ciao_conn.in ()" << endl
+ << STRS[ENV_ARG] << ");"
+ << "ACE_CHECK_RETURN (0);" << endl
+ << "return 0;" << endl
+ << "}";
+ }
+
+ virtual void
+ traverse (SemanticGraph::MultiUser& u)
+ {
+ os << "if (ACE_OS::strcmp (name, \""
+ << u.name () << "\") == 0)" << endl
+ << "{";
+
+ Traversal::MultiUserData::belongs (u, belongs_);
+
+ os << "_var _ciao_conn =" << endl;
+
+ Traversal::MultiUserData::belongs (u, belongs_);
+
+ os << "::_narrow (" << endl
+ << "connection" << endl
+ << STRS[ENV_ARG] << ");"
+ << "ACE_CHECK_RETURN (0);" << endl
+ << "if (::CORBA::is_nil (_ciao_conn.in ()))" << endl
+ << "{"
+ << "ACE_THROW_RETURN (" << STRS[EXCP_IC] << " (), 0);"
+ << endl
+ << "}"
+ << "// Multiplex connect." << endl
+ << "return this->connect_" << u.name () << " (" << endl
+ << "_ciao_conn.in ()" << endl
+ << STRS[ENV_ARG] << ");"
+ << "}";
+ }
+
+ private:
+ TypeNameEmitter type_name_emitter_;
+ Traversal::Belongs belongs_;
+ };
+
+ struct UsesDisconnectEmitter : Traversal::SingleUserData,
+ Traversal::MultiUserData,
+ EmitterBase
+ {
+ UsesDisconnectEmitter (Context& c)
+ : EmitterBase (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::SingleUser& u)
+ {
+ os << "if (ACE_OS::strcmp (name, \""
+ << u.name () << "\") == 0)" << endl
+ << "{"
+ << "// Simplex disconnect." << endl
+ << "return this->disconnect_" << u.name ()
+ << " (" << STRS[ENV_SNGL_ARG] << ");" << endl
+ << "}";
+ }
+
+ virtual void
+ traverse (SemanticGraph::MultiUser& u)
+ {
+ os << "if (ACE_OS::strcmp (name, \""
+ << u.name () << "\") == 0)" << endl
+ << "{"
+ << "// Multiplex disconnect." << endl
+ << "return this->disconnect_" << u.name () << " (" << endl
+ << "ck" << endl
+ << STRS[ENV_ARG] << ");" << endl
+ << "}";
+ }
+ };
+
+ struct UsesEmitter : Traversal::SingleUserData,
+ Traversal::MultiUserData,
+ EmitterBase
+ {
+ UsesEmitter (Context& c, SemanticGraph::Component& scope)
+ : EmitterBase (c),
+ type_name_emitter_ (c.os ()),
+ scope_ (scope)
+ {
+ belongs_.node_traverser (type_name_emitter_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::SingleUser& u)
+ {
+ os << "void" << endl
+ << scope_.name () << "_Servant::connect_"
+ << u.name () << " (" << endl;
+
+ Traversal::SingleUserData::belongs (u, belongs_);
+
+ os << "_ptr c" << endl
+ << STRS[ENV_SRC] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_AC] << "," << endl
+ << STRS[EXCP_IC] << "))" << endl
+ << "{"
+ << "this->context_->connect_" << u.name () << " ("
+ << endl
+ << "c" << endl
+ << STRS[ENV_ARG] << ");" << endl
+ << "}";
+
+ Traversal::SingleUserData::belongs (u, belongs_);
+
+ os << "_ptr" << endl
+ << scope_.name () << "_Servant::disconnect_"
+ << u.name () << " (" << endl
+ << STRS[ENV_SNGL_SRC] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_NC] << "))" << endl
+ << "{"
+ << "return this->context_->disconnect_" << u.name ()
+ << " (" << endl
+ << STRS[ENV_SNGL_ARG] << ");" << endl
+ << "}";
+
+ Traversal::SingleUserData::belongs (u, belongs_);
+
+ os << "_ptr" << endl
+ << scope_.name ()
+ << "_Servant::get_connection_" << u.name ()
+ << " (" << endl
+ << STRS[ENV_SNGL_SRC] << ")" << endl
+ << STRS[EXCP_SNGL] << endl
+ << "{"
+ << "return this->context_->get_connection_"
+ << u.name () << " (" << endl
+ << STRS[ENV_SNGL_ARG] << ");" << endl
+ << "}";
+ }
+
+ virtual void
+ traverse (SemanticGraph::MultiUser& u)
+ {
+ os << STRS[COMP_CK] << " *" << endl
+ << scope_.name () << "_Servant::connect_"
+ << u.name () << " (" << endl;
+
+ Traversal::MultiUserData::belongs (u, belongs_);
+
+ os << "_ptr c" << endl
+ << STRS[ENV_SRC] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_ECL] << "," << endl
+ << STRS[EXCP_IC] << "))" << endl
+ << "{"
+ << "return this->context_->connect_" << u.name () << " ("
+ << endl
+ << "c" << endl
+ << STRS[ENV_ARG] << ");" << endl
+ << "}";
+
+ Traversal::MultiUserData::belongs (u, belongs_);
+
+ os << "_ptr" << endl
+ << scope_.name () << "_Servant::disconnect_"
+ << u.name () << " (" << endl
+ << STRS[COMP_CK] << " * ck" << endl
+ << STRS[ENV_SRC] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_IC] << "))" << endl
+ << "{"
+ << "return this->context_->disconnect_" << u.name ()
+ << " (" << endl
+ << "ck" << endl
+ << STRS[ENV_ARG] << ");" << endl
+ << "}";
+
+ os << u.scoped_name () << "Connections *" << endl
+ << scope_.name ()
+ << "_Servant::get_connections_" << u.name ()
+ << " (" << endl
+ << STRS[ENV_SNGL_SRC] << ")" << endl
+ << STRS[EXCP_SNGL] << endl
+ << "{"
+ << "return this->context_->get_connections_"
+ << u.name () << " (" << endl
+ << STRS[ENV_SNGL_ARG] << ");" << endl
+ << "}";
+ }
+
+ private:
+ TypeNameEmitter type_name_emitter_;
+ Traversal::Belongs belongs_;
+ SemanticGraph::Component& scope_;
+ };
+
+ struct PublishesSubscribeEmitter : Traversal::PublisherData,
+ EmitterBase
+ {
+ PublishesSubscribeEmitter (Context& c)
+ : EmitterBase (c),
+ type_name_emitter_ (c.os ())
+ {
+ belongs_.node_traverser (type_name_emitter_);
+ }
+
+ virtual void
+ traverse (Type& p)
+ {
+ os << "if (ACE_OS::strcmp (publisher_name, \""
+ << p.name () << "\") == 0)" << endl
+ << "{";
+
+ Traversal::PublisherData::belongs (p, belongs_);
+
+ os << "Consumer_var _ciao_consumer =" << endl;
+
+ Traversal::PublisherData::belongs (p, belongs_);
+
+ os << "Consumer::_narrow (" << endl
+ << "subscribe" << endl
+ << STRS[ENV_ARG] << ");"
+ << "ACE_CHECK_RETURN (0);" << endl
+ << "if (::CORBA::is_nil (_ciao_consumer.in ()))" << endl
+ << "{"
+ << "ACE_THROW_RETURN (" << STRS[EXCP_IC] << " (), 0);"
+ << endl
+ << "}"
+ << "return this->subscribe_" << p.name ()
+ << " (" << endl
+ << "_ciao_consumer.in ()" << endl
+ << STRS[ENV_ARG] << ");" << endl
+ << "}";
+ }
+
+ private:
+ TypeNameEmitter type_name_emitter_;
+ Traversal::Belongs belongs_;
+ };
+
+ struct PublishesUnsubscribeEmitter : Traversal::PublisherData,
+ EmitterBase
+ {
+ PublishesUnsubscribeEmitter (Context& c)
+ : EmitterBase (c)
+ {}
+
+ virtual void
+ traverse (Type& p)
+ {
+ os << "if (ACE_OS::strcmp (publisher_name, \""
+ << p.name () << "\") == 0)" << endl
+ << "{"
+ << "return this->unsubscribe_" << p.name ()
+ << " (" << endl
+ << "ck" << endl
+ << STRS[ENV_ARG] << ");" << endl
+ << "}";
+ }
+ };
+
+ struct EmitsEmitter : Traversal::EmitterData,
+ EmitterBase
+ {
+ EmitsEmitter (Context& c, SemanticGraph::Component& scope)
+ : EmitterBase (c),
+ type_name_emitter_ (c.os ()),
+ scope_ (scope)
+ {
+ belongs_.node_traverser (type_name_emitter_);
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ os << "void" << endl
+ << scope_.name () << "_Servant::connect_"
+ << e.name () << " (" << endl;
+
+ Traversal::EmitterData::belongs (e, belongs_);
+
+ os << "Consumer_ptr c" << endl
+ << STRS[ENV_SRC] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_AC] << "))" << endl
+ << "{"
+ << "this->context_->connect_" << e.name ()
+ << " (" << endl
+ << "c" << endl
+ << STRS[ENV_ARG] << ");" << endl
+ << "}";
+
+ Traversal::EmitterData::belongs (e, belongs_);
+
+ os << "Consumer_ptr" << endl
+ << scope_.name () << "_Servant::disconnect_"
+ << e.name () << " (" << endl
+ << STRS[ENV_SNGL_SRC] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_NC] << "))" << endl
+ << "{"
+ << "return this->context_->disconnect_"
+ << e.name () << " (" << endl
+ << STRS[ENV_SNGL_ARG] << ");" << endl
+ << "}";
+ }
+
+ private:
+ TypeNameEmitter type_name_emitter_;
+ Traversal::Belongs belongs_;
+ SemanticGraph::Component& scope_;
+ };
+
+ struct ServantTypeNameEmitter : Traversal::Type
+ {
+ ServantTypeNameEmitter (std::ostream& os_)
+ : os (os_)
+ {}
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ os << "CIAO_GLUE";
+
+ ScopedName scope (t.scoped_name ().scope_name ());
+
+ if (!scope.simple ())
+ {
+ for (Name::Iterator i (scope.begin () + 1); i != scope.end (); ++i)
+ {
+ os << "_" << i->str ();
+ }
+ }
+
+ os << "::" << t.name () << "_Servant";
+ }
+
+ private:
+ std::ostream& os;
+ };
+
+ struct FacetProvidesEmitter : Traversal::ProviderData,
+ EmitterBase
+ {
+ FacetProvidesEmitter (Context& c, SemanticGraph::Component& scope)
+ : EmitterBase (c),
+ type_name_emitter_ (c.os ()),
+ simple_type_name_emitter_ (c.os ()),
+ servant_type_name_emitter_ (c.os ()),
+ enclosing_type_name_emitter_ (c.os ()),
+ repo_id_emitter_ (c.os ()),
+ scope_ (scope)
+ {
+ belongs_.node_traverser (type_name_emitter_);
+ simple_belongs_.node_traverser (simple_type_name_emitter_);
+ servant_belongs_.node_traverser (servant_type_name_emitter_);
+ enclosing_belongs_.node_traverser (enclosing_type_name_emitter_);
+ repo_id_belongs_.node_traverser (repo_id_emitter_);
+ }
+
+ virtual void
+ traverse (Type& p)
+ {
+ Traversal::ProviderData::belongs (p, belongs_);
+
+ os << "_ptr" << endl
+ << scope_.name ()
+ << "_Servant::provide_" << p.name () << " (" << endl
+ << STRS[ENV_SNGL_SRC] << ")" << endl
+ << STRS[EXCP_SNGL] << endl
+ << "{"
+ << "if (! ::CORBA::is_nil (this->provide_"
+ << p.name () << "_.in ()))" << endl
+ << "{"
+ << "return ";
+
+ Traversal::ProviderData::belongs (p, belongs_);
+
+ os << "::_duplicate (this->provide_" << p.name () << "_.in ());"
+ << "}";
+
+ /*
+ Traversal::ProviderData::belongs (p, enclosing_belongs_);
+
+ os << "::CCM_";
+
+ Traversal::ProviderData::belongs (p, simple_belongs_);
+
+ os << "_var fexe =" << endl
+ << "this->executor_->get_" << p.name ()
+ << " (" << STRS[ENV_SNGL_ARG] << ");"
+ << "ACE_CHECK_RETURN (";
+
+ Traversal::ProviderData::belongs (p, belongs_);
+
+ os << "::_nil ());"
+ << endl
+ << "if (::CORBA::is_nil (fexe.in ()))" << endl
+ << "{"
+ << "ACE_THROW_RETURN (" << endl
+ << "::CORBA::INTERNAL ()," << endl;
+
+ Traversal::ProviderData::belongs (p, belongs_);
+
+ os << "::_nil ());" << endl
+ << "}";
+ */
+ os << "::CORBA::Object_var obj =" << endl
+ << "this->provide_" << p.name () << "_i ("
+ << STRS[ENV_SNGL_ARG] << ");"
+ << "ACE_CHECK_RETURN (";
+
+ Traversal::ProviderData::belongs (p, belongs_);
+
+ os << "::_nil ());" << endl;
+
+ ScopedName scoped (scope_.scoped_name ());
+ Name stripped (scoped.begin () + 1, scoped.end ());
+ string unique_obj_name =
+ regex::perl_s (stripped.str (), "/::/_/") + "_" + p.name ().str ();
+
+
+ Traversal::ProviderData::belongs (p, belongs_);
+
+ os << "_var fo =" << endl;
+
+ Traversal::ProviderData::belongs (p, belongs_);
+
+ os << "::_narrow (" << endl
+ << "obj.in ()" << endl
+ << STRS[ENV_ARG] << ");"
+ << "ACE_CHECK_RETURN (";
+
+ Traversal::ProviderData::belongs (p, belongs_);
+
+ os << "::_nil ());" << endl
+ << "this->provide_" << p.name () << "_ = fo;"
+ << "return ";
+
+ Traversal::ProviderData::belongs (p, belongs_);
+
+ os << "::_duplicate (this->provide_"
+ << p.name () << "_.in ());" << endl
+ << "}";
+
+ // Corresponding private provide_*_i() method.
+
+ os << "::CORBA::Object_ptr" << endl
+ << scope_.name ()
+ << "_Servant::provide_" << p.name () << "_i (" << endl
+ << STRS[ENV_SNGL_SRC] << ")" << endl
+ << STRS[EXCP_SNGL] << endl
+ << "{"
+ << "::CORBA::Object_ptr ret =" << endl
+ << "this->lookup_facet (\"" << p.name () << "\");" << endl;
+
+ os << "if (! ::CORBA::is_nil (ret))" << endl
+ << "{"
+ << "return ret;"
+ << "}";
+
+ os << "CIAO::Port_Activator_T<" << endl
+ << " ";
+
+ Traversal::ProviderData::belongs (p, servant_belongs_);
+
+ os << "," << endl
+ << " ";
+
+ Traversal::ProviderData::belongs (p, enclosing_belongs_);
+
+ os << "::CCM_";
+
+ Traversal::ProviderData::belongs (p, simple_belongs_);
+
+ os << "," << endl
+ << " ::Components::CCMContext," << endl
+ << " " << scope_.name () << "_Servant" << endl
+ << " > *tmp = 0;" << endl
+ << "typedef CIAO::Port_Activator_T<" << endl
+ << " ";
+
+ Traversal::ProviderData::belongs (p, servant_belongs_);
+
+ os << "," << endl
+ << " ";
+
+ Traversal::ProviderData::belongs (p, enclosing_belongs_);
+
+ os << "::CCM_";
+
+ Traversal::ProviderData::belongs (p, simple_belongs_);
+
+ os << "," << endl
+ << " ::Components::CCMContext," << endl
+ << " " << scope_.name () << "_Servant" << endl
+ << " >" << endl
+ << "MACRO_MADNESS_TYPEDEF;" << endl;
+
+ os << "ACE_NEW_THROW_EX ( " << endl
+ << "tmp," << endl
+ << "MACRO_MADNESS_TYPEDEF (" << endl
+ << "\"" << unique_obj_name << "\"," << endl
+ << "\"" << p.name () << "\"," << endl
+ << "CIAO::Port_Activator::Facet," << endl
+ << "0," << endl
+ << "this->context_," << endl
+ << "this)," << endl
+ << "CORBA::NO_MEMORY ());" << endl;
+
+ os << "CIAO::Servant_Activator *sa = " << endl
+ << "this->container_->ports_servant_activator ();" << endl
+ << "if (!sa->register_port_activator (tmp))" << endl
+ << "{"
+ << "return 0;" << endl
+ << "}";
+
+ os << "::CORBA::Object_var obj =" << endl
+ << "this->container_->generate_reference (" << endl
+ << "\"" << unique_obj_name << "\"," << endl;
+
+ Traversal::ProviderData::belongs (p, repo_id_belongs_);
+
+ os << "," << endl
+ << "CIAO::Container::Facet_Consumer" << endl
+ << STRS[ENV_ARG] << ");"
+ << "ACE_CHECK_RETURN (";
+
+ Traversal::ProviderData::belongs (p, belongs_);
+
+ os << "::_nil ());" << endl
+ << "this->add_facet (" << endl
+ << "\"" << p.name () << "\"," << endl
+ << "obj.in ());" << endl;
+
+ os << "return obj._retn ();" << endl
+ << "}";
+ }
+
+ private:
+ TypeNameEmitter type_name_emitter_;
+ SimpleTypeNameEmitter simple_type_name_emitter_;
+ ServantTypeNameEmitter servant_type_name_emitter_;
+ EnclosingTypeNameEmitter enclosing_type_name_emitter_;
+ RepoIdEmitter repo_id_emitter_;
+ Traversal::Belongs belongs_;
+ Traversal::Belongs simple_belongs_;
+ Traversal::Belongs servant_belongs_;
+ Traversal::Belongs enclosing_belongs_;
+ Traversal::Belongs repo_id_belongs_;
+ SemanticGraph::Component& scope_;
+ };
+
+ struct ConsumesEmitter : Traversal::ConsumerData,
+ EmitterBase
+ {
+ ConsumesEmitter (Context& c, SemanticGraph::Component& scope)
+ : EmitterBase (c),
+ type_name_emitter_ (c.os ()),
+ simple_type_name_emitter_ (c.os ()),
+ repo_id_emitter_ (c.os ()),
+ scope_ (scope)
+ {
+ belongs_.node_traverser (type_name_emitter_);
+ simple_belongs_.node_traverser (simple_type_name_emitter_);
+ repo_id_belongs_.node_traverser (repo_id_emitter_);
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ os << scope_.name () << "_Servant::";
+
+ Traversal::ConsumerData::belongs (c, simple_belongs_);
+
+ os << "Consumer_" << c.name ()
+ << "_Servant::";
+
+ Traversal::ConsumerData::belongs (c, simple_belongs_);
+
+ os << "Consumer_" << c.name ()
+ << "_Servant (" << endl
+ << c.scoped_name ().scope_name ().scope_name () << "::CCM_"
+ << c.scoped_name ().scope_name ().simple_name ()
+ << "_ptr executor,"
+ << endl
+ << c.scoped_name ().scope_name ().scope_name () << "::CCM_"
+ << c.scoped_name ().scope_name ().simple_name ()
+ << "_Context_ptr c)" << endl
+ << ": executor_ (" << c.scoped_name ().scope_name ().scope_name ()
+ << "::CCM_" << c.scoped_name ().scope_name ().simple_name ()
+ << "::_duplicate (executor))," << endl
+ << "ctx_ (" << c.scoped_name ().scope_name ().scope_name ()
+ << "::CCM_" << c.scoped_name ().scope_name ().simple_name ()
+ << "_Context::_duplicate (c))" << endl
+ << "{"
+ << "}";
+
+ os << scope_.name () << "_Servant::";
+
+ Traversal::ConsumerData::belongs (c, simple_belongs_);
+
+ os << "Consumer_" << c.name ()
+ << "_Servant::~";
+
+ Traversal::ConsumerData::belongs (c, simple_belongs_);
+
+ os << "Consumer_" << c.name ()
+ << "_Servant (void)" << endl
+ << "{"
+ << "}";
+
+ os << "CORBA::Object_ptr" << endl
+ << scope_.name () << "_Servant::";
+
+ Traversal::ConsumerData::belongs (c, simple_belongs_);
+
+ os << "Consumer_" << c.name ()
+ << "_Servant::_get_component (" << endl
+ << STRS[ENV_SNGL_SRC] << ")" << endl
+ << STRS[EXCP_SNGL] << endl
+ << "{"
+ << "return this->ctx_->get_CCM_object "
+ << "(" << STRS[ENV_SNGL_ARG] << ");" << endl
+ << "}";
+
+ os << "void" << endl
+ << scope_.name () << "_Servant::";
+
+ Traversal::ConsumerData::belongs (c, simple_belongs_);
+
+ os << "Consumer_" << c.name ()
+ << "_Servant::push_";
+
+ Traversal::ConsumerData::belongs (c, simple_belongs_);
+
+ os << " (" << endl;
+
+ Traversal::ConsumerData::belongs (c, belongs_);
+
+ os << " *evt" << endl
+ << STRS[ENV_SRC] << ")" << endl
+ << STRS[EXCP_SNGL] << endl
+ << "{"
+ << "this->executor_->push_" << c.name ()
+ << " (" << endl
+ << "evt" << endl
+ << STRS[ENV_ARG] << ");" << endl
+ << "}";
+
+ os << "// Inherited from " << STRS[COMP_ECB] << "." << endl
+ << "void" << endl
+ << scope_.name () << "_Servant::";
+
+ Traversal::ConsumerData::belongs (c, simple_belongs_);
+
+ os << "Consumer_" << c.name ()
+ << "_Servant::push_event (" << endl
+ << "::Components::EventBase *ev" << endl
+ << STRS[ENV_SRC] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_BET] << "))" << endl
+ << "{";
+
+ Traversal::ConsumerData::belongs (c, belongs_);
+
+ os << "_var ev_type =" << endl;
+
+ Traversal::ConsumerData::belongs (c, belongs_);
+
+ os << "::_downcast (ev);" << endl
+ << "if (ev_type.in () != 0)" << endl
+ << "{"
+ << "this->push_";
+
+ Traversal::ConsumerData::belongs (c, simple_belongs_);
+
+ os << " (" << endl
+ << "ev_type.in ()" << endl
+ << STRS[ENV_ARG] << ");" << endl
+ << "return;" << endl
+ << "}"
+ << "ACE_THROW (" << STRS[EXCP_BET] << " ());" << endl
+ << "}";
+
+ Traversal::ConsumerData::belongs (c, belongs_);
+
+ os << "Consumer_ptr" << endl
+ << scope_.name () << "_Servant::"
+ << "get_consumer_" << c.name () << " (" << endl
+ << STRS[ENV_SNGL_SRC] << ")" << endl
+ << STRS[EXCP_SNGL] << endl
+ << "{"
+ << "if (! ::CORBA::is_nil (this->consumes_" << c.name ()
+ << "_.in ()))" << endl
+ << "{"
+ << "return ";
+
+ Traversal::ConsumerData::belongs (c, belongs_);
+
+ os << "Consumer::_duplicate (this->consumes_"
+ << c.name () << "_.in ());"
+ << "}";
+
+ os << "::Components::EventConsumerBase_var obj =" << endl
+ << "this->get_consumer_" << c.name () << "_i (" << endl
+ << STRS[ENV_SNGL_ARG] << ");"
+ << "ACE_CHECK_RETURN (";
+
+ Traversal::ConsumerData::belongs (c, belongs_);
+
+ os << "Consumer::_nil ());" << endl;
+
+ ScopedName scoped (scope_.scoped_name ());
+ Name stripped (scoped.begin () + 1, scoped.end ());
+ string unique_obj_name =
+ regex::perl_s (stripped.str (), "/::/_/") + "_" + c.name ().str ();
+
+ Traversal::ConsumerData::belongs (c, belongs_);
+
+ os << "Consumer_var eco =" << endl;
+
+ Traversal::ConsumerData::belongs (c, belongs_);
+
+ os << "Consumer::_narrow (" << endl
+ << "obj.in ()" << endl
+ << STRS[ENV_ARG] << ");"
+ << "ACE_CHECK_RETURN (";
+
+ Traversal::ConsumerData::belongs (c, belongs_);
+
+ os << "Consumer::_nil ());" << endl
+ << "this->consumes_" << c.name () << "_ = eco;"
+ << "return ";
+
+ Traversal::ConsumerData::belongs (c, belongs_);
+
+ os << "Consumer::_duplicate (this->consumes_" << c.name ()
+ << "_.in ());" << endl
+ << "}";
+
+ // Corresponding private get_consumer_*_i() method.
+
+ os << "::Components::EventConsumerBase_ptr" << endl
+ << scope_.name () << "_Servant::"
+ << "get_consumer_" << c.name () << "_i (" << endl
+ << STRS[ENV_SNGL_SRC] << ")" << endl
+ << STRS[EXCP_SNGL] << endl
+ << "{"
+ << "::Components::EventConsumerBase_ptr ret =" << endl
+ << "this->lookup_consumer (\"" << c.name () << "\");" << endl;
+
+ os << "if (! ::CORBA::is_nil (ret))" << endl
+ << "{"
+ << "return ret;"
+ << "}";
+
+ os << "CIAO::Port_Activator_T<" << endl;
+
+ os << scope_.name () << "_Servant::";
+
+ Traversal::ConsumerData::belongs (c, simple_belongs_);
+
+ os << "Consumer_" << c.name ()
+ << "_Servant," << endl
+ << c.scoped_name ().scope_name ().scope_name ()
+ << "::CCM_"
+ << c.scoped_name ().scope_name ().simple_name ()
+ << "," << endl
+ << c.scoped_name ().scope_name ().scope_name () << "::CCM_"
+ << c.scoped_name ().scope_name ().simple_name ()
+ << "_Context," << endl
+ << scope_.name () << "_Servant"
+ << " > *tmp = 0;" << endl
+ << "typedef CIAO::Port_Activator_T<" << endl;
+
+ os << scope_.name () << "_Servant::";
+
+ Traversal::ConsumerData::belongs (c, simple_belongs_);
+
+ os << "Consumer_" << c.name ()
+ << "_Servant," << endl
+ << c.scoped_name ().scope_name ().scope_name ()
+ << "::CCM_"
+ << c.scoped_name ().scope_name ().simple_name ()
+ << "," << endl
+ << c.scoped_name ().scope_name ().scope_name () << "::CCM_"
+ << c.scoped_name ().scope_name ().simple_name ()
+ << "_Context, " << endl
+ << scope_.name () << "_Servant"
+ << " > " << endl
+ << " MACRO_MADNESS_TYPEDEF;"
+ << endl << endl;
+
+ os << "ACE_NEW_THROW_EX ( " << endl
+ << " tmp," << endl
+ << " MACRO_MADNESS_TYPEDEF (" << endl
+ << "\"" << unique_obj_name << "\"," << endl
+ << "\"" << c.name () << "\"," << endl
+ << "CIAO::Port_Activator::Sink," << endl
+ << "this->executor_.in ()," << endl
+ << "this->context_," << endl
+ << "this)," << endl
+ << "CORBA::NO_MEMORY ());" << endl << endl;
+
+ os << "CIAO::Servant_Activator *sa = " << endl
+ << "this->container_->ports_servant_activator ();" <<endl
+ << "if (!sa->register_port_activator (tmp))" << endl
+ << "{"
+ << "return 0;" << endl
+ << "}";
+
+ os << "::CORBA::Object_var obj =" << endl
+ << "this->container_->generate_reference (" << endl
+ << "\"" << unique_obj_name << "\"," << endl;
+
+ Traversal::ConsumerData::belongs (c, repo_id_belongs_);
+
+ os << "," << endl
+ << "CIAO::Container::Facet_Consumer" << endl
+ << STRS[ENV_ARG] << ");"
+ << "ACE_CHECK_RETURN (";
+
+ Traversal::ConsumerData::belongs (c, belongs_);
+
+ os << "Consumer::_nil ());" << endl;
+
+ os << "::Components::EventConsumerBase_var ecb =" << endl
+ << "::Components::EventConsumerBase::_narrow (" << endl
+ << "obj.in ()" << endl
+ << STRS[ENV_ARG] << ");"
+ << "ACE_CHECK_RETURN (";
+
+ Traversal::ConsumerData::belongs (c, belongs_);
+
+ os << "Consumer::_nil ());" << endl;
+
+ os << "this->add_consumer (" << endl
+ << "\"" << c.name () << "\"," << endl
+ << "ecb.in ());" << endl;
+
+ os << "return ecb._retn ();" << endl
+ << "}";
+ }
+
+ private:
+ TypeNameEmitter type_name_emitter_;
+ SimpleTypeNameEmitter simple_type_name_emitter_;
+ ConsumerRepoIdEmitter repo_id_emitter_;
+ Traversal::Belongs belongs_;
+ Traversal::Belongs simple_belongs_;
+ Traversal::Belongs repo_id_belongs_;
+ SemanticGraph::Component& scope_;
+ };
+
+ struct OperationExistsEmitter;
+
+ struct RegisterValueFactoryEmitter : Traversal::ConsumerData,
+ EmitterBase
+ {
+ RegisterValueFactoryEmitter (Context& c)
+ : EmitterBase (c),
+ type_name_emitter_ (c.os ()),
+ gen_factory_ (true)
+ {
+ belongs_.node_traverser (type_name_emitter_);
+ }
+
+ void factory_gen_off (void)
+ {
+ gen_factory_ = false;
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ {
+ Traversal::ConsumerData consumer;
+
+ Traversal::Belongs consumer_belongs;
+ consumer.edge_traverser (consumer_belongs);
+
+ Traversal::EventType event_type;
+ consumer_belongs.node_traverser (event_type);
+
+ Traversal::Inherits inherits;
+ inherits.node_traverser (event_type);
+ event_type.edge_traverser (inherits);
+
+ Traversal::Supports supports;
+ supports.node_traverser (event_type);
+ event_type.edge_traverser (supports);
+
+ // (JP) The above two need front end support,
+ // and we need to check for private members
+ // as well.
+
+ Traversal::Defines defines;
+ event_type.edge_traverser (defines);
+
+ OperationExistsEmitter op_emitter (this);
+ defines.node_traverser (op_emitter);
+
+ consumer.traverse (c);
+ }
+
+ if (gen_factory_)
+ {
+ os << "CIAO_REGISTER_OBV_FACTORY (" << endl;
+
+ Traversal::ConsumerData::belongs (c, belongs_);
+
+ os << "_init," << endl;
+
+ Traversal::ConsumerData::belongs (c, belongs_);
+
+ os << ");" << endl;
+ }
+ }
+
+ private:
+ TypeNameEmitter type_name_emitter_;
+ Traversal::Belongs belongs_;
+ bool gen_factory_;
+ };
+
+ struct OperationExistsEmitter : Traversal::Operation,
+ Traversal::EventTypeFactory
+ {
+ OperationExistsEmitter (RegisterValueFactoryEmitter* r)
+ : r_ (r)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Operation&)
+ {
+ r_->factory_gen_off ();
+ }
+
+ virtual void
+ traverse (SemanticGraph::EventTypeFactory&)
+ {
+ r_->factory_gen_off ();
+ }
+
+ private:
+ RegisterValueFactoryEmitter* r_;
+ };
+
+ struct PortTablePopulator : Traversal::ProviderData,
+ Traversal::UserData,
+ Traversal::PublisherData,
+ Traversal::EmitterData,
+ Traversal::ConsumerData,
+ EmitterBase
+ {
+ PortTablePopulator (Context& c)
+ : EmitterBase (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Provider& p)
+ {
+ os << "obj_var =" << endl
+ << "this->provide_" << p.name () << "_i (" << endl
+ << STRS[ENV_SNGL_ARG] << ");"
+ << "ACE_CHECK;" << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::User&)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Publisher&)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Emitter&)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Consumer& p)
+ {
+ os << "ecb_var =" << endl
+ << "this->get_consumer_" << p.name () << "_i (" << endl
+ << STRS[ENV_SNGL_ARG] << ");"
+ << "ACE_CHECK;" << endl;
+ }
+ };
+
+ struct SetAttributesEmitter : Traversal::ReadWriteAttribute,
+ EmitterBase
+ {
+ SetAttributesEmitter (Context& c)
+ : EmitterBase (c),
+ extract_emitter_ (c.os ()),
+ assign_emitter_ (c.os ())
+ {
+ extract_belongs_.node_traverser (extract_emitter_);
+ assign_belongs_.node_traverser (assign_emitter_);
+ }
+
+ virtual void
+ pre (SemanticGraph::ReadWriteAttribute& a)
+ {
+ os << "if (ACE_OS::strcmp (descr_name, \""
+ << a.name () << "\") == 0)" << endl
+ << "{";
+
+ Traversal::ReadWriteAttribute::belongs (a, extract_belongs_);
+
+ os << "descr_value >>= " << STRS[EXTRACT] << ";"
+ << "this->" << a.name () << " (";
+
+ Traversal::ReadWriteAttribute::belongs (a, assign_belongs_);
+
+ os << ");"
+ << "continue;"
+ << "}";
+ }
+
+ private:
+ ExtractedTypeDeclEmitter extract_emitter_;
+ AssignFromExtractedEmitter assign_emitter_;
+ Traversal::Belongs extract_belongs_;
+ Traversal::Belongs assign_belongs_;
+ };
+
+ public:
+ virtual void
+ pre (Type& t)
+ {
+ os << STRS[GLUE_NS]
+ << regex::perl_s (t.scoped_name ().scope_name ().str (), "/::/_/")
+ << "{";
+
+ ScopedName scoped (t.scoped_name ());
+ Name stripped (scoped.begin () + 1, scoped.end ());
+
+ // Servant Constructor
+ os << t.name () << "_Servant::"
+ << t.name () << "_Servant (" << endl
+ << t.scoped_name ().scope_name () << "::CCM_" << t.name ()
+ << "_ptr exe," << endl
+ << "::Components::CCMHome_ptr h," << endl
+ << "::CIAO::Session_Container *c)" << endl
+ << " : ACE_NESTED_CLASS (CIAO, Servant_Impl_Base (c))," << endl
+ << " comp_svnt_base (exe, c)" << endl
+ << "{"
+ << "ACE_NEW (" << endl
+ << "this->context_," << endl
+ << t.name () << "_Context (h, c, this));" << endl;
+
+ // Generate the macro to register a value factory for each
+ // eventtype consumed.
+ if (!ctx.cl ().get_value ("suppress-register-factory", false))
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits inherits;
+ inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+ component_emitter.edge_traverser (inherits);
+
+ RegisterValueFactoryEmitter factory_emitter (ctx);
+ defines.node_traverser (factory_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << "ACE_TRY_NEW_ENV" << endl
+ << "{"
+ << "::Components::SessionComponent_var scom =" << endl
+ << "::Components::SessionComponent::_narrow (" << endl
+ << "exe" << endl
+ << STRS[ENV_ARG] << ");"
+ << "ACE_TRY_CHECK;" << endl
+ << "if (! ::CORBA::is_nil (scom.in ()))" << endl
+ << "{"
+ << "scom->set_session_context (" << endl
+ << "this->context_" << endl
+ << STRS[ENV_ARG] << ");"
+ << "ACE_TRY_CHECK;"
+ << "}"
+ << "this->populate_port_tables (" << endl
+ << STRS[ENV_SNGL_ARG] << ");"
+ << "ACE_TRY_CHECK;"
+ << "}"
+ << "ACE_CATCHANY" << endl
+ << "{"
+ << "}"
+ << "ACE_ENDTRY;" << endl
+ << "}";
+
+ // Servant Destructor
+ os << t.name () << "_Servant::~"
+ << t.name () << "_Servant (void)" << endl
+ << "{"
+ << "}";
+
+ // Override pure virtual set_attributes() operation.
+ os << "void" << endl
+ << t.name () << "_Servant::set_attributes (" << endl
+ << "const ::Components::ConfigValues &descr" << endl
+ << STRS[ENV_SRC_NOTUSED] << ")" << endl
+ << "{"
+ << "for (CORBA::ULong i = 0; i < descr.length (); ++i)" << endl
+ << "{"
+ << "const char *descr_name = descr[i]->name ();"
+ << "::CORBA::Any &descr_value = descr[i]->value ();" << endl;
+
+ // Generate string compare and set for each attribute.
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits inherits;
+ inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+ component_emitter.edge_traverser (inherits);
+
+ SetAttributesEmitter set_attributes_emitter (ctx);
+ defines.node_traverser (set_attributes_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+
+ os << "ACE_UNUSED_ARG (descr_name);"
+ << "ACE_UNUSED_ARG (descr_value);" << endl;
+
+ os << "}"
+ << "}";
+
+ // Generate provides_<facet> operation.
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits inherits;
+ inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+ component_emitter.edge_traverser (inherits);
+
+ FacetProvidesEmitter provides_emitter (ctx, t);
+ defines.node_traverser (provides_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ // Generate subscribe_* and unsubscribe_* operations.
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits inherits;
+ inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+ component_emitter.edge_traverser (inherits);
+
+ PublishesEmitter publishes_emitter (ctx, t);
+ defines.node_traverser (publishes_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ // Generate operations for nested Consumer classes.
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits inherits;
+ inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+ component_emitter.edge_traverser (inherits);
+
+ ConsumesEmitter consumes_emitter (ctx, t);
+ defines.node_traverser (consumes_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << STRS[COMP_CK] << " *" << endl
+ << t.name () << "_Servant::connect (" << endl
+ << "const char *name," << endl
+ << "::CORBA::Object_ptr connection" << endl
+ << STRS[ENV_SRC] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_IN] << "," << endl
+ << STRS[EXCP_IC] << "," << endl
+ << STRS[EXCP_AC] << "," << endl
+ << STRS[EXCP_ECL] << "))" << endl
+ << "{"
+ << "// If the component has no receptacles, this will be unused."
+ << endl
+ << "ACE_UNUSED_ARG (connection);" << endl
+ << "if (name == 0)" << endl
+ << "{"
+ << "ACE_THROW_RETURN (" << STRS[EXCP_IN] << " (), 0);" << endl
+ << "}";
+
+ // Generate IF block in connect operation for each receptacle.
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits inherits;
+ inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+ component_emitter.edge_traverser (inherits);
+
+ UsesConnectEmitter uses_emitter (ctx);
+ defines.node_traverser (uses_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << "ACE_THROW_RETURN (" << STRS[EXCP_IN] << " (), 0);" << endl
+ << "}";
+
+ os << "CORBA::Object_ptr" << endl
+ << t.name () << "_Servant::disconnect (" << endl
+ << "const char *name," << endl
+ << STRS[COMP_CK] << " * ck" << endl
+ << STRS[ENV_SRC] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_IN] << "," << endl
+ << STRS[EXCP_IC] << "," << endl
+ << STRS[EXCP_CR] << "," << endl
+ << STRS[EXCP_NC] << "))" << endl
+ << "{"
+ << "if (name == 0)" << endl
+ << "{"
+ << "ACE_THROW_RETURN (" << endl
+ << STRS[EXCP_IN] << " ()," << endl
+ << "::CORBA::Object::_nil ());" << endl
+ << "}";
+
+ // Generate IF block in disconnect operation for each receptacle.
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits inherits;
+ inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+ component_emitter.edge_traverser (inherits);
+
+ UsesDisconnectEmitter uses_emitter (ctx);
+ defines.node_traverser (uses_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << "ACE_THROW_RETURN (" << endl
+ << STRS[EXCP_IN] << " ()," << endl
+ << "::CORBA::Object::_nil ());" << endl
+ << "ACE_UNUSED_ARG (ck);" << endl
+ << "}";
+
+ // Generate generic operations for receptacles.
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits inherits;
+ inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+ component_emitter.edge_traverser (inherits);
+
+ UsesEmitter uses_emitter (ctx, t);
+ defines.node_traverser (uses_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << "void" << endl
+ << t.name () << "_Servant::connect_consumer ("
+ << endl
+ << "const char * emitter_name," << endl
+ << STRS[COMP_ECB] << "_ptr consumer" << endl
+ << STRS[ENV_SRC] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_IN] << "," << endl
+ << STRS[EXCP_AC] << "," << endl
+ << STRS[EXCP_IC] << "))" << endl
+ << "{"
+ << "if (emitter_name == 0)" << endl
+ << "{"
+ << "ACE_THROW (::CORBA::BAD_PARAM ());" << endl
+ << "}";
+
+ // Generate an IF block for each 'emits' declaration.
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits inherits;
+ inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+ component_emitter.edge_traverser (inherits);
+
+ NavigationEmitsEmitter navigation_emits_emitter (ctx);
+ defines.node_traverser (navigation_emits_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << "ACE_UNUSED_ARG (consumer);"
+ << "ACE_THROW ("
+ << STRS[EXCP_IN] << " ());" << endl
+ << "}";
+
+ os << STRS[COMP_CK] << " *" << endl
+ << t.name () << "_Servant::subscribe (" << endl
+ << "const char *publisher_name," << endl
+ << STRS[COMP_ECB] << "_ptr subscribe" << endl
+ << STRS[ENV_SRC] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_IN] << "," << endl
+ << STRS[EXCP_IC] << "," << endl
+ << STRS[EXCP_ECL] << "))" << endl
+ << "{"
+ << "// Just in case there are no if blocks" << endl
+ << "ACE_UNUSED_ARG (subscribe);" << endl
+ << "if (publisher_name == 0)" << endl
+ << "{"
+ << "ACE_THROW_RETURN (" << STRS[EXCP_IN] << " (), 0);"
+ << endl
+ << "}";
+
+ // Generate an IF block in for each publisher in subscribe().
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits inherits;
+ inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+ component_emitter.edge_traverser (inherits);
+
+ PublishesSubscribeEmitter publishes_emitter (ctx);
+ defines.node_traverser (publishes_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << "ACE_THROW_RETURN (" << STRS[EXCP_IN] << " (), 0);" << endl
+ << "}";
+
+ os << STRS[COMP_ECB] << "_ptr" << endl
+ << t.name () << "_Servant::unsubscribe ("
+ << endl
+ << "const char *publisher_name," << endl
+ << STRS[COMP_CK] << " *ck" << endl
+ << STRS[ENV_SRC] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl
+ << STRS[EXCP_IN] << "," << endl
+ << STRS[EXCP_IC] << "))" << endl
+ << "{"
+ << "// Just in case there are no if blocks" << endl
+ << "ACE_UNUSED_ARG (ck);" << endl
+ << "if (publisher_name == 0)" << endl
+ << "{"
+ << "ACE_THROW_RETURN (" << endl
+ << STRS[EXCP_IN] << " ()," << endl
+ << STRS[COMP_ECB] << "::_nil ());" << endl
+ << "}";
+
+ // Generate an IF block in for each publisher in unsubscribe().
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits inherits;
+ inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+ component_emitter.edge_traverser (inherits);
+
+ PublishesUnsubscribeEmitter publishes_emitter (ctx);
+ defines.node_traverser (publishes_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << "ACE_THROW_RETURN (" << endl
+ << STRS[EXCP_IN] << " ()," << endl
+ << STRS[COMP_ECB] << "::_nil ());" << endl
+ << "}";
+
+ // Generate connect() and disconnect() for each emits declaration.
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits inherits;
+ inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+ component_emitter.edge_traverser (inherits);
+
+ EmitsEmitter emits_emitter (ctx, t);
+ defines.node_traverser (emits_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << "CORBA::Object_ptr" << endl
+ << t.name ()
+ << "_Servant::get_facet_executor (const char *name" << endl
+ << STRS[ENV_SRC] << ")" << endl
+ << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "))" << endl
+ << "{"
+ << "if (name == 0)" << endl
+ << "{"
+ << "ACE_THROW_RETURN (" << endl
+ << "::CORBA::BAD_PARAM ()," << endl
+ << "::CORBA::Object::_nil ());" << endl
+ << "}";
+
+ // Generate an IF block for each facet inside provide_facet().
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits inherits;
+ inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+ component_emitter.edge_traverser (inherits);
+
+ NavigationGetFacetExecEmitter navigation_facet_exec_emitter (ctx);
+ defines.node_traverser (navigation_facet_exec_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << " return CORBA::Object::_nil ();"
+ << "}";
+ os << "// Supported operations." << endl << endl;
+
+ // Generate operations for all supported interfaces.
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits component_inherits;
+ component_inherits.node_traverser (component_emitter);
+
+ Traversal::Supports supports_;
+ component_emitter.edge_traverser (supports_);
+ component_emitter.edge_traverser (component_inherits);
+
+ InterfaceEmitter interface_emitter (ctx);
+ supports_.node_traverser (interface_emitter);
+
+ Traversal::Defines defines;
+ Traversal::Inherits interface_inherits;
+ interface_emitter.edge_traverser (defines);
+ interface_emitter.edge_traverser (interface_inherits);
+
+ AttributeEmitter<SemanticGraph::Component> attribute_emitter (ctx, t);
+ ReadOnlyAttributeEmitter<
+ SemanticGraph::Component
+ > read_only_attribute_emitter (ctx, t);
+ defines.node_traverser (attribute_emitter);
+ defines.node_traverser (read_only_attribute_emitter);
+
+ OperationEmitter<SemanticGraph::Component> operation_emitter (ctx, t);
+ defines.node_traverser (operation_emitter);
+ interface_inherits.node_traverser (interface_emitter);
+
+ Traversal::Receives receives;
+ Traversal::Belongs returns;
+ Traversal::Raises raises;
+ operation_emitter.edge_traverser (receives);
+ operation_emitter.edge_traverser (returns);
+ operation_emitter.edge_traverser (raises);
+
+ ParameterEmitter<Traversal::InParameter> in_param (os);
+ ParameterEmitter<Traversal::InOutParameter> inout_param (os);
+ ParameterEmitter<Traversal::OutParameter> out_param (os);
+ receives.node_traverser (in_param);
+ receives.node_traverser (inout_param);
+ receives.node_traverser (out_param);
+
+ ReturnTypeNameEmitter return_type_emitter (os);
+ TypeNameEmitter type_name_emitter (os);
+ returns.node_traverser (return_type_emitter);
+ raises.node_traverser (type_name_emitter);
+
+ Traversal::Belongs in_belongs, inout_belongs, out_belongs;
+ in_param.edge_traverser (in_belongs);
+ inout_param.edge_traverser (inout_belongs);
+ out_param.edge_traverser (out_belongs);
+
+ INArgTypeNameEmitter in_arg_emitter (os);
+ INOUTArgTypeNameEmitter inout_arg_emitter (os);
+ OUTArgTypeNameEmitter out_arg_emitter (os);
+ in_belongs.node_traverser (in_arg_emitter);
+ inout_belongs.node_traverser (inout_arg_emitter);
+ out_belongs.node_traverser (out_arg_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ // Generate operations for component attributes.
+ os << "// Component attribute operations." << endl << endl;
+
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits inherits;
+ component_emitter.edge_traverser (inherits);
+ inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+
+ AttributeEmitter<SemanticGraph::Component> attribute_emitter (ctx, t);
+ ReadOnlyAttributeEmitter<SemanticGraph::Component> read_only_attribute_emitter (ctx, t);
+ defines.node_traverser (attribute_emitter);
+ defines.node_traverser (read_only_attribute_emitter);
+
+ component_emitter.traverse (t);
+ }
+
+ os << "// Private method to populate the port tables."
+ << endl;
+
+ os << "void" << endl
+ << t.name () << "_Servant::populate_port_tables (" << endl
+ << STRS[ENV_SNGL_SRC] << ")" << endl
+ << STRS[EXCP_SNGL] << endl
+ << "{"
+ << "ACE_ENV_ARG_NOT_USED;"
+ << "::CORBA::Object_var obj_var;"
+ << "::Components::EventConsumerBase_var ecb_var;" << endl;
+
+ {
+ Traversal::Component component_emitter;
+
+ Traversal::Inherits inherits;
+ component_emitter.edge_traverser (inherits);
+ inherits.node_traverser (component_emitter);
+
+ Traversal::Defines defines;
+ component_emitter.edge_traverser (defines);
+
+ PortTablePopulator port_table_populator (ctx);
+ defines.node_traverser (port_table_populator);
+
+ component_emitter.traverse (t);
+ }
+
+ os << "}";
+ }
+
+ virtual void
+ post (Type&)
+ {
+ // Namespace closer.
+ os << "}";
+ }
+ };
+
+ struct HomeEmitter : Traversal::Home, EmitterBase
+ {
+ HomeEmitter (Context& c)
+ : EmitterBase (c)
+ {}
+
+ // Nested classes used by this emitter.
+ private:
+ struct HomeOpExecReturnEmitter : Traversal::Type
+ {
+ HomeOpExecReturnEmitter (std::ostream& os_)
+ : os (os_)
+ {}
+
+ virtual void
+ traverse (SemanticGraph::Type&)
+ {
+ os << STRS[COMP_EC] << "_var _ciao_ec =" << endl
+ << "this->executor_->";
+ }
+
+ private:
+ std::ostream& os;
+ };
+
+ // HomeFactory and HomeFinder are tied to Operation in
+ // the front end. Since we want to treat them differently
+ // than regular operations in a home (we don't want to
+ // generate anything for base class factory operations,
+ // example), we use this class for regular home operations
+ // that overrides HomeFactory and HomeFinder traversals
+ // to do nothing.
+ struct HomeOperationEmitter : OperationEmitter<SemanticGraph::Home>,
+ Traversal::HomeFactory,
+ Traversal::HomeFinder
+ {
+ HomeOperationEmitter (Context& c, SemanticGraph::Home& home)
+ : OperationEmitter<SemanticGraph::Home> (c, home)
+ {}
+
+ virtual void
+ traverse (SemanticGraph::HomeFactory&)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::HomeFinder&)
+ {
+ }
+ };
+
+ struct FactoryOperationEmitter : Traversal::HomeFactory,
+ Traversal::Home,
+ EmitterBase
+ {
+ FactoryOperationEmitter (Context& c, SemanticGraph::Home& home)
+ : EmitterBase (c),
+ return_type_name_emitter_ (c.os ()),
+ enclosing_type_name_emitter_ (c.os ()),
+ simple_type_name_emitter_ (c.os ()),
+ type_name_emitter_ (c.os ()),
+ scope_ (home)
+ {
+ returns_.node_traverser (return_type_name_emitter_);
+ enclosing_manages_.node_traverser (enclosing_type_name_emitter_);
+ simple_manages_.node_traverser (simple_type_name_emitter_);
+ manages_.node_traverser (type_name_emitter_);
+ }
+
+ virtual void
+ returns (SemanticGraph::HomeFactory& hf)
+ {
+ Traversal::HomeFactory::returns (hf, returns_);
+
+ os << endl;
+ }
+
+ virtual void
+ name (SemanticGraph::HomeFactory& hf)
+ {
+ os << scope_.name () << "_Servant::" << hf.name ();
+ }
+
+ virtual void
+ receives_none (SemanticGraph::HomeFactory&)
+ {
+ os << " (" << endl
+ << STRS[ENV_SNGL_SRC] << ")" << endl;
+ }
+
+ virtual void
+ receives_pre (SemanticGraph::HomeFactory&)
+ {
+ os << " (" << endl;
+ }
+
+ virtual void
+ receives_post (SemanticGraph::HomeFactory&)
+ {
+ os << endl << STRS[ENV_SRC] << ")" << endl;
+ }
+
+ virtual void
+ raises_none (SemanticGraph::HomeFactory&)
+ {
+ os << STRS[EXCP_SNGL];
+ }
+
+ virtual void
+ raises_pre (SemanticGraph::HomeFactory&)
+ {
+ os << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl;
+ }
+
+ virtual void
+ raises_post (SemanticGraph::HomeFactory&)
+ {
+ os << "))";
+ }
+
+ virtual void
+ post (SemanticGraph::HomeFactory& hf)
+ {
+ os << "{";
+
+ {
+ OperationExecEmitter operation_emitter (ctx);
+
+ Traversal::Receives receives;
+ Traversal::Belongs returns;
+ operation_emitter.edge_traverser (receives);
+ operation_emitter.edge_traverser (returns);
+
+ ParameterExecEmitter<Traversal::InParameter> in_param (os);
+ ParameterExecEmitter<Traversal::InOutParameter> inout_param (os);
+ ParameterExecEmitter<Traversal::OutParameter> out_param (os);
+ receives.node_traverser (in_param);
+ receives.node_traverser (inout_param);
+ receives.node_traverser (out_param);
+
+ HomeOpExecReturnEmitter return_emitter (os);
+ returns.node_traverser (return_emitter);
+
+ operation_emitter.traverse (hf);
+ }
+
+ os << "ACE_CHECK_RETURN (";
+
+ Traversal::Home::manages (scope_, manages_);
+
+ os << "::_nil ());" << endl;
+
+ Traversal::Home::manages (scope_, enclosing_manages_);
+
+ os << "::CCM_";
+
+ Traversal::Home::manages (scope_, simple_manages_);
+
+ os << "_var _ciao_comp =" << endl;
+
+ Traversal::Home::manages (scope_, enclosing_manages_);
+
+ os << "::CCM_";
+
+ Traversal::Home::manages (scope_, simple_manages_);
+
+ os << "::_narrow (" << endl
+ << "_ciao_ec.in ()" << endl
+ << STRS[ENV_ARG] << ");" << endl;
+
+ os << "ACE_CHECK_RETURN (";
+
+ Traversal::Home::manages (scope_, manages_);
+
+ os << "::_nil ());" << endl;
+
+ os << "return this->_ciao_activate_component (" << endl
+ << "_ciao_comp.in ()" << endl
+ << STRS[ENV_ARG] << ");" << endl;
+
+ os << "}";
+ }
+
+ virtual void
+ comma (SemanticGraph::HomeFactory&)
+ {
+ os << "," << endl;
+ }
+
+ private:
+ ReturnTypeNameEmitter return_type_name_emitter_;
+ EnclosingTypeNameEmitter enclosing_type_name_emitter_;
+ SimpleTypeNameEmitter simple_type_name_emitter_;
+ TypeNameEmitter type_name_emitter_;
+ Traversal::Returns returns_;
+ Traversal::Manages enclosing_manages_;
+ Traversal::Manages simple_manages_;
+ Traversal::Manages manages_;
+ SemanticGraph::Home& scope_;
+ };
+
+ struct FinderOperationEmitter : Traversal::HomeFinder,
+ Traversal::Home,
+ EmitterBase
+ {
+ FinderOperationEmitter (Context& c, SemanticGraph::Home& home)
+ : EmitterBase (c),
+ type_name_emitter_ (c.os ()),
+ return_type_name_emitter_ (c.os ()),
+ enclosing_type_name_emitter_ (c.os ()),
+ simple_type_name_emitter_ (c.os ()),
+ scope_ (home)
+ {
+ returns_.node_traverser (return_type_name_emitter_);
+ simple_returns_.node_traverser (type_name_emitter_);
+ enclosing_manages_.node_traverser (enclosing_type_name_emitter_);
+ simple_manages_.node_traverser (simple_type_name_emitter_);
+ }
+
+ virtual void
+ returns (SemanticGraph::HomeFinder& hf)
+ {
+ Traversal::HomeFinder::returns (hf, returns_);
+
+ os << endl;
+ }
+
+ virtual void
+ name (SemanticGraph::HomeFinder& hf)
+ {
+ os << scope_.name () << "_Servant::" << hf.name ();
+ }
+
+ virtual void
+ receives_none (SemanticGraph::HomeFinder&)
+ {
+ os << " (" << endl
+ << STRS[ENV_SNGL_SRC] << ")" << endl;
+ }
+
+ virtual void
+ receives_pre (SemanticGraph::HomeFinder&)
+ {
+ os << " (" << endl;
+ }
+
+ virtual void
+ receives_post (SemanticGraph::HomeFinder&)
+ {
+ os << endl << STRS[ENV_SRC] << ")" << endl;
+ }
+
+ virtual void
+ raises_none (SemanticGraph::HomeFinder&)
+ {
+ os << STRS[EXCP_SNGL];
+ }
+
+ virtual void
+ raises_pre (SemanticGraph::HomeFinder&)
+ {
+ os << STRS[EXCP_START] << endl
+ << STRS[EXCP_SYS] << "," << endl;
+ }
+
+ virtual void
+ raises_post (SemanticGraph::HomeFinder&)
+ {
+ os << "))";
+ }
+
+ virtual void
+ post (SemanticGraph::HomeFinder& hf)
+ {
+ os << "{"
+ << "ACE_THROW_RETURN (" << endl
+ << "::CORBA::NO_IMPLEMENT ()," << endl;
+
+ Traversal::HomeFinder::returns (hf, simple_returns_);
+
+ os << "::_nil ());"
+ << "}";
+ }
+
+ virtual void
+ comma (SemanticGraph::HomeFinder&)
+ {
+ os << "," << endl;
+ }
+
+ private:
+ TypeNameEmitter type_name_emitter_;
+ ReturnTypeNameEmitter return_type_name_emitter_;
+ EnclosingTypeNameEmitter enclosing_type_name_emitter_;
+ SimpleTypeNameEmitter simple_type_name_emitter_;
+ Traversal::Returns returns_;
+ Traversal::Returns simple_returns_;
+ Traversal::Manages enclosing_manages_;
+ Traversal::Manages simple_manages_;
+ SemanticGraph::Home& scope_;
+ };
+
+ public:
+ virtual void
+ pre (Type& t)
+ {
+ os << STRS[GLUE_NS]
+ << regex::perl_s (t.scoped_name ().scope_name ().str (), "/::/_/")
+ << "{";
+
+ os << t.name () << "_Servant::"
+ << t.name () << "_Servant (" << endl
+ << t.scoped_name ().scope_name () << "::CCM_" << t.name ()
+ << "_ptr exe," << endl
+ << "::CIAO::Session_Container *c)" << endl
+ << " : ACE_NESTED_CLASS (CIAO, Home_Servant_Impl_Base (c))," << endl
+ << " home_svnt_base (exe, c)" << endl
+ << "{"
+ << "}";
+
+ os << t.name () << "_Servant::~"
+ << t.name () << "_Servant (void)" << endl
+ << "{"
+ << "}";
+
+ os << "// Home operations." << endl << endl;
+
+ {
+ Traversal::Home home_emitter;
+
+ Traversal::Inherits inherits;
+ home_emitter.edge_traverser (inherits);
+ inherits.node_traverser (home_emitter);
+
+ Traversal::Defines defines;
+ home_emitter.edge_traverser (defines);
+
+ HomeOperationEmitter home_operation_emitter (ctx, t);
+ defines.node_traverser (home_operation_emitter);
+
+ Traversal::Receives receives;
+ Traversal::Belongs returns;
+ Traversal::Raises raises;
+ home_operation_emitter.edge_traverser (receives);
+ home_operation_emitter.edge_traverser (returns);
+ home_operation_emitter.edge_traverser (raises);
+
+ ParameterEmitter<Traversal::InParameter> in_param (os);
+ ParameterEmitter<Traversal::InOutParameter> inout_param (os);
+ ParameterEmitter<Traversal::OutParameter> out_param (os);
+ receives.node_traverser (in_param);
+ receives.node_traverser (inout_param);
+ receives.node_traverser (out_param);
+
+ ReturnTypeNameEmitter return_type_emitter (os);
+ TypeNameEmitter type_name_emitter (os);
+ returns.node_traverser (return_type_emitter);
+ raises.node_traverser (type_name_emitter);
+
+ Traversal::Belongs in_belongs, inout_belongs, out_belongs;
+ in_param.edge_traverser (in_belongs);
+ inout_param.edge_traverser (inout_belongs);
+ out_param.edge_traverser (out_belongs);
+
+ INArgTypeNameEmitter in_arg_emitter (os);
+ INOUTArgTypeNameEmitter inout_arg_emitter (os);
+ OUTArgTypeNameEmitter out_arg_emitter (os);
+ in_belongs.node_traverser (in_arg_emitter);
+ inout_belongs.node_traverser (inout_arg_emitter);
+ out_belongs.node_traverser (out_arg_emitter);
+
+ home_emitter.traverse (t);
+ }
+
+ os << "// Home supported interface operations." << endl << endl;
+
+ {
+ Traversal::Home home_emitter;
+
+ Traversal::Inherits home_inherits;
+ home_inherits.node_traverser (home_emitter);
+ home_emitter.edge_traverser (home_inherits);
+
+ Traversal::Supports supports_;
+ home_emitter.edge_traverser (supports_);
+
+ InterfaceEmitter interface_emitter (ctx);
+ supports_.node_traverser (interface_emitter);
+
+ Traversal::Defines defines;
+ Traversal::Inherits interface_inherits;
+ interface_emitter.edge_traverser (defines);
+ interface_emitter.edge_traverser (interface_inherits);
+
+ AttributeEmitter<SemanticGraph::Home> attribute_emitter (ctx, t);
+ ReadOnlyAttributeEmitter<
+ SemanticGraph::Home
+ > read_only_attribute_emitter (ctx, t);
+ defines.node_traverser (attribute_emitter);
+ defines.node_traverser (read_only_attribute_emitter);
+
+ OperationEmitter<SemanticGraph::Home> operation_emitter (ctx, t);
+ defines.node_traverser (operation_emitter);
+ interface_inherits.node_traverser (interface_emitter);
+
+ Traversal::Receives receives;
+ Traversal::Belongs returns;
+ Traversal::Raises raises;
+ operation_emitter.edge_traverser (receives);
+ operation_emitter.edge_traverser (returns);
+ operation_emitter.edge_traverser (raises);
+
+ ParameterEmitter<Traversal::InParameter> in_param (os);
+ ParameterEmitter<Traversal::InOutParameter> inout_param (os);
+ ParameterEmitter<Traversal::OutParameter> out_param (os);
+ receives.node_traverser (in_param);
+ receives.node_traverser (inout_param);
+ receives.node_traverser (out_param);
+
+ ReturnTypeNameEmitter return_type_emitter (os);
+ TypeNameEmitter type_name_emitter (os);
+ returns.node_traverser (return_type_emitter);
+ raises.node_traverser (type_name_emitter);
+
+ Traversal::Belongs in_belongs, inout_belongs, out_belongs;
+ in_param.edge_traverser (in_belongs);
+ inout_param.edge_traverser (inout_belongs);
+ out_param.edge_traverser (out_belongs);
+
+ INArgTypeNameEmitter in_arg_emitter (os);
+ INOUTArgTypeNameEmitter inout_arg_emitter (os);
+ OUTArgTypeNameEmitter out_arg_emitter (os);
+ in_belongs.node_traverser (in_arg_emitter);
+ inout_belongs.node_traverser (inout_arg_emitter);
+ out_belongs.node_traverser (out_arg_emitter);
+
+ home_emitter.traverse (t);
+ }
+
+ os << "// Home factory and finder operations." << endl << endl;
+
+ {
+ Traversal::Home home_emitter;
+
+ Traversal::Inherits inherits;
+ home_emitter.edge_traverser (inherits);
+ inherits.node_traverser (home_emitter);
+
+ Traversal::Defines defines;
+ home_emitter.edge_traverser (defines);
+
+ FactoryOperationEmitter factory_operation_emitter (ctx, t);
+ FinderOperationEmitter finder_operation_emitter (ctx, t);
+ defines.node_traverser (factory_operation_emitter);
+ defines.node_traverser (finder_operation_emitter);
+
+ Traversal::Receives receives;
+ Traversal::Belongs returns;
+ Traversal::Raises raises;
+ factory_operation_emitter.edge_traverser (receives);
+ factory_operation_emitter.edge_traverser (returns);
+ factory_operation_emitter.edge_traverser (raises);
+ finder_operation_emitter.edge_traverser (receives);
+ finder_operation_emitter.edge_traverser (returns);
+ finder_operation_emitter.edge_traverser (raises);
+
+ ParameterEmitter<Traversal::InParameter> in_param (os);
+ ParameterEmitter<Traversal::InOutParameter> inout_param (os);
+ ParameterEmitter<Traversal::OutParameter> out_param (os);
+ receives.node_traverser (in_param);
+ receives.node_traverser (inout_param);
+ receives.node_traverser (out_param);
+
+ ReturnTypeNameEmitter return_type_emitter (os);
+ TypeNameEmitter type_name_emitter (os);
+ returns.node_traverser (return_type_emitter);
+ raises.node_traverser (type_name_emitter);
+
+ Traversal::Belongs in_belongs, inout_belongs, out_belongs;
+ in_param.edge_traverser (in_belongs);
+ inout_param.edge_traverser (inout_belongs);
+ out_param.edge_traverser (out_belongs);
+
+ INArgTypeNameEmitter in_arg_emitter (os);
+ INOUTArgTypeNameEmitter inout_arg_emitter (os);
+ OUTArgTypeNameEmitter out_arg_emitter (os);
+ in_belongs.node_traverser (in_arg_emitter);
+ inout_belongs.node_traverser (inout_arg_emitter);
+ out_belongs.node_traverser (out_arg_emitter);
+
+ home_emitter.traverse (t);
+ }
+
+ // Generate operations for component attributes.
+ os << "// Home attribute operations." << endl << endl;
+
+ {
+ Traversal::Home home_emitter;
+
+ Traversal::Inherits inherits;
+ home_emitter.edge_traverser (inherits);
+ inherits.node_traverser (home_emitter);
+
+ Traversal::Defines defines;
+ home_emitter.edge_traverser (defines);
+
+ AttributeEmitter<SemanticGraph::Home> attribute_emitter (ctx, t);
+ ReadOnlyAttributeEmitter<SemanticGraph::Home> read_only_attribute_emitter (ctx, t);
+ defines.node_traverser (attribute_emitter);
+ defines.node_traverser (read_only_attribute_emitter);
+
+ home_emitter.traverse (t);
+ }
+ }
+
+ virtual void
+ post (Type& t)
+ {
+ // Namespace closer.
+ os << "}";
+
+ os << "extern \"C\" " << ctx.export_macro ()
+ << " ::PortableServer::Servant"
+ << endl
+ << "create" << t.name () << "_Servant (" << endl
+ << "::Components::HomeExecutorBase_ptr p," << endl
+ << "CIAO::Session_Container *c" << endl
+ << STRS[ENV_SRC] << ")" << endl
+ << "{"
+ << "if (p == 0)" << endl
+ << "{"
+ << "return 0;" << endl
+ << "}"
+ << t.scoped_name ().scope_name () << "::CCM_"
+ << t.name () << "_var x =" << endl
+ << t.scoped_name ().scope_name () << "::CCM_" << t.name ()
+ << "::_narrow (" << endl
+ << "p" << endl
+ << STRS[ENV_ARG] << ");"
+ << "ACE_CHECK_RETURN (0);" << endl
+ << "if (::CORBA::is_nil (x.in ()))" << endl
+ << "{"
+ << "return 0;" << endl
+ << "}"
+ << "return new" << endl;
+
+ os << "CIAO_GLUE"
+ << regex::perl_s (t.scoped_name ().scope_name ().str (), "/::/_/")
+ << "::" << t.name () << "_Servant (" << endl
+ << "x.in ()," << endl
+ << "c);" << endl
+ << "}";
+ }
+ };
+
+ //@@ There is exactly the same code in header generator.
+ //
+ struct CompositionEmitter : Traversal::Composition, EmitterBase
+ {
+ CompositionEmitter (Context& c)
+ : EmitterBase (c)
+ {
+ }
+
+ virtual void
+ pre (Type& t)
+ {
+ os << "namespace " << t.name () << "{";
+ }
+
+ virtual void
+ post (Type&)
+ {
+ os << "}";
+ }
+ };
+}
+
+ServantSourceEmitter::ServantSourceEmitter (std::ostream& os_,
+ CommandLine const& cl,
+ string export_macro,
+ fs::path const& file)
+ : os (os_),
+ cl_ (cl),
+ export_macro_ (export_macro),
+ file_ (file)
+{}
+
+void
+ServantSourceEmitter::pre (TranslationUnit&)
+{
+ os << COPYRIGHT;
+
+ string file_name ("");
+
+ if (! file_.empty ())
+ {
+ file_name = file_.leaf ();
+ }
+
+ string file_suffix = cl_.get_value ("svnt-hdr-file-suffix",
+ "_svnt.h");
+
+ file_name = regex::perl_s (file_name,
+ "/(\\.(idl|cidl|cdl))?$/"
+ + file_suffix
+ + "/");
+
+ os << "#include \"" << file_name << "\"" << endl
+ << "#include \"Cookies.h\"" << endl
+ << "#include \"ciao/Servant_Activator.h\"" << endl
+ << "#include \"ciao/Port_Activator_T.h\"" << endl
+ << "#include \"ace/OS_NS_string.h\"" << endl << endl;
+}
+
+void
+ServantSourceEmitter::generate (TranslationUnit& u)
+{
+ pre (u);
+
+ Context c (os, export_macro_, cl_);
+
+ Traversal::TranslationUnit unit;
+
+ // Layer 1
+ //
+ Traversal::ContainsPrincipal contains_principal;
+ unit.edge_traverser (contains_principal);
+
+ //--
+ Traversal::TranslationRegion region;
+ contains_principal.node_traverser (region);
+
+ // Layer 2
+ //
+ Traversal::ContainsRoot contains_root;
+ Traversal::Includes includes;
+
+ region.edge_traverser (includes);
+ region.edge_traverser (contains_root);
+
+ //--
+ Traversal::Root root;
+ includes.node_traverser (region);
+ contains_root.node_traverser (root);
+
+ // Layer 3
+ //
+ Traversal::Defines defines;
+ root.edge_traverser (defines);
+
+ //--
+ Traversal::Module module;
+ CompositionEmitter composition (c);
+ defines.node_traverser (module);
+ defines.node_traverser (composition);
+
+ // Layer 4
+ //
+ Traversal::Defines composition_defines;
+ composition.edge_traverser (composition_defines);
+
+ //--
+ Traversal::ComponentExecutor component_executor;
+ Traversal::HomeExecutor home_executor;
+ composition_defines.node_traverser (component_executor);
+ composition_defines.node_traverser (home_executor);
+
+ module.edge_traverser (defines);
+
+ // Layer 5
+ //
+ Traversal::Implements implements;
+ component_executor.edge_traverser (implements);
+ home_executor.edge_traverser (implements);
+
+ //--
+ ContextEmitter context_emitter (c);
+ ServantEmitter servant_emitter (c);
+ HomeEmitter home_emitter (c);
+ implements.node_traverser (context_emitter);
+ implements.node_traverser (servant_emitter);
+ implements.node_traverser (home_emitter);
+
+ unit.traverse (u);
+}
+
+/*
+ * Local Variables:
+ * mode: C++
+ * c-basic-offset: 2
+ * End:
+ */
diff --git a/TAO/CIAO/CIDLC/TypeNameEmitter.cpp b/TAO/CIAO/CIDLC/TypeNameEmitter.cpp
new file mode 100644
index 00000000000..debc8472543
--- /dev/null
+++ b/TAO/CIAO/CIDLC/TypeNameEmitter.cpp
@@ -0,0 +1,1542 @@
+// file : CIDLC/TypeNameEmitter.cpp
+// author : Jeff Parsons <j.parsons@vanderbilt.edu>
+// cvs-id : $Id$
+
+#include "TypeNameEmitter.hpp"
+#include "Literals.hpp"
+
+#include <ostream>
+
+using namespace std;
+using namespace StringLiterals;
+
+TypeNameEmitter::TypeNameEmitter (ostream& os_)
+ : os (os_)
+{
+}
+
+void
+TypeNameEmitter::traverse (Void&)
+{
+}
+
+void
+TypeNameEmitter::traverse (Boolean&)
+{
+}
+
+void
+TypeNameEmitter::traverse (Octet&)
+{
+}
+
+void
+TypeNameEmitter::traverse (Char&)
+{
+}
+
+void
+TypeNameEmitter::traverse (Wchar&)
+{
+}
+
+void
+TypeNameEmitter::traverse (Short&)
+{
+}
+
+void
+TypeNameEmitter::traverse (UnsignedShort&)
+{
+}
+
+void
+TypeNameEmitter::traverse (Long&)
+{
+}
+
+void
+TypeNameEmitter::traverse (UnsignedLong&)
+{
+}
+
+void
+TypeNameEmitter::traverse (LongLong&)
+{
+}
+
+void
+TypeNameEmitter::traverse (UnsignedLongLong&)
+{
+}
+
+void
+TypeNameEmitter::traverse (Float&)
+{
+}
+
+void
+TypeNameEmitter::traverse (Double&)
+{
+}
+
+void
+TypeNameEmitter::traverse (String&)
+{
+}
+
+void
+TypeNameEmitter::traverse (Wstring&)
+{
+}
+
+void
+TypeNameEmitter::traverse (Object&)
+{
+}
+
+void
+TypeNameEmitter::traverse (ValueBase&)
+{
+}
+
+void
+TypeNameEmitter::traverse (Any&)
+{
+}
+
+void
+TypeNameEmitter::traverse (SemanticGraph::Enum&)
+{
+}
+
+void
+TypeNameEmitter::traverse (SemanticGraph::Struct&)
+{
+}
+
+void
+TypeNameEmitter::traverse (SemanticGraph::Union&)
+{
+}
+
+void
+TypeNameEmitter::traverse (SemanticGraph::UnboundedSequence&)
+{
+}
+
+void
+TypeNameEmitter::traverse (SemanticGraph::Interface&)
+{
+}
+
+void
+TypeNameEmitter::traverse (SemanticGraph::ValueType&)
+{
+}
+
+void
+TypeNameEmitter::traverse (SemanticGraph::EventType&)
+{
+}
+
+void
+TypeNameEmitter::traverse (SemanticGraph::Component&)
+{
+}
+
+void
+TypeNameEmitter::traverse (SemanticGraph::Home&)
+{
+}
+
+// ====================================================================
+
+ReturnTypeNameEmitter::ReturnTypeNameEmitter (ostream& os_)
+ : TypeNameEmitter (os_)
+{
+}
+
+void
+ReturnTypeNameEmitter::traverse (Void&)
+{
+ os << "void";
+}
+
+void
+ReturnTypeNameEmitter::traverse (Boolean&)
+{
+ os << "::CORBA::Boolean";
+}
+
+void
+ReturnTypeNameEmitter::traverse (Octet&)
+{
+ os << "::CORBA::Octet";
+}
+
+void
+ReturnTypeNameEmitter::traverse (Char&)
+{
+ os << "::CORBA::Char";
+}
+
+void
+ReturnTypeNameEmitter::traverse (Wchar&)
+{
+ os << "::CORBA::WChar";
+}
+
+void
+ReturnTypeNameEmitter::traverse (Short&)
+{
+ os << "::CORBA::Short";
+}
+
+void
+ReturnTypeNameEmitter::traverse (UnsignedShort&)
+{
+ os << "::CORBA::UShort";
+}
+
+void
+ReturnTypeNameEmitter::traverse (Long&)
+{
+ os << "::CORBA::Long";
+}
+
+void
+ReturnTypeNameEmitter::traverse (UnsignedLong&)
+{
+ os << "::CORBA::ULong";
+}
+
+void
+ReturnTypeNameEmitter::traverse (LongLong&)
+{
+ os << "::CORBA::LongLong";
+}
+
+void
+ReturnTypeNameEmitter::traverse (UnsignedLongLong&)
+{
+ os << "::CORBA::ULongLong";
+}
+
+void
+ReturnTypeNameEmitter::traverse (Float&)
+{
+ os << "::CORBA::Float";
+}
+
+void
+ReturnTypeNameEmitter::traverse (Double&)
+{
+ os << "::CORBA::Double";
+}
+
+void
+ReturnTypeNameEmitter::traverse (String&)
+{
+ os << "char *";
+}
+
+void
+ReturnTypeNameEmitter::traverse (Wstring&)
+{
+ os << "::CORBA::WChar *";
+}
+
+void
+ReturnTypeNameEmitter::traverse (Object&)
+{
+ os << "::CORBA::Object_ptr";
+}
+
+void
+ReturnTypeNameEmitter::traverse (ValueBase&)
+{
+ os << "::CORBA::ValueBase *";
+}
+
+void
+ReturnTypeNameEmitter::traverse (Any&)
+{
+ os << "::CORBA::Any *";
+}
+
+void
+ReturnTypeNameEmitter::traverse (SemanticGraph::Enum& e)
+{
+ os << e.scoped_name ();
+}
+
+void
+ReturnTypeNameEmitter::traverse (SemanticGraph::Struct& s)
+{
+ // This should always be in the context, since the SizeTypeCalculator
+ // is executed before the servant code generators.
+ bool var_size = s.context ().get<bool> (STRS[VAR_SIZE]);
+
+ os << s.scoped_name ();
+
+ if (var_size)
+ {
+ os << " *";
+ }
+}
+
+void
+ReturnTypeNameEmitter::traverse (SemanticGraph::Union& u)
+{
+ // This should always be in the context, since the SizeTypeCalculator
+ // is executed before the servant code generators.
+ bool var_size = u.context ().get<bool> (STRS[VAR_SIZE]);
+
+ os << u.scoped_name ();
+
+ if (var_size)
+ {
+ os << " *";
+ }
+}
+
+void
+ReturnTypeNameEmitter::traverse (SemanticGraph::UnboundedSequence& s)
+{
+ os << s.scoped_name () << " *";
+}
+
+void
+ReturnTypeNameEmitter::traverse (SemanticGraph::Interface& i)
+{
+ os << i.scoped_name () << "_ptr";
+}
+
+void
+ReturnTypeNameEmitter::traverse (SemanticGraph::ValueType& v)
+{
+ os << v.scoped_name () << " *";
+}
+
+void
+ReturnTypeNameEmitter::traverse (SemanticGraph::EventType& e)
+{
+ os << e.scoped_name () << " *";
+}
+
+void
+ReturnTypeNameEmitter::traverse (SemanticGraph::Component& c)
+{
+ os << c.scoped_name () << "_ptr";
+}
+
+void
+ReturnTypeNameEmitter::traverse (SemanticGraph::Home& h)
+{
+ os << h.scoped_name () << "_ptr";
+}
+
+// ===============================================================
+
+INArgTypeNameEmitter::INArgTypeNameEmitter (ostream& os_)
+ : TypeNameEmitter (os_)
+{
+}
+
+void
+INArgTypeNameEmitter::traverse (Boolean&)
+{
+ os << "::CORBA::Boolean";
+}
+
+void
+INArgTypeNameEmitter::traverse (Octet&)
+{
+ os << "::CORBA::Octet";
+}
+
+void
+INArgTypeNameEmitter::traverse (Char&)
+{
+ os << "::CORBA::Char";
+}
+
+void
+INArgTypeNameEmitter::traverse (Wchar&)
+{
+ os << "::CORBA::WChar";
+}
+
+void
+INArgTypeNameEmitter::traverse (Short&)
+{
+ os << "::CORBA::Short";
+}
+
+void
+INArgTypeNameEmitter::traverse (UnsignedShort&)
+{
+ os << "::CORBA::UShort";
+}
+
+void
+INArgTypeNameEmitter::traverse (Long&)
+{
+ os << "::CORBA::Long";
+}
+
+void
+INArgTypeNameEmitter::traverse (UnsignedLong&)
+{
+ os << "::CORBA::ULong";
+}
+
+void
+INArgTypeNameEmitter::traverse (LongLong&)
+{
+ os << "::CORBA::LongLong";
+}
+
+void
+INArgTypeNameEmitter::traverse (UnsignedLongLong&)
+{
+ os << "::CORBA::ULongLong";
+}
+
+void
+INArgTypeNameEmitter::traverse (Float&)
+{
+ os << "::CORBA::Float";
+}
+
+void
+INArgTypeNameEmitter::traverse (Double&)
+{
+ os << "::CORBA::Double";
+}
+
+void
+INArgTypeNameEmitter::traverse (String&)
+{
+ os << "const char *";
+}
+
+void
+INArgTypeNameEmitter::traverse (Wstring&)
+{
+ os << "const ::CORBA::WChar *";
+}
+
+void
+INArgTypeNameEmitter::traverse (Object&)
+{
+ os << "::CORBA::Object_ptr";
+}
+
+void
+INArgTypeNameEmitter::traverse (ValueBase&)
+{
+ os << "::CORBA::ValueBase *";
+}
+
+void
+INArgTypeNameEmitter::traverse (Any&)
+{
+ os << "const ::CORBA::Any &";
+}
+
+void
+INArgTypeNameEmitter::traverse (SemanticGraph::Enum& e)
+{
+ os << e.scoped_name ();
+}
+
+void
+INArgTypeNameEmitter::traverse (SemanticGraph::Struct& s)
+{
+ os << "const " << s.scoped_name () << " &";;
+}
+
+void
+INArgTypeNameEmitter::traverse (SemanticGraph::Union& u)
+{
+ os << "const " << u.scoped_name () << " &";;
+}
+
+void
+INArgTypeNameEmitter::traverse (SemanticGraph::UnboundedSequence& s)
+{
+ os << "const " << s.scoped_name () << " &";;
+}
+
+void
+INArgTypeNameEmitter::traverse (SemanticGraph::Interface& i)
+{
+ os << i.scoped_name () << "_ptr";
+}
+
+void
+INArgTypeNameEmitter::traverse (SemanticGraph::ValueType& v)
+{
+ os << v.scoped_name () << " *";
+}
+
+void
+INArgTypeNameEmitter::traverse (SemanticGraph::EventType& e)
+{
+ os << e.scoped_name () << " *";
+}
+
+void
+INArgTypeNameEmitter::traverse (SemanticGraph::Component& c)
+{
+ os << c.scoped_name () << "_ptr";
+}
+
+void
+INArgTypeNameEmitter::traverse (SemanticGraph::Home& h)
+{
+ os << h.scoped_name () << "_ptr";
+}
+
+// ===============================================================
+
+INOUTArgTypeNameEmitter::INOUTArgTypeNameEmitter (ostream& os_)
+ : TypeNameEmitter (os_)
+{
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (Boolean&)
+{
+ os << "::CORBA::Boolean &";
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (Octet&)
+{
+ os << "::CORBA::Octet &";
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (Char&)
+{
+ os << "::CORBA::Char &";
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (Wchar&)
+{
+ os << "::CORBA::WChar &";
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (Short&)
+{
+ os << "::CORBA::Short &";
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (UnsignedShort&)
+{
+ os << "::CORBA::UShort &";
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (Long&)
+{
+ os << "::CORBA::Long &";
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (UnsignedLong&)
+{
+ os << "::CORBA::ULong &";
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (LongLong&)
+{
+ os << "::CORBA::LongLong &";
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (UnsignedLongLong&)
+{
+ os << "::CORBA::ULongLong &";
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (Float&)
+{
+ os << "::CORBA::Float &";
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (Double&)
+{
+ os << "::CORBA::Double &";
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (String&)
+{
+ os << "char *&";
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (Wstring&)
+{
+ os << "::CORBA::WChar *&";
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (Object&)
+{
+ os << "::CORBA::Object_ptr &";
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (ValueBase&)
+{
+ os << "::CORBA::ValueBase *&";
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (Any&)
+{
+ os << "::CORBA::Any &";
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (SemanticGraph::Enum& e)
+{
+ os << e.scoped_name () << " &";
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (SemanticGraph::Struct& s)
+{
+ os << s.scoped_name () << " &";
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (SemanticGraph::Union& u)
+{
+ os << u.scoped_name () << " &";
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (SemanticGraph::UnboundedSequence& s)
+{
+ os << s.scoped_name () << " &";
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (SemanticGraph::Interface& i)
+{
+ os << i.scoped_name () << "_ptr &";
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (SemanticGraph::ValueType& v)
+{
+ os << v.scoped_name () << " *&";
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (SemanticGraph::EventType& e)
+{
+ os << e.scoped_name () << " *&";
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (SemanticGraph::Component& c)
+{
+ os << c.scoped_name () << "_ptr &";
+}
+
+void
+INOUTArgTypeNameEmitter::traverse (SemanticGraph::Home& h)
+{
+ os << h.scoped_name () << "_ptr";
+}
+
+// =================================================================
+
+OUTArgTypeNameEmitter::OUTArgTypeNameEmitter (ostream& os_)
+ : TypeNameEmitter (os_)
+{
+}
+
+void
+OUTArgTypeNameEmitter::traverse (Boolean&)
+{
+ os << "::CORBA::Boolean_out";
+}
+
+void
+OUTArgTypeNameEmitter::traverse (Octet&)
+{
+ os << "::CORBA::Octet_out";
+}
+
+void
+OUTArgTypeNameEmitter::traverse (Char&)
+{
+ os << "::CORBA::Char_out";
+}
+
+void
+OUTArgTypeNameEmitter::traverse (Wchar&)
+{
+ os << "::CORBA::WChar_out";
+}
+
+void
+OUTArgTypeNameEmitter::traverse (Short&)
+{
+ os << "::CORBA::Short_out";
+}
+
+void
+OUTArgTypeNameEmitter::traverse (UnsignedShort&)
+{
+ os << "::CORBA::UShort_out";
+}
+
+void
+OUTArgTypeNameEmitter::traverse (Long&)
+{
+ os << "::CORBA::Long_out";
+}
+
+void
+OUTArgTypeNameEmitter::traverse (UnsignedLong&)
+{
+ os << "::CORBA::ULong_out";
+}
+
+void
+OUTArgTypeNameEmitter::traverse (LongLong&)
+{
+ os << "::CORBA::LongLong_out";
+}
+
+void
+OUTArgTypeNameEmitter::traverse (UnsignedLongLong&)
+{
+ os << "::CORBA::ULongLong_out";
+}
+
+void
+OUTArgTypeNameEmitter::traverse (Float&)
+{
+ os << "::CORBA::Float_out";
+}
+
+void
+OUTArgTypeNameEmitter::traverse (Double&)
+{
+ os << "::CORBA::Double_out";
+}
+
+void
+OUTArgTypeNameEmitter::traverse (String&)
+{
+ os << "::CORBA::String_out";
+}
+
+void
+OUTArgTypeNameEmitter::traverse (Wstring&)
+{
+ os << "::CORBA::WString_out";
+}
+
+void
+OUTArgTypeNameEmitter::traverse (Object&)
+{
+ os << "::CORBA::Object_out";
+}
+
+void
+OUTArgTypeNameEmitter::traverse (ValueBase&)
+{
+ os << "::CORBA::ValueBase_out";
+}
+
+void
+OUTArgTypeNameEmitter::traverse (Any&)
+{
+ os << "::CORBA::Any_out";
+}
+
+void
+OUTArgTypeNameEmitter::traverse (SemanticGraph::Enum& e)
+{
+ os << e.scoped_name () << "_out";
+}
+
+void
+OUTArgTypeNameEmitter::traverse (SemanticGraph::Struct& s)
+{
+ os << s.scoped_name () << "_out";
+}
+
+void
+OUTArgTypeNameEmitter::traverse (SemanticGraph::Union& u)
+{
+ os << u.scoped_name () << "_out";
+}
+
+void
+OUTArgTypeNameEmitter::traverse (SemanticGraph::UnboundedSequence& s)
+{
+ os << s.scoped_name () << "_out";
+}
+
+void
+OUTArgTypeNameEmitter::traverse (SemanticGraph::Interface& i)
+{
+ os << i.scoped_name () << "_out";
+}
+
+void
+OUTArgTypeNameEmitter::traverse (SemanticGraph::ValueType& v)
+{
+ os << v.scoped_name () << "_out";
+}
+
+void
+OUTArgTypeNameEmitter::traverse (SemanticGraph::EventType& e)
+{
+ os << e.scoped_name () << "_out";
+}
+
+void
+OUTArgTypeNameEmitter::traverse (SemanticGraph::Component& c)
+{
+ os << c.scoped_name () << "_out";
+}
+
+void
+OUTArgTypeNameEmitter::traverse (SemanticGraph::Home& h)
+{
+ os << h.scoped_name () << "_ptr";
+}
+
+// ====================================================================
+
+NullReturnEmitter::NullReturnEmitter (ostream& os_)
+ : TypeNameEmitter (os_)
+{
+}
+
+void
+NullReturnEmitter::traverse (Boolean&)
+{
+ os << "return false;";
+}
+
+void
+NullReturnEmitter::traverse (Octet&)
+{
+ os << "return 0;";
+}
+
+void
+NullReturnEmitter::traverse (Char&)
+{
+ os << "return 0;";
+}
+
+void
+NullReturnEmitter::traverse (Wchar&)
+{
+ os << "return 0;";
+}
+
+void
+NullReturnEmitter::traverse (Short&)
+{
+ os << "return 0;";
+}
+
+void
+NullReturnEmitter::traverse (UnsignedShort&)
+{
+ os << "return 0;";
+}
+
+void
+NullReturnEmitter::traverse (Long&)
+{
+ os << "return 0;";
+}
+
+void
+NullReturnEmitter::traverse (UnsignedLong&)
+{
+ os << "return 0;";
+}
+
+void
+NullReturnEmitter::traverse (LongLong&)
+{
+ os << "return ACE_CDR_LONGLONG_INITIALIZER;";
+}
+
+void
+NullReturnEmitter::traverse (UnsignedLongLong&)
+{
+ os << "return 0;";
+}
+
+void
+NullReturnEmitter::traverse (Float&)
+{
+ os << "return 0.0f;";
+}
+
+void
+NullReturnEmitter::traverse (Double&)
+{
+ os << "return 0.0;";
+}
+
+void
+NullReturnEmitter::traverse (String&)
+{
+ os << "return 0;";
+}
+
+void
+NullReturnEmitter::traverse (Wstring&)
+{
+ os << "return 0;";
+}
+
+void
+NullReturnEmitter::traverse (Object&)
+{
+ os << "return ::CORBA::Object::_nil ();";
+}
+
+void
+NullReturnEmitter::traverse (ValueBase&)
+{
+ os << "return 0;";
+}
+
+void
+NullReturnEmitter::traverse (Any&)
+{
+ os << "return 0;";
+}
+
+void
+NullReturnEmitter::traverse (SemanticGraph::Enum& e)
+{
+ os << e.scoped_name () << " retval;" << endl
+ << "return retval;";
+}
+
+void
+NullReturnEmitter::traverse (SemanticGraph::Struct& s)
+{
+ // This should always be in the context, since the SizeTypeCalculator
+ // is executed before the servant code generators.
+ bool var_size = s.context ().get<bool> (STRS[VAR_SIZE]);
+
+ if (var_size)
+ {
+ os << "return 0;";
+ }
+ else
+ {
+ os << s.scoped_name () << " retval;" << endl
+ << "return retval;";
+ }
+}
+
+void
+NullReturnEmitter::traverse (SemanticGraph::Union& u)
+{
+ // This should always be in the context, since the SizeTypeCalculator
+ // is executed before the servant code generators.
+ bool var_size = u.context ().get<bool> (STRS[VAR_SIZE]);
+
+ if (var_size)
+ {
+ os << "return 0;";
+ }
+ else
+ {
+ os << u.scoped_name () << " retval;" << endl
+ << "return retval;";
+ }
+}
+
+void
+NullReturnEmitter::traverse (SemanticGraph::UnboundedSequence& s)
+{
+ os << "return 0;";
+}
+
+void
+NullReturnEmitter::traverse (SemanticGraph::Interface& i)
+{
+ os << "return " << i.scoped_name () << "::_nil ();";
+}
+
+void
+NullReturnEmitter::traverse (SemanticGraph::ValueType& v)
+{
+ os << "return 0;";
+}
+
+void
+NullReturnEmitter::traverse (SemanticGraph::EventType& e)
+{
+ os << "return 0;";
+}
+
+void
+NullReturnEmitter::traverse (SemanticGraph::Component& c)
+{
+ os << "return " << c.scoped_name () << "::_nil ();";
+}
+
+void
+NullReturnEmitter::traverse (SemanticGraph::Home& h)
+{
+ os << "return " << h.scoped_name () << "::_nil ();";
+}
+
+// ====================================================================
+
+NullRHSEmitter::NullRHSEmitter (ostream& os_)
+ : TypeNameEmitter (os_)
+{
+}
+
+void
+NullRHSEmitter::traverse (Boolean&)
+{
+ os << "= false;";
+}
+
+void
+NullRHSEmitter::traverse (Octet&)
+{
+ os << "= 0;";
+}
+
+void
+NullRHSEmitter::traverse (Char&)
+{
+ os << "= 0;";
+}
+
+void
+NullRHSEmitter::traverse (Wchar&)
+{
+ os << "= 0;";
+}
+
+void
+NullRHSEmitter::traverse (Short&)
+{
+ os << "= 0;";
+}
+
+void
+NullRHSEmitter::traverse (UnsignedShort&)
+{
+ os << "= 0;";
+}
+
+void
+NullRHSEmitter::traverse (Long&)
+{
+ os << "= 0;";
+}
+
+void
+NullRHSEmitter::traverse (UnsignedLong&)
+{
+ os << "= 0;";
+}
+
+void
+NullRHSEmitter::traverse (LongLong&)
+{
+ os << "= ACE_CDR_LONGLONG_INITIALIZER;";
+}
+
+void
+NullRHSEmitter::traverse (UnsignedLongLong&)
+{
+ os << "= 0;";
+}
+
+void
+NullRHSEmitter::traverse (Float&)
+{
+ os << "= 0.0f;";
+}
+
+void
+NullRHSEmitter::traverse (Double&)
+{
+ os << "= 0.0;";
+}
+
+void
+NullRHSEmitter::traverse (String&)
+{
+ os << "= 0;";
+}
+
+void
+NullRHSEmitter::traverse (Wstring&)
+{
+ os << "= 0;";
+}
+
+void
+NullRHSEmitter::traverse (Object&)
+{
+ os << "= ::CORBA::Object::_nil ();";
+}
+
+void
+NullRHSEmitter::traverse (ValueBase&)
+{
+ os << "= 0;";
+}
+
+void
+NullRHSEmitter::traverse (Any&)
+{
+ // This will hopefully work both if the lhs is a pointer (for example
+ // RetunrTypeNameEmitter) or not (for example INArgTypeNameEmitter).
+ os << ";";
+}
+
+void
+NullRHSEmitter::traverse (SemanticGraph::Enum& e)
+{
+ os << ";";
+}
+
+void
+NullRHSEmitter::traverse (SemanticGraph::Struct& s)
+{
+ // This should always be in the context, since the SizeTypeCalculator
+ // is executed before the servant code generators.
+ bool var_size = s.context ().get<bool> (STRS[VAR_SIZE]);
+
+ if (var_size)
+ {
+ os << "= 0;";
+ }
+ else
+ {
+ os << ";";
+ }
+}
+
+void
+NullRHSEmitter::traverse (SemanticGraph::Union& u)
+{
+ // This should always be in the context, since the SizeTypeCalculator
+ // is executed before the servant code generators.
+ bool var_size = u.context ().get<bool> (STRS[VAR_SIZE]);
+
+ if (var_size)
+ {
+ os << "= 0;";
+ }
+ else
+ {
+ os << ";";
+ }
+}
+
+void
+NullRHSEmitter::traverse (SemanticGraph::UnboundedSequence& s)
+{
+ os << "= 0;";
+}
+
+void
+NullRHSEmitter::traverse (SemanticGraph::Interface& i)
+{
+ os << "= " << i.scoped_name () << "::_nil ();";
+}
+
+void
+NullRHSEmitter::traverse (SemanticGraph::ValueType& v)
+{
+ os << "= 0;";
+}
+
+void
+NullRHSEmitter::traverse (SemanticGraph::EventType& e)
+{
+ os << "= 0;";
+}
+
+void
+NullRHSEmitter::traverse (SemanticGraph::Component& c)
+{
+ os << "= " << c.scoped_name () << "::_nil ();";
+}
+
+void
+NullRHSEmitter::traverse (SemanticGraph::Home& h)
+{
+ os << "= " << h.scoped_name () << "::_nil ();";
+}
+
+// ====================================================================
+
+ExtractedTypeDeclEmitter::ExtractedTypeDeclEmitter (ostream& os_)
+ : TypeNameEmitter (os_)
+{
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (Boolean&)
+{
+ os << "::CORBA::Boolean " << STRS[EXTRACT_TMP] << " = false;"
+ << "::CORBA::Any::to_boolean " << STRS[EXTRACT]
+ << " (" << STRS[EXTRACT_TMP] << ");";
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (Octet&)
+{
+ os << "::CORBA::Octet " << STRS[EXTRACT_TMP] << " = 0;"
+ << "::CORBA::Any::to_octet " << STRS[EXTRACT]
+ << " (" << STRS[EXTRACT_TMP] << ");";
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (Char&)
+{
+ os << "::CORBA::Char " << STRS[EXTRACT_TMP] << " = 0;"
+ << "::CORBA::Any::to_char " << STRS[EXTRACT]
+ << " (" << STRS[EXTRACT_TMP] << ");";
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (Wchar&)
+{
+ os << "::CORBA::WChar " << STRS[EXTRACT_TMP] << " = 0;"
+ << "::CORBA::Any::to_wchar " << STRS[EXTRACT]
+ << " (" << STRS[EXTRACT_TMP] << ");";
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (Short&)
+{
+ os << "::CORBA::Short " << STRS[EXTRACT] << " = 0;";
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (UnsignedShort&)
+{
+ os << "::CORBA::UShort " << STRS[EXTRACT] << " = 0;";
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (Long&)
+{
+ os << "::CORBA::Long " << STRS[EXTRACT] << " = 0;";
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (UnsignedLong&)
+{
+ os << "::CORBA::ULong " << STRS[EXTRACT] << " = 0;";
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (LongLong&)
+{
+ os << "::CORBA::LongLong " << STRS[EXTRACT]
+ << " = ACE_CDR_LONGLONG_INITIALIZER;";
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (UnsignedLongLong&)
+{
+ os << "::CORBA::ULongLong " << STRS[EXTRACT] << " = 0;";
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (Float&)
+{
+ os << "::CORBA::Float " << STRS[EXTRACT] << " = 0;";
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (Double&)
+{
+ os << "::CORBA::Double " << STRS[EXTRACT] << " = 0;";
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (String&)
+{
+ os << "const char * " << STRS[EXTRACT] << " = 0;";
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (Wstring&)
+{
+ os << "::CORBA::WChar * " << STRS[EXTRACT] << " = 0;";
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (Object&)
+{
+ os << "::CORBA::Object_ptr " << STRS[EXTRACT]
+ << " = ::CORBA::Object::_nil ();";
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (ValueBase&)
+{
+ os << "::CORBA::ValueBase * " << STRS[EXTRACT] << " = 0;";
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (Any&)
+{
+ os << "::CORBA::Any * " << STRS[EXTRACT] << " = 0;";
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (SemanticGraph::Enum& e)
+{
+ os << e.scoped_name () << " " << STRS[EXTRACT] << ";";
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (SemanticGraph::Struct& s)
+{
+ os << s.scoped_name () << " " << STRS[EXTRACT] << ";";
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (SemanticGraph::Union& u)
+{
+ os << u.scoped_name () << " " << STRS[EXTRACT] << ";";
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (SemanticGraph::UnboundedSequence& s)
+{
+ os << s.scoped_name () << " * " << STRS[EXTRACT] << " = 0;";
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (SemanticGraph::Interface& i)
+{
+ os << i.scoped_name () << "_ptr " << STRS[EXTRACT] << " = "
+ << i.scoped_name () << "::_nil ();";
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (SemanticGraph::ValueType& v)
+{
+ os << v.scoped_name () << " * " << STRS[EXTRACT] << " = 0;";
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (SemanticGraph::EventType& e)
+{
+ os << e.scoped_name () << " * " << STRS[EXTRACT] << " = 0;";
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (SemanticGraph::Component& c)
+{
+ os << c.scoped_name () << "_ptr " << STRS[EXTRACT] << " = "
+ << c.scoped_name () << "::_nil ();";
+}
+
+void
+ExtractedTypeDeclEmitter::traverse (SemanticGraph::Home& h)
+{
+ os << h.scoped_name () << "_ptr " << STRS[EXTRACT] << " = "
+ << h.scoped_name () << "::_nil ();";
+}
+
+// ====================================================================
+
+AssignFromExtractedEmitter::AssignFromExtractedEmitter (ostream& os_)
+ : TypeNameEmitter (os_)
+{
+}
+
+void
+AssignFromExtractedEmitter::traverse (Boolean&)
+{
+ os << STRS[EXTRACT] << ".ref_";
+}
+
+void
+AssignFromExtractedEmitter::traverse (Octet&)
+{
+ os << STRS[EXTRACT] << ".ref_";
+}
+
+void
+AssignFromExtractedEmitter::traverse (Char&)
+{
+ os << STRS[EXTRACT] << ".ref_";
+}
+
+void
+AssignFromExtractedEmitter::traverse (Wchar&)
+{
+ os << STRS[EXTRACT] << ".ref_";
+}
+
+void
+AssignFromExtractedEmitter::traverse (Short&)
+{
+ os << STRS[EXTRACT];
+}
+
+void
+AssignFromExtractedEmitter::traverse (UnsignedShort&)
+{
+ os << STRS[EXTRACT];
+}
+
+void
+AssignFromExtractedEmitter::traverse (Long&)
+{
+ os << STRS[EXTRACT];
+}
+
+void
+AssignFromExtractedEmitter::traverse (UnsignedLong&)
+{
+ os << STRS[EXTRACT];
+}
+
+void
+AssignFromExtractedEmitter::traverse (LongLong&)
+{
+ os << STRS[EXTRACT];
+}
+
+void
+AssignFromExtractedEmitter::traverse (UnsignedLongLong&)
+{
+ os << STRS[EXTRACT];
+}
+
+void
+AssignFromExtractedEmitter::traverse (Float&)
+{
+ os << STRS[EXTRACT];
+}
+
+void
+AssignFromExtractedEmitter::traverse (Double&)
+{
+ os << STRS[EXTRACT];
+}
+
+void
+AssignFromExtractedEmitter::traverse (String&)
+{
+ os << STRS[EXTRACT];
+}
+
+void
+AssignFromExtractedEmitter::traverse (Wstring&)
+{
+ os << STRS[EXTRACT];
+}
+
+void
+AssignFromExtractedEmitter::traverse (Object&)
+{
+ os << STRS[EXTRACT];
+}
+
+void
+AssignFromExtractedEmitter::traverse (ValueBase&)
+{
+ os << STRS[EXTRACT];
+}
+
+void
+AssignFromExtractedEmitter::traverse (Any&)
+{
+ os << "*" << STRS[EXTRACT];
+}
+
+void
+AssignFromExtractedEmitter::traverse (SemanticGraph::Enum&)
+{
+ os << STRS[EXTRACT];
+}
+
+void
+AssignFromExtractedEmitter::traverse (SemanticGraph::Struct&)
+{
+ os << STRS[EXTRACT];
+}
+
+void
+AssignFromExtractedEmitter::traverse (SemanticGraph::Union&)
+{
+ os << STRS[EXTRACT];
+}
+
+void
+AssignFromExtractedEmitter::traverse (SemanticGraph::UnboundedSequence&)
+{
+ os << STRS[EXTRACT];
+}
+
+void
+AssignFromExtractedEmitter::traverse (SemanticGraph::Interface&)
+{
+ os << STRS[EXTRACT];
+}
+
+void
+AssignFromExtractedEmitter::traverse (SemanticGraph::ValueType&)
+{
+ os << STRS[EXTRACT];
+}
+
+void
+AssignFromExtractedEmitter::traverse (SemanticGraph::EventType&)
+{
+ os << STRS[EXTRACT];
+}
+
+void
+AssignFromExtractedEmitter::traverse (SemanticGraph::Component&)
+{
+ os << STRS[EXTRACT];
+}
+
+void
+AssignFromExtractedEmitter::traverse (SemanticGraph::Home&)
+{
+ os << STRS[EXTRACT];
+}
+
diff --git a/TAO/CIAO/CIDLC/cidlc.cpp b/TAO/CIAO/CIDLC/cidlc.cpp
new file mode 100644
index 00000000000..06f22e6fca6
--- /dev/null
+++ b/TAO/CIAO/CIDLC/cidlc.cpp
@@ -0,0 +1,322 @@
+// file : CIDLC/cidlc.cpp
+// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
+// cvs-id : $Id$
+
+#include <vector>
+#include <iostream>
+
+#include "CCF/CompilerElements/Context.hpp"
+#include "CCF/CompilerElements/FileSystem.hpp"
+#include "CCF/CompilerElements/Diagnostic.hpp"
+#include "CCF/CompilerElements/TokenStream.hpp"
+#include "CCF/CompilerElements/Preprocessor.hpp"
+
+#include "CCF/CodeGenerationKit/CommandLine.hpp"
+#include "CCF/CodeGenerationKit/CommandLineParser.hpp"
+#include "CCF/CodeGenerationKit/CommandLineDescriptor.hpp"
+
+#include "CCF/CIDL/LexicalAnalyzer.hpp"
+#include "CCF/CIDL/Parser.hpp"
+#include "CCF/CIDL/SemanticGraph.hpp"
+#include "CCF/CIDL/SemanticAction/Impl/Factory.hpp"
+
+#include "ExecutorMappingGenerator.hpp"
+#include "ServantGenerator.hpp"
+#include "ExecImplGenerator.hpp"
+#include "RepositoryIdGenerator.hpp"
+#include "DescriptorGenerator.hpp"
+#include "SizeTypeCalculator.hpp"
+
+#include "ciao/Version.h" // for --version
+
+using std::cerr;
+using std::endl;
+
+class ErrorDetector : public std::streambuf
+{
+public:
+ ErrorDetector (std::streambuf* prev)
+ : error_ (false),
+ prev_ (*prev)
+ {
+ }
+
+ virtual int_type
+ overflow (int_type c)
+ {
+ error_ = true;
+ return prev_.sputc (c);
+ }
+
+ virtual int
+ sync ()
+ {
+ return prev_.pubsync ();
+ }
+
+ bool
+ error () const throw ()
+ {
+ return error_;
+ }
+
+private:
+ bool error_;
+ std::streambuf& prev_;
+};
+
+using namespace CCF::CompilerElements;
+using namespace CCF::CIDL;
+using namespace CCF::CIDL::SemanticGraph;
+
+int
+main (int argc, char* argv[])
+{
+ try
+ {
+ // Parsing command line options and arguments
+ //
+ //
+ CommandLine cl;
+
+ if (!parse (argc, argv, cl))
+ {
+ cerr << "command line syntax error" << endl;
+ cerr << "try " << argv[0] << " --help for usage information" << endl;
+ return -1;
+ }
+
+ if (cl.get_value ("version", false))
+ {
+ cerr << "CIAO CIDL Compiler " << CIAO_VERSION
+ << " (built on " << __DATE__ << " at " << __TIME__ << ")" << endl;
+ return 0;
+ }
+
+
+ ExecutorMappingGenerator lem_gen;
+ ServantGenerator svnt_gen (cl);
+ ExecImplGenerator impl_gen (cl);
+ RepositoryIdGenerator repid_gen;
+ DescriptorGenerator desc_gen;
+ SizeTypeCalculator sizetype_calc;
+
+ if (cl.get_value ("help", false) || cl.get_value ("help-html", false))
+ {
+ CL::Description d (argv[0]);
+
+ lem_gen.options (d);
+ svnt_gen.options (d);
+ desc_gen.options (d);
+ impl_gen.options (d);
+
+ d.add_option (CL::OptionDescription (
+ "trace-semantic-actions",
+ "Turn on semantic actions tracing facility.",
+ true));
+
+ d.add_option (CL::OptionDescription (
+ "preprocess-only",
+ "Run preprocessor only and output result to stdout.",
+ true));
+
+ d.add_option (CL::OptionDescription (
+ "gen-exec-impl",
+ "Generate the executor implementation classes.",
+ true));
+
+ d.add_option (CL::OptionDescription (
+ "help",
+ "Display usage information and exit.",
+ true));
+
+ d.add_option (CL::OptionDescription (
+ "help-html",
+ "Dump usage information in html format and exit.",
+ true));
+
+ d.add_argument ("cidl file");
+
+ if (cl.get_value ("help-html", false)) CL::print_html (cerr, d);
+ else CL::print_text (cerr, d);
+
+ return 0;
+ }
+
+ fs::ifstream ifs;
+ ifs.exceptions (std::ios_base::badbit | std::ios_base::failbit);
+
+ fs::path file_path;
+
+ CommandLine::ArgumentsIterator i = cl.arguments_begin ();
+
+ if (i != cl.arguments_end ())
+ {
+ try
+ {
+ file_path = fs::path (*i, fs::native);
+ ifs.open (file_path, std::ios_base::in);
+ }
+ catch (fs::filesystem_error const&)
+ {
+ cerr << *i << ": error: unable to open in read mode" << endl;
+ return -1;
+ }
+ catch (std::ios_base::failure const&)
+ {
+ cerr << *i << ": error: unable to open in read mode" << endl;
+ return -1;
+ }
+ }
+
+ //@@ for some reason ifs throws exception if I don't reset it to
+ // original state. It probably has something to do with call to
+ // get after eof.
+ ifs.exceptions (std::ios_base::iostate (0));
+
+ std::istream& is = ifs.is_open ()
+ ? static_cast<std::istream&> (ifs)
+ : static_cast<std::istream&> (std::cin);
+
+ InputStreamAdapter isa (is);
+ CPP::Preprocessor pp (isa);
+
+ if (cl.get_value ("preprocess-only", false))
+ {
+ while (true)
+ {
+ CPP::Token t (pp.next ());
+
+ if (t == CPP::Token::eos) break;
+
+ std::cout << t;
+ }
+
+ return 0;
+ }
+
+ Diagnostic::Stream dout;
+ ErrorDetector detector (cerr.rdbuf ());
+ cerr.rdbuf (&detector);
+
+ LexicalAnalyzer lexer (pp);
+
+ TokenList token_stream;
+
+ //@@ bad token comparison
+ for (TokenPtr token = lexer.next ();; token = lexer.next ())
+ {
+ // cerr << typeid(*(token.in ())).name () << " : " << token << endl;
+ token_stream.push_back (token);
+ if (ReferenceCounting::strict_cast<EndOfStream> (token) != 0) break;
+ }
+
+ if (token_stream.size () < 2)
+ {
+ cerr << "no tokens produced so nothing to parse" << endl;
+ return 0;
+ }
+
+ TranslationUnit tu;
+
+ // Initialize compilation context.
+ //
+ CCF::CompilerElements::Context context;
+ context.set ("file-path", file_path);
+ context.set ("trace-semantic-action",
+ cl.get_value ("trace-semantic-actions", false));
+
+
+ // Extract include search paths.
+ //
+
+ std::vector<fs::path> include_paths;
+
+ for (CommandLine::OptionsIterator
+ i (cl.options_begin ()), e (cl.options_end ()); i != e; ++i)
+ {
+ if (i->name () == "I")
+ {
+ include_paths.push_back (fs::path (i->value (), fs::native));
+ }
+ else if (i->name ()[0] == 'I')
+ {
+ std::string opt (i->name ());
+ std::string path (opt.begin () + 1, opt.end ());
+ include_paths.push_back (fs::path (path, fs::native));
+ }
+ }
+
+ context.set ("include-search-paths", include_paths);
+
+ // Instantiate semantic actions factory.
+ //
+ SemanticAction::Impl::Factory actions (context, dout, tu);
+
+ Parser parser (context, dout, lexer, actions);
+
+ //@@ should be able to use CIDL here. Or better yet get rid of this
+ // function completely.
+ //
+ CCF::IDL2::Parsing::parse (token_stream.begin (),
+ token_stream.end (),
+ parser.start ());
+
+ if (dout.error_count () != 0) return 1;
+
+ // This is a little hack to make CIDL compiler signal
+ // error conditions by return value. Once I redesign
+ // diagnostic in CCF this should be removed.
+
+ if (detector.error ()) return 1;
+
+
+ // Generate executor mapping.
+ {
+ lem_gen.generate (cl, tu, file_path);
+ }
+
+ // Calculate the size type of everything in the AST.
+ // This must be executed before the servant code generator.
+ {
+ sizetype_calc.calculate (tu);
+ }
+
+ // Compute repository IDs in a separate pass.
+ {
+ if (!repid_gen.generate (tu)) return 1;
+ }
+
+ // Generate servant code.
+ {
+ svnt_gen.generate (tu, file_path);
+ }
+
+ // Generate executor implementation code.
+ if (cl.get_value ("gen-exec-impl", false))
+ {
+ impl_gen.generate (tu, file_path);
+ }
+
+ // Generate descriptor code.
+ {
+ desc_gen.generate (cl, tu);
+ }
+
+ return 0;
+ }
+ catch (std::bad_cast const&)
+ {
+ cerr << "bad cast exception" << endl;
+ }
+ catch (InvalidName const&)
+ {
+ cerr << "invalid name exception" << endl;
+ }
+ catch (...)
+ {
+ cerr << "caught unknown exception" << endl;
+ }
+
+ return 1;
+}
diff --git a/TAO/CIAO/COPYING b/TAO/CIAO/COPYING
new file mode 100644
index 00000000000..0cc3d9cca79
--- /dev/null
+++ b/TAO/CIAO/COPYING
@@ -0,0 +1,111 @@
+
+ _________________________________________________________________
+
+ Copyright and Licensing Information for ACE(TM), TAO(TM), CIAO(TM), and
+ CoSMIC(TM)
+
+ [1]ACE(TM), [2]TAO(TM), [3]CIAO(TM), and [4]CoSMIC(TM) (henceforth
+ referred to as "DOC software") are copyrighted by [5]Douglas C.
+ Schmidt and his [6]research group at [7]Washington University,
+ [8]University of California, Irvine, and [9]Vanderbilt University,
+ Copyright (c) 1993-2005, all rights reserved. Since DOC software is
+ [10]open-source, free software, you are free to use, modify, copy, and
+ distribute--perpetually and irrevocably--the DOC software source code
+ and object code produced from the source, as well as copy and
+ distribute modified versions of this software. You must, however,
+ include this copyright statement along with code built using DOC
+ software.
+
+ You can use DOC software in proprietary software and are under no
+ obligation to redistribute any of your source code that is built using
+ DOC software. Note, however, that you may not do anything to the DOC
+ software code, such as copyrighting it yourself or claiming authorship
+ of the DOC software code, that will prevent DOC software from being
+ distributed freely using an open-source development model. You needn't
+ inform anyone that you're using DOC software in your software, though
+ we encourage you to let [11]us know so we can promote your project in
+ the [12]DOC software success stories..
+
+ DOC software is provided as is with no warranties of any kind,
+ including the warranties of design, merchantability, and fitness for a
+ particular purpose, noninfringement, or arising from a course of
+ dealing, usage or trade practice. Moreover, DOC software is provided
+ with no support and without any obligation on the part of Washington
+ University, UC Irvine, Vanderbilt University, their employees, or
+ students to assist in its use, correction, modification, or
+ enhancement. A [13]number of companies around the world provide
+ commercial support for DOC software, however. DOC software is
+ Y2K-compliant, as long as the underlying OS platform is Y2K-compliant.
+
+ Washington University, UC Irvine, Vanderbilt University, their
+ employees, and students shall have no liability with respect to the
+ infringement of copyrights, trade secrets or any patents by DOC
+ software or any part thereof. Moreover, in no event will Washington
+ University, UC Irvine, or Vanderbilt University, their employees, or
+ students be liable for any lost revenue or profits or other special,
+ indirect and consequential damages.
+
+ The [14]ACE, [15]TAO, [16]CIAO, and [17]CoSMIC web sites are
+ maintained by the [18]DOC Group at the [19]Institute for Software
+ Integrated Systems (ISIS) and the [20]Center for Distributed Object
+ Computing of Washington University, St. Louis for the development of
+ open-source software as part of the [21]open-source software
+ community. By submitting comments, suggestions, code, code snippets,
+ techniques (including that of usage), and algorithms, submitters
+ acknowledge that they have the right to do so, that any such
+ submissions are given freely and unreservedly, and that they waive any
+ claims to copyright or ownership. In addition, submitters acknowledge
+ that any such submission might become part of the copyright maintained
+ on the overall body of code, which comprises the DOC software. By
+ making a submission, submitter agree to these terms. Furthermore,
+ submitters acknowledge that the incorporation or modification of such
+ submissions is entirely at the discretion of the moderators of the
+ open-source DOC software projects or their designees.
+
+ The names ACE(TM), TAO(TM), CIAO(TM), CoSMIC(TM), Washington
+ University, UC Irvine, and Vanderbilt University, may not be used to
+ endorse or promote products or services derived from this source
+ without express written permission from Washington University, UC
+ Irvine, or Vanderbilt University. Further, products or services
+ derived from this source may not be called ACE(TM), TAO(TM), CIAO(TM),
+ or CoSMIC(TM) nor may the name Washington University, UC Irvine, or
+ Vanderbilt University appear in their names, without express written
+ permission from Washington University, UC Irvine, and Vanderbilt
+ University.
+
+ If you have any suggestions, additions, comments, or questions, please
+ let [22]me know.
+
+ [23]Douglas C. Schmidt
+ _________________________________________________________________
+
+ Back to the [24]ACE home page.
+
+ Last modified 21:26:22 CST 03 November 2003
+
+References
+
+ 1. http://www.cs.wustl.edu/~schmidt/ACE.html
+ 2. http://www.cs.wustl.edu/~schmidt/TAO.html
+ 3. http://www.dre.vanderbilt.edu/CIAO/
+ 4. http://www.dre.vanderbilt.edu/cosmic/
+ 5. http://www.dre.vanderbilt.edu/~schmidt/
+ 6. http://www.cs.wustl.edu/~schmidt/ACE-members.html
+ 7. http://www.wustl.edu/
+ 8. http://www.uci.edu/
+ 9. http://www.vanderbilt.edu/
+ 10. http://www.the-it-resource.com/Open-Source/Licenses.html
+ 11. mailto:doc_group@cs.wustl.edu
+ 12. http://www.cs.wustl.edu/~schmidt/ACE-users.html
+ 13. http://www.cs.wustl.edu/~schmidt/commercial-support.html
+ 14. http://www.cs.wustl.edu/~schmidt/ACE.html
+ 15. http://www.cs.wustl.edu/~schmidt/TAO.html
+ 16. http://www.dre.vanderbilt.edu/CIAO/
+ 17. http://www.dre.vanderbilt.edu/cosmic/
+ 18. http://www.dre.vanderbilt.edu/
+ 19. http://www.isis.vanderbilt.edu/
+ 20. http://www.cs.wustl.edu/~schmidt/doc-center.html
+ 21. http://www.opensource.org/
+ 22. mailto:d.schmidt@vanderbilt.edu
+ 23. http://www.dre.vanderbilt.edu/~schmidt/
+ 24. http://www.cs.wustl.edu/ACE.html
diff --git a/TAO/CIAO/ChangeLog b/TAO/CIAO/ChangeLog
new file mode 100644
index 00000000000..5069defecd3
--- /dev/null
+++ b/TAO/CIAO/ChangeLog
@@ -0,0 +1,452 @@
+Fri Mar 4 17:13:16 2005 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * examples/Hello/Hello_Base/Hello_Base.idl:
+ * examples/Hello/Hello_Base/Hello_Base.mpc:
+ * examples/Hello/Receiver/Receiver.idl:
+ * examples/Hello/Receiver/Receiver.mpc:
+ * examples/Hello/Sender/Sender.mpc:
+
+ Cosmetic changes to IDL files and changes to MPC files to
+ eliminate unnecessary files in a given project and bring
+ in missing export header files.
+
+Thu Mar 3 10:31:10 2005 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * CIDLC/ExecImplGenerator.cpp:
+ * CIDLC/ExecImplHeaderGenerator.cpp:
+
+ - Added support for .cdl file extension similar to
+ support already in the servant generators.
+
+ - Fixed bug in export include generation.
+
+ Thanks to Matt Emerson <mjemerson@isis.vanderbilt.edu>,
+ Ming Xiong <xiongm@isi.vanderbilt.edu>, James Hill
+ <jhill@isis.vanderbilt.edu> and Stoyan Paunov
+ <spaunov@isis.vanderbilt.edu> for reporting these
+ problems.
+
+ * CIDLC/ServantSourceGenerator.cpp:
+
+ - Replaced remaining instances of generation of 'new' with
+ 'ACE_NEW' and changed code generation to reduce line
+ lengths.
+
+ - Changed code generation of Cookie_var for multiplex
+ receptacles to pass a Cookie* to ACE_NEW, then
+ assign to the _var, instead of passing in _var.out(),
+ which causes the allocation to fail on some platforms.
+ Thanks to Don Busch <busch_d@ociweb.com> for reporting
+ the problem.
+
+Mon Mar 03 09:37:23 2005 Gan Deng <gan.deng@vanderbilt.edu>
+
+ * DAnCE/examples/Hello/descriptors/Hello.cdp
+ * DAnCE/examples/Hello/descriptors/hello.dat
+
+ Remove these two files because the file name is bad.
+
+ * DAnCE/examples/Hello/descriptors/DeploymentPlan.cdp
+ * DAnCE/examples/Hello/descriptors/NodeManagerMap.dat
+
+ Added these two files.
+
+ * DAnCE/examples/Hello/step-by-step.html
+
+ Fixed this page to reflex the above change.
+
+Mon Mar 03 08:59:23 2005 Gan Deng <gan.deng@vanderbilt.edu>
+
+ * DAnCE/examples/Hello/Hello_Base/Hello_Base.mpc
+
+ Fixed the Hello_Base_DnC_svnt project settings which
+ caused comilation errors.
+
+Wed Mar 02 11:42:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * DAnCE/Config_Handlers/Config_Handlers.mpc
+ * DAnCE/RepositoryManager/RepositoryManager.mpc
+ * performance-tests/Protocols/Controller/Controller.mpc
+ * performance-tests/Protocols/Receiver/Receiver.mpc
+ * performance-tests/Protocols/Sender/Sender.mpc
+ * tests/RTCCM/DiffServ/Controller/Controller.mpc
+ Use exceptions as base project instead of requires exceptions
+
+Mon Mar 02 18:30:25 2005 Gan Deng <gan.deng@vanderbilt.edu>
+
+ * examples/Hello/step-by-step.html
+ * DAnCE/examples/Hello/step-by-step.html
+
+ Modified these two documentation page to fix some errors.
+
+ * DAnCE/examples/Hello/Hello_Base/Hello_Base.mpc
+
+ Fixed wrong shared library names and project names.
+
+Sat Feb 26 14:38:46 2005 Arvind S. Krishna <arvindk@tango.dre.vanderbilt.edu>
+
+ * examples/handcrafted/BasicSP_EC/BMClosedED/BMClosedED.mpc:
+ * examples/handcrafted/BasicSP_EC/BMDevice/BMDevice.mpc:
+ * examples/handcrafted/BasicSP_EC/BMDisplay/BMDisplay.mpc:
+ * examples/handcrafted/BasicSP_EC/EC/EC.mpc:
+ * examples/handcrafted/BasicSP_EC/BasicSP.mpc:
+ * examples/handcrafted/BasicSP_EC2/BMClosedED/BMClosedED.mpc:
+ * examples/handcrafted/BasicSP_EC2/BMDevice/BMDevice.mpc:
+ * examples/handcrafted/BasicSP_EC2/BMDisplay/BMDisplay.mpc:
+ * examples/handcrafted/BasicSP_EC2/EC/EC.mpc:
+ * examples/handcrafted/BasicSP_EC2/RTEventService/RTEventService.mpc:
+ * examples/handcrafted/BasicSP_EC2/BasicSP.mpc:
+
+ Replaced all occurances of "dummy" with "dummy_label"
+
+ * bin/replace_dummy_with_dummylabel.sh:
+
+ Shell script that can be used to do this. In case people find it
+ useful.
+
+
+Tue Feb 22 09:55:51 2005 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * CIDLC/TypeNameEmitter.cpp:
+
+ Fixed typos in code generation that were omitting a space
+ between the type name and '_ciao_extract_val' for enums,
+ structs and unions when used as component or home attributes.
+ Thanks to Steve Baker <steven_d_baker@raytheon.com> for
+ reporting the bug with enums.
+
+Fri Feb 18 10:11:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * DAnCE/ciao/Servant_Activator.h:
+ * ciao/Servant_Activator.h:
+ Added missing includes because of POA refactoring
+
+Thu Feb 17 14:04:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * ciao/Component_Base.idl:
+ Fixed typo in include of orb.idl. Thanks to Roland Schimmack
+ <Roland dot Schimmack at gmx dot de> for reporting this
+
+Tue Feb 15 22:43:34 2005 Arvind S. Krishna <arvindk@dre.vanderbilt.edu>
+
+ * DAnCE/examples/BasicSP/BMDisplay_exec.h:
+
+ Added missing export file to make things compile on Windows
+ platforms. Thanks to Diana Ukleja <Diana_Ukleja@raytheon.com>
+ for pointing this out.
+
+Mon Feb 14 14:52:32 2005 Gan Deng <gan.deng@vanderbilt.edu>
+
+ * DAnCE/NEWS
+
+ Updated the NEWS file by adding support for parsing
+ hierarchical assembly of component descriptors.
+
+Sun Feb 13 13:25:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * Release:
+ Removed CIAO-INSTALL from the release files. It is already
+ picked up because we include the complete CIAO directory
+
+Fri Feb 11 11:12:21 2005 Gan Deng <gan.deng@vanderbilt.edu>
+
+ * DAnCE/NEWS
+
+ Updated the NEWS file by adding support for setting up
+ attribute in component configuration.
+
+Fri Feb 11 11:10:54 2005 Will Otte <wotte@dre.vanderbilt.edu>
+
+ * docs/schema/Modified_Deployment.xsd:
+
+ Corrected a couple mistakes in the schema.
+
+Thu Feb 10 07:11:04 2005 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * CIAO version 0.4.4 released.
+
+Tue Feb 08 10:04:21 2005 Gan Deng <gan.deng@vanderbilt.edu>
+
+ * DAnCE/NEWS
+
+ Updated the NEWS file for the coming 0.4.4 release.
+
+Mon Feb 7 09:49:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * Release:
+ Added CIAO-INSTALL to the release files
+
+Fri Feb 4 09:35:00 2005 Emre Turkay <turkaye@dre.vanderbilt.edu>
+
+ * DAnCE/examples/Hello/descriptors/basicNodeDaemon.pl:
+ The perl script to create node daemons created.
+
+ * DAnCE/examples/Hello/step-by-step.html:
+ Step by step tutorial for the DAnCE.
+
+Fri Feb 4 12:11:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * tools/RTComponentServer/RTConfig_Manager.h:
+ Include SString.h instead of SStringfwd.h to fix compile errors with
+ CBuilderX
+
+Thu Feb 3 20:01:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * tools/Segment_Timer/Segment_Timer.mpc:
+ Removed TAO_ROOT again, the gnu template has been changed so that
+ when CIAO is detected, also TAO_ROOT is set
+
+Thu Feb 3 12:32:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * DAnCE/ciao/NodeApplication_Impl.h:
+ Added include of ace/SString.h to fix compile errors with CBuilderX
+
+Thu Feb 3 10:11:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * tools/Segment_Timer/Segment_Timer.mpc:
+ Added $(TAO_ROOT) so that MPC creates a correct GNU makefile
+
+Wed Feb 2 19:48:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * rules.ciao.GNU:
+ Fixed error in this file
+
+Wed Feb 2 09:39:25 2005 Chad Elliott <elliott_c@ociweb.com>
+
+ * CCF/CCF/CIDL/CIDL.mpc:
+ * CCF/CCF/CodeGenerationKit/CodeGenerationKit.mpc:
+ * CCF/CCF/CompilerElements/CompilerElements.mpc:
+ * CCF/CCF/IDL2/IDL2.mpc:
+ * CCF/CCF/IDL3/IDL3.mpc:
+ * CIDLC/CIDLC.mpc:
+
+ Converted includes to incorporate $(CIAO_ROOT). This allows the
+ GNUACEProjectCreator to recognize these projects as CIAO projects.
+
+ * DAnCE/ciao/CCM_Core.mpc:
+ * ciao/CCM_Core.mpc:
+ * tools/IDL3_to_IDL2/IDL3_to_IDL2.mpc:
+ * tools/Segment_Timer/Segment_Timer.mpc:
+
+ Added a bogus include of $(CIAO_ROOT). This allows the
+ GNUACEProjectCreator to recognize these projects as CIAO projects.
+
+Wed Feb 2 14:33:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * rules.ciao.GNU:
+ New rules file to set the correct SOVERSION and SONAME values
+
+Wed Feb 2 10:51:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * ciao/Port_Activator_T.cpp:
+ Added include of OS_NS_string.h to get ACE_OS::strcmp
+
+Tue Feb 1 18:09:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * ciao/CCM_Core.mpc:
+ * DAnCE/ciao/CCM_Core.mpc:
+ Removed some ciaoversion based projects I missed during my checkin
+ below
+
+Tue Feb 1 13:41:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * ciao/CCM_Core.mpc:
+ * DAnCE/ciao/CCM_Core.mpc:
+ Removed ciaoversion as base project. This will be removed because it
+ results in the fact that each generated GNU makefile will get the
+ version number generated. We want that the GNU make rules get the
+ version number from Version.h
+
+Mon Jan 31 21:00:12 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
+
+ * CIDLC/ServantSourceGenerator.cpp (pre):
+
+ Generate '#include "ace/OS_NS_string.h"' directive. CIAO CIDL
+ servant sources call ACE_OS::strcmp(), the prototype of which is
+ found in that header. Necessitated by inter-header dependency
+ reductions in ACE.
+
+Mon Jan 31 11:59:04 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
+
+ * DAnCE/Config_Handlers/Any_Handler.cpp:
+ * DAnCE/Config_Handlers/CPK_Handler.cpp:
+ * DAnCE/Config_Handlers/DT_Handler.cpp:
+ * DAnCE/Config_Handlers/Property_Handler.cpp:
+ * DAnCE/Config_Handlers/RS_Handler.cpp:
+ * DAnCE/Config_Handlers/Requirement_Handler.cpp:
+ * DAnCE/Config_Handlers/SP_Handler.cpp:
+ * DAnCE/ciao/Port_Activator_T.cpp:
+ * DAnCE/examples/BasicSP/BMClosedED/BMClosedED_exec.cpp:
+ * ciao/Container_Impl.cpp:
+ * performance-tests/Protocols/Controller/Controller.cpp:
+ * tools/RTComponentServer/RTConfig_Manager.cpp:
+ * tools/RTComponentServer/RTConfig_Manager.h:
+ * tools/RTComponentServer/RTServer_Impl.cpp:
+
+ Added missing header include directives that are necessary due
+ to inter-header dependency reductions in ACE.
+
+Sun Jan 30 20:30:46 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
+
+ * DAnCE/DomainApplicationManager/Deployment_Configuration.h:
+ * DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp:
+ * DAnCE/ExecutionManager/ExecutionManager_Impl.h:
+ * DAnCE/NodeApplicationManager/ImplementationInfo.cpp:
+ * DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.h:
+ * DAnCE/ciao/Container_Base.cpp:
+ * DAnCE/ciao/NodeApplication_Impl.cpp:
+ * ciao/Container_Base.cpp:
+ * ciao/ServerActivator_Impl.h:
+ * docs/tutorial/Hello/hello_exec.cpp:
+ * examples/OEP/BasicSP/BMClosedED/BMClosedED_exec.cpp:
+ * tests/RTCCM/Priority_Test/Controllers/client.cpp:
+ * tests/RTCCM/Priority_Test/Workers/CB_Worker_exec.cpp:
+ * tools/Assembly_Deployer/Deployment_Configuration.h:
+ * tools/RTComponentServer/RTServer_Impl.cpp:
+
+ Added missing header include directives that are necessary due
+ to inter-header dependency reductions in ACE.
+
+Sun Jan 23 01:49:51 2005 Marek Brudka <mbrudka@aster.pl>
+
+ * examples/OEP/Display/NavDisplayGUI_exec/README (Module):
+ * examples/OEP/Display/NavDisplayGUI_exec/NavDisplayGUI.mpc (Module):
+ Changes related with separation of GUI reactors.
+ The additional information is avalaible in ChangeLog at REACTOR_SEPARATION branch (below).
+
+ Mon Dec 6 00:39:19 2004 Marek Brudka <mbrudka@aster.pl>
+
+ * examples/OEP/Display/NavDisplayGUI_exec/README (Module):
+ Remove reference to ACE_HAS_QT.
+
+ * examples/OEP/Display/NavDisplayGUI_exec/NavDisplayGUI.mpc (Module):
+ Removed deprecated qt_moc base project.
+
+>>>>>>> 1.1095
+Fri Jan 21 17:27:12 2005 Gan Deng <gan.deng@vanderbilt.edu>
+
+ * DAnCE/tests/NodeApplicationTest/NodeAppTest.mpc
+
+ Fixed dependency relationship by making
+ NodeAppTest_RoundTrip_stub depending on CIAO_DnC_Container.
+
+ * examples/OEP/Display/NavDisplayGUI_exec/NavDisplayGUI_exec.cpp
+
+ Fixed warning on Debian_Full_Reactor build. The warning is
+ caused because of assigning "const char*" to a "char *" type.
+
+ Thanks Johnny Willemsen <jwillemsen@remedy.nl> for pointing
+ these.
+
+Thu Jan 20 18:29:47 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
+
+ * DAnCE/Config_Handlers/Any_Handler.cpp:
+ * DAnCE/Config_Handlers/Utils.cpp:
+ * performance-tests/Protocols/Sender/Sender_exec.cpp:
+ * tools/Daemon/Daemon_Impl.cpp:
+
+ Converted all ACE_{static,dynamic,reinterpret,const}_cast macros
+ calls to their standard C++ counterparts using new
+ bin/ACE-casts-convert script. The ACE cast macros were
+ deprecated back in ACE 5.4.2.
+
+Thu Jan 20 09:54:04 2005 Nanbor Wang <nanbor@cs.wustl.edu>
+
+ * examples/OEP/Display/descriptors/NOTE.txt:
+ * examples/OEP/Display/descriptors/NOTE-win.txt:
+
+ Fixed the discrepancy on using Assembly_Deployer. Thanks to
+ Martina Yen <martina_h_yen@raytheon.com> for reporting this.
+
+Wed Jan 19 09:39:14 2005 Gan Deng <gan.deng@vanderbilt.edu>
+
+ * DAnCE/examples/BasicSP/BasicSP.mpc
+ * DAnCE/examples/BasicSP/BMClosedED/BMClosedED.mpc
+ * DAnCE/examples/BasicSP/BMDevice/BMDevice.mpc
+ * DAnCE/examples/BasicSP/BMDisplay/BMDisplay.mpc
+ * DAnCE/examples/BasicSP/EC/EC.mpc
+
+ Changed the shared component library name from
+ <what_ever_component>_DnC_<stub> to <What_ever_component>_<stub>,
+ since it doesn't make sense to let the modelers to put _DnC
+ trailing a component name.
+
+ The same change applied to _svnt and _exec libraries.
+
+ * DAnCE/examples/BasicSP/descriptors/basicNodeDaemon.pl
+
+ Fixed this script since Some earlier cosmetic change make
+ this perl script broken.
+
+ Thanks Steven Baker <Steven_D_Baker@raytheon.com> and
+ Sam Abbe <sam_abbe@raytheon.com> to pointing errors to
+ run this example.
+
+Sat Jan 15 15:16:14 2005 Gan Deng <gan.deng@vanderbilt.edu>
+
+ * DAnCE/examples/BasicSP/README.html
+
+ Updated this README file for instructions on running the BasicSP
+ example by using DAnCE. Thanks Sam Abbe <sam_abbe@raytheon.com>
+ for pointing errors on this document page. This fixes bugid
+ 2031.
+
+Mon Jan 10 09:45:14 2005 Nanbor Wang <nanbor@cs.wustl.edu>
+
+ * DAnCE/RTNodeApplication/RTServer_Impl.h:
+ * DAnCE/RTNodeApplication/RTServer_Impl.cpp: Removed init method
+ altogether. VC6 can't handle the syntax and we'll deal with
+ later.
+
+Fri Jan 7 10:02:02 2005 Nanbor Wang <nanbor@cs.wustl.edu>
+
+ * DAnCE/RTNodeApplication/RTServer_Impl.cpp (init): Changed to
+ call the virtual function defined by the parent explicitly with
+ this pointer to work around a VC6 bug.
+
+Wed Jan 5 15:20:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * DAnCE/DomainApplicationManager/Deployment_Configuration.inl:
+ * DAnCE/tests/Config_Handlers/Handler_Test.i:
+ Removed inl/i file, updated h,cpp
+
+Wed Jan 5 14:57:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * tools/Assembly_Deployer/Deployment_Configuration.{h,cpp,inl}:
+ * tools/XML_Helpers/XML_Utils.{h,cpp,inl}:
+ Removed inl file, updated h,cpp
+
+Wed Jan 5 10:45:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * DAnCE/RTNodeApplication/RTServer_Impl.h:
+ Fixed compile problem in emulated exception builds due to
+ incorrect environment macro
+
+Mon Jan 3 10:01:09 2005 Nanbor Wang <nanbor@cs.wustl.edu>
+
+ * DAnCE/RTNodeApplication/README:
+ * DAnCE/RTNodeApplication/NodeApplication_Task.cpp:
+ * DAnCE/RTNodeApplication/NodeApplication_Task.h:
+ * DAnCE/RTNodeApplication/NodeApplication_Task.inl:
+ * DAnCE/RTNodeApplication/RTNodeApplication.cpp:
+ * DAnCE/RTNodeApplication/RTNodeApplication.mpc:
+ * DAnCE/RTNodeApplication/RTServer_Impl.cpp:
+ * DAnCE/RTNodeApplication/RTServer_Impl.h:
+ * DAnCE/RTNodeApplication/RTServer_Impl.inl:
+ * DAnCE/RTNodeApplication/senv.sh: Added a minimal
+ real-time-enabled NodeApplication server.
+
+Mon Jan 3 12:20:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * ciao/CCM_Core.mpc:
+ * DAnCE/ciao/CCM_Core.mpc:
+ Added ciaoversion as base project to all projects so that SOVERSION
+ is set to the correct version number in the GNU makefiles
+
+Thu Dec 30 13:24:16 2004 Chris Cleeland <cleeland@ociweb.com>
+
+ * CIAO version 0.4.3 released.
+
+Local Variables:
+add-log-time-format: current-time-string
+End:
diff --git a/TAO/CIAO/ChangeLogs/ChangeLog-04b b/TAO/CIAO/ChangeLogs/ChangeLog-04b
new file mode 100644
index 00000000000..233cfed69fc
--- /dev/null
+++ b/TAO/CIAO/ChangeLogs/ChangeLog-04b
@@ -0,0 +1,2250 @@
+Tue Dec 28 19:50:06 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * Release:
+
+ Updated the name of the target for generating the textual
+ version of CIAO-INSTALL.html file.
+
+Sat Dec 25 20:55:55 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * Release:
+
+ Added INSTALL target which generates textual version of
+ CIAO-INSTAll.html for the release.
+
+Sat Dec 25 15:01:40 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * CIDLC/ExecImplSourceGenerator.cpp:
+
+ Got rid of unused environment variable warnings in the generated
+ code.
+
+Wed Dec 22 06:53:30 2004 Chad Elliott <elliott_c@ociweb.com>
+
+ * tests/CIDL/CodeGen/CodeGen.mpc:
+
+ Make sure that CodeGen_stub gets built before CodeGen_exec.
+
+Tue Dec 21 11:29:03 2004 Gan Deng <gan.deng@vanderbilt.edu>
+
+ * tools/Segment_Timer/Segment_Timer.h
+
+ Increased the value of the macro MAX_READINGS, since the
+ current value is too small and caused core dump for even
+ 50 connections. Thanks Roland Schmmack <Roland.Schimmack@gmx.de>
+ for reporting this bug!
+
+Mon Dec 20 17:27:01 2004 Gan Deng <gan.deng@vanderbilt.edu>
+
+ * DAnCE/ciao/CCM_Core.mpc
+ * ciao/Deployment_Core.idl
+ * ciao/NodeApplication_Impl.cpp
+ * ciao/NodeApplication_Impl.h
+ * ciao/NodeApplication_Impl.inl
+
+ Reverted changes back because of the check-in mistake I just made.
+
+Mon Dec 20 16:32:54 2004 Nanbor Wang <nanbor@cse.wustl.edu>
+
+ * DAnCE/Config_Handlers/Config_Handlers.mpc: Added include path to
+ self for XSC_Config_Handlers project..
+
+Wed Dec 15 13:48:44 2004 Chad Elliott <elliott_c@ociweb.com>
+
+ * DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp:
+
+ Get rid of build warnings from gcc 3.3.
+
+Tue Nov 30 21:41:58 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * CIDLC/ServantSourceGenerator.cpp (namespace):
+
+ More use of ACE_NEW_THROW_EX instead of ACE_NEW_RETURN.
+
+Tue Nov 30 21:03:00 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * CIDLC/ServantSourceGenerator.cpp (namespace):
+
+ Another use of ACE_NEW_THROW_EX instead of ACE_NEW_RETURN.
+
+Tue Nov 30 20:39:26 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * CIDLC/ServantSourceGenerator.cpp (namespace):
+
+ Used ACE_NEW_THROW_EX instead of ACE_NEW_RETURN.
+
+Tue Nov 30 20:22:19 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * CIDLC/ServantSourceGenerator.cpp (namespace):
+
+ Fixes for VC6.
+
+Wed Nov 24 09:47:58 2004 Chad Elliott <elliott_c@ociweb.com>
+
+ * examples/OEP/Display/NavDisplayGUI_exec/DetailView.cpp:
+
+ Added static_cast from double to int to avoid build warnings from
+ g++.
+
+Wed Nov 17 17:46:44 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * examples/Hello/Receiver/Receiver.idl:
+
+ Added 'uses multiple' receptacle to test code generation
+ and compilation.
+
+Sat Nov 13 18:04:36 2004 Jaiganesh B <jai@dre.vanderbilt.edu>
+
+ * DAnCE/examples/Hello/Hello_Base/Hello_Base.idl:
+ * DAnCE/examples/Hello/Hello_Base/Hello_Base.mpc:
+ * DAnCE/examples/Hello/Hello_Base/Hello_Base_stub_export.h:
+ * DAnCE/examples/Hello/Hello_Base/Hello_Base_svnt_export.h:
+ * DAnCE/examples/Hello/Receiver/Receiver.cidl:
+ * DAnCE/examples/Hello/Receiver/Receiver.idl:
+ * DAnCE/examples/Hello/Receiver/Receiver.mpc:
+ * DAnCE/examples/Hello/Receiver/Receiver_exec.cpp:
+ * DAnCE/examples/Hello/Receiver/Receiver_exec.h:
+ * DAnCE/examples/Hello/Receiver/Receiver_exec_export.h:
+ * DAnCE/examples/Hello/Receiver/Receiver_stub_export.h:
+ * DAnCE/examples/Hello/Receiver/Receiver_svnt_export.h:
+ * DAnCE/examples/Hello/Sender/Sender.cidl:
+ * DAnCE/examples/Hello/Sender/Sender.idl:
+ * DAnCE/examples/Hello/Sender/Sender.mpc:
+ * DAnCE/examples/Hello/Sender/Sender_exec.cpp:
+ * DAnCE/examples/Hello/Sender/Sender_exec.h:
+ * DAnCE/examples/Hello/Sender/Sender_exec_export.h:
+ * DAnCE/examples/Hello/Sender/Sender_stub_export.h:
+ * DAnCE/examples/Hello/Sender/Sender_svnt_export.h:
+ * DAnCE/examples/Hello/Sender/starter.cpp:
+ * DAnCE/examples/Hello/descriptors/Deployment.xsd:
+ * DAnCE/examples/Hello/descriptors/Domain.cdd:
+ * DAnCE/examples/Hello/descriptors/Hello.cdp:
+ * DAnCE/examples/Hello/descriptors/Hello.cid:
+ * DAnCE/examples/Hello/descriptors/Hello.cpd:
+ * DAnCE/examples/Hello/descriptors/Hello.pcd:
+ * DAnCE/examples/Hello/descriptors/Libraries.iad:
+ * DAnCE/examples/Hello/descriptors/Receiver.ccd:
+ * DAnCE/examples/Hello/descriptors/Receiver.cid:
+ * DAnCE/examples/Hello/descriptors/Receiver.cpd:
+ * DAnCE/examples/Hello/descriptors/Receiver_Exec.iad:
+ * DAnCE/examples/Hello/descriptors/Receiver_Stub.iad
+ * DAnCE/examples/Hello/descriptors/Receiver_Svnt.iad:
+ * DAnCE/examples/Hello/descriptors/Sender.ccd:
+ * DAnCE/examples/Hello/descriptors/Sender.cid:
+ * DAnCE/examples/Hello/descriptors/Sender.cpd:
+ * DAnCE/examples/Hello/descriptors/Sender_Exec.iad:
+ * DAnCE/examples/Hello/descriptors/Sender_Stub.iad:
+ * DAnCE/examples/Hello/descriptors/Sender_Svnt.iad:
+ * DAnCE/examples/Hello/descriptors/XMI.xsd:
+ * DAnCE/examples/Hello/descriptors/hello.dat:
+ * DAnCE/examples/Hello/descriptors/package.tpd:
+
+ Added another version of the Hello example
+ in the DanCE/examples directory.
+
+ This example will use the DanCE framework for
+ deploying the components used in the example.
+
+Sat Nov 13 13:17:48 2004 Gan Deng <dengg@dre.vanderbilt.edu>
+
+ * NEWS
+
+ Added the Real-time Event Channel integration plan into
+ the NEWS file.
+
+Fri Nov 12 06:21:03 2004 Chad Elliott <elliott_c@ociweb.com>
+
+ * tests/RTCCM/Priority_Test/Controllers/Pulser.h:
+ * tests/RTCCM/Priority_Test/Controllers/Pulser.cpp:
+
+ Changed the open and close method of the Pulser class to match
+ the signature of the ACE_Task_Base.
+
+Thu Nov 11 17:17:48 2004 Arvind S. Krishna <arvindk@dre.vanderbilt.edu>
+
+ * ciao/Servant_Activator.cpp:
+ * DAnCE/examples/BasicSP/BMDisplay/BMDisplay_exec.cpp:
+ * DAnCE/examples/BasicSP/BMClosedED/BMClosedED_exec.cpp:
+ * DAnCE/examples/BasicSP/BMDevice/BMDevice_exec.cpp:
+ * docs/tutorial/Hello/hello_exec.cpp:
+ Fixed warnings in the scoreboard from RH8 NoInline build
+
+ Thu Nov 11 11:24:05 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * CIDLC/ServantSourceGenerator.cpp:
+
+ In the generated servant method populate_port_tables(),
+ added the line 'ACE_ENV_ARG_NOT_USED;' to avoid an
+ unused parameter warning if there happens to be no
+ populating to be done in this genrated method.
+
+Thu Nov 11 10:50:45 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * CIDLC/ExecImplSourceGenerator.cpp:
+
+ Fixed incorrect generation of environment arg macro.
+ Thanks to Chad Elliott <elliott_c@ociweb.com> for
+ pointing out the mistake.
+
+Thu Nov 11 09:46:58 2004 Chad Elliott <elliott_c@ociweb.com>
+
+ * performance-tests/Protocols/Receiver/Receiver.mpc:
+ * performance-tests/Protocols/Sender/Sender.mpc:
+ * tests/RTCCM/DiffServ/Controller/Controller.mpc:
+
+ Added requires += exceptions for these projects.
+
+ * performance-tests/Protocols/Sender/Sender_exec.cpp:
+
+ Removed ACE_CHECK's which caused compilation errors when
+ exceptions=0 was set.
+
+Thu Nov 11 14:40:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * DAnCE/ciao/Servant_Activator.cpp:
+ * docs/tutorial/Hello/hello_exec.cpp:
+ Fixed unused parameter warnings in emulated exception build
+
+Tue Nov 9 14:20:31 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * CIDLC/ServantSourceGenerator.cpp:
+
+ Fixed incorrect code generation for home factory operations.
+ Thanks to Chad Elliott <elliott_c@ociweb.com> for pointing
+ out the mistake. This fixes [BUGID:1977].
+
+Mon Nov 8 12:58:24 2004 Chad Elliott <elliott_c@ociweb.com>
+
+ * DAnCE/tests/NodeApplicationTest/NodeAppTest.mpc:
+
+ Fixed build ordering to match library requirements.
+
+ * ciao/StandardConfigurator_Impl.h:
+
+ Removed the StandardConfigurator_Impl:: prefix on the configure
+ method (gcc 3.4.1 did not like it).
+
+Fri Nov 5 09:55:28 2004 Arvind S. Krishna <arvindk@dre.vanderbilt.edu>
+
+ * performance-tests/Benchmark/RoundTrip/client.cpp:
+
+ The svc.conf file passed in to the client was not being passed
+ to the ORB as ACE::Get_Opt ate up the argument before being
+ passed to the client ORB. This fixes this error at the client
+ side temporarily by initializing the ORB before parsing the
+ arguments. Thanks to Abhi <abhi@qualcomm.com> for reporting
+ this.
+
+Thu Nov 4 09:31:29 2004 Jaiganesh B <jai@dre.vanderbilt.edu>
+
+ * DAnCE/RepositoryManager/Update_Plan.cpp:
+
+ Made changes to fix some build warnings.
+ Thanks to Chad Elliot <elliott_c@ociweb.com> for reporting
+ this warning.
+
+Wed Nov 3 16:32:54 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * CIDLC/ExecutorMappingGenerator.cpp:
+
+ Added generation of newline before each operation
+ parameter so each one will be on a separate line.
+ It was discovered that the VC 7.1 lexer truncates lines
+ longer than 1024 characters.
+
+Wed Nov 3 22:32:18 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * CIDLC/ServantSourceGenerator.cpp (namespace):
+
+ VC6 error fixes. Grr...!
+
+Wed Nov 3 12:38:21 2004 Jaiganesh B <jai@dre.vanderbilt.edu>
+
+ * DAnCE/RepositoryManager/Update_Plan.cpp:
+ * DAnCE/RepositoryManager/Update_Plan.h:
+
+ Made changes to handle multiple component instances
+ deployment.
+
+Tue Nov 2 17:26:42 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * CIDLC/ServantHeaderGenerator.cpp:
+ * CIDLC/ServantSourceGenerator.cpp:
+
+ Fixed the emitters for supported operations to include
+ abstract interfaces in their traversals.
+
+Tue Nov 2 09:59:15 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * CIDLC/ServantGenerator.cpp:
+ * CIDLC/ServantHeaderGenerator.cpp:
+
+ Fixed some regular expressions, used to generate the servant
+ header file ifdef guard and export macros, to recognize the
+ file extension .cdl in addition to the existing patterns for
+ .cidl and .idl. These particular regular expressions were
+ overlooked in the checkin of
+
+ Thu Sep 30 11:03:20 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+Tue Nov 2 04:45:44 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * CIDLC/ServantSourceGenerator.cpp:
+
+ Addressing compile errors in Borland. Thanks to Johnny for the
+ suggestion.
+
+Mon Nov 1 15:09:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * VERSION:
+ Fixed description and mailing lists to use
+
+Fri Oct 29 17:18:51 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * CIDLC/ServantSourceGenerator.cpp (namespace):
+
+ Fixed some weird VC6 issues reported by Theckla
+ Louchios<theckla.louchiois@lmco.com>.
+
+Fri Oct 29 10:44:52 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * DAnCE/RepositoryManager/Repository_Manager.cpp;
+
+ Cosmetic changes.
+
+Mon Oct 25 07:31:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * DAnCE/RepositoryManager/Repository_Manager.cpp:
+ * DAnCE/RepositoryManager/Repository_Manager_Impl.cpp:
+ Use ACE auto_ptr instead of std::auto_ptr to fix compile problems
+ with vc6.
+
+Fri Oct 22 11:49:25 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/Config_Handlers/Config_Handlers.mpc:
+
+ Reversed this change "Thu Oct 21 18:37:12 2004 Gan Deng
+ <dengg@dre.vanderbilt.edu>"
+
+Fri Oct 22 08:16:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * tests/RTCCM/DiffServ/Controller/Controller.mpc:
+ Added DiffServ_Stub to the libs part, this should fix the link errors
+ in the CBX Static Release build
+
+Fri Oct 22 07:51:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * tools/IDL3_to_IDL2/TAO_IDL3_TO_IDL2_BE_Export.h:
+ Used ACE_AS_STATIC_LIBS to check whether we need to build a DLL
+ or not, TAO_AS_STATIC_LIBS was used, but this project isn't
+ dependent on TAO, just on ACE
+
+Thu Oct 21 18:37:12 2004 Gan Deng <dengg@dre.vanderbilt.edu>
+
+ * DAnCE/Config_Handlers/Config_Handlers.mpc
+
+ Put the xerces-c library into "lib +=" to avoid
+ linking to the wrong library.
+
+Wed Oct 13 06:37:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * tests/RTCCM/Priority_Test/Workers/Worker.mpc
+ * tests/RTCCM/Priority_Test/Controllers/Controller.mpc:
+ Added Priority_Test_stub to the libs, this should fix the link errors
+ in the borland builds
+
+ * tests/CIDL/CodeGen/CodeGen.mpc:
+ Added CIDL_Basic_stub to the libs, this should fix the link errors
+ in the borland builds
+
+Tue Oct 12 09:07:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * performance-tests/Benchmark/Multi_Threaded/Multi_Threaded.mpc:
+ Removed / at the end of the includes part, this should fix the
+ compile error in the Borland builds
+
+Mon Oct 11 23:41:16 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * examples/OEP/BasicSP/BMDisplay/BMDisplay.mpc:
+ * examples/OEP/Display/GPS/GPS.mpc:
+ * examples/OEP/Display/NavDisplay/NavDisplay.mpc:
+ * examples/OEP/Display/RateGen/RateGen.mpc:
+
+ Fixed typos that broke the builds.
+
+Mon Oct 11 11:02:41 2004 Boris Kolpackov <boris@dre.vanderbilt.edu>
+
+ * CCF/CCF/CodeGenerationKit/IndentationIDL.hpp:
+
+ Put double new line after `}'.
+
+ * CIDLC/cidlc.cpp:
+
+ Print build date and time in --version.
+
+Mon Oct 11 10:08:48 2004 Gan Deng <gan.deng@vanderbilt.edu>
+
+ * DAnCE/examples/BasicSP/Readme.html
+
+ Update the README file for running the example.
+
+Sun Oct 10 10:45:48 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * performance-tests/Benchmark/RoundTrip/RoundTrip.mpc:
+ * performance-tests/Benchmark/RoundTripClient/RoundTripClient.mpc:
+
+ Fix for some typos which broke the daily builds.
+
+Sun Oct 10 02:47:21 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/tests/Config_Handlers/CompImplDesc_Handler_Test.cpp:
+ * DAnCE/tests/Config_Handlers/CompIntrDesc_Handler_Test.cpp:
+ * DAnCE/tests/Config_Handlers/CompPkgDesc_Handler_Test.cpp:
+ * DAnCE/tests/Config_Handlers/Domain_Handler_Test.cpp:
+ * DAnCE/tests/Config_Handlers/Handler_Test.cpp:
+ * DAnCE/tests/Config_Handlers/Handler_Test.h:
+ * DAnCE/tests/Config_Handlers/IAD_Handler_Test.cpp:
+ * DAnCE/tests/Config_Handlers/PC_Handler_Test.cpp:
+ * DAnCE/tests/Config_Handlers/Plan_Handler_Test.cpp:
+
+ Fix for MSVC6 build errors. They compile fine on MSVC6 now. I am
+ just hoping that this fix also addresses compile errors in
+ Borland. The Borland compilation errors are also similar to the
+ MSVC6 errors and hence the hope!
+
+Sun Oct 10 00:21:39 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/examples/BasicSP/BMDisplay/BMDisplay.mpc:
+
+ Fixed a typo.
+
+Sat Oct 9 23:43:52 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/Config_Handlers/Plan_Handler.cpp:
+
+ Fixed a compilation error in Borland builds.
+
+ * DAnCE/examples/BasicSP/BMClosedED/BMClosedED.mpc:
+ * DAnCE/examples/BasicSP/BMDisplay/BMDisplay.mpc:
+ * DAnCE/examples/BasicSP/EC/EC.mpc:
+ * examples/OEP/BasicSP/BMClosedED/BMClosedED.mpc:
+ * examples/OEP/BasicSP/BMDevice/BMDevice.mpc:
+ * examples/OEP/BasicSP/BMDisplay/BMDisplay.mpc:
+ * examples/OEP/BasicSP/EC/EC.mpc:
+ * examples/OEP/Display/GPS/GPS.mpc:
+ * examples/OEP/Display/NavDisplay/NavDisplay.mpc:
+ * examples/OEP/Display/RateGen/RateGen.mpc:
+ * performance-tests/Benchmark/RoundTrip/RoundTrip.mpc:
+ * performance-tests/Benchmark/RoundTripClient/RoundTripClient.mpc:
+
+ Added missing libraries. They have been wrong for a very long
+ time. Thanks to Borland builds for catching these. I am sure
+ there are a few more and I will allow one more build to catch
+ them.
+
+ * examples/OEP/Display/RateGen/RateGen_exec.cpp:
+ * examples/OEP/Display/RateGen/RateGen_exec.h:
+
+ Fixed warnings due to hidden virtual functions.
+
+
+Sat Oct 9 14:29:41 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * CIDLC/ServantSourceGenerator.cpp:
+
+ Added a .in () to the _var variable used in push_event ().
+
+ * DAnCE/Config_Handlers/XercesString.cpp:
+ * DAnCE/Config_Handlers/XercesString.h:
+
+ Removed an unnecessary operator== which was confusing some
+ compilers.
+
+ * DAnCE/RepositoryManager/RepositoryManager_Impl.cpp:
+ * DAnCE/RepositoryManager/Repository_Manager.cpp:
+
+ Changed the wrong exceptions that were being thrown.
+
+ * DAnCE/examples/BasicSP/EC/EC_exec.cpp:
+ * DAnCE/examples/BasicSP/EC/EC_exec.h:
+ * examples/OEP/BasicSP/EC/EC_exec.cpp:
+ * examples/OEP/BasicSP/EC/EC_exec.h:
+
+ The declaration of open () and close () was hiding the base
+ class methods. Changed the name of the functions.
+
+ The above changes should fix part of the errors from the Borland
+ builds.
+
+Thu Oct 7 03:17:54 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * docs/schema/Basic_Deployment_Data.xsd:
+ * docs/schema/ccd.xsd:
+ * docs/schema/cdp.xsd:
+
+ Updated to be more compliant with the DnC spec.
+
+Wed Oct 6 16:10:27 2004 Will Otte <wotte@dre.vanderbilt.edu>
+
+ * docs/schema/ciaopolicy.xsd:
+
+ Finished filling out the policy schema.
+
+Sun Oct 03 09:38:03 2004 Nanbor Wang <nanbor@cse.wustl.edu>
+
+ * DAnCE/Config_Handlers/XSCRT/Elements.hpp:
+ * DAnCE/Config_Handlers/XSCRT/ExtendedTypeInfo.hpp:
+ * DAnCE/Config_Handlers/XSCRT/Parser.hpp:
+ * DAnCE/Config_Handlers/XSCRT/Traversal.hpp:
+ * DAnCE/Config_Handlers/XSCRT/XMLSchema.hpp:
+ * DAnCE/Config_Handlers/pcd.hpp:
+ * DAnCE/Config_Handlers/iad.hpp:
+ * DAnCE/Config_Handlers/cpd.hpp:
+ * DAnCE/Config_Handlers/cid.hpp:
+ * DAnCE/Config_Handlers/cdp.hpp:
+ * DAnCE/Config_Handlers/cdd.hpp:
+ * DAnCE/Config_Handlers/Deployment.hpp:
+ * DAnCE/Config_Handlers/Basic_Deployment_Data.hpp:
+ * DAnCE/Config_Handlers/ccd.hpp:
+ * DAnCE/Config_Handlers/toplevel.hpp: Change to include XSCRT
+ headers as "user libraries" instead of <system libraries>.
+
+Sun Oct 03 09:18:05 2004 Nanbor Wang <nanbor@cse.wustl.edu>
+
+ * DAnCE/tests/Config_Handlers/handler_test.mpb: Changed to use the
+ xerces base project that Johnny added. The base project
+ correctly uses lit_libs to include xerces.
+
+Thu Sep 30 14:49:23 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * CIDLC/ExecImplHeaderGenerator.cpp:
+ * CIDLC/ExecImplSourceGenerator.cpp:
+ * CIDLC/ServantHeaderGenerator.cpp:
+
+ Removed identifiers of unused args.
+
+ * CIDLC/RepositoryIdGenerator.cpp:
+
+ Extended generator to compute repo ids for
+ homes and components.
+
+ * CIDLC/DescriptorGenerator.cpp:
+
+ Changed code to use the context value set by the expanded
+ repo id generator and removed code to compute repo id
+ in this generator.
+
+Thu Sep 30 11:03:20 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * CIDLC/ExecImplGenerator.cpp:
+ * CIDLC/ExecImplHeaderGenerator.cpp:
+ * CIDLC/ExecImplSourceGenerator.cpp:
+ * CIDLC/ExecutorMappingGenerator.cpp:
+ * CIDLC/ServantGenerator.cpp:
+ * CIDLC/ServantHeaderGenerator.cpp:
+ * CIDLC/ServantSourceGenerator.cpp:
+
+ Added handling of file extension .cdl, as found in
+ spec documents.
+
+Thu Sep 30 09:16:52 2004 Nanbor Wang <nanbor_a_txcorp_._com>
+
+ * CCF/Config.rules: Added new definitions to actually add the
+ boost and utility related directives into compiler/linker
+ flags.
+
+Thu Sep 30 09:55:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * DAnCE/Config_Handlers/DnC_Dump_T.h:
+ Fixed fuzz error
+
+Wed Sep 29 17:30:25 2004 Irfan Pyarali <irfan@oomworks.com>
+
+ * performance-tests/Protocols:
+
+ - Minor changes were made to the Sender to in lieu of some
+ interface changes.
+
+ - run_test.pl was changed so that a simple version of the test
+ can be executed.
+
+ * performance-tests/Protocols/Sender/Sender.mpc:
+ * performance-tests/Protocols/Receiver/Receiver.mpc:
+
+ Removed "dummy" label so that it is included in nightly builds.
+
+ * performance-tests/Protocols/descriptors/CIAO_Installation_Data.ini:
+ * performance-tests/Protocols/Sender/Sender.mpc:
+ * performance-tests/Protocols/descriptors/Receiver.csd:
+ * performance-tests/Protocols/descriptors/Receiver.ssd:
+ * performance-tests/Protocols/descriptors/Sender.csd:
+ * performance-tests/Protocols/descriptors/Sender.ssd:
+
+ Sender_* was changed to Protocols_Sender_* and Receiver_* was
+ changed to Protocols_Receiver_*.
+
+ * performance-tests/Protocols/Sender/Sender_exec.cpp:
+ * performance-tests/Protocols/Sender/Sender.mpc:
+
+ Custom_Network_Priority_Mapping.cpp was included directly. If
+ listed as a source file that is not in the current directory,
+ mpc mucks the object file location.
+
+ * performance-tests/Protocols/descriptors/Receiver.csd:
+ * performance-tests/Protocols/descriptors/Receiver.ssd:
+ * performance-tests/Protocols/descriptors/Sender.csd:
+ * performance-tests/Protocols/descriptors/Sender.ssd:
+
+ Hello was changed to Protocols.
+
+ * tests/RTCCM/DiffServ/descriptors/CIAO_Installation_Data.ini:
+ * tests/RTCCM/DiffServ/Sender/Sender.mpc:
+ * tests/RTCCM/DiffServ/descriptors/Receiver.csd:
+ * tests/RTCCM/DiffServ/descriptors/Receiver.ssd:
+ * tests/RTCCM/DiffServ/descriptors/Sender.csd:
+ * tests/RTCCM/DiffServ/descriptors/Sender.ssd:
+
+ Sender_* was changed to DiffServ_Sender_* and Receiver_* was
+ changed to DiffServ_Receiver_*.
+
+ * tests/RTCCM/DiffServ/Sender/Sender_exec.cpp:
+ * tests/RTCCM/DiffServ/Sender/Sender.mpc:
+
+ Custom_Network_Priority_Mapping.cpp was included directly. If
+ listed as a source file that is not in the current directory,
+ mpc mucks the object file location.
+
+ * tests/RTCCM/DiffServ/descriptors/Receiver.csd:
+ * tests/RTCCM/DiffServ/descriptors/Receiver.ssd:
+ * tests/RTCCM/DiffServ/descriptors/Sender.csd:
+ * tests/RTCCM/DiffServ/descriptors/Sender.ssd:
+
+ Hello was changed to DiffServ.
+
+ * tests/RTCCM/DiffServ/Controller/Controller.mpc:
+
+ "requires" directive was incorrect. Correct directive is
+ "after".
+
+Wed Sep 29 19:20:19 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/examples/BasicSP/BMClosedED/BMClosedED_svnt.cpp:
+ * DAnCE/examples/BasicSP/EC/EC_svnt.cpp:
+ * DAnCE/examples/BasicSP/EC/EC_svnt.h:
+
+ Removed them from the main trunk.
+
+Wed Sep 29 14:39:29 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ The dump function was too complicated not compiling on many
+ platforms cleanly. This effort is to simplify the dump functions
+ so that we can compile on many platforms.
+
+ * DAnCE/Config_Handlers/DnC_Dump.cpp:
+ * DAnCE/Config_Handlers/DnC_Dump.h:
+
+ Moved template functions out of the class.
+
+ * DAnCE/Config_Handlers/DnC_Dump_T.cpp:
+ * DAnCE/Config_Handlers/DnC_Dump_T.h:
+
+ New files for the template functions.
+
+ * DAnCE/Config_Handlers/Dump_Obj.cpp:
+ * DAnCE/Config_Handlers/Dump_Obj.h:
+
+ Utility functions have been moved here.
+
+ * DAnCE/Config_Handlers/Config_Handlers.mpc:
+ New files added to the build.
+
+Wed Sep 29 07:51:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * ciao/Servant_Activator.h:
+ * DAnCE/ciao/Servant_Activator.h:
+ Added missing prama pop
+
+Wed Sep 29 07:09:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * DAnCE/Config_Handlers/Utils.h:
+ Added missing include of ace/post.h
+
+Mon Sep 27 17:57:08 2004 Krishnakumar B <kitty@dre.vanderbilt.edu>
+
+ * DAnCE/examples/BasicSP/BasicSP.mpc:
+ * DAnCE/examples/BasicSP/BMClosedED/BMClosedED.mpc:
+ * DAnCE/examples/BasicSP/BMDevice/BMDevice.mpc:
+ * DAnCE/examples/BasicSP/BMDisplay/BMDisplay.mpc:
+ * DAnCE/examples/BasicSP/EC/EC.mpc:
+
+ Fixed the MPC files to refer to the version of DAnCE libraries
+ instead of the old CIAO libraries.
+
+Mon Sep 27 22:41:52 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * CIDLC/ServantSourceGenerator.cpp:
+
+ Remove calling Home_Servant_impl_Base () directly.
+
+ * DAnCE/ciao/Home_Servant_Impl_Base.cpp:
+ * DAnCE/ciao/Home_Servant_Impl_Base.h:
+ * ciao/Home_Servant_Impl_Base.cpp:
+ * ciao/Home_Servant_Impl_Base.h:
+
+ Provided a default constructor with explicit keyword. This
+ should help VC6 and Borland compilers to compile the generated
+ servants just fine.
+
+Mon Sep 27 19:45:04 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * CIDLC/ServantSourceGenerator.cpp:
+
+ Remove calling Context_Impl_Base () and Servant_Impl_Base ()
+ directly.
+
+ * DAnCE/ciao/Context_Impl_Base.cpp:
+ * DAnCE/ciao/Context_Impl_Base.h:
+ * DAnCE/ciao/Servant_Impl_Base.cpp:
+ * DAnCE/ciao/Servant_Impl_Base.h:
+ * ciao/Context_Impl_Base.cpp:
+ * ciao/Context_Impl_Base.h:
+ * ciao/Servant_Impl_Base.cpp:
+ * ciao/Servant_Impl_Base.h:
+
+ Added a explicit default constructor so that they are not called
+ implicitly when derived classes are instantiated.
+
+ * DAnCE/DomainApplicationManager/Deployment_Configuration.h:
+
+ Checking in the change mentioned before just now, since it
+ fell trhough the cracks.
+
+Mon Sep 27 15:41:20 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/DomainApplicationManager/Deployment_Configuration.h:
+
+ Export the class out for Win32 builds.
+
+ * DAnCE/ExecutionManager/ExecutionManager.mpc:
+
+ Removed a strange character frm the mpc file.
+
+Mon Sep 27 15:26:46 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp:
+ * DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.h:
+
+ Added a new exception specification to correct an error in BCB6
+ builds.
+
+ * DAnCE/ciao/CCM_Core.mpc:
+
+ Deployment_stub should link with CIAO_DnC_Client.
+
+Mon Sep 27 12:56:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * DAnCE/RepositoryManager/RepositoryManager.mpc:
+ * DAnCE/Config_Handlers/Config_Handlers.mpc:
+ Instead of adding all xerces stuff to the project itself, inherit
+ from the new xerces base project
+
+Mon Sep 27 12:02:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * DAnCE/NodeManager/NodeDaemon.mpc:
+ Instead of adding ifr_client to libs, use the
+ corresponding base projects
+
+Mon Sep 27 11:54:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * DAnCE/Config_Handlers/Config_Handlers.mpc:
+ * DAnCE/DomainApplicationManager/DomainApplicationManager.mpc:
+ * DAnCE/ExecutionManager/ExecutionManager.mpc:
+ Instead of adding the valuetype and ifr_client to libs, use the
+ corresponding base projects
+
+Mon Sep 27 08:54:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * DAnCE/examples/BasicSP/EC/EC_exec.cpp:
+ Added missing ACE_TRY_CHECK
+
+Mon Sep 27 08:03:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * ciao/Context_Impl_Base.cpp:
+ Use false instead of FALSE.
+
+Wed Sep 22 17:46:14 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * CIDLC/ServantSourceGenerator.cpp:
+
+ Removed unused parameter identifiers and fixed the order of some
+ class member initializations.
+
+Tue Sep 21 13:28:40 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * docs/value_factory_registration.html:
+
+ New documentation file, describing the behavior of the CIDL
+ compiler with respect to automatic generation of code to
+ register valuetype factories for eventtypes referenced by
+ 'consumes' declarations in a component.
+
+Tue Sep 21 13:04:39 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * CIDLC/ServantGenerator.cpp:
+ * CIDLC/ServantSourceGenerator.cpp:
+
+ Added code to check an eventtype used as an event consumer
+ in a component for the presence of an operation or
+ factory. If either is found, code generation for registering
+ the associated _init class with the container's ORB is skipped.
+ Also added command line option to toggle off generation of
+ the factory registration in all cases. Thanks to
+ Vasili Goutas <vasili@goutas.de> for the posting to the ciao-users
+ mailing list that prompted us to make the CIDL compiler
+ smarter and more friendly with regard to this feature.
+
+Tue Sep 21 13:00:33 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * CCF/CCF/IDL3/IDL3.vcproj:
+
+ Added new files create by Boris for eventtype factory support.
+
+ * CCF/CCF/IDL3/SemanticGraph/EventType.cpp:
+
+ Fixed search-and-replace error in EventTypeFactory constructor
+ that had it inheriting from itself.
+
+Tue Sep 21 11:08:20 2004 Boris Kolpackov <boris@dre.vanderbilt.edu>
+
+ * CCF/CCF/IDL2/SemanticGraph/ValueType.cpp:
+ * CCF/CCF/IDL2/SemanticGraph/ValueType.hpp:
+ * CCF/CCF/IDL2/Traversal/ValueType.hpp:
+ * CCF/CCF/IDL3/Parser.cpp:
+ * CCF/CCF/IDL3/Parser.hpp:
+ * CCF/CCF/IDL3/SemanticAction.hpp:
+ * CCF/CCF/IDL3/SemanticAction/EventTypeFactory.hpp:
+ * CCF/CCF/IDL3/SemanticAction/Factory.hpp:
+ * CCF/CCF/IDL3/SemanticAction/Impl/EventTypeFactory.cpp:
+ * CCF/CCF/IDL3/SemanticAction/Impl/EventTypeFactory.hpp:
+ * CCF/CCF/IDL3/SemanticAction/Impl/Factory.cpp:
+ * CCF/CCF/IDL3/SemanticAction/Impl/Factory.hpp:
+ * CCF/CCF/IDL3/SemanticGraph/EventType.cpp:
+ * CCF/CCF/IDL3/SemanticGraph/EventType.hpp:
+ * CCF/CCF/IDL3/Traversal/EventType.hpp:
+
+ Added support for eventtype factories.
+
+Tue Sep 21 07:39:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * DAnCE/ciao/Context_Impl_Base.cpp:
+ Use false instead of FALSE.
+
+Mon Sep 20 18:47:47 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/Config_Handlers/Config_Handlers.mpc:
+
+ Use lit_libs for xercesc as suggested by Chad Elliott.
+
+ * performance-tests/Protocols/Sender/Sender.idl:
+
+ Fixed the IDL to compile with the latest changes to IDL
+ compiler.
+
+Mon Sep 20 18:43:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * performance-tests/Benchmark/RoundTripServer/RoundTripServer.mpc:
+ Added strategies as base project
+
+Mon Sep 20 11:37:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * DAnCE/ciao/StandardConfigurator_Impl.h:
+ Removed not needed qualifier, and fixed incorrect Id tag
+
+Sun Sep 19 19:12:22 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/ciao/Deployment.idl:
+
+ Fixed variable name that differ by case from the data type.
+
+Fri Sep 17 16:46:32 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * CIDLC/CIDLC.sln:
+
+ Added the 5 projects from CCF.sln so the CIDL compiler can be
+ built from scratch in a single MSVC 7.1 Solution.
+
+Fri Sep 17 08:27:57 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/ciao/Context_Impl_Base.cpp:
+ * ciao/Context_Impl_Base.cpp:
+
+ Use false instead of FALSE. This should fix compile errors in
+ debian full reactor builds.
+
+Fri Sep 17 13:22:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * performance-tests/Benchmark/RoundTripServer/RoundTripServer.mpc:
+ Use ciao_server as base
+
+Thu Sep 16 10:15:04 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * DAnCE/ciao/Servant_Impl_Base.h:
+
+ Added inheritance to Servant_Impl_Base of
+ POA_Components::CCMObject to bring it in sync with the
+ version in regular CIAO/ciao.
+
+ * DAnCE/ciao/Servant_Impl_T.h:
+
+ Made inheritance of Servant_Impl_Base virtual, to bring it
+ in sync with the version in regular CIAO/ciao.
+
+Thu Sep 16 08:44:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * DAnCE/ciao/Servant_Activator.cpp:
+ * CIAO/ciao/Servant_Activator.cpp:
+ Fixed compile errors in Borland build
+
+Tue Sep 14 20:43:31 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * ciao/Context_Impl_Base.h:
+ * DAnCE/ciao/Context_Impl_Base.h:
+
+ Moved a sufficiently substantial included file above the
+ #pragma once directive, so that some compilers will not
+ complain that it's obsolete.
+
+Tue Sep 14 15:02:24 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * DAnCE/ciao/Context_Impl_Base.cpp:
+ * DAnCE/ciao/Context_Impl_Base.h:
+ * DAnCE/ciao/Context_Impl_T.cpp:
+ * DAnCE/ciao/Context_Impl_T.h:
+ * DAnCE/ciao/Home_Servant_Impl_Base.cpp:
+ * DAnCE/ciao/Home_Servant_Impl_Base.h:
+ * DAnCE/ciao/Home_Servant_Impl_T.cpp:
+ * DAnCE/ciao/Home_Servant_Impl_T.h:
+ * ciao/Context_Impl_Base.cpp:
+ * ciao/Context_Impl_Base.h:
+ * ciao/Context_Impl_T.cpp:
+ * ciao/Context_Impl_T.h:
+ * ciao/Home_Servant_Impl_Base.cpp:
+ * ciao/Home_Servant_Impl_Base.h:
+ * ciao/Home_Servant_Impl_T.cpp:
+ * ciao/Home_Servant_Impl_T.h:
+
+ New files, duplicated in CIAO/ciao and
+ CIAO/DAnCE/ciao, containing base classes
+ for the CIDL-compiler-generated context
+ and home servant classes. A template class
+ sits in the hierarchy between the generated
+ class and its skeleton base class (in the
+ case of the home servant) or its executor
+ base (in the case of the context). The
+ template class also inherits from a
+ non-template class which is used to hold
+ members and operations not using any template
+ parameters.
+
+ * CIDLC/ServantHeaderGenerator.cpp:
+ * CIDLC/ServantSourceGenerator.cpp:
+ * DAnCE/ciao/CCM_Core.mpc:
+ * DAnCE/ciao/Servant_Impl_Base.cpp:
+ * DAnCE/ciao/Servant_Impl_Base.h:
+ * DAnCE/ciao/Servant_Impl_T.cpp:
+ * DAnCE/ciao/Servant_Impl_T.h:
+ * ciao/CCM_Core.mpc:
+ * ciao/Servant_Impl_Base.cpp:
+ * ciao/Servant_Impl_Base.h:
+ * ciao/Servant_Impl_T.cpp:
+ * ciao/Servant_Impl_T.h:
+
+ Modified existing files to correspond with the
+ new files described above and:
+
+ - Added implementations for the component servant
+ operations provide_facet(), get_named_facets(),
+ get_consumer() and get_named_consumers().
+
+ - Added inheritance of CCMObject to the non-template
+ base class, to enable operations in the template
+ base class, which used no template parameters but
+ which were there only to be in the inheritance
+ hierarchy from skeleton to generated servant, to
+ be moved to the non-template base class, and
+ thus not be reinstantiated with every new type.
+
+ - Moved operations from generated code to one of
+ the two base classes.
+
+Mon Sep 13 13:18:33 2004 Gan Deng <gan.deng@vanderbilt.edu>
+
+ * RepositoryManager/Update_Plan.h
+
+ Fixed a waring in Windows build by changing "class" to "struct"
+ in forward declaration.
+
+ * examples/BasicSP/BasicSP.mpc
+ * examples/BasicSP/BMClosedED/BMClosedED.mpc
+ * examples/BasicSP/BMDevice/BMDevice.mpc
+ * examples/BasicSP/BMDisplay/BMDisplay.mpc
+ * examples/BasicSP/EC/EC.mpc
+
+ Changed the output stub, servant, and executor library names
+ for all the components in BasicSP example. The reason is
+ becasue all the DnC descriptors are tightly coupled with the
+ output library names. I might come back switch this change
+ back since this will conflict with the BasicSP example in
+ CIAO_ROOT/examples.
+
+Mon Sep 13 13:07:33 2004 Gan Deng <gan.deng@vanderbilt.edu>
+
+ * DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp
+
+ Fixed a bug inside create_connections () method.
+
+Mon Sep 13 15:16:33 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/tests/NodeApplicationTest/run_test.pl:
+ * DAnCE/tests/NodeApplicationTest/run_test_ex.pl:
+ * DAnCE/tests/NodeApplicationTest/run_test_simple.pl:
+
+ Fixed the paths in the scripts.
+
+Mon Sep 13 07:11:06 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/ciao/Port_Activator.h:
+ * DAnCE/ciao/Servant_Activator.cpp:
+ * ciao/Port_Activator.h:
+ * ciao/Servant_Activator.cpp:
+
+ Fixes for MSVC++ compilation errors. Inspite of being careful I
+ introduced a couple of VC++ anathemas.
+
+Mon Sep 13 06:16:31 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/ciao/Container_Base.cpp:
+ * ciao/Container_Base.cpp:
+
+ Fixed wrong ACE_CHECK usage. This should fix compilation errors
+ in Full_Reactors build.
+
+Mon Sep 13 04:20:44 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/ciao/CCM_Core.mpc:
+
+ Removed iorinterceptor and objreftemplate from CIAO_DnC_Server
+ project. No reason to believe that they need thes. This should
+ hopefully remove the warnings in our daily builds.
+
+ * examples/Hello/Sender/Sender_exec.cpp:
+
+ Added a simple debug statement.
+
+ * performance-tests/Benchmark/Benchmark.mpc:
+
+ Tried fixing the link errors on the scoreboard.
+
+Mon Sep 13 03:50:08 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/ciao/CCM_Core.mpc:
+ * DAnCE/ciao/Container_Base.cpp:
+ * DAnCE/ciao/Container_Base.h:
+ * DAnCE/ciao/Container_Base.inl:
+ * DAnCE/ciao/Port_Activator.cpp:
+ * DAnCE/ciao/Port_Activator.h:
+ * DAnCE/ciao/Port_Activator_T.cpp:
+ * DAnCE/ciao/Port_Activator_T.h:
+ * DAnCE/ciao/Servant_Activator.cpp:
+ * DAnCE/ciao/Servant_Activator.h:
+
+ Replicated changes to DAnCE. DAnCE testing hasn't been completed
+ yet.
+
+Sun Sep 12 22:10:38 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * CIDLC/ServantHeaderGenerator.cpp:
+ * CIDLC/ServantSourceGenerator.cpp:
+
+ Changes to the CIDL which uses the servant and port activators
+ checked in now.
+
+Mon Sep 13 03:00:52 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ To overcome the long standing problem in DAnCE, we are now making
+ the facet and consumer servants to be on demand activatable. This
+ would make sure that application level ports are not activated
+ until used. This should help address the problems between DAnCE
+ and existing way of doing things. These changes should be useful
+ even after old CIAO is removed since we want to give existing
+ component applications the same activation semantics with DAnCE.
+
+ This checkin addresses old CIAO. DAnCE and CIDLC changes will come
+ in soon.
+
+ * ciao/Servant_Activator.cpp:
+ * ciao/Servant_Activator.h:
+
+ New files for facet and consumer activations. We now have a
+ seperate servant activator for facet and consumer ports. The
+ servant activator acts like a factory activating the right port
+ activators which can create the right servant for every port.
+
+ * ciao/Port_Activator.cpp:
+ * ciao/Port_Activator.h:
+ * ciao/Port_Activator_T.cpp:
+ * ciao/Port_Activator_T.h:
+
+ Concrete port activators for every port.
+
+ * ciao/CCM_Core.mpc:
+
+ Added the new files for building.
+
+ * ciao/Container_Base.cpp:
+ * ciao/Container_Base.h:
+ * ciao/Container_Base.inl:
+
+ Changes to the Container to use the above servant activator. The
+ continer creates the servant activator and sets that in the POA
+ meant for facet and consumers.
+
+Fri Sep 10 23:08:15 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/ciao/Container_Base.cpp:
+ * DAnCE/ciao/Container_Base.h:
+ * ciao/Container_Base.cpp:
+ * ciao/Container_Base.h:
+
+ Reverted this change "Sat Sep 11 03:35:24 2004 Balachandran
+ Natarajan <bala@dre.vanderbilt.edu>"
+
+Fri Sep 10 22:53:58 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/ciao/CCM_Core.mpc:
+ * ciao/CCM_Core.mpc:
+
+ Linked with TAO_Utils library
+
+Sat Sep 11 03:35:24 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/ciao/Container_Base.cpp:
+ * DAnCE/ciao/Container_Base.h:
+ * ciao/Container_Base.cpp:
+ * ciao/Container_Base.h:
+
+ Removed install_servant () since it is not used.
+
+Fri Sep 10 22:28:45 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * CIDLC/ServantSourceGenerator.cpp:
+
+ Changes to accomodate the accessor renaming.
+
+Sat Sep 11 03:22:06 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * ciao/Container_Base.cpp:
+ * ciao/Container_Base.h:
+ * ciao/Container_Base.inl:
+ * DAnCE/ciao/Container_Base.cpp:
+ * DAnCE/ciao/Container_Base.h:
+ * DAnCE/ciao/Container_Base.inl:
+
+ Made a few changes. They are
+
+ . Added a second POA into the container. One of the POA's will
+ host the component and the other POA will host the facet and
+ consumer servants. Obviously the two POA's have different sets
+ of policies. The new POA is primarily targeted to activate
+ facet and consumer servants on demand.
+
+ . Renamed the accessor to the ORB and POA. Made them const
+ methods
+
+ . Improved documentation and a number of costeic changes.
+
+
+ * DAnCE/RepositoryManager/Repository_Manager.cpp:
+ * DAnCE/RepositoryManager/Update_Plan.cpp:
+ * DAnCE/RepositoryManager/Update_Plan.h:
+
+ BUnch of cosmetic changes to be conformant with ACE+TAI coding
+ guidelines.
+
+ * DAnCE/ciao/Servant_Impl_Base.cpp:
+ * DAnCE/ciao/Servant_Impl_T.cpp:
+ * ciao/Servant_Impl_Base.cpp:
+ * ciao/Servant_Impl_T.cpp:
+
+ Fixed simple compilation errors and warnings.
+
+Thu Sep 9 17:07:59 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * tests/IDL3/Events/Abstract/Abstract.idl:
+
+ Uncommented IDL testing multiple inheritance of eventtypes.
+
+Thu Sep 9 10:30:22 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * DAnCE/ciao/Container_Base.cpp:
+ * DAnCE/ciao/Container_Base.h:
+ * ciao/Container_Base.cpp:
+
+ Added generate_reference() method to DAnCE version of
+ Container_Base, and fixed ACE_CHECK macro mistake in
+ both versions.
+
+Wed Sep 8 11:52:45 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * DAnCE/ciao/Servant_Impl_Base.h:
+ * DAnCE/ciao/Servant_Impl_Base.cpp:
+
+ Updated files with changes made to the corresponding files
+ in regular CIAO/ciao.
+
+Tue Sep 7 22:14:43 2004 Ossama Othman <ossama@dre.vanderbilt.edu>
+
+ * CCF/CCF/IDL2/SemanticGraph/Elements.hpp:
+ * CCF/CCF/IDL2/Traversal/Elements.hpp:
+ * CIDLC/ExecutorMappingGenerator.cpp:
+
+ Fixed unused argument warnings.
+
+Tue Sep 7 15:48:19 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * DAnCE/ciao/Servant_Impl_Base.cpp:
+ * ciao/Servant_Impl_Base.cpp:
+
+ Cosmetic changes.
+
+ * CIDLC/ServantHeaderGenerator.cpp:
+ * CIDLC/ServantSourceGenerator.cpp:
+ * DAnCE/ciao/Servant_Impl_T.cpp:
+ * DAnCE/ciao/Servant_Impl_T.h:
+ * ciao/Servant_Impl_T.cpp:
+ * ciao/Servant_Impl_T.h:
+
+ Moved several methods from the generated servant class to the
+ template Servant_Impl base class.
+
+Tue Sep 7 10:44:10 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * CIDLC/CIDLC.mpc:
+ * CIDLC/CIDLC.vcproj:
+ * CIDLC/RepositoryIdGenerator.cpp:
+ * CIDLC/RepositoryIdGenerator.hpp:
+ * CIDLC/ServantHeaderGenerator.cpp:
+ * CIDLC/ServantSourceGenerator.cpp:
+ * CIDLC/cidlc.cpp:
+
+ - Updated the RepositoryIdGenerator and re-added the source
+ and header files to the build. This generator creates
+ repository ids for interfaces and eventtypes, and stores
+ them internally in a context variable for later access
+ in code generation. It also handles modifications to the
+ repository ids stemming from 'typeprefix' or 'typeid'
+ declarations.
+
+ - Added generation of 'provide_<facet name>_i' and
+ 'get_consumer_<event consumer name>_i' methods in the servant,
+ which create dummy object references and store them in the
+ appropriate port table in the servant base class.
+
+ - Re-implemented the generated 'provide_<facet name>' and
+ 'get_consumer_<event consumer name>' methods. They now
+ use the container's POA to activate the dummy objects
+ created by the corresponding _i methods described above.
+ The activation takes place upon the first outside access
+ of these objects. If an object has already been activated,
+ it will simply be found in its port table and returned.
+ Thanks to Bala for the prototype code for this feature.
+
+ * ciao/Container_Base.cpp:
+ * ciao/Container_Base.h:
+
+ Added 'generate_reference' utility method called by the
+ '_i' methods described above.
+
+ * ciao/Servant_Impl_Base.cpp:
+ * ciao/Servant_Impl_Base.h:
+
+ Added 'lookup_facet' and 'lookup_consumer' methods used in
+ generated servant code to determine if a desired object has
+ been activated already (and added to a port table) or not.
+
+Mon Aug 30 12:52:28 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * performance-tests/Benchmark/Benchmark.mpc:
+
+ Fixes for link errors in the daily builds
+
+Sun Aug 29 19:25:21 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * tools/XML_Helpers/XMLHelpers.mpc:
+
+ Fix for link errors in Debian_Core builds.
+
+Sun Aug 29 19:02:42 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/ciao/CCM_Core.mpc:
+
+ Added valuetype seperately to the Deployment_svnt project.
+
+Sun Aug 29 18:10:13 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/examples/BasicSP/BMClosedED/BMClosedED_svnt.h:
+ * DAnCE/examples/BasicSP/BMDevice/BMDevice_svnt.h:
+ * DAnCE/examples/BasicSP/BMDisplay/BMDisplay_svnt.h:
+ * DAnCE/examples/BasicSP/EC/EC_svnt.h:
+
+ These files should not be in the repository.
+
+Sat Aug 28 18:44:00 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/examples/BasicSP/BMDevice/BMDevice.mpc:
+
+ Fixed a compile erros in the daily builds.
+
+Sat Aug 28 09:22:15 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/examples/BasicSP/BasicSP.mpc:
+ * DAnCE/examples/BasicSP/BMClosedED/BMClosedED.mpc:
+ * DAnCE/examples/BasicSP/BMDevice/BMDevice.mpc:
+ * DAnCE/examples/BasicSP/BMDisplay/BMDisplay.mpc:
+ * DAnCE/examples/BasicSP/EC/EC.mpc:
+
+ Fixed the project names and shared librray names so that they
+ don't collide with the regual BasicSP test. Ideally there
+ shouldn't be any duplicate code. I waill talk to Gan about
+ this.
+
+Thu Aug 26 16:45:10 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * tests/IDL3/Lookup/README:
+ * tests/IDL3/Lookup/lookup_test.idl:
+ * tests/IDL3/Lookup/lookup_test.mpc:
+
+ New files, a test for the IDL compiler lookup of declarations
+ in base interfaces, valuetypes, components, and homes, and
+ in supported interfaces, referenced by the local name in the
+ derived IDL type. Thanks to Boris Kolpackov
+ <boris@dre.vanderbilt.edu> for reporting the bug and for
+ providing an example IDL file that illustrates the various
+ cases.
+
+Thu Aug 26 13:24:40 2004 Gan Deng <gan.deng@vanderbilt.edu>
+
+ * DAnCE/examples/BaiscSP/*.*:
+
+ Created above directory and subdictories to add an example for
+ using DAnCE.
+
+Thu Aug 26 12:28:40 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * CIDLC/CIDLC.vcproj:
+
+ Added missing files to project.
+
+Thu Aug 26 11:25:39 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * tests/CIDL/CodeGen/CodeGen.mpc:
+
+ Changed dependency from ciao_server to ciao_servant.
+
+Wed Aug 25 11:28:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * DAnCE/Config_Handlers/DnC_Dump.h:
+ Removed not needed qualifier
+
+ * DAnCE/RepositoryManager/RepositoryManager_Impl.h:
+ Removed not needed ; after namespace closure
+
+Wed Aug 25 11:24:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * DAnCE/Config_Handlers/Config_Error_Handler.h:
+ Removed not needed ; after namespace closure
+
+Tue Aug 24 11:31:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * DAnCE/Config_Handlers/Config.h:
+ Removed not needed ; after namespace closure
+
+Mon Aug 23 21:47:10 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/Config_Handlers/XSCRT/Elements.hpp:
+ * DAnCE/Config_Handlers/XSCRT/Elements.ipp:
+ * DAnCE/Config_Handlers/XSCRT/Elements.tpp:
+ * DAnCE/Config_Handlers/XSCRT/ExtendedTypeInfo.hpp:
+ * DAnCE/Config_Handlers/XSCRT/ExtendedTypeInfo.ipp:
+ * DAnCE/Config_Handlers/XSCRT/Parser.hpp:
+ * DAnCE/Config_Handlers/XSCRT/Parser.ipp:
+ * DAnCE/Config_Handlers/XSCRT/Parser.tpp:
+ * DAnCE/Config_Handlers/XSCRT/Traversal.hpp:
+ * DAnCE/Config_Handlers/XSCRT/Traversal.ipp:
+ * DAnCE/Config_Handlers/XSCRT/Traversal.tpp:
+ * DAnCE/Config_Handlers/XSCRT/XMLSchema.hpp:
+ * DAnCE/Config_Handlers/XSCRT/XMLSchema.ipp:
+ * DAnCE/Config_Handlers/XSCRT/XMLSchema.tpp:
+
+ Added XSCRT 0.0.4 into the repository to compile the handlers.
+
+Mon Aug 23 21:32:50 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * CIDLC/TypeNameEmitter.cpp:
+
+ Fixed a compiler error in the daily builds showing up from a
+ non-const declaration of a char * for extraction into an Any.
+
+ * DAnCE/Config_Handlers/Config.h:
+
+ Deployment.h has been renamed to Config.h
+
+ * DAnCE/Config_Handlers/Process_Element.h:
+ * DAnCE/Config_Handlers/Basic_Handler.h:
+
+ Include Config.h
+
+ * DAnCE/Config_Handlers/Basic_Deployment_Data.cpp:
+ * DAnCE/Config_Handlers/Basic_Deployment_Data.hpp:
+ * DAnCE/Config_Handlers/Deployment.cpp:
+ * DAnCE/Config_Handlers/Deployment.hpp:
+ * DAnCE/Config_Handlers/ccd.cpp:
+ * DAnCE/Config_Handlers/ccd.hpp:
+ * DAnCE/Config_Handlers/cdd.cpp:
+ * DAnCE/Config_Handlers/cdd.hpp:
+ * DAnCE/Config_Handlers/cdp.cpp:
+ * DAnCE/Config_Handlers/cdp.hpp:
+ * DAnCE/Config_Handlers/cid.cpp:
+ * DAnCE/Config_Handlers/cid.hpp:
+ * DAnCE/Config_Handlers/cpd.cpp:
+ * DAnCE/Config_Handlers/cpd.hpp:
+ * DAnCE/Config_Handlers/iad.cpp:
+ * DAnCE/Config_Handlers/iad.hpp:
+ * DAnCE/Config_Handlers/pcd.cpp:
+ * DAnCE/Config_Handlers/pcd.hpp:
+ * DAnCE/Config_Handlers/toplevel.cpp:
+ * DAnCE/Config_Handlers/toplevel.hpp:
+ * DAnCE/Config_Handlers/Config_Handlers.mpc:
+
+ Generated code from XSC which is going to be used for the next
+ generation handlers. They have been added in the MPC but guarded
+ with requires += dummy_label since they give lot of warnings.
+
+Mon Aug 23 08:02:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * tools/IDL3_to_IDL2/IDL3_to_IDL2.mpc:
+ Fixed typo in vpath
+
+Sun Aug 22 22:23:12 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/Config_Handlers/Config_Handlers.mpc:
+
+ Fixed VC6 compilation errors.
+
+Mon Aug 23 01:07:24 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/ciao/StandardConfigurator_Impl.cpp:
+ * ciao/StandardConfigurator_Impl.cpp:
+
+ Fixed unused variable warnings.
+
+Sun Aug 22 21:28:34 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/ciao/Servant_Impl_Base.cpp:
+ * DAnCE/ciao/Servant_Impl_Base.h:
+ * DAnCE/ciao/StandardConfigurator_Impl.cpp:
+ * DAnCE/ciao/StandardConfigurator_Impl.h:
+ * DAnCE/ciao/CCM_Core.mpc:
+
+ Added these files to the DAnCE builds. These were from the
+ following change
+
+ Tue Aug 17 14:29:00 2004 Jules White <jules@dre.vanderbilt.edu>
+
+ * ciao/CCM_Core.mpc:
+ * ciao/Servant_Impl_Base.cpp:
+ * ciao/Servant_Impl_Base.h:
+ * ciao/StandardConfigurator_Impl.cpp:
+ * ciao/StandardConfigurator_Impl.h:
+
+ Fixed compilation errors in builds where exceptions have been
+ turned off.
+
+Sun Aug 22 22:11:49 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * tools/IDL3_to_IDL2/idl3_to_idl2_visitor.cpp:
+
+ Fixed redeclaration error in VC6 builds.
+
+Sun Aug 22 20:08:10 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * CIDLC/ServantSourceGenerator.cpp:
+
+ Fixed unused variable warnings in the generated code.
+
+Sun Aug 22 17:06:44 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * tools/IDL3_to_IDL2/be_global.cpp:
+ * tools/IDL3_to_IDL2/idl3_to_idl2_visitor.cpp:
+
+ Fixed unused variable warnings in our daily builds.
+
+Sun Aug 22 16:26:01 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * performance-tests/Protocols/Receiver/Receiver.mpc:
+
+ Fixed a compile error in our daily builds.
+
+Fri Aug 20 16:01:55 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * tools/IDL3_to_IDL2/IDL3_to_IDL2.mpc:
+
+ Fixed typo in source file name.
+
+Fri Aug 20 10:39:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * DAnCE/ciao/Container_Base.h:
+ Fixed compile errors
+
+Fri Aug 20 07:32:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * ciao/Container_Base.h:
+ Fixed compile errors
+
+Thu Aug 19 17:13:22 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * CIDLC/Literals.cpp:
+ * CIDLC/Literals.hpp:
+ * CIDLC/ServantHeaderGenerator.cpp:
+ * CIDLC/ServantSourceGenerator.cpp:
+ * CIDLC/TypeNameEmitter.cpp:
+ * CIDLC/TypeNameEmitter.hpp:
+
+ Added code generation for the set_attributes() method called
+ on the servant by the deployer.
+
+Thu Aug 19 16:09:45 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/ciao/Container_Base.h:
+ * ciao/Container_Base.h:
+
+ Fixed a compilation error reported by Roland Schimmack <Roland
+ dot Schimmack at gmx dot de>
+
+Thu Aug 19 08:44:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * PROBLEM-REPORT-FORM:
+ Ask for the default.features file used by MPC.
+
+Wed Aug 18 14:21:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * DAnCE/NodeManager/NodeDaemon_Impl.h:
+ Added missing pragma pop
+
+Tue Aug 17 14:29:00 2004 Jules White <jules@dre.vanderbilt.edu>
+
+ * CIAO/ciao/Servant_Impl_Base.h:
+ * CIAO/ciao/Servant_Impl_Base.cpp:
+ Added a method to create and return the StandardConfigurator for a component.
+ Overrided _default_POA so that it returns the POA of the servant's container.
+
+ * CIAO/ciao/StandardConfigurator_Impl.h:
+ * CIAO/ciao/StandardConfigurator_Impl.cpp:
+ Created an implementation of the StandardConfigurator interface.
+
+Mon Aug 16 22:15:52 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/tests/NodeApplicationTest/RoundTrip_exec.cpp:
+ * DAnCE/tests/NodeApplicationTest/RoundTrip_exec.h:
+
+ Fixed compilation errors in builds where exceptions have been
+ turned off.
+
+Mon Aug 16 22:09:52 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * performance-tests/Protocols/Sender/Sender.mpc:
+
+ Fix for link errors on the scoreboard.
+
+Mon Aug 16 21:01:49 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * performance-tests/Benchmark/Benchmark.mpc:
+
+ Fix for link errors on the scoreboard.
+
+Mon Aug 16 16:44:13 2004 J.T. Conklin <jtc@acorntoolworks.com>
+
+ * CIAO/DAnCE/ExecutionManager/Execution_Manager.cpp:
+ * CIAO/DAnCE/NodeManager/Node_Daemon.cpp:
+ * CIAO/DAnCE/ciao/CCM_Container.idl:
+ * CIAO/ciao/CCM_Container.idl:
+ Changed #include "orbsvcs/orbsvcs/..." to #include "orbsvcs/...".
+
+Mon Aug 16 16:36:49 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * tools/IDL3_to_IDL2/idl3_to_idl2_visitor.cpp:
+
+ Changed conversion for eventtypes to generate, instead of the
+ original eventtype, a valuetype with Components::EventBase added
+ to its inheritance list. This is completely equivalent to the
+ original eventtype and has the advantage that it eliminates the
+ need to use the -Sm option (disabling CCM equivalent IDL
+ preprocessing) when running the IDL compiler on a converted
+ file. Thanks to Bala Natarajan <bala@dre.vanderbilt.edu> for
+ the suggestion.
+
+Mon Aug 16 14:14:15 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * tests/IDL3/ImpliedIDL/Components/Receptacles/ICReceptacles.idl:
+
+ Do not do the compile the implied data part of the IDL.
+
+Mon Aug 16 12:42:59 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/Config_Handlers/CAD_Handler.h:
+ * DAnCE/Config_Handlers/CEPE_Handler.h:
+ * DAnCE/Config_Handlers/CPK_Handler.h:
+ * DAnCE/Config_Handlers/CPR_Handler.h:
+ * DAnCE/Config_Handlers/Cap_Handler.h:
+ * DAnCE/Config_Handlers/CompIntrDesc_Handler.h:
+ * DAnCE/Config_Handlers/CompPkgDesc_Handler.h:
+ * DAnCE/Config_Handlers/DT_Handler.h:
+ * DAnCE/Config_Handlers/Domain_Handler.h:
+ * DAnCE/Config_Handlers/ERE_Handler.h:
+ * DAnCE/Config_Handlers/IAD_Handler.h:
+ * DAnCE/Config_Handlers/ID_Handler.h:
+ * DAnCE/Config_Handlers/IR_Handler.h:
+ * DAnCE/Config_Handlers/MID_Handler.h:
+ * DAnCE/Config_Handlers/NIA_Handler.h:
+ * DAnCE/Config_Handlers/PCI_Handler.h:
+ * DAnCE/Config_Handlers/PC_Handler.h:
+ * DAnCE/Config_Handlers/Plan_Handler.h:
+ * DAnCE/Config_Handlers/Process_Element.h:
+ * DAnCE/Config_Handlers/Property_Handler.h:
+ * DAnCE/Config_Handlers/RS_Handler.h:
+ * DAnCE/Config_Handlers/RUK_Handler.h:
+ * DAnCE/Config_Handlers/Requirement_Handler.h:
+ * DAnCE/Config_Handlers/SPK_Handler.h:
+ * DAnCE/Config_Handlers/SP_Handler.h:
+ * DAnCE/Config_Handlers/TPD_Handler.h:
+ * DAnCE/Config_Handlers/Utils.h:
+
+ Use ciao/ to include any header files from core ciao.
+
+ * DAnCE/ciao/CCM_Core.mpc:
+ * DAnCE/tests/Config_Handlers/handler_test.mpb:
+ * DAnCE/tests/NodeApplicationTest/NodeAppTest.mpc:
+
+ Use the right libraries for linking. This should probably
+ address some of the core build errors on the scoreboard.
+
+Sun Aug 15 18:32:49 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * tools/IDL3_to_IDL2/IDL3_to_IDL2.mpc:
+ * tools/IDL3_to_IDL2/TAO_IDL3_TO_IDL2_BE_Export.h:
+ * tools/IDL3_to_IDL2/be_extern.h:
+ * tools/IDL3_to_IDL2/be_global.cpp:
+ * tools/IDL3_to_IDL2/be_global.h:
+ * tools/IDL3_to_IDL2/be_helper.cpp:
+ * tools/IDL3_to_IDL2/be_helper.h:
+ * tools/IDL3_to_IDL2/be_init.cpp:
+ * tools/IDL3_to_IDL2/be_produce.cpp:
+ * tools/IDL3_to_IDL2/be_sunsoft.cpp:
+ * tools/IDL3_to_IDL2/be_sunsoft.h:
+ * tools/IDL3_to_IDL2/idl3_to_idl2_visitor.cpp:
+ * tools/IDL3_to_IDL2/idl3_to_idl2_visitor.h:
+ * tools/IDL3_to_IDL2/README:
+
+ New files implementing a tool that inputs an IDL file with IDL3
+ constructs and generates another IDL file with the IDL3
+ constructs converted to the spec-defined IDL2 equivalents. Using
+ the generated file instead of the original one in applications
+ will allow the developer to reference the IDL2 equivalent types
+ in application IDL, rather than just in C++ code as before.
+ The generated IDL file has a '_IDL2' suffix added to the
+ original file name just before the '.idl' extension.
+
+Sun Aug 15 09:17:59 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * performance-tests/Benchmark/Benchmark.mpc:
+
+ Added missing libraries as reported by our daily builds.
+
+Sun Aug 15 09:12:36 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/tests/Config_Handlers/handler_test.mpb:
+
+ Fixed the handlers to link in CIAO_DnC_Container too.
+
+Sat Aug 14 14:44:24 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/Config_Handlers/Config_Handlers.mpc:
+
+ Do not include /usr/lib to be in libpaths. This is odd and
+ shouldn't be there at the application level. Applications should
+ only be bothered about using $XERCESCROOT and the like. If the
+ application doesn't specify the compiler, linker and the loader
+ knows where to pick things from.
+
+Sat Aug 14 14:07:53 2004 Aniruddha Gokhale <a.gokhale@vanderbilt.edu>
+
+ * DAnCE/NodeManager/Node_Daemon.cpp:
+
+ Included "ace/os_include/os_netdb.h since otherwise the
+ MAXHOSTNAMELEN constant was not found.
+
+Sat Aug 14 15:36:28 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/NodeManager/NodeDaemon_Impl.cpp:
+ * DAnCE/NodeManager/NodeDaemon_Impl.h:
+ * DAnCE/NodeManager/Node_Daemon.cpp:
+
+ Cosmetic fixes for fuzz errors and other simple fixes for the
+ daily builds.
+
+ * DAnCE/NodeManager/README:
+
+ Added a README file in the directory.
+
+Sat Aug 14 04:20:44 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/ExecutionManager/ExecutionManager_Impl.h:
+ * DAnCE/ciao/ComponentsC.h:
+ * ciao/ComponentsC.h:
+
+ Removed a trailing ; at the end of namespace closure. g++-3.4.1
+ starts getting seizures once it locates a trailing ;.
+
+Sat Aug 14 03:29:18 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/tests/Config_Handlers/handler_test.mpb:
+ * DAnCE/tests/NodeApplicationTest/NodeAppTest.mpc:
+ * tools/XML_Helpers/XMLHelpers.mpc:
+
+ Tried fixing some warnings and errors in the builds. I am not
+ able to reproduce it and so I am taking a blind shot.
+
+Thu Aug 12 14:14:00 Jules White <jules@dre.vanderbilt.edu>
+
+ * docs/schema/cdp.xsd:
+ * docs/schema/Modified_Deployment.xsd:
+
+ Changed the schema so that it was more compliant with the spec.
+
+Thu Aug 12 15:25:44 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/NEWS:
+ * DAnCE/ciao/Servant_Impl_T.cpp:
+ * DAnCE/ciao/Servant_Impl_T.h:
+
+ Updates at this
+
+Thu Aug 12 11:35:44 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/ciao/Servant_Impl_T.cpp:
+ * DAnCE/ciao/Servant_Impl_T.h:
+
+ Propogating the changes from "Mon Aug 9 11:38:04 2004 Jeff
+ Parsons <j.parsons@vanderbilt.edu>" to DAnCE.
+
+ * DAnCE/tests/Config_Handlers/Handler_Test.cpp:
+ * DAnCE/tests/Config_Handlers/Handler_Test.h:
+
+ Cleaned up things so that it is more portable.
+
+ * DAnCE/tests/Config_Handlers/handler_test.mpb:
+
+ Put Handler_Test as a template file.
+
+Thu Aug 12 16:20:19 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/tests/Config_Handlers/Handler_Test.cpp:
+ * DAnCE/tests/Config_Handlers/Handler_Test.h:
+ * DAnCE/tests/Config_Handlers/Handler_Test.i:
+
+ Fixed fuzz errors.
+
+Wed Aug 11 22:37:31 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/NodeManager/Node_Daemon.cpp:
+ * tests/RTCCM/DiffServ/Sender/Sender_exec.cpp:
+
+ Fixed fuzz errors.
+
+Wed Aug 11 22:15:26 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/tests/NodeApplicationTest/NodeAppTest.mpc:
+
+ Fixed yet another problem with MPC file. Should by now compile
+ clean on the scoreboard. Let us see hwo it goes.
+
+Wed Aug 11 20:08:58 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * CIDLC/CIDLC.mpc:
+
+ Fixed library paths. This seems to have been busted.
+
+Wed Aug 11 14:38:00 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/ExecutionManager/Execution_Manager.cpp:
+
+ Made certain parts exception safe and fixed fuzz errors.
+
+ * tests/CIDL/CodeGen/CodeGen.mpc:
+
+ The MPC file was busted which lead to errors in the daily
+ builds.
+
+ * tests/RTCCM/DiffServ/Receiver/Receiver.mpc:
+
+ Fixed errors in he MPC file.
+
+ * tests/RTCCM/DiffServ/Sender/Sender_exec.cpp:
+
+ Fixed fuzz errors.
+
+Wed Aug 11 12:45:09 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * CIDLC/CIDLC.mpc:
+
+ Added new files startting with Exec* into the CIDLC project.
+
+ * CIAOTAO.mwc:
+
+ Added tests section to the above file.
+
+Wed Aug 11 15:08:44 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * tests/CIDL/CodeGen/CodeGen.mpc:
+
+ Fix for the compilation errors in the daily builds.
+
+Mon Aug 9 11:38:04 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * ciao/Servant_Impl_T.cpp:
+ * ciao/Servant_Impl_T.h:
+
+ Moved the body of the destructor and the same_component()
+ method from the generated servant class to the base class.
+
+Sat Aug 7 17:55:59 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * DAnCE/tests/NodeApplicationTest/NodeAppTest.mpc:
+
+ Prevented compilation errors if CIDL is not built.
+
+Sat Aug 7 16:43:45 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * tests/CIDL/CodeGen/CodeGen.mpc:
+ * tests/IDL3/Homes/Basic/Basic.mpc:
+
+ Changed the name of the stub library and project names. There
+ was a clash in project and library names.
+
+Thu Aug 5 17:42:56 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * CIDLC/ExecImplGenerator.cpp:
+ * CIDLC/ExecImplGenerator.hpp:
+ * CIDLC/ExecImplHeaderGenerator.cpp:
+ * CIDLC/ExecImplHeaderGenerator.hpp:
+ * CIDLC/ExecImplSourceGenerator.cpp:
+ * CIDLC/ExecImplSourceGenerator.hpp:
+
+ New files, which generate empty executor implementation
+ classes (with spec-defined operations filled in and
+ IDL operations and attributes marked for the developer
+ to fill in). This generation is optional, triggered by
+ the CIDL compiler command line option --gen-exec-impl.
+ Two other options --exec-hdr-file-suffix and --exec-src-file-suffix,
+ can override the default generated file extensions of
+ _exec.h and _exec.cpp. Tao others, --exec-hdr-file-regex and
+ --exec-src-file-regex, allow replacement of default generated
+ filenames by pattern matching with regular expressions.
+ And finally, two more, --exec-export-include,
+ overrides the default generated export macro header file,
+ and --exec-export-macro, overrides the default generated
+ export macro for the executor implementation file.
+
+ * CIDLC/Literals.cpp:
+ * CIDLC/Literals.hpp:
+ * CIDLC/ServantGenerator.cpp:
+ * CIDLC/ServantHeaderGenerator.cpp:
+ * CIDLC/ServantHeaderGenerator.hpp:
+ * CIDLC/ServantSourceGenerator.cpp:
+ * CIDLC/TypeNameEmitter.cpp:
+ * CIDLC/TypeNameEmitter.hpp:
+ * CIDLC/cidlc.cpp:
+
+ - Added generation of (unimplemented) home finder
+ operations.
+
+ - Filled gaps and organized the command line options
+ for servant filename suffixes and regular expressions
+ to replace default generated filenames.
+
+ - Added a new type name emitter that generates the
+ appropriate NULL return value for any type.
+
+ * tests/CIDL/CodeGen/Basic.idl:
+ * tests/CIDL/CodeGen/Basic_stub_export.h:
+ * tests/CIDL/CodeGen/Basic_svnt_export.h:
+ * tests/CIDL/CodeGen/CodeGen.cidl:
+ * tests/CIDL/CodeGen/CodeGen.idl:
+ * tests/CIDL/CodeGen/CodeGen.mpc:
+ * tests/CIDL/CodeGen/CodeGen_exec_export.h:
+ * tests/CIDL/CodeGen/CodeGen_stub_export.h:
+ * tests/CIDL/CodeGen/CodeGen_svnt_export.h:
+ * tests/CIDL/CodeGen/README:
+
+ New test, for servant and executor implemtation code
+ generation of the CIDL compiler. This test target
+ correct code generation for many component-specific
+ features of IDL - catching operations and attributes
+ for supported interfaces, operations and attributes
+ for parents of supported interfaces, home operations
+ from base homes, inherited home factory and finder
+ operations, etc. The object of the test is to check
+ that the generated code builds and links successfully.
+
+Thu Aug 5 15:49:10 2004 Ossama Othman <ossama@dre.vanderbilt.edu>
+
+ * DAnCE/tests/NodeApplicationTest/RoundTrip_exec.h:
+
+ Made destructors in reference count enabled classes protected to
+ enforce proper memory management through the reference counting
+ mechansism (i.e. prevent directly calling operator delete() on
+ the reference counted object).
+
+ (cube_long):
+ * DAnCE/tests/NodeApplicationTest/RoundTrip_exec.cpp (cube_long):
+ * performance-tests/Benchmark/RoundTrip/RoundTrip_exec.h
+ (makeCall):
+ * performance-tests/Benchmark/RoundTrip/RoundTrip_exec.cpp
+ (makeCall):
+
+ Added missing emulated exception parameter. Fixes compile-time
+ errors in emulated exception builds.
+
+ * examples/OEP/Display/NavDisplayGUI_exec/NavDisplayGUI_exec.cpp
+ (ccm_activate):
+
+ Corrected emulated excepton parameter. Fixes a compile-time
+ error in emulated exception builds.
+
+ * performance-tests/Protocols/Controller/Controller.mpc:
+ * tests/RTCCM/DiffServ/Receiver/Receiver.mpc
+ (DiffServ_Receiver_exec):
+ * tests/RTCCM/DiffServ/Sender/Sender.mpc (DiffServ_Sender_exec):
+
+ Added missing "requires += exceptions". These tests will not
+ compile in emulated exception configurations.
+
+ * performance-tests/Benchmark/RoundTrip/RoundTrip_exec.cpp
+ (get_latency):
+
+ Fixed unused parameter warning in emulated exception builds.
+
+Thu Aug 5 11:48:49 2004 Ossama Othman <ossama@dre.vanderbilt.edu>
+
+ * performance-tests/Protocols/Controller/Controller.mpc:
+
+ Corrected library link order. Addresses undefined reference
+ link-time errors in static builds.
+
+ * tools/XML_Helpers/XMLHelpers.mpc (Helper_Test):
+
+ Added missing TAO_IFR_Client library to "libs" variable.
+ Addresses undefined reference link-time errors in static
+ builds.
+
+Thu Aug 5 13:28:49 2004 Will Otte <wotte@dre.vanderbilt.edu>
+
+ * docs/schema/ciaopolicy.xsd:
+
+ Schema describing ORB policy configurations.
+
+Thu Aug 5 11:56:03 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * CCF/CCF/CodeGenerationKit/IndentationImplanter.hpp:
+
+ Changed template template parameter of class Implanter from
+ "Buffer" to "BufferType" because the former was causing a
+ problem with VC 7.1 clashing with a class Buffer in another
+ file.
+
+Thu Aug 5 08:48:50 2004 Krishnakumar B <kitty@nospam.invalid.domain>
+
+ * CIAO-INSTALL.html: Updated to reflect dependency on Xerces and
+ native exceptions.
+
+Wed Aug 4 22:50:17 2004 Ossama Othman <ossama@dre.vanderbilt.edu>
+
+ * examples/Hello/Sender/Sender.mpc (Hello_Starter):
+ * performance-tests/Protocols/Controller/Controller.mpc (perf):
+ * tools/XML_Helpers/XMLHelpers.mpc (Helper_Test):
+
+ Fixed static build link-time errors caused by not linking the
+ appropriate libraries.
+
+Wed Aug 4 22:31:24 2004 Ossama Othman <ossama@dre.vanderbilt.edu>
+
+ * docs/tutorial/Hello/client.cpp (main):
+
+ Fixed typo that caused a syntax error.
+
+Wed Aug 4 17:24:18 2004 Ossama Othman <ossama@dre.vanderbilt.edu>
+
+ * examples/OEP/Display/RateGen/RateGen_exec.cpp (create):
+ * performance-tests/Benchmark/LatencyTest.cpp (makeCall):
+ * performance-tests/Benchmark/RoundTripServer/LatencyTest.cpp
+ (makeCall):
+ * tests/RTCCM/Priority_Test/Controllers/Rate_Controller.cpp
+ (create):
+ * tests/RTCCM/Priority_Test/Workers/CB_Worker_exec.cpp:
+ * tests/RTCCM/Priority_Test/Workers/IOB_Worker_exec.cpp:
+
+ Fixued unused parameter warnings.
+
+ * docs/tutorial/Hello/hello_exec.cpp:
+ * performance-tests/Benchmark/RoundTrip/RoundTrip_exec.cpp:
+
+ Fixed emulated exception usage.
+
+ Fixed unused argument warnings.
+
+ * docs/tutorial/Hello/client.cpp (main):
+ * docs/tutorial/Hello/simple_client.cpp (main):
+ * performance-tests/Benchmark/Multi_Threaded/client.cpp (main):
+ * performance-tests/Benchmark/RoundTrip/client.cpp (main):
+ * performance-tests/Benchmark/RoundTripClient/client.cpp (main):
+
+ Fixed CORBA::ORB_init() arguments in emulated exception case.
+
+ Added missing ACE_TRY_CHECK after CORBA::ORB_init() call.
+
+ * performance-tests/Benchmark/RoundTripClient/RoundTripClient_exec.cpp
+ (start):
+
+ Fixed emulated exception usage.
+
+ Added missing emulated exception parameter. Fixes a
+ compile-time error.
+
+ Fixed unused parameter warnings.
+
+ * tests/RTCCM/DiffServ/Sender/Sender_exec.cpp:
+
+ Include "ace/OS_NS_unistd.h" to pull in ACE_OS::sleep()
+ declaration.
+
+ * tests/RTCCM/Priority_Test/Controllers/Controller_exec.cpp:
+
+ Include "ace/OS_NS_stdio.h" to pull in ACE_OS::snprintf()
+ declaration.
+
+ Fixed unused parameter warnings.
+
+Wed Aug 4 16:43:43 2004 Ossama Othman <ossama@dre.vanderbilt.edu>
+
+ * DAnCE/tests/NodeApplicationTest/RoundTrip_exec.cpp:
+ * examples/OEP/Display/NavDisplayGUI_exec/NavDisplayGUI_exec.cpp
+ (push_Refresh):
+
+ Fixed emulated exception usage.
+
+ Fixed unused parameter warnings.
+
+ * examples/OEP/BasicSP/EC/EC_exec.cpp (pulse):
+
+ Added missing ACE_TRY_CHECK emulated exception macro. Fixes
+ warning about unused "ACE_TRY_LABEL" label.
+
+ * examples/OEP/Display/RateGen/client.cpp:
+
+ Include "ace/OS_NS_unistd.h" to pull in ACE_OS::sleep()
+ declaration.
+
+ * examples/Hello/Receiver/Receiver_exec.cpp (ccm_activate):
+ * examples/OEP/BasicSP/BMClosedED/BMClosedED_exec.cpp
+ (ccm_activate):
+ * examples/OEP/BasicSP/BMDevice/BMDevice_exec.cpp (ccm_activate):
+ * examples/OEP/BasicSP/BMDisplay/BMDisplay_exec.cpp
+ (ccm_activate):
+ * examples/OEP/Display/GPS/GPS_exec.cpp (get_MyLocation, posx):
+ (posy, create):
+ * examples/OEP/Display/GPS/GPS_tracing_exec.cpp (get_MyLocation):
+ (posx, posy, create):
+ * examples/OEP/Display/NavDisplay/NavDisplay_exec.cpp
+ (ccm_activate):
+ * examples/OEP/Display/NavDisplayGUI_exec/AddNavUnitCmd.cpp
+ (execute):
+ * examples/OEP/Display/NavDisplayGUI_exec/NodeItem.cpp (moveBy):
+ * examples/OEP/Display/NavDisplayGUI_exec/QuitCmd.cpp (execute):
+
+ Fixed unused parameter warnings.
+
+Wed Aug 4 11:16:47 2004 Will Otte <wotte@dre.vanderbilt.edu>
+
+ * Components/ComplexComponent/Attributes/Attributes.idl:
+ * Homes/Attributes/HomeAttributes.idl:
+ * ImpliedIDL/Components/Basic/ICBasic.idl:
+ * Homes/Finder/Finder.idl:
+ * ImpliedIDL/Components/EventSink/ICEventSink.idl:
+ * ImpliedIDL/Components/EventSource/ICEventSource.idl:
+ * ImpliedIDL/Components/Receptacles/ICReceptacles.idl:
+
+ Addressed some build errors on the Fuzz build.
+
+ * Components/ComplexComponent/Attributes/AttributesS.cpp:
+ * Components/ComplexComponent/EventSink/EventSinkS.cpp:
+ * Components/ComplexComponent/EventSource/EventSourceS.cpp:
+ * Components/ComplexComponent/Facets/FacetsS.cpp:
+ * Components/ComplexComponent/Receptacles/ReceptaclesS.cpp:
+ * Components/SimpleComponent/SimpleComponentS.cpp:
+ * Events/Abstract/AbstractS.cpp:
+ * Events/Regular/RegularS.cpp:
+ * Homes/Attributes/HomeAttributesS.cpp:
+ * Homes/Basic/BasicS.cpp:
+ * Homes/Factory/FactoryS.cpp:
+ * Homes/Finder/FinderS.cpp:
+ * Homes/Inheritance/InheritanceS.cpp:
+ * ImpliedIDL/Components/Basic/ICBasicS.cpp:
+ * ImpliedIDL/Components/EventSink/ICEventSinkS.cpp:
+ * ImpliedIDL/Components/EventSource/ICEventSourceS.cpp:
+ * ImpliedIDL/Components/Receptacles/ICReceptaclesS.cpp:
+ * ImpliedIDL/Events/EventsS.cpp:
+ * ImpliedIDL/Homes/HomesS.cpp:
+
+ Removed a bunch of generated code from the repository.
+
+Tue Aug 3 20:18:48 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * docs/schema/cid.xsd:
+ * docs/schema/Deployment.xsd:
+
+ Added some tweaks.
+
+Tue Aug 3 14:25:44 2004 Will Otte <wotte@dre.vanderbilt.edu>
+
+ * IDL3/Components/ComplexComponent/Attributes/Attributes.idl:
+ * IDL3/Components/ComplexComponent/Attributes/Attributes.mpc:
+ * IDL3/Components/ComplexComponent/Attributes/AttributesS.cpp:
+ * IDL3/Components/ComplexComponent/Attributes/Attributes_stub_export.h:
+ * IDL3/Components/ComplexComponent/Attributes/Attributes_svnt_export.h:
+ * IDL3/Components/ComplexComponent/EventSink/EventSink.idl:
+ * IDL3/Components/ComplexComponent/EventSink/EventSink.mpc:
+ * IDL3/Components/ComplexComponent/EventSink/EventSinkS.cpp:
+ * IDL3/Components/ComplexComponent/EventSink/EventSink_stub_export.h:
+ * IDL3/Components/ComplexComponent/EventSink/EventSink_svnt_export.h:
+ * IDL3/Components/ComplexComponent/EventSource/EventSource.idl:
+ * IDL3/Components/ComplexComponent/EventSource/EventSource.mpc:
+ * IDL3/Components/ComplexComponent/EventSource/EventSourceS.cpp:
+ * IDL3/Components/ComplexComponent/EventSource/EventSource_stub_export.h:
+ * IDL3/Components/ComplexComponent/EventSource/EventSource_svnt_export.h:
+ * IDL3/Components/ComplexComponent/Facets/Facets.idl:
+ * IDL3/Components/ComplexComponent/Facets/Facets.mpc:
+ * IDL3/Components/ComplexComponent/Facets/FacetsS.cpp:
+ * IDL3/Components/ComplexComponent/Facets/Facets_stub_export.h:
+ * IDL3/Components/ComplexComponent/Facets/Facets_svnt_export.h:
+ * IDL3/Components/ComplexComponent/Receptacles/Receptacles.idl:
+ * IDL3/Components/ComplexComponent/Receptacles/Receptacles.mpc:
+ * IDL3/Components/ComplexComponent/Receptacles/ReceptaclesS.cpp:
+ * IDL3/Components/ComplexComponent/Receptacles/Receptacles_stub_export.h:
+ * IDL3/Components/ComplexComponent/Receptacles/Receptacles_svnt_export.h:
+ * IDL3/Components/SimpleComponent/SimpleComponent.idl:
+ * IDL3/Components/SimpleComponent/SimpleComponent.mpc:
+ * IDL3/Components/SimpleComponent/SimpleComponentS.cpp:
+ * IDL3/Components/SimpleComponent/SimpleComponent_exec_export.h:
+ * IDL3/Components/SimpleComponent/SimpleComponent_stub_export.h:
+ * IDL3/Components/SimpleComponent/SimpleComponent_svnt_export.h:
+ * IDL3/Events/Abstract/Abstract.idl:
+ * IDL3/Events/Abstract/Abstract.mpc:
+ * IDL3/Events/Abstract/AbstractS.cpp:
+ * IDL3/Events/Abstract/Abstract_stub_export.h:
+ * IDL3/Events/Abstract/Abstract_svnt_export.h:
+ * IDL3/Events/Regular/Regular.idl:
+ * IDL3/Events/Regular/Regular.mpc:
+ * IDL3/Events/Regular/RegularS.cpp:
+ * IDL3/Events/Regular/Regular_stub_export.h:
+ * IDL3/Events/Regular/Regular_svnt_export.h:
+ * IDL3/Homes/Attributes/HomeAttributes.idl:
+ * IDL3/Homes/Attributes/HomeAttributes.mpc:
+ * IDL3/Homes/Attributes/HomeAttributesS.cpp:
+ * IDL3/Homes/Attributes/HomeAttributes_stub_export.h:
+ * IDL3/Homes/Attributes/HomeAttributes_svnt_export.h:
+ * IDL3/Homes/Basic/Basic.idl:
+ * IDL3/Homes/Basic/Basic.mpc:
+ * IDL3/Homes/Basic/BasicS.cpp:
+ * IDL3/Homes/Basic/Basic_stub_export.h:
+ * IDL3/Homes/Basic/Basic_svnt_export.h:
+ * IDL3/Homes/Factory/Factory.idl:
+ * IDL3/Homes/Factory/Factory.mpc:
+ * IDL3/Homes/Factory/FactoryS.cpp:
+ * IDL3/Homes/Factory/Factory_stub_export.h:
+ * IDL3/Homes/Factory/Factory_svnt_export.h:
+ * IDL3/Homes/Finder/Finder.idl:
+ * IDL3/Homes/Finder/Finder.mpc:
+ * IDL3/Homes/Finder/FinderS.cpp:
+ * IDL3/Homes/Finder/Finder_stub_export.h:
+ * IDL3/Homes/Finder/Finder_svnt_export.h:
+ * IDL3/Homes/Inheritance/Inheritance.idl:
+ * IDL3/Homes/Inheritance/Inheritance.mpc:
+ * IDL3/Homes/Inheritance/InheritanceS.cpp:
+ * IDL3/Homes/Inheritance/Inheritance_stub_export.h:
+ * IDL3/Homes/Inheritance/Inheritance_svnt_export.h:
+ * IDL3/ImpliedIDL/Components/Basic/ICBasic.idl:
+ * IDL3/ImpliedIDL/Components/Basic/ICBasic.mpc:
+ * IDL3/ImpliedIDL/Components/Basic/ICBasicS.cpp:
+ * IDL3/ImpliedIDL/Components/Basic/ICBasic_stub_export.h:
+ * IDL3/ImpliedIDL/Components/Basic/ICBasic_svnt_export.h:
+ * IDL3/ImpliedIDL/Components/EventSink/ICEventSink.idl:
+ * IDL3/ImpliedIDL/Components/EventSink/ICEventSink.mpc:
+ * IDL3/ImpliedIDL/Components/EventSink/ICEventSinkS.cpp:
+ * IDL3/ImpliedIDL/Components/EventSink/ICEventSink_stub_export.h:
+ * IDL3/ImpliedIDL/Components/EventSink/ICEventSink_svnt_export.h:
+ * IDL3/ImpliedIDL/Components/EventSource/ICEventSource.idl:
+ * IDL3/ImpliedIDL/Components/EventSource/ICEventSource.mpc:
+ * IDL3/ImpliedIDL/Components/EventSource/ICEventSourceS.cpp:
+ * IDL3/ImpliedIDL/Components:
+
+ Various tests of compilation for IDL3 constructs.
+
+Tue Aug 3 18:36:10 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * docs/schema/README.html:
+
+ File explaining what these new descriptors mean.
+
+ * docs/schema/Basic_Deployment_Data.xsd:
+ * docs/schema/Deployment.xsd:
+ * docs/schema/Modified_Deployment.xsd:
+ * docs/schema/Spec_Defined_Deployment.xsd:
+ * docs/schema/Spec_Defined_XMI.xsd:
+ * docs/schema/ccd.xsd:
+ * docs/schema/cdd.xsd:
+ * docs/schema/cdp.xsd:
+ * docs/schema/cid.xsd:
+ * docs/schema/cpd.xsd:
+ * docs/schema/iad.xsd:
+ * docs/schema/pcd.xsd:
+ * docs/schema/toplevel.xsd:
+ * docs/schema/unused_elements.xsd:
+
+ Sets of schemata that will be used in DAnCE. The meaning of
+ these different schemata have been documented in the
+ README.html.
+
+Sun Aug 1 09:30:37 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * ChangeLogs:
+
+ Created a new directory and moved a bunch of ChangeLog entries
+ there.
+
+Sat Jul 31 11:15:15 2004 Ossama Othman <ossama@dre.vanderbilt.edu>
+
+ * CIAO version 0.4.2 released.
+
+Local Variables:
+add-log-time-format: current-time-string
+End:
diff --git a/TAO/CIAO/DAnCE/RTNodeApplication/NodeApplication_Task.cpp b/TAO/CIAO/DAnCE/RTNodeApplication/NodeApplication_Task.cpp
new file mode 100644
index 00000000000..8272e2a87f9
--- /dev/null
+++ b/TAO/CIAO/DAnCE/RTNodeApplication/NodeApplication_Task.cpp
@@ -0,0 +1,153 @@
+// $Id$
+
+#include "ciao/NodeApplication_CallBackC.h"
+#include "NodeApplication_Task.h"
+#include "tao/RTPortableServer/RTPortableServer.h"
+#include "RTServer_Impl.h"
+#include "ace/Null_Mutex.h"
+#include "ciao/CIAO_common.h"
+#include "tao/RTPortableServer/RTPortableServer.h"
+
+#if !defined (__ACE_INLINE__)
+# include "NodeApplication_Task.inl"
+#endif /* __ACE_INLINE__ */
+
+int
+CIAO::NodeApplication_Task::svc ()
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::Object_var object =
+ this->orb_->resolve_initial_references ("RTORB"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ RTCORBA::RTORB_var rt_orb =
+ RTCORBA::RTORB::_narrow (object.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ object =
+ this->orb_->resolve_initial_references ("RootPOA"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ PortableServer::POA_var root_poa =
+ PortableServer::POA::_narrow (object.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ PortableServer::POAManager_var poa_manager =
+ root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ // ...
+ CIAO::RTServer::RTNodeApplication_Impl *nodeapp_servant;
+
+ ACE_NEW_RETURN (nodeapp_servant,
+ CIAO::RTServer::RTNodeApplication_Impl (this->orb_.in (),
+ rt_orb.in (),
+ root_poa.in ()),
+ -1);
+
+ PortableServer::ServantBase_var safe_servant (nodeapp_servant);
+
+ // Configuring NodeApplication.
+ PortableServer::ObjectId_var cs_oid
+ = root_poa->activate_object (nodeapp_servant
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ object = root_poa->id_to_reference (cs_oid.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ Deployment::NodeApplication_var nodeapp_obj =
+ Deployment::NodeApplication::_narrow (object.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (CORBA::is_nil (nodeapp_obj.in ()))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Unable to activate RTNodeApplication object\n"),
+ -1);
+
+ /** @@ We need to call NodeApplication servant's init method.
+ * But it's not sure to me where exactly we can get the
+ * Properties needed by the init method at this moment. There are two
+ * ways to set the property of the NodeApplication:
+ * 1. call init remotely from NodeApplicationManager
+ * 2. call init locally on the servant of NodeApplication.
+ */
+
+ if (nodeapp_servant->init (ACE_ENV_SINGLE_ARG_PARAMETER))
+ {
+ ACE_DEBUG ((LM_DEBUG, "NodeApplication Failed on creating and\
+ initializing the session container!"));
+ return 1;
+ }
+ ACE_TRY_CHECK;
+
+ CORBA::String_var str = this->orb_->object_to_string (nodeapp_obj.in ()
+ ACE_ENV_ARG_PARAMETER);
+
+ if (this->options_.ior_output_filename_.length () != 0)
+ CIAO::Utility::write_IOR (this->options_.ior_output_filename_.c_str (),
+ str.in ());
+
+ // End Deployment part
+ if (CIAO::debug_level () > 10)
+ {
+ ACE_DEBUG ((LM_INFO, "RTNodeApplication IOR: %s\n", str.in ()));
+
+ }
+
+ Deployment::NodeApplicationManager_var nodeapp_man;
+ Deployment::Properties_var prop = new Deployment::Properties;
+
+ if (this->options_.use_callback_)
+ {
+ object = this->orb_->string_to_object (this->options_.callback_ior_.c_str ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ CIAO::NodeApplication_Callback_var nam_callback
+ = CIAO::NodeApplication_Callback::_narrow (object.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ Deployment::Properties_out properties_out (prop.out ());
+
+ nodeapp_man
+ = nam_callback->register_node_application (nodeapp_obj.in (),
+ properties_out
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+
+ ACE_DEBUG ((LM_DEBUG,
+ "Running RTNodeApplication...\n"));
+
+ this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ this->orb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
+ return -1;
+ }
+ ACE_ENDTRY;
+
+ ACE_DEBUG ((LM_DEBUG,
+ "Exiting RTNodeApplication...\n"));
+ return 0;
+}
diff --git a/TAO/CIAO/DAnCE/RTNodeApplication/NodeApplication_Task.h b/TAO/CIAO/DAnCE/RTNodeApplication/NodeApplication_Task.h
new file mode 100644
index 00000000000..5b14a2b5ab5
--- /dev/null
+++ b/TAO/CIAO/DAnCE/RTNodeApplication/NodeApplication_Task.h
@@ -0,0 +1,82 @@
+// -*- C++ -*-
+
+//=============================================================================
+/**
+ * @file NodeApplication_Task.h
+ *
+ * $Id$
+ *
+ * An ACE_Task subclass that manages the RT-ORB thread for CIAO's RT
+ * NodeApplication.
+ *
+ * @author Nanbor Wang <nanbor@cs.wustl.edu>
+ */
+//=============================================================================
+
+
+#ifndef CIAO_NODEAPPLICATION_TASK_H
+#define CIAO_NODEAPPLICATION_TASK_H
+#include /**/ "ace/pre.h"
+
+#include "tao/ORB_Core.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "tao/ORB.h"
+#include "ace/Task.h"
+#include "ace/SString.h"
+
+namespace CIAO
+{
+ /**
+ * @class NodeApplication_task
+ *
+ * @brief An ACE_Task subclass that manages the RT-ORB therad
+ */
+ class NodeApplication_Task
+ : public virtual ACE_Task_Base
+ {
+ public:
+ // We can add a rt-task configuration facility here.
+ typedef struct _options
+ {
+ // default ctor.
+ _options () : use_callback_ (1) {}
+
+ // The name of the file to write stringified IOR to.
+ ACE_CString ior_output_filename_;
+
+ // Stringified IOR of a CIAO's callback object.
+ ACE_CString callback_ior_;
+
+ // CIAO ComponentServer uses the callback object to pass it's
+ // own object reference back to NodeApplicationManager.
+ int use_callback_;
+
+ // RTCAD extension filename.
+ ACE_CString rtcad_filename_;
+ } Options;
+
+ NodeApplication_Task (ACE_Thread_Manager &thread_manager,
+ CORBA::ORB_ptr orb,
+ Options &opts);
+
+ int svc (void);
+
+ protected:
+ CORBA::ORB_var orb_;
+
+ // ComponentServer config options.
+ Options options_;
+ };
+
+}
+
+#if defined (__ACE_INLINE__)
+# include "NodeApplication_Task.inl"
+#endif /* __ACE_INLINE__ */
+
+#include /**/ "ace/post.h"
+#endif /* CIAO_NODEAPPLICAITON_TASK_H */
diff --git a/TAO/CIAO/DAnCE/RTNodeApplication/NodeApplication_Task.inl b/TAO/CIAO/DAnCE/RTNodeApplication/NodeApplication_Task.inl
new file mode 100644
index 00000000000..c3ae7a829b5
--- /dev/null
+++ b/TAO/CIAO/DAnCE/RTNodeApplication/NodeApplication_Task.inl
@@ -0,0 +1,11 @@
+// -*- C++ -*- $Id$
+
+ACE_INLINE
+CIAO::NodeApplication_Task::NodeApplication_Task (ACE_Thread_Manager &tm,
+ CORBA::ORB_ptr o,
+ CIAO::NodeApplication_Task::Options &opts)
+ : ACE_Task_Base (&tm),
+ orb_ (CORBA::ORB::_duplicate (o)),
+ options_ (opts)
+{
+}
diff --git a/TAO/CIAO/DAnCE/RTNodeApplication/README b/TAO/CIAO/DAnCE/RTNodeApplication/README
new file mode 100644
index 00000000000..bcda46942d6
--- /dev/null
+++ b/TAO/CIAO/DAnCE/RTNodeApplication/README
@@ -0,0 +1,39 @@
+$Id$
+
+This directory contains the RTNodeApplication implementation
+
+* Currently, the RTNodeApplication does not support configuring of any
+ RT policies.
+
+* RTNodeApplication supports the following command line flags:
+
+ * -n : Do not try to call back NodeApplicationManager. This is only
+ useful when testing the server and the server is not created
+ by a NodeApplicationManager.
+
+ * -o <filename> : Specify the filename NodeApplication will write
+ IOR to. This is only useful when debugging also.
+
+ * -k <IOR> : Specify the callback IOR to the NodeApplicationManager.
+
+* Corresponding files to old RTNodeApplication:
+
+ RTNodeApplication.cpp: Main program
+
+ NodeApplication_Task.*: ACE_Task class for spawning the thread for
+ RT-NodeApplication using the right scheduling
+ strategy.
+
+ RTNodeApplication_Impl.* : Actual RTNodeApplication server implementation.
+
+ senv.sh: A simple shell script for setting up the run-time
+ environment when starting NodeDaemon with sudo.
+ This is necessary because the RTNodeApplication needs to
+ spawn threads with real-time scheduling class. This
+ operation requires the process to be run by privileged user.
+ You may need to tweak this shell script to suit your need.
+ Here's an example of how to use the script:
+
+ $ sudo senv.sh $CIAO_ROOT/DAnCE/NodeManager/Node_Daemon \
+ -ORBEndpoint iiop://localhost:10000 \
+ -s $CIAO_ROOT/DAnCE/RTNodeApplication/RTNodeApplication
diff --git a/TAO/CIAO/DAnCE/RTNodeApplication/RTNodeApplication.cpp b/TAO/CIAO/DAnCE/RTNodeApplication/RTNodeApplication.cpp
new file mode 100644
index 00000000000..86e56f99cb3
--- /dev/null
+++ b/TAO/CIAO/DAnCE/RTNodeApplication/RTNodeApplication.cpp
@@ -0,0 +1,171 @@
+// $Id$
+
+#include "ace/Get_Opt.h"
+#include "ace/Sched_Params.h"
+#include "NodeApplication_Task.h"
+#include "ciao/Server_init.h"
+
+int
+parse_args (int argc,
+ char *argv[],
+ CIAO::NodeApplication_Task::Options &opts)
+{
+ ACE_Get_Opt get_opts (argc, argv, "nk:o:");
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+ case 'n':
+ opts.use_callback_ = 0;
+ break;
+
+ case 'o': // get the file name to write to
+ opts.ior_output_filename_ = get_opts.opt_arg ();
+ break;
+
+ case 'k': // get the activator callback IOR
+ opts.callback_ior_ = get_opts.opt_arg ();
+ break;
+
+ case '?': // display help for use of the server.
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s\n"
+ "-n Don't not try to callback NodeApplicationManager (testing)\n"
+ "-o <ior_output_file>\n"
+ "-k <activator_callback_ior>\n"
+ "\n",
+ argv [0]),
+ -1);
+ }
+
+ if (opts.use_callback_ && opts.callback_ior_.length () == 0)
+ ACE_ERROR_RETURN ((LM_ERROR, "Callback IOR to NodeApplicationManager is required.\n"),
+ -1);
+
+ return 0;
+}
+
+const char *
+sched_policy_name (int sched_policy)
+{
+ const char *name = 0;
+
+ switch (sched_policy)
+ {
+ case ACE_SCHED_OTHER:
+ name = "SCHED_OTHER";
+ break;
+ case ACE_SCHED_RR:
+ name = "SCHED_RR";
+ break;
+ case ACE_SCHED_FIFO:
+ name = "SCHED_FIFO";
+ break;
+ }
+
+ return name;
+}
+
+/// The following check is taken from $(TAO_ROOT)/tests/RTCORBA/
+void
+check_supported_priorities (CORBA::ORB_ptr orb)
+{
+ int sched_policy =
+ orb->orb_core ()->orb_params ()->ace_sched_policy ();
+
+ // Check that we have sufficient priority range to run,
+ // i.e., more than 1 priority level.
+ int max_priority =
+ ACE_Sched_Params::priority_max (sched_policy);
+ int min_priority =
+ ACE_Sched_Params::priority_min (sched_policy);
+
+ if (max_priority == min_priority)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Not enough priority levels with the %s scheduling policy\n"
+ "on this platform to run, terminating program....\n"
+ "Check svc.conf options\n",
+ sched_policy_name (sched_policy)));
+
+ ACE_OS::exit (2);
+ }
+}
+
+
+int
+main (int argc, char **argv)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc,
+ argv,
+ ""
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ // Register value factories for the server side.
+ CIAO::Server_init (orb.in ());
+
+ CIAO::NodeApplication_Task::Options options;
+
+ int result =
+ parse_args (argc, argv, options);
+
+ if (result != 0)
+ return result;
+
+ // Make sure we can support multiple priorities that are required
+ // for this test.
+ // check_supported_priorities (orb.in());
+
+ // Thread Manager for managing task.
+ ACE_Thread_Manager thread_manager;
+
+ // Create task.
+ CIAO::NodeApplication_Task cs_task (thread_manager,
+ orb.in (),
+ options);
+
+ // Task activation flags.
+ long flags =
+ THR_NEW_LWP |
+ THR_JOINABLE |
+ orb->orb_core ()->orb_params ()->thread_creation_flags ();
+
+ // Activate task.
+ result =
+ cs_task.activate (flags);
+ if (result == -1)
+ {
+ if (errno == EPERM)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Cannot create thread with scheduling policy %s\n"
+ "because the user does not have the appropriate privileges, terminating program....\n"
+ "Check svc.conf options and/or run as root\n",
+ sched_policy_name (orb->orb_core ()->orb_params ()->ace_sched_policy ())),
+ 2);
+ }
+ else
+ // Unexpected error.
+ ACE_ASSERT (0);
+ }
+
+ // Wait for task to exit.
+ result =
+ thread_manager.wait ();
+ ACE_ASSERT (result != -1);
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
+ return -1;
+ }
+ ACE_ENDTRY;
+
+ return 0;
+}
diff --git a/TAO/CIAO/DAnCE/RTNodeApplication/RTNodeApplication.mpc b/TAO/CIAO/DAnCE/RTNodeApplication/RTNodeApplication.mpc
new file mode 100644
index 00000000000..3105bcc3ef7
--- /dev/null
+++ b/TAO/CIAO/DAnCE/RTNodeApplication/RTNodeApplication.mpc
@@ -0,0 +1,13 @@
+// $Id$
+
+project(RTNodeApplication): ciao_deployment_stub, ciao_deployment_svnt, ciao_server_dnc,rt_server {
+
+ exename = RTNodeApplication
+
+ Source_Files {
+ NodeApplication_Task.cpp
+ RTNodeApplication.cpp
+ RTServer_Impl.cpp
+ }
+}
+
diff --git a/TAO/CIAO/DAnCE/RTNodeApplication/RTServer_Impl.cpp b/TAO/CIAO/DAnCE/RTNodeApplication/RTServer_Impl.cpp
new file mode 100644
index 00000000000..597b8c76d6d
--- /dev/null
+++ b/TAO/CIAO/DAnCE/RTNodeApplication/RTServer_Impl.cpp
@@ -0,0 +1,13 @@
+// $Id$
+
+#include "RTServer_Impl.h"
+#include "ciao/CIAO_common.h"
+
+#if !defined (__ACE_INLINE__)
+# include "RTServer_Impl.inl"
+#endif /* __ACE_INLINE__ */
+
+CIAO::RTServer::RTNodeApplication_Impl::~RTNodeApplication_Impl ()
+{
+}
+
diff --git a/TAO/CIAO/DAnCE/RTNodeApplication/RTServer_Impl.h b/TAO/CIAO/DAnCE/RTNodeApplication/RTServer_Impl.h
new file mode 100644
index 00000000000..75758c0dc36
--- /dev/null
+++ b/TAO/CIAO/DAnCE/RTNodeApplication/RTServer_Impl.h
@@ -0,0 +1,78 @@
+// -*- C++ -*-
+
+//=============================================================================
+/**
+ * @file RTServer_Impl.h
+ *
+ * $Id$
+ *
+ * This file contains real-time extended implementations for the
+ * servants of
+ * Deployment::NodeApplication
+ *
+ * It will also contain the real-time extended version of
+ * CIAO::Session_Container.
+ *
+ * Currently, they are only used in the RTComponentServer
+ * implementation.
+ *
+ * @author Nanbor Wang <nanbor@cs.wustl.edu>
+ */
+//=============================================================================
+
+
+#ifndef CIAO_RTSERVER_IMPL_H
+#define CIAO_RTSERVER_IMPL_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/RTCORBA/RTCORBA.h"
+#include "ciao/NodeApplication_Impl.h"
+//#include "ciao/Container_Impl.h"
+#include "ciao/Container_Base.h"
+
+namespace CIAO
+{
+ namespace RTServer
+ {
+ /**
+ * @class RTNodeApplication
+ *
+ * @brief Real-time extention servant implementation of
+ * Deployment::NodeApplication
+ *
+ * This class implements the Deployment::NodeApplication
+ * interface as defined by the DnC spcification. As the interface
+ * implies, this is actually part of the deployment interface and is
+ * used to manage the lifecycle of containers running on the server.
+ */
+ class RTNodeApplication_Impl
+ : public virtual CIAO::NodeApplication_Impl
+ {
+ public:
+ /// Constructor
+ RTNodeApplication_Impl (CORBA::ORB_ptr o,
+ RTCORBA::RTORB_ptr rto,
+ PortableServer::POA_ptr p);
+
+ /// Destructor
+ virtual ~RTNodeApplication_Impl (void);
+
+ protected:
+ RTCORBA::RTORB_var rtorb_;
+ };
+
+ }
+}
+
+#if defined (__ACE_INLINE__)
+# include "RTServer_Impl.inl"
+#endif /* __ACE_INLINE__ */
+
+#include /**/ "ace/post.h"
+#endif /* CIAO_RTSERVER_IMPL_H */
diff --git a/TAO/CIAO/DAnCE/RTNodeApplication/RTServer_Impl.inl b/TAO/CIAO/DAnCE/RTNodeApplication/RTServer_Impl.inl
new file mode 100644
index 00000000000..aa1679b88a3
--- /dev/null
+++ b/TAO/CIAO/DAnCE/RTNodeApplication/RTServer_Impl.inl
@@ -0,0 +1,13 @@
+/* -*- C++ -*- */
+// $Id$
+
+ACE_INLINE
+CIAO::RTServer::RTNodeApplication_Impl::RTNodeApplication_Impl (CORBA::ORB_ptr o,
+ RTCORBA::RTORB_ptr rto,
+ PortableServer::POA_ptr p)
+ : NodeApplication_Impl (o, p),
+ rtorb_ (RTCORBA::RTORB::_duplicate (rto))
+{
+}
+
+
diff --git a/TAO/CIAO/DAnCE/RTNodeApplication/senv.sh b/TAO/CIAO/DAnCE/RTNodeApplication/senv.sh
new file mode 100755
index 00000000000..bc01029e288
--- /dev/null
+++ b/TAO/CIAO/DAnCE/RTNodeApplication/senv.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ACE_ROOT/lib
+export LD_LIBRARY_PATH
+$*
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Hello_Base/Hello_Base.idl b/TAO/CIAO/DAnCE/examples/Hello/Hello_Base/Hello_Base.idl
new file mode 100644
index 00000000000..6cb61fed2c1
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Hello_Base/Hello_Base.idl
@@ -0,0 +1,21 @@
+//$Id$:
+
+#ifndef CIAO_HELLO_IDL
+#define CIAO_HELLO_IDL
+
+#include <Components.idl>
+
+module Hello
+{
+ interface ReadMessage
+ {
+ string get_message();
+ };
+
+ eventtype TimeOut
+ {
+ };
+
+};
+
+#endif /* CIAO_HELLO_IDL */
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Hello_Base/Hello_Base.mpc b/TAO/CIAO/DAnCE/examples/Hello/Hello_Base/Hello_Base.mpc
new file mode 100644
index 00000000000..cded34e3b3a
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Hello_Base/Hello_Base.mpc
@@ -0,0 +1,34 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -n Hello_Base"
+
+project(Hello_Base_DnC_stub): ciao_client_dnc {
+
+ sharedname = Hello_Base_DnC_stub
+ idlflags += -Wb,stub_export_macro=HELLO_BASE_STUB_Export -Wb,stub_export_include=Hello_Base_stub_export.h -Wb,skel_export_macro=HELLO_BASE_SVNT_Export -Wb,skel_export_include=Hello_Base_svnt_export.h
+ dynamicflags = HELLO_BASE_STUB_BUILD_DLL
+
+ IDL_Files {
+ Hello_Base.idl
+ }
+
+ Source_Files {
+ Hello_BaseC.cpp
+ }
+}
+
+project(Hello_Base_DnC_svnt) : ciao_server_dnc {
+ after += Hello_Base_DnC_stub
+ sharedname = Hello_Base_DnC_svnt
+ libs += Hello_Base_DnC_stub
+
+ idlflags += -Wb,stub_export_macro=HELLO_BASE_STUB_Export -Wb,stub_export_include=Hello_Base_stub_export.h -Wb,skel_export_macro=HELLO_BASE_SVNT_Export -Wb,skel_export_include=Hello_Base_svnt_export.h
+ dynamicflags = HELLO_BASE_SVNT_BUILD_DLL
+
+ IDL_Files {
+ Hello_Base.idl
+ }
+
+ Source_Files {
+ Hello_BaseS.cpp
+ }
+}
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Hello_Base/Hello_Base_stub_export.h b/TAO/CIAO/DAnCE/examples/Hello/Hello_Base/Hello_Base_stub_export.h
new file mode 100644
index 00000000000..224fe95a845
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Hello_Base/Hello_Base_stub_export.h
@@ -0,0 +1,54 @@
+
+// -*- C++ -*-
+// $Id$
+// Definition for Win32 Export directives.
+// This file is generated automatically by generate_export_file.pl HELLO_BASE_STUB
+// ------------------------------
+#ifndef HELLO_BASE_STUB_EXPORT_H
+#define HELLO_BASE_STUB_EXPORT_H
+
+#include "ace/config-all.h"
+
+#if !defined (HELLO_BASE_STUB_HAS_DLL)
+# define HELLO_BASE_STUB_HAS_DLL 1
+#endif /* ! HELLO_BASE_STUB_HAS_DLL */
+
+#if defined (HELLO_BASE_STUB_HAS_DLL) && (HELLO_BASE_STUB_HAS_DLL == 1)
+# if defined (HELLO_BASE_STUB_BUILD_DLL)
+# define HELLO_BASE_STUB_Export ACE_Proper_Export_Flag
+# define HELLO_BASE_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
+# define HELLO_BASE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# else /* HELLO_BASE_STUB_BUILD_DLL */
+# define HELLO_BASE_STUB_Export ACE_Proper_Import_Flag
+# define HELLO_BASE_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
+# define HELLO_BASE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# endif /* HELLO_BASE_STUB_BUILD_DLL */
+#else /* HELLO_BASE_STUB_HAS_DLL == 1 */
+# define HELLO_BASE_STUB_Export
+# define HELLO_BASE_STUB_SINGLETON_DECLARATION(T)
+# define HELLO_BASE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+#endif /* HELLO_BASE_STUB_HAS_DLL == 1 */
+
+// Set HELLO_BASE_STUB_NTRACE = 0 to turn on library specific tracing even if
+// tracing is turned off for ACE.
+#if !defined (HELLO_BASE_STUB_NTRACE)
+# if (ACE_NTRACE == 1)
+# define HELLO_BASE_STUB_NTRACE 1
+# else /* (ACE_NTRACE == 1) */
+# define HELLO_BASE_STUB_NTRACE 0
+# endif /* (ACE_NTRACE == 1) */
+#endif /* !HELLO_BASE_STUB_NTRACE */
+
+#if (HELLO_BASE_STUB_NTRACE == 1)
+# define HELLO_BASE_STUB_TRACE(X)
+#else /* (HELLO_BASE_STUB_NTRACE == 1) */
+# if !defined (ACE_HAS_TRACE)
+# define ACE_HAS_TRACE
+# endif /* ACE_HAS_TRACE */
+# define HELLO_BASE_STUB_TRACE(X) ACE_TRACE_IMPL(X)
+# include "ace/Trace.h"
+#endif /* (HELLO_BASE_STUB_NTRACE == 1) */
+
+#endif /* HELLO_BASE_STUB_EXPORT_H */
+
+// End of auto generated file.
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Hello_Base/Hello_Base_svnt_export.h b/TAO/CIAO/DAnCE/examples/Hello/Hello_Base/Hello_Base_svnt_export.h
new file mode 100644
index 00000000000..57625da60c6
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Hello_Base/Hello_Base_svnt_export.h
@@ -0,0 +1,54 @@
+
+// -*- C++ -*-
+// $Id$
+// Definition for Win32 Export directives.
+// This file is generated automatically by generate_export_file.pl HELLO_BASE_SVNT
+// ------------------------------
+#ifndef HELLO_BASE_SVNT_EXPORT_H
+#define HELLO_BASE_SVNT_EXPORT_H
+
+#include "ace/config-all.h"
+
+#if !defined (HELLO_BASE_SVNT_HAS_DLL)
+# define HELLO_BASE_SVNT_HAS_DLL 1
+#endif /* ! HELLO_BASE_SVNT_HAS_DLL */
+
+#if defined (HELLO_BASE_SVNT_HAS_DLL) && (HELLO_BASE_SVNT_HAS_DLL == 1)
+# if defined (HELLO_BASE_SVNT_BUILD_DLL)
+# define HELLO_BASE_SVNT_Export ACE_Proper_Export_Flag
+# define HELLO_BASE_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
+# define HELLO_BASE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# else /* HELLO_BASE_SVNT_BUILD_DLL */
+# define HELLO_BASE_SVNT_Export ACE_Proper_Import_Flag
+# define HELLO_BASE_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
+# define HELLO_BASE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# endif /* HELLO_BASE_SVNT_BUILD_DLL */
+#else /* HELLO_BASE_SVNT_HAS_DLL == 1 */
+# define HELLO_BASE_SVNT_Export
+# define HELLO_BASE_SVNT_SINGLETON_DECLARATION(T)
+# define HELLO_BASE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+#endif /* HELLO_BASE_SVNT_HAS_DLL == 1 */
+
+// Set HELLO_BASE_SVNT_NTRACE = 0 to turn on library specific tracing even if
+// tracing is turned off for ACE.
+#if !defined (HELLO_BASE_SVNT_NTRACE)
+# if (ACE_NTRACE == 1)
+# define HELLO_BASE_SVNT_NTRACE 1
+# else /* (ACE_NTRACE == 1) */
+# define HELLO_BASE_SVNT_NTRACE 0
+# endif /* (ACE_NTRACE == 1) */
+#endif /* !HELLO_BASE_SVNT_NTRACE */
+
+#if (HELLO_BASE_SVNT_NTRACE == 1)
+# define HELLO_BASE_SVNT_TRACE(X)
+#else /* (HELLO_BASE_SVNT_NTRACE == 1) */
+# if !defined (ACE_HAS_TRACE)
+# define ACE_HAS_TRACE
+# endif /* ACE_HAS_TRACE */
+# define HELLO_BASE_SVNT_TRACE(X) ACE_TRACE_IMPL(X)
+# include "ace/Trace.h"
+#endif /* (HELLO_BASE_SVNT_NTRACE == 1) */
+
+#endif /* HELLO_BASE_SVNT_EXPORT_H */
+
+// End of auto generated file.
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver.cidl b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver.cidl
new file mode 100644
index 00000000000..3b2e04e5161
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver.cidl
@@ -0,0 +1,17 @@
+//$Id$
+
+#ifndef SENDER_CIDL
+#define SENDER_CIDL
+
+#include "Receiver.idl"
+
+composition session Receiver_Impl
+{
+ home executor ReceiverHome_Exec
+ {
+ implements Hello::ReceiverHome;
+ manages Receiver_Exec;
+ };
+};
+
+#endif /* SENDER_CIDL */
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver.idl b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver.idl
new file mode 100644
index 00000000000..8be435c687c
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver.idl
@@ -0,0 +1,21 @@
+//$Id$:
+
+#ifndef RECEIVER_IDL
+#define RECEIVER_IDL
+
+#include "../Hello_Base/Hello_Base.idl"
+
+module Hello
+{
+ component Receiver
+ {
+ uses ReadMessage read_message;
+ consumes TimeOut click_in;
+ };
+
+ home ReceiverHome manages Receiver
+ {
+ };
+
+};
+#endif /*RECEIVER_IDL*/
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver.mpc b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver.mpc
new file mode 100644
index 00000000000..f10e7d08a06
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver.mpc
@@ -0,0 +1,58 @@
+// $Id$
+// This file is generated with "generate_component_mpc_extra.pl -p Hello_Base Receiver"
+
+project(Hello_Base_Receiver_DnC_stub): ciao_client_dnc {
+ after += Hello_Base_DnC_stub
+ sharedname = Receiver_DnC_stub
+ idlflags += -Wb,stub_export_macro=RECEIVER_STUB_Export -Wb,stub_export_include=Receiver_stub_export.h -Wb,skel_export_macro=RECEIVER_SVNT_Export -Wb,skel_export_include=Receiver_svnt_export.h
+ dynamicflags = RECEIVER_STUB_BUILD_DLL
+ libs += Hello_Base_DnC_stub
+
+ IDL_Files {
+ Receiver.idl
+ }
+
+ Source_Files {
+ ReceiverC.cpp
+ }
+}
+
+project(Hello_Base_Receiver_DnC_svnt) : ciao_servant_dnc {
+ after += Hello_Base_DnC_svnt Hello_Base_Receiver_DnC_stub
+ sharedname = Receiver_DnC_svnt
+ libs += Receiver_DnC_stub Hello_Base_DnC_stub Hello_Base_DnC_svnt
+
+ idlflags += -Wb,export_macro=RECEIVER_SVNT_Export -Wb,export_include=Receiver_svnt_export.h
+ dynamicflags = RECEIVER_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ Receiver.cidl
+ }
+
+ IDL_Files {
+ ReceiverE.idl
+ }
+
+ Source_Files {
+ ReceiverEC.cpp
+ ReceiverS.cpp
+ Receiver_svnt.cpp
+ }
+}
+
+
+project(Hello_Base_Receiver_DnC_exec) : ciao_component_dnc {
+ after += Hello_Base_Receiver_DnC_svnt
+ sharedname = Receiver_DnC_exec
+ libs += Receiver_DnC_stub Receiver_DnC_svnt Hello_Base_DnC_stub Hello_Base_DnC_svnt
+
+ idlflags += -Wb,export_macro=RECEIVER_EXEC_Export -Wb,export_include=Receiver_exec_export.h
+ dynamicflags = RECEIVER_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Receiver_exec.cpp
+ }
+}
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_exec.cpp b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_exec.cpp
new file mode 100644
index 00000000000..ca74c2a3c42
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_exec.cpp
@@ -0,0 +1,189 @@
+//$Id$
+/*
+ * @file Receiver_exec.cpp
+ *
+ * @author Tao Lu <lu@dre.vanderbilt.edu>
+ */
+
+#include "Receiver_exec.h"
+#include "CIAO_common.h"
+
+Receiver_Impl::ReceiverSwap_exec_i::ReceiverSwap_exec_i ()
+{
+}
+
+Receiver_Impl::ReceiverSwap_exec_i::~ReceiverSwap_exec_i ()
+{
+}
+
+::Components::EnterpriseComponent_ptr
+Receiver_Impl::ReceiverSwap_exec_i::incarnate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return new Receiver_Impl::Receiver_exec_i;
+}
+
+::Components::EnterpriseComponent_ptr
+Receiver_Impl::ReceiverSwap_exec_i::etherealize (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return new Receiver_Impl::Receiver_exec_i;
+}
+
+Receiver_Impl::Receiver_exec_i::Receiver_exec_i ()
+{
+}
+
+Receiver_Impl::Receiver_exec_i::~Receiver_exec_i ()
+{
+}
+
+void
+Receiver_Impl::Receiver_exec_i::push_click_in (Hello::TimeOut *
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ //Get the message from the Sender first.
+ ACE_DEBUG ((LM_DEBUG,
+ "Receiver - Informed by the Sender \n"));
+
+ Hello::ReadMessage_var rev
+ = this->context_->get_connection_read_message
+ (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ if (CORBA::is_nil (rev.in ()))
+ ACE_THROW (CORBA::BAD_INV_ORDER ());
+
+ CORBA::String_var str =
+ rev->get_message (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ ACE_DEBUG ((LM_DEBUG,
+ "Receiver - Got message from the server [%s] \n",
+ str.in () ));
+}
+
+// Operations from Components::SessionComponen
+void
+Receiver_Impl::Receiver_exec_i::set_session_context
+ (Components::SessionContext_ptr ctx
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG, "Receiver_Impl::Receiver_exec_i::set_session_context\n"));
+
+ this->context_ =
+ Receiver_Impl::Receiver_Exec_Context::_narrow (ctx
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ if (CORBA::is_nil (this->context_.in ()))
+ ACE_THROW (CORBA::INTERNAL ());
+}
+
+void
+Receiver_Impl::Receiver_exec_i::ciao_preactivate
+ (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG,
+ "Receiver_Impl::Receiver_exec_i::ciao_preactivate\n"));
+}
+
+void
+Receiver_Impl::Receiver_exec_i::ccm_activate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG, "Receiver_Impl::Receiver_exec_i::ccm_activate\n"));
+}
+
+void
+Receiver_Impl::Receiver_exec_i::ciao_postactivate
+ (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG,
+ "Receiver_Impl::Receiver_exec_i::ciao_postactivate\n"));
+}
+
+void
+Receiver_Impl::Receiver_exec_i::ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG, "Receiver_Impl::Receiver_exec_i::ccm_passivate\n"));
+ /*
+ CORBA::Object_var comp_object =
+ this->context_->get_CCM_object (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ Hello::Receiver_var receiver = Hello::Receiver::_narrow (comp_object.in ()
+ ACE_ENV_ARG_PARAMETER);
+
+ ::Components::ConsumerDescriptions_var cons_desc =
+ receiver->get_all_consumers (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ ::Components::FacetDescriptions_var facet_desc =
+ receiver->get_all_facets (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ CORBA::ULong cons_len = cons_desc->length ();
+ CORBA::ULong facet_len = facet_desc->length ();
+ for (CORBA::ULong i = 0; i < cons_len; ++i)
+ {
+ // ACE_DEBUG ((LM_DEBUG, "consumer name is %s\n", cons_desc[i]->name ()));
+ }
+ for (CORBA::ULong i = 0; i < facet_len; ++i)
+ {
+ // ACE_DEBUG ((LM_DEBUG, "facet name is %s\n", facet_desc[i]->name ()));
+ }
+ */
+}
+
+void
+Receiver_Impl::Receiver_exec_i::ccm_remove (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG, "Receiver_Impl::Receiver_exec_i::ccm_remove\n"));
+}
+
+
+Receiver_Impl::ReceiverHome_exec_i::ReceiverHome_exec_i ()
+{
+}
+
+Receiver_Impl::ReceiverHome_exec_i::~ReceiverHome_exec_i ()
+{
+}
+
+::Components::EnterpriseComponent_ptr
+Receiver_Impl::ReceiverHome_exec_i::create (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ Components::EnterpriseComponent_ptr tmp;
+
+ ACE_NEW_THROW_EX (tmp,
+ Receiver_Impl::ReceiverSwap_exec_i,
+ CORBA::NO_MEMORY ());
+ /*
+ ACE_NEW_THROW_EX (tmp,
+ Receiver_Impl::Receiver_exec_i,
+ CORBA::NO_MEMORY ());
+ */
+
+ return tmp;
+}
+
+extern "C" RECEIVER_EXEC_Export ::Components::HomeExecutorBase_ptr
+createReceiverHome_Impl (void)
+{
+ return new Receiver_Impl::ReceiverHome_exec_i ();
+}
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_exec.h b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_exec.h
new file mode 100644
index 00000000000..a86ff5970ae
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_exec.h
@@ -0,0 +1,126 @@
+//$Id$:
+//============================================================
+/**
+ * @file Receiver_exec.h
+ *
+ * Header file for the Executor implementation.
+ */
+//============================================================
+
+#ifndef RECEIVER_EXEC_H
+#define RECEIVER_EXEC_H
+
+#include "SwapExecC.h"
+#include "ReceiverEC.h"
+#include "Receiver_exec_export.h"
+#include "tao/LocalObject.h"
+
+namespace Receiver_Impl
+{
+
+ /**
+ * @class Receiver_exec_i
+ *
+ * Receiver executor implementation class.
+ */
+
+ class RECEIVER_EXEC_Export ReceiverSwap_exec_i :
+ public virtual CIAO::Swap_Exec,
+ public virtual TAO_Local_RefCounted_Object
+ {
+ public:
+ ReceiverSwap_exec_i ();
+
+ ~ReceiverSwap_exec_i ();
+
+ virtual ::Components::EnterpriseComponent_ptr
+ incarnate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual ::Components::EnterpriseComponent_ptr
+ etherealize (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+ };
+
+ class RECEIVER_EXEC_Export Receiver_exec_i :
+ public virtual Receiver_Exec,
+ public virtual TAO_Local_RefCounted_Object
+ {
+
+ public:
+ /// Default constructor.
+ Receiver_exec_i ();
+
+ /// Default destructor.
+ ~Receiver_exec_i ();
+
+ // Operation which will be called upon receiving the timeout event.
+ virtual void
+ push_click_in (Hello::TimeOut *ev
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // Operations from Components::SessionComponent
+ virtual void set_session_context (Components::SessionContext_ptr ctx
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ccm_activate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+
+ virtual void ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ccm_remove (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ protected:
+ /// Copmponent specific context
+ Receiver_Exec_Context_var context_;
+ private:
+ CORBA::String_var message_;
+ };
+
+ /**
+ * @class ReceiverHome_exec_i
+ *
+ * Receiver home executor implementation class.
+ */
+ class RECEIVER_EXEC_Export ReceiverHome_exec_i :
+ public virtual ReceiverHome_Exec,
+ public virtual TAO_Local_RefCounted_Object
+ {
+ public:
+ /// Default ctor.
+ ReceiverHome_exec_i ();
+
+ /// Default dtor.
+ ~ReceiverHome_exec_i ();
+
+ // Implicit home operations.
+
+ virtual ::Components::EnterpriseComponent_ptr
+ create (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+ };
+
+}
+
+extern "C" RECEIVER_EXEC_Export ::Components::HomeExecutorBase_ptr
+createReceiverHome_Impl (void);
+
+#endif /* RECEIVER_EXEC_H */
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_exec_export.h b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_exec_export.h
new file mode 100644
index 00000000000..639c089cb6b
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_exec_export.h
@@ -0,0 +1,53 @@
+// -*- C++ -*-
+// $Id$
+// Definition for Win32 Export directives.
+// This file is generated automatically by generate_export_file.pl RECEIVER_EXEC
+// ------------------------------
+#ifndef RECEIVER_EXEC_EXPORT_H
+#define RECEIVER_EXEC_EXPORT_H
+
+#include "ace/config-all.h"
+
+#if !defined (RECEIVER_EXEC_HAS_DLL)
+# define RECEIVER_EXEC_HAS_DLL 1
+#endif /* ! RECEIVER_EXEC_HAS_DLL */
+
+#if defined (RECEIVER_EXEC_HAS_DLL) && (RECEIVER_EXEC_HAS_DLL == 1)
+# if defined (RECEIVER_EXEC_BUILD_DLL)
+# define RECEIVER_EXEC_Export ACE_Proper_Export_Flag
+# define RECEIVER_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
+# define RECEIVER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# else /* RECEIVER_EXEC_BUILD_DLL */
+# define RECEIVER_EXEC_Export ACE_Proper_Import_Flag
+# define RECEIVER_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
+# define RECEIVER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# endif /* RECEIVER_EXEC_BUILD_DLL */
+#else /* RECEIVER_EXEC_HAS_DLL == 1 */
+# define RECEIVER_EXEC_Export
+# define RECEIVER_EXEC_SINGLETON_DECLARATION(T)
+# define RECEIVER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+#endif /* RECEIVER_EXEC_HAS_DLL == 1 */
+
+// Set RECEIVER_EXEC_NTRACE = 0 to turn on library specific tracing even if
+// tracing is turned off for ACE.
+#if !defined (RECEIVER_EXEC_NTRACE)
+# if (ACE_NTRACE == 1)
+# define RECEIVER_EXEC_NTRACE 1
+# else /* (ACE_NTRACE == 1) */
+# define RECEIVER_EXEC_NTRACE 0
+# endif /* (ACE_NTRACE == 1) */
+#endif /* !RECEIVER_EXEC_NTRACE */
+
+#if (RECEIVER_EXEC_NTRACE == 1)
+# define RECEIVER_EXEC_TRACE(X)
+#else /* (RECEIVER_EXEC_NTRACE == 1) */
+# if !defined (ACE_HAS_TRACE)
+# define ACE_HAS_TRACE
+# endif /* ACE_HAS_TRACE */
+# define RECEIVER_EXEC_TRACE(X) ACE_TRACE_IMPL(X)
+# include "ace/Trace.h"
+#endif /* (RECEIVER_EXEC_NTRACE == 1) */
+
+#endif /* RECEIVER_EXEC_EXPORT_H */
+
+// End of auto generated file.
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_stub_export.h b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_stub_export.h
new file mode 100644
index 00000000000..d102fa7a514
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_stub_export.h
@@ -0,0 +1,53 @@
+// -*- C++ -*-
+// $Id$
+// Definition for Win32 Export directives.
+// This file is generated automatically by generate_export_file.pl RECEIVER_STUB
+// ------------------------------
+#ifndef RECEIVER_STUB_EXPORT_H
+#define RECEIVER_STUB_EXPORT_H
+
+#include "ace/config-all.h"
+
+#if !defined (RECEIVER_STUB_HAS_DLL)
+# define RECEIVER_STUB_HAS_DLL 1
+#endif /* ! RECEIVER_STUB_HAS_DLL */
+
+#if defined (RECEIVER_STUB_HAS_DLL) && (RECEIVER_STUB_HAS_DLL == 1)
+# if defined (RECEIVER_STUB_BUILD_DLL)
+# define RECEIVER_STUB_Export ACE_Proper_Export_Flag
+# define RECEIVER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
+# define RECEIVER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# else /* RECEIVER_STUB_BUILD_DLL */
+# define RECEIVER_STUB_Export ACE_Proper_Import_Flag
+# define RECEIVER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
+# define RECEIVER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# endif /* RECEIVER_STUB_BUILD_DLL */
+#else /* RECEIVER_STUB_HAS_DLL == 1 */
+# define RECEIVER_STUB_Export
+# define RECEIVER_STUB_SINGLETON_DECLARATION(T)
+# define RECEIVER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+#endif /* RECEIVER_STUB_HAS_DLL == 1 */
+
+// Set RECEIVER_STUB_NTRACE = 0 to turn on library specific tracing even if
+// tracing is turned off for ACE.
+#if !defined (RECEIVER_STUB_NTRACE)
+# if (ACE_NTRACE == 1)
+# define RECEIVER_STUB_NTRACE 1
+# else /* (ACE_NTRACE == 1) */
+# define RECEIVER_STUB_NTRACE 0
+# endif /* (ACE_NTRACE == 1) */
+#endif /* !RECEIVER_STUB_NTRACE */
+
+#if (RECEIVER_STUB_NTRACE == 1)
+# define RECEIVER_STUB_TRACE(X)
+#else /* (RECEIVER_STUB_NTRACE == 1) */
+# if !defined (ACE_HAS_TRACE)
+# define ACE_HAS_TRACE
+# endif /* ACE_HAS_TRACE */
+# define RECEIVER_STUB_TRACE(X) ACE_TRACE_IMPL(X)
+# include "ace/Trace.h"
+#endif /* (RECEIVER_STUB_NTRACE == 1) */
+
+#endif /* RECEIVER_STUB_EXPORT_H */
+
+// End of auto generated file.
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.cpp.new_impl b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.cpp.new_impl
new file mode 100644
index 00000000000..6a24be74c1c
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.cpp.new_impl
@@ -0,0 +1,585 @@
+// $Id$
+//
+// **** Code generated by the ****
+// **** Component Integrated ACE ORB (CIAO) CIDL Compiler ****
+// CIAO has been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// CIDL Compiler has been developed by:
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about CIAO is available at:
+// http://www.dre.vanderbilt.edu/CIAO
+
+#include "Receiver_svnt.h"
+#include "Cookies.h"
+#include "ciao/Servant_Activator.h"
+#include "ciao/Port_Activator_T.h"
+
+namespace Receiver_Impl
+{
+ namespace CIAO_GLUE_Hello
+ {
+ Receiver_Context::Receiver_Context (
+ ::Components::CCMHome_ptr home,
+ ::CIAO::Session_Container *c,
+ Receiver_Servant *sv)
+ : ACE_NESTED_CLASS (CIAO, Context_Impl_Base (home, c)),
+ ctx_svnt_base (home, c, sv)
+ {
+ }
+
+ Receiver_Context::~Receiver_Context (void)
+ {
+ }
+
+ // Operations for Receiver receptacles and event sources,
+ // defined in ::Hello::CCM_Receiver_Context.
+
+ ::Hello::ReadMessage_ptr
+ Receiver_Context::get_connection_read_message (
+ ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ return ::Hello::ReadMessage::_duplicate (
+ this->ciao_uses_read_message_.in ());
+ }
+
+ void
+ Receiver_Context::connect_read_message (
+ ::Hello::ReadMessage_ptr c
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::AlreadyConnected,
+ ::Components::InvalidConnection))
+ {
+ if (!CORBA::is_nil (this->ciao_uses_read_message_.in ()))
+ {
+ ACE_THROW (::Components::AlreadyConnected ());
+ }
+
+ if (CORBA::is_nil (c))
+ {
+ ACE_THROW (::Components::InvalidConnection ());
+ }
+
+ this->ciao_uses_read_message_ =
+ ::Hello::ReadMessage::_duplicate (c);
+ }
+
+ ::Hello::ReadMessage_ptr
+ Receiver_Context::disconnect_read_message (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::NoConnection))
+ {
+ if (CORBA::is_nil (this->ciao_uses_read_message_.in ()))
+ {
+ ACE_THROW_RETURN (
+ ::Components::NoConnection (),
+ ::Hello::ReadMessage::_nil ());
+ }
+
+ return this->ciao_uses_read_message_._retn ();
+ }
+
+ // CIAO-specific.
+
+ Receiver_Context *
+ Receiver_Context::_narrow (
+ ::Components::SessionContext_ptr p
+ ACE_ENV_ARG_DECL_NOT_USED)
+ {
+ return dynamic_cast<Receiver_Context *> (p);
+ }
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ Receiver_Servant::Receiver_Servant (
+ ::Hello::CCM_Receiver_ptr exe,
+ ::Components::CCMHome_ptr h,
+ ::CIAO::Home_Servant_Impl_Base *home_servant,
+ ::CIAO::Session_Container *c)
+ : ACE_NESTED_CLASS (CIAO, Servant_Impl_Base (h, home_servant, c)),
+ comp_svnt_base (exe, h, home_servant, c)
+ {
+ this->context_ = new Receiver_Context (h, c, this);
+
+ CIAO_REGISTER_OBV_FACTORY (
+ ::Hello::TimeOut_init,
+ ::Hello::TimeOut);
+
+ ACE_TRY_NEW_ENV
+ {
+ ::Components::SessionComponent_var scom =
+ ::Components::SessionComponent::_narrow (
+ exe
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (! ::CORBA::is_nil (scom.in ()))
+ {
+ scom->set_session_context (
+ this->context_
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+
+ this->populate_port_tables (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+
+ ACE_CATCHANY
+ {
+ }
+
+ ACE_ENDTRY;
+ }
+
+ Receiver_Servant::~Receiver_Servant (void)
+ {
+ }
+
+ void
+ Receiver_Servant::set_attributes (
+ const ::Components::ConfigValues &descr
+ ACE_ENV_ARG_DECL_NOT_USED)
+ {
+ for (CORBA::ULong i = 0;
+ i < descr.length ();
+ ++i)
+ {
+ const char *descr_name = descr[i]->name ();
+ ::CORBA::Any &descr_value = descr[i]->value ();
+
+ ACE_UNUSED_ARG (descr_name);
+ ACE_UNUSED_ARG (descr_value);
+ }
+ }
+
+ Receiver_Servant::TimeOutConsumer_click_in_Servant::TimeOutConsumer_click_in_Servant (
+ ::Hello::CCM_Receiver_ptr executor,
+ ::Hello::CCM_Receiver_Context_ptr c)
+ : executor_ (::Hello::CCM_Receiver::_duplicate (executor)),
+ ctx_ (::Hello::CCM_Receiver_Context::_duplicate (c))
+ {
+ }
+
+ Receiver_Servant::TimeOutConsumer_click_in_Servant::~TimeOutConsumer_click_in_Servant (void)
+ {
+ }
+
+ CORBA::Object_ptr
+ Receiver_Servant::TimeOutConsumer_click_in_Servant::_get_component (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ return this->ctx_->get_CCM_object (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+
+ void
+ Receiver_Servant::TimeOutConsumer_click_in_Servant::push_TimeOut (
+ ::Hello::TimeOut *evt
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ this->executor_->push_click_in (
+ evt
+ ACE_ENV_ARG_PARAMETER);
+ }
+
+ // Inherited from ::Components::EventConsumerBase.
+ void
+ Receiver_Servant::TimeOutConsumer_click_in_Servant::push_event (
+ ::Components::EventBase *ev
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::BadEventType))
+ {
+ ::Hello::TimeOut_var ev_type =
+ ::Hello::TimeOut::_downcast (ev);
+
+ if (ev_type.in () != 0)
+ {
+ this->push_TimeOut (
+ ev_type.in ()
+ ACE_ENV_ARG_PARAMETER);
+
+ return;
+ }
+
+ ACE_THROW (::Components::BadEventType ());
+ }
+
+ ::Hello::TimeOutConsumer_ptr
+ Receiver_Servant::get_consumer_click_in (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ if (! ::CORBA::is_nil (this->consumes_click_in_.in ()))
+ {
+ return ::Hello::TimeOutConsumer::_duplicate (this->consumes_click_in_.in ());
+ }
+
+ ::Components::EventConsumerBase_var obj =
+ this->get_consumer_click_in_i (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (::Hello::TimeOutConsumer::_nil ());
+
+ ::Hello::TimeOutConsumer_var eco =
+ ::Hello::TimeOutConsumer::_narrow (
+ obj.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (::Hello::TimeOutConsumer::_nil ());
+
+ this->consumes_click_in_ = eco;
+ return ::Hello::TimeOutConsumer::_duplicate (this->consumes_click_in_.in ());
+ }
+
+ ::Components::EventConsumerBase_ptr
+ Receiver_Servant::get_consumer_click_in_i (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ ::Components::EventConsumerBase_ptr ret =
+ this->lookup_consumer ("click_in");
+
+ if (! ::CORBA::is_nil (ret))
+ {
+ return ret;
+ }
+
+ CIAO::Port_Activator_T<
+ Receiver_Servant::TimeOutConsumer_click_in_Servant,
+ ::Hello::CCM_Receiver,
+ ::Hello::CCM_Receiver_Context,
+ Receiver_Servant > *tmp = 0;
+
+ typedef CIAO::Port_Activator_T<
+ Receiver_Servant::TimeOutConsumer_click_in_Servant,
+ ::Hello::CCM_Receiver,
+ ::Hello::CCM_Receiver_Context,
+ Receiver_Servant >
+ MACRO_MADNESS_TYPEDEF;
+
+
+ ACE_NEW_THROW_EX (
+ tmp,
+ MACRO_MADNESS_TYPEDEF (
+ "Hello_Receiver_click_in",
+ "click_in",
+ CIAO::Port_Activator::Sink,
+ this->executor_.in (),
+ this->context_,
+ this),
+ CORBA::NO_MEMORY ());
+
+
+ CIAO::Servant_Activator *sa =
+ this->container_->ports_servant_activator ();
+
+ if (!sa->register_port_activator (tmp))
+ {
+ return 0;
+ }
+
+ ::CORBA::Object_var obj =
+ this->container_->generate_reference (
+ "Hello_Receiver_click_in",
+ "IDL:Hello/TimeOutConsumer:1.0",
+ CIAO::Container::Facet_Consumer
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (::Hello::TimeOutConsumer::_nil ());
+
+ ::Components::EventConsumerBase_var ecb =
+ ::Components::EventConsumerBase::_narrow (
+ obj.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (::Hello::TimeOutConsumer::_nil ());
+
+ this->add_consumer (
+ "click_in",
+ ecb.in ());
+
+ return ecb._retn ();
+ }
+
+ ::Components::Cookie *
+ Receiver_Servant::connect (
+ const char *name,
+ ::CORBA::Object_ptr connection
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::AlreadyConnected,
+ ::Components::ExceededConnectionLimit))
+ {
+ // If the component has no receptacles, this will be unused.
+ ACE_UNUSED_ARG (connection);
+
+ if (name == 0)
+ {
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ if (ACE_OS::strcmp (name, "read_message") == 0)
+ {
+ ::Hello::ReadMessage_var _ciao_conn =
+ ::Hello::ReadMessage::_narrow (
+ connection
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ if (::CORBA::is_nil (_ciao_conn.in ()))
+ {
+ ACE_THROW_RETURN (::Components::InvalidConnection (), 0);
+ }
+
+ // Simplex connect.
+ this->connect_read_message (
+ _ciao_conn.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ return 0;
+ }
+
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ CORBA::Object_ptr
+ Receiver_Servant::disconnect (
+ const char *name,
+ ::Components::Cookie * ck
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::CookieRequired,
+ ::Components::NoConnection))
+ {
+ if (name == 0)
+ {
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::CORBA::Object::_nil ());
+ }
+
+ if (ACE_OS::strcmp (name, "read_message") == 0)
+ {
+ // Simplex disconnect.
+ return this->disconnect_read_message (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::CORBA::Object::_nil ());
+
+ ACE_UNUSED_ARG (ck);
+ }
+
+ void
+ Receiver_Servant::connect_read_message (
+ ::Hello::ReadMessage_ptr c
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::AlreadyConnected,
+ ::Components::InvalidConnection))
+ {
+ this->context_->connect_read_message (
+ c
+ ACE_ENV_ARG_PARAMETER);
+ }
+
+ ::Hello::ReadMessage_ptr
+ Receiver_Servant::disconnect_read_message (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::NoConnection))
+ {
+ return this->context_->disconnect_read_message (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+
+ ::Hello::ReadMessage_ptr
+ Receiver_Servant::get_connection_read_message (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ return this->context_->get_connection_read_message (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+
+ void
+ Receiver_Servant::connect_consumer (
+ const char * emitter_name,
+ ::Components::EventConsumerBase_ptr consumer
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::AlreadyConnected,
+ ::Components::InvalidConnection))
+ {
+ if (emitter_name == 0)
+ {
+ ACE_THROW (::CORBA::BAD_PARAM ());
+ }
+
+ ACE_UNUSED_ARG (consumer);
+ ACE_THROW (::Components::InvalidName ());
+ }
+
+ ::Components::Cookie *
+ Receiver_Servant::subscribe (
+ const char *publisher_name,
+ ::Components::EventConsumerBase_ptr subscribe
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::ExceededConnectionLimit))
+ {
+ // Just in case there are no if blocks
+ ACE_UNUSED_ARG (subscribe);
+
+ if (publisher_name == 0)
+ {
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ ::Components::EventConsumerBase_ptr
+ Receiver_Servant::unsubscribe (
+ const char *publisher_name,
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection))
+ {
+ // Just in case there are no if blocks
+ ACE_UNUSED_ARG (ck);
+
+ if (publisher_name == 0)
+ {
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::Components::EventConsumerBase::_nil ());
+ }
+
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::Components::EventConsumerBase::_nil ());
+ }
+
+ CORBA::Object_ptr
+ Receiver_Servant::get_facet_executor (const char *name
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException))
+ {
+ if (name == 0)
+ {
+ ACE_THROW_RETURN (
+ ::CORBA::BAD_PARAM (),
+ ::CORBA::Object::_nil ());
+ }
+
+ return CORBA::Object::_nil ();
+ }
+
+ // Supported operations.
+
+ // Component attribute operations.
+
+ // Private method to populate the port tables.
+ void
+ Receiver_Servant::populate_port_tables (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ ACE_ENV_ARG_NOT_USED;
+ ::CORBA::Object_var obj_var;
+ ::Components::EventConsumerBase_var ecb_var;
+
+ ecb_var =
+ this->get_consumer_click_in_i (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+ }
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ ReceiverHome_Servant::ReceiverHome_Servant (
+ ::Hello::CCM_ReceiverHome_ptr exe,
+ ::CIAO::Session_Container *c)
+ : ACE_NESTED_CLASS (CIAO, Home_Servant_Impl_Base (c)),
+ home_svnt_base (exe, c)
+ {
+ }
+
+ ReceiverHome_Servant::~ReceiverHome_Servant (void)
+ {
+ }
+
+ // Home operations.
+
+ // Home supported interface operations.
+
+ // Home factory and finder operations.
+
+ // Home attribute operations.
+ }
+
+ extern "C" RECEIVER_SVNT_Export ::PortableServer::Servant
+ createReceiverHome_Servant (
+ ::Components::HomeExecutorBase_ptr p,
+ CIAO::Session_Container *c
+ ACE_ENV_ARG_DECL)
+ {
+ if (p == 0)
+ {
+ return 0;
+ }
+
+ ::Hello::CCM_ReceiverHome_var x =
+ ::Hello::CCM_ReceiverHome::_narrow (
+ p
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ if (::CORBA::is_nil (x.in ()))
+ {
+ return 0;
+ }
+
+ return new
+ CIAO_GLUE_Hello::ReceiverHome_Servant (
+ x.in (),
+ c);
+ }
+}
+
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.cpp.no-connections b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.cpp.no-connections
new file mode 100644
index 00000000000..ade8f64fff2
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.cpp.no-connections
@@ -0,0 +1,317 @@
+// $Id$
+//
+// **** Code generated by the ****
+// **** Component Integrated ACE ORB (CIAO) CIDL Compiler ****
+// CIAO has been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// CIDL Compiler has been developed by:
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about CIAO is available at:
+// http://www.dre.vanderbilt.edu/CIAO
+
+#include "Receiver_svnt.h"
+#include "Cookies.h"
+#include "ciao/Servant_Activator.h"
+#include "ciao/Port_Activator_T.h"
+
+namespace Receiver_Impl
+{
+ namespace CIAO_GLUE_Hello
+ {
+ Receiver_Context::Receiver_Context (
+ ::Components::CCMHome_ptr home,
+ ::CIAO::Swapping_Container *c,
+ Receiver_Servant *sv)
+ : ACE_NESTED_CLASS (CIAO, Context_Impl_Base (home, c)),
+ ctx_svnt_base (home, c, sv)
+ {
+ }
+
+ Receiver_Context::~Receiver_Context (void)
+ {
+ }
+
+ // Operations for Receiver receptacles and event sources,
+ // defined in ::Hello::CCM_Receiver_Context.
+
+ // CIAO-specific.
+
+ Receiver_Context *
+ Receiver_Context::_narrow (
+ ::Components::SessionContext_ptr p
+ ACE_ENV_ARG_DECL_NOT_USED)
+ {
+ return dynamic_cast<Receiver_Context *> (p);
+ }
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ Receiver_Servant::Receiver_Servant (
+ ::Hello::CCM_Receiver_ptr exe,
+ ::Components::CCMHome_ptr h,
+ ::CIAO::Swapping_Container *c)
+ : ACE_NESTED_CLASS (CIAO, Servant_Impl_Base (c)),
+ comp_svnt_base (exe, c)
+ {
+ this->context_ = new Receiver_Context (h, c, this);
+
+ ACE_TRY_NEW_ENV
+ {
+ ::Components::SessionComponent_var scom =
+ ::Components::SessionComponent::_narrow (
+ exe
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (! ::CORBA::is_nil (scom.in ()))
+ {
+ scom->set_session_context (
+ this->context_
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+
+ this->populate_port_tables (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+
+ ACE_CATCHANY
+ {
+ }
+
+ ACE_ENDTRY;
+ }
+
+ Receiver_Servant::~Receiver_Servant (void)
+ {
+ }
+
+ void
+ Receiver_Servant::set_attributes (
+ const ::Components::ConfigValues &descr
+ ACE_ENV_ARG_DECL_NOT_USED)
+ {
+ for (CORBA::ULong i = 0;
+ i < descr.length ();
+ ++i)
+ {
+ const char *descr_name = descr[i]->name ();
+ ::CORBA::Any &descr_value = descr[i]->value ();
+
+ ACE_UNUSED_ARG (descr_name);
+ ACE_UNUSED_ARG (descr_value);
+ }
+ }
+
+ ::Components::Cookie *
+ Receiver_Servant::connect (
+ const char *name,
+ ::CORBA::Object_ptr connection
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::AlreadyConnected,
+ ::Components::ExceededConnectionLimit))
+ {
+ // If the component has no receptacles, this will be unused.
+ ACE_UNUSED_ARG (connection);
+
+ if (name == 0)
+ {
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ CORBA::Object_ptr
+ Receiver_Servant::disconnect (
+ const char *name,
+ ::Components::Cookie * ck
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::CookieRequired,
+ ::Components::NoConnection))
+ {
+ if (name == 0)
+ {
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::CORBA::Object::_nil ());
+ }
+
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::CORBA::Object::_nil ());
+
+ ACE_UNUSED_ARG (ck);
+ }
+
+ void
+ Receiver_Servant::connect_consumer (
+ const char * emitter_name,
+ ::Components::EventConsumerBase_ptr consumer
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::AlreadyConnected,
+ ::Components::InvalidConnection))
+ {
+ if (emitter_name == 0)
+ {
+ ACE_THROW (::CORBA::BAD_PARAM ());
+ }
+
+ ACE_UNUSED_ARG (consumer);
+ ACE_THROW (::Components::InvalidName ());
+ }
+
+ ::Components::Cookie *
+ Receiver_Servant::subscribe (
+ const char *publisher_name,
+ ::Components::EventConsumerBase_ptr subscribe
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::ExceededConnectionLimit))
+ {
+ // Just in case there are no if blocks
+ ACE_UNUSED_ARG (subscribe);
+
+ if (publisher_name == 0)
+ {
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ ::Components::EventConsumerBase_ptr
+ Receiver_Servant::unsubscribe (
+ const char *publisher_name,
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection))
+ {
+ // Just in case there are no if blocks
+ ACE_UNUSED_ARG (ck);
+
+ if (publisher_name == 0)
+ {
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::Components::EventConsumerBase::_nil ());
+ }
+
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::Components::EventConsumerBase::_nil ());
+ }
+
+ CORBA::Object_ptr
+ Receiver_Servant::get_facet_executor (const char *name
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException))
+ {
+ if (name == 0)
+ {
+ ACE_THROW_RETURN (
+ ::CORBA::BAD_PARAM (),
+ ::CORBA::Object::_nil ());
+ }
+
+ return CORBA::Object::_nil ();
+ }
+
+ // Supported operations.
+
+ // Component attribute operations.
+
+ // Private method to populate the port tables.
+ void
+ Receiver_Servant::populate_port_tables (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ ACE_ENV_ARG_NOT_USED;
+ ::CORBA::Object_var obj_var;
+ ::Components::EventConsumerBase_var ecb_var;
+ }
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ ReceiverHome_Servant::ReceiverHome_Servant (
+ ::Hello::CCM_ReceiverHome_ptr exe,
+ ::CIAO::Swapping_Container *c)
+ : ACE_NESTED_CLASS (CIAO, Swapping_Servant_Home_Impl_Base (c)),
+ home_svnt_base (exe, c, "Receiver_Impl_Hello_Receiver",
+ "Receiver_Impl_Hello_Receiver")
+ {
+ }
+
+ ReceiverHome_Servant::~ReceiverHome_Servant (void)
+ {
+ }
+
+ // Home operations.
+
+ // Home supported interface operations.
+
+ // Home factory and finder operations.
+
+ // Home attribute operations.
+ }
+
+ extern "C" RECEIVER_SVNT_Export ::PortableServer::Servant
+ createReceiverHome_Servant (
+ ::Components::HomeExecutorBase_ptr p,
+ CIAO::Swapping_Container *c
+ ACE_ENV_ARG_DECL)
+ {
+ if (p == 0)
+ {
+ return 0;
+ }
+
+ ::Hello::CCM_ReceiverHome_var x =
+ ::Hello::CCM_ReceiverHome::_narrow (
+ p
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ if (::CORBA::is_nil (x.in ()))
+ {
+ return 0;
+ }
+
+ return new
+ CIAO_GLUE_Hello::ReceiverHome_Servant (
+ x.in (),
+ c);
+ }
+}
+
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.cpp.with-connections b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.cpp.with-connections
new file mode 100644
index 00000000000..9f7a372eb76
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.cpp.with-connections
@@ -0,0 +1,608 @@
+// $Id$
+//
+// **** Code generated by the ****
+// **** Component Integrated ACE ORB (CIAO) CIDL Compiler ****
+// CIAO has been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// CIDL Compiler has been developed by:
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about CIAO is available at:
+// http://www.dre.vanderbilt.edu/CIAO
+
+#include "Receiver_svnt.h"
+#include "Cookies.h"
+#include "ciao/Servant_Activator.h"
+#include "ciao/Port_Activator_T.h"
+
+namespace Receiver_Impl
+{
+ namespace CIAO_GLUE_Hello
+ {
+ Receiver_Context::Receiver_Context (
+ ::Components::CCMHome_ptr home,
+ ::CIAO::Session_Container *c,
+ Receiver_Servant *sv)
+ : ACE_NESTED_CLASS (CIAO, Context_Impl_Base (home, c)),
+ ctx_svnt_base (home, c, sv)
+ {
+ }
+
+ Receiver_Context::~Receiver_Context (void)
+ {
+ }
+
+ // Operations for Receiver receptacles and event sources,
+ // defined in ::Hello::CCM_Receiver_Context.
+
+ ::Hello::ReadMessage_ptr
+ Receiver_Context::get_connection_read_message (
+ ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ return ::Hello::ReadMessage::_duplicate (
+ this->ciao_uses_read_message_.in ());
+ }
+
+ /*
+ ::Components::ConsumerDescriptions *
+ Receiver_Context::get_all_consumers (
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException))
+ {
+ }
+ */
+
+ void
+ Receiver_Context::connect_read_message (
+ ::Hello::ReadMessage_ptr c
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::AlreadyConnected,
+ ::Components::InvalidConnection))
+ {
+ if (!CORBA::is_nil (this->ciao_uses_read_message_.in ()))
+ {
+ ACE_THROW (::Components::AlreadyConnected ());
+ }
+
+ if (CORBA::is_nil (c))
+ {
+ ACE_THROW (::Components::InvalidConnection ());
+ }
+
+ this->ciao_uses_read_message_ =
+ ::Hello::ReadMessage::_duplicate (c);
+ }
+
+ ::Hello::ReadMessage_ptr
+ Receiver_Context::disconnect_read_message (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::NoConnection))
+ {
+ if (CORBA::is_nil (this->ciao_uses_read_message_.in ()))
+ {
+ ACE_THROW_RETURN (
+ ::Components::NoConnection (),
+ ::Hello::ReadMessage::_nil ());
+ }
+
+ return this->ciao_uses_read_message_._retn ();
+ }
+
+ // CIAO-specific.
+
+ Receiver_Context *
+ Receiver_Context::_narrow (
+ ::Components::SessionContext_ptr p
+ ACE_ENV_ARG_DECL_NOT_USED)
+ {
+ return dynamic_cast<Receiver_Context *> (p);
+ }
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ Receiver_Servant::Receiver_Servant (
+ ::Hello::CCM_Receiver_ptr exe,
+ ::Components::CCMHome_ptr h,
+ ::CIAO::Home_Servant_Impl_Base *home_servant,
+ ::CIAO::Session_Container *c)
+ : ACE_NESTED_CLASS (CIAO, Servant_Impl_Base (h, home_servant, c)),
+ comp_svnt_base (exe, h, home_servant, c)
+ {
+ this->context_ = new Receiver_Context (h, c, this);
+
+ CIAO_REGISTER_OBV_FACTORY (
+ ::Hello::TimeOut_init,
+ ::Hello::TimeOut);
+
+ ACE_TRY_NEW_ENV
+ {
+ ::Components::SessionComponent_var scom =
+ ::Components::SessionComponent::_narrow (
+ exe
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (! ::CORBA::is_nil (scom.in ()))
+ {
+ scom->set_session_context (
+ this->context_
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+
+ this->populate_port_tables (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+
+ ACE_CATCHANY
+ {
+ }
+
+ ACE_ENDTRY;
+ }
+
+ Receiver_Servant::~Receiver_Servant (void)
+ {
+ }
+
+ void
+ Receiver_Servant::set_attributes (
+ const ::Components::ConfigValues &descr
+ ACE_ENV_ARG_DECL_NOT_USED)
+ {
+ for (CORBA::ULong i = 0;
+ i < descr.length ();
+ ++i)
+ {
+ const char *descr_name = descr[i]->name ();
+ ::CORBA::Any &descr_value = descr[i]->value ();
+
+ ACE_UNUSED_ARG (descr_name);
+ ACE_UNUSED_ARG (descr_value);
+ }
+ }
+
+ /*
+ ::Components::ConsumerDescriptions *
+ Receiver_Servant::get_all_consumers (
+ ACE_ENV_SINGLE_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ return this->context_->get_all_consumers (
+ ACE_ENV_ARG_PARAMETER);
+ }
+ */
+
+ Receiver_Servant::TimeOutConsumer_click_in_Servant::TimeOutConsumer_click_in_Servant (
+ ::Hello::CCM_Receiver_ptr executor,
+ ::Hello::CCM_Receiver_Context_ptr c)
+ : executor_ (::Hello::CCM_Receiver::_duplicate (executor)),
+ ctx_ (::Hello::CCM_Receiver_Context::_duplicate (c))
+ {
+ }
+
+ Receiver_Servant::TimeOutConsumer_click_in_Servant::~TimeOutConsumer_click_in_Servant (void)
+ {
+ }
+
+ CORBA::Object_ptr
+ Receiver_Servant::TimeOutConsumer_click_in_Servant::_get_component (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ return this->ctx_->get_CCM_object (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+
+ void
+ Receiver_Servant::TimeOutConsumer_click_in_Servant::push_TimeOut (
+ ::Hello::TimeOut *evt
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ this->executor_->push_click_in (
+ evt
+ ACE_ENV_ARG_PARAMETER);
+ }
+
+ // Inherited from ::Components::EventConsumerBase.
+ void
+ Receiver_Servant::TimeOutConsumer_click_in_Servant::push_event (
+ ::Components::EventBase *ev
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::BadEventType))
+ {
+ ::Hello::TimeOut_var ev_type =
+ ::Hello::TimeOut::_downcast (ev);
+
+ if (ev_type.in () != 0)
+ {
+ this->push_TimeOut (
+ ev_type.in ()
+ ACE_ENV_ARG_PARAMETER);
+
+ return;
+ }
+
+ ACE_THROW (::Components::BadEventType ());
+ }
+
+ ::Hello::TimeOutConsumer_ptr
+ Receiver_Servant::get_consumer_click_in (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ if (! ::CORBA::is_nil (this->consumes_click_in_.in ()))
+ {
+ return ::Hello::TimeOutConsumer::_duplicate (this->consumes_click_in_.in ());
+ }
+
+ ::Components::EventConsumerBase_var obj =
+ this->get_consumer_click_in_i (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (::Hello::TimeOutConsumer::_nil ());
+
+ ::Hello::TimeOutConsumer_var eco =
+ ::Hello::TimeOutConsumer::_narrow (
+ obj.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (::Hello::TimeOutConsumer::_nil ());
+
+ this->consumes_click_in_ = eco;
+ return ::Hello::TimeOutConsumer::_duplicate (this->consumes_click_in_.in ());
+ }
+
+ ::Components::EventConsumerBase_ptr
+ Receiver_Servant::get_consumer_click_in_i (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ ::Components::EventConsumerBase_ptr ret =
+ this->lookup_consumer ("click_in");
+
+ if (! ::CORBA::is_nil (ret))
+ {
+ return ret;
+ }
+
+ CIAO::Port_Activator_T<
+ Receiver_Servant::TimeOutConsumer_click_in_Servant,
+ ::Hello::CCM_Receiver,
+ ::Hello::CCM_Receiver_Context,
+ Receiver_Servant > *tmp = 0;
+
+ typedef CIAO::Port_Activator_T<
+ Receiver_Servant::TimeOutConsumer_click_in_Servant,
+ ::Hello::CCM_Receiver,
+ ::Hello::CCM_Receiver_Context,
+ Receiver_Servant >
+ MACRO_MADNESS_TYPEDEF;
+
+
+ ACE_NEW_THROW_EX (
+ tmp,
+ MACRO_MADNESS_TYPEDEF (
+ "Hello_Receiver_click_in",
+ "click_in",
+ CIAO::Port_Activator::Sink,
+ this->executor_.in (),
+ this->context_,
+ this),
+ CORBA::NO_MEMORY ());
+
+
+ CIAO::Servant_Activator *sa =
+ this->container_->ports_servant_activator ();
+
+ if (!sa->register_port_activator (tmp))
+ {
+ return 0;
+ }
+
+ ::CORBA::Object_var obj =
+ this->container_->generate_reference (
+ "Hello_Receiver_click_in",
+ "IDL:Hello/TimeOutConsumer:1.0",
+ CIAO::Container::Facet_Consumer
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (::Hello::TimeOutConsumer::_nil ());
+
+ ::Components::EventConsumerBase_var ecb =
+ ::Components::EventConsumerBase::_narrow (
+ obj.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (::Hello::TimeOutConsumer::_nil ());
+
+ this->add_consumer (
+ "click_in",
+ ecb.in ());
+
+ return ecb._retn ();
+ }
+
+ ::Components::Cookie *
+ Receiver_Servant::connect (
+ const char *name,
+ ::CORBA::Object_ptr connection
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::AlreadyConnected,
+ ::Components::ExceededConnectionLimit))
+ {
+ // If the component has no receptacles, this will be unused.
+ ACE_UNUSED_ARG (connection);
+
+ if (name == 0)
+ {
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ if (ACE_OS::strcmp (name, "read_message") == 0)
+ {
+ ::Hello::ReadMessage_var _ciao_conn =
+ ::Hello::ReadMessage::_narrow (
+ connection
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ if (::CORBA::is_nil (_ciao_conn.in ()))
+ {
+ ACE_THROW_RETURN (::Components::InvalidConnection (), 0);
+ }
+
+ // Simplex connect.
+ this->connect_read_message (
+ _ciao_conn.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ return 0;
+ }
+
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ CORBA::Object_ptr
+ Receiver_Servant::disconnect (
+ const char *name,
+ ::Components::Cookie * ck
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::CookieRequired,
+ ::Components::NoConnection))
+ {
+ if (name == 0)
+ {
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::CORBA::Object::_nil ());
+ }
+
+ if (ACE_OS::strcmp (name, "read_message") == 0)
+ {
+ // Simplex disconnect.
+ return this->disconnect_read_message (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::CORBA::Object::_nil ());
+
+ ACE_UNUSED_ARG (ck);
+ }
+
+ void
+ Receiver_Servant::connect_read_message (
+ ::Hello::ReadMessage_ptr c
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::AlreadyConnected,
+ ::Components::InvalidConnection))
+ {
+ this->context_->connect_read_message (
+ c
+ ACE_ENV_ARG_PARAMETER);
+ }
+
+ ::Hello::ReadMessage_ptr
+ Receiver_Servant::disconnect_read_message (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::NoConnection))
+ {
+ return this->context_->disconnect_read_message (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+
+ ::Hello::ReadMessage_ptr
+ Receiver_Servant::get_connection_read_message (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ return this->context_->get_connection_read_message (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+
+ void
+ Receiver_Servant::connect_consumer (
+ const char * emitter_name,
+ ::Components::EventConsumerBase_ptr consumer
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::AlreadyConnected,
+ ::Components::InvalidConnection))
+ {
+ if (emitter_name == 0)
+ {
+ ACE_THROW (::CORBA::BAD_PARAM ());
+ }
+
+ ACE_UNUSED_ARG (consumer);
+ ACE_THROW (::Components::InvalidName ());
+ }
+
+ ::Components::Cookie *
+ Receiver_Servant::subscribe (
+ const char *publisher_name,
+ ::Components::EventConsumerBase_ptr subscribe
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::ExceededConnectionLimit))
+ {
+ // Just in case there are no if blocks
+ ACE_UNUSED_ARG (subscribe);
+
+ if (publisher_name == 0)
+ {
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ ::Components::EventConsumerBase_ptr
+ Receiver_Servant::unsubscribe (
+ const char *publisher_name,
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection))
+ {
+ // Just in case there are no if blocks
+ ACE_UNUSED_ARG (ck);
+
+ if (publisher_name == 0)
+ {
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::Components::EventConsumerBase::_nil ());
+ }
+
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::Components::EventConsumerBase::_nil ());
+ }
+
+ CORBA::Object_ptr
+ Receiver_Servant::get_facet_executor (const char *name
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException))
+ {
+ if (name == 0)
+ {
+ ACE_THROW_RETURN (
+ ::CORBA::BAD_PARAM (),
+ ::CORBA::Object::_nil ());
+ }
+
+ return CORBA::Object::_nil ();
+ }
+
+ // Supported operations.
+
+ // Component attribute operations.
+
+ // Private method to populate the port tables.
+ void
+ Receiver_Servant::populate_port_tables (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ ACE_ENV_ARG_NOT_USED;
+ ::CORBA::Object_var obj_var;
+ ::Components::EventConsumerBase_var ecb_var;
+
+ ecb_var =
+ this->get_consumer_click_in_i (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+ }
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ ReceiverHome_Servant::ReceiverHome_Servant (
+ ::Hello::CCM_ReceiverHome_ptr exe,
+ ::CIAO::Session_Container *c)
+ : ACE_NESTED_CLASS (CIAO, Home_Servant_Impl_Base (c)),
+ home_svnt_base (exe, c, "Receiver_Impl_Hello_Receiver",
+ "Receiver_Impl_Hello_Receiver")
+ {
+ }
+
+ ReceiverHome_Servant::~ReceiverHome_Servant (void)
+ {
+ }
+
+ // Home operations.
+
+ // Home supported interface operations.
+
+ // Home factory and finder operations.
+
+ // Home attribute operations.
+ }
+
+ extern "C" RECEIVER_SVNT_Export ::PortableServer::Servant
+ createReceiverHome_Servant (
+ ::Components::HomeExecutorBase_ptr p,
+ CIAO::Session_Container *c
+ ACE_ENV_ARG_DECL)
+ {
+ if (p == 0)
+ {
+ return 0;
+ }
+
+ ::Hello::CCM_ReceiverHome_var x =
+ ::Hello::CCM_ReceiverHome::_narrow (
+ p
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ if (::CORBA::is_nil (x.in ()))
+ {
+ return 0;
+ }
+
+ return new
+ CIAO_GLUE_Hello::ReceiverHome_Servant (
+ x.in (),
+ c);
+ }
+}
+
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.h.new_impl b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.h.new_impl
new file mode 100644
index 00000000000..4f6b91009c4
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.h.new_impl
@@ -0,0 +1,356 @@
+// $Id$
+//
+// **** Code generated by the ****
+// **** Component Integrated ACE ORB (CIAO) CIDL Compiler ****
+// CIAO has been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// CIDL Compiler has been developed by:
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about CIAO is available at:
+// http://www.dre.vanderbilt.edu/CIAO
+
+#ifndef CIAO_GLUE_SESSION_RECEIVER_SVNT_H
+#define CIAO_GLUE_SESSION_RECEIVER_SVNT_H
+
+#include /**/ "ace/pre.h"
+
+#include "ReceiverEC.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "ciao/Container_Base.h"
+#include "ciao/Servant_Impl_T.h"
+#include "ciao/Context_Impl_T.h"
+#include "Home_Servant_Impl_Base.h"
+#include "ciao/Home_Servant_Impl_T.h"
+#include "ace/Active_Map_Manager_T.h"
+
+#include "ReceiverS.h"
+
+namespace Receiver_Impl
+{
+ namespace CIAO_GLUE_Hello
+ {
+ class Receiver_Servant;
+
+ class RECEIVER_SVNT_Export Receiver_Context
+ : public virtual CIAO::Context_Impl<
+ ::Hello::CCM_Receiver_Context,
+ Receiver_Servant,
+ ::Hello::Receiver,
+ ::Hello::Receiver_var
+ >
+ {
+ public:
+ // We will allow the servant glue code we generate to access our state.
+ friend class Receiver_Servant;
+
+ /// Hack for VC6.
+ typedef CIAO::Context_Impl<
+ ::Hello::CCM_Receiver_Context,
+ Receiver_Servant,
+ ::Hello::Receiver,
+ ::Hello::Receiver_var
+ > ctx_svnt_base;
+
+ Receiver_Context (
+ ::Components::CCMHome_ptr home,
+ ::CIAO::Session_Container *c,
+ Receiver_Servant *sv);
+
+ virtual ~Receiver_Context (void);
+
+ // Operations for Receiver receptacles and event sources,
+ // defined in ::Hello::CCM_Receiver_Context.
+
+ virtual ::Hello::ReadMessage_ptr
+ get_connection_read_message (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // CIAO-specific.
+
+ static Receiver_Context *
+ _narrow (
+ ::Components::SessionContext_ptr p
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS);
+
+ protected:
+ // Methods that manage this component's connections and consumers.
+
+ virtual void
+ connect_read_message (
+ ::Hello::ReadMessage_ptr
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::AlreadyConnected,
+ ::Components::InvalidConnection));
+
+ virtual ::Hello::ReadMessage_ptr
+ disconnect_read_message (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::NoConnection));
+
+ protected:
+ // Simplex read_message connection.
+ ::Hello::ReadMessage_var
+ ciao_uses_read_message_;
+ };
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ class RECEIVER_SVNT_Export Receiver_Servant
+ : public virtual CIAO::Servant_Impl<
+ POA_Hello::Receiver,
+ ::Hello::CCM_Receiver,
+ ::Hello::CCM_Receiver_var,
+ Receiver_Context
+ >
+ {
+ public:
+ /// Hack for VC6.
+ typedef CIAO::Servant_Impl<
+ POA_Hello::Receiver,
+ ::Hello::CCM_Receiver,
+ ::Hello::CCM_Receiver_var,
+ Receiver_Context
+ > comp_svnt_base;
+
+ Receiver_Servant (
+ ::Hello::CCM_Receiver_ptr executor,
+ ::Components::CCMHome_ptr home,
+ ::CIAO::Home_Servant_Impl_Base *home_servant,
+ ::CIAO::Session_Container *c);
+
+ virtual ~Receiver_Servant (void);
+
+ virtual void
+ set_attributes (
+ const ::Components::ConfigValues &descr
+ ACE_ENV_ARG_DECL);
+
+ // Supported operations.
+
+ // Public port operations.
+
+ virtual void
+ connect_read_message (
+ ::Hello::ReadMessage_ptr c
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::AlreadyConnected,
+ ::Components::InvalidConnection));
+
+ virtual ::Hello::ReadMessage_ptr
+ disconnect_read_message (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::NoConnection));
+
+ virtual ::Hello::ReadMessage_ptr
+ get_connection_read_message (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // Servant class for the click_in consumer.
+ class RECEIVER_SVNT_Export TimeOutConsumer_click_in_Servant
+ : public virtual POA_Hello::TimeOutConsumer,
+ public virtual PortableServer::RefCountServantBase
+ {
+ public:
+ TimeOutConsumer_click_in_Servant (
+ ::Hello::CCM_Receiver_ptr executor,
+ ::Hello::CCM_Receiver_Context_ptr c);
+
+ virtual ~TimeOutConsumer_click_in_Servant (void);
+
+ virtual void
+ push_TimeOut (
+ ::Hello::TimeOut *evt
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // Inherited from ::Components::EventConsumerBase.
+ virtual void
+ push_event (::Components::EventBase *ev
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::BadEventType));
+
+ // Get component implementation.
+ virtual CORBA::Object_ptr
+ _get_component (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ protected:
+ ::Hello::CCM_Receiver_var
+ executor_;
+
+ ::Hello::CCM_Receiver_Context_var
+ ctx_;
+ };
+
+ virtual ::Hello::TimeOutConsumer_ptr
+ get_consumer_click_in (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // Component attribute operations.
+
+ // Operations for Receptacles interface.
+
+ virtual ::Components::Cookie *
+ connect (
+ const char *name,
+ CORBA::Object_ptr connection
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::AlreadyConnected,
+ ::Components::ExceededConnectionLimit));
+
+ virtual CORBA::Object_ptr
+ disconnect (
+ const char *name,
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::CookieRequired,
+ ::Components::NoConnection));
+
+ // Operations for Events interface.
+
+ virtual ::Components::Cookie *
+ subscribe (
+ const char *publisher_name,
+ ::Components::EventConsumerBase_ptr subscriber
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::ExceededConnectionLimit));
+
+ virtual ::Components::EventConsumerBase_ptr
+ unsubscribe (
+ const char *publisher_name,
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection));
+
+ virtual void
+ connect_consumer (
+ const char *emitter_name,
+ ::Components::EventConsumerBase_ptr consumer
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::AlreadyConnected,
+ ::Components::InvalidConnection));
+
+ // CIAO specific operations on the servant
+ CORBA::Object_ptr
+ get_facet_executor (const char *name
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException));
+
+ private:
+
+ ::Hello::TimeOutConsumer_var
+ consumes_click_in_;
+
+ private:
+
+ void
+ populate_port_tables (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ ::Components::EventConsumerBase_ptr
+ get_consumer_click_in_i (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+ };
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ class RECEIVER_SVNT_Export ReceiverHome_Servant
+ : public virtual CIAO::Home_Servant_Impl<
+ POA_Hello::ReceiverHome,
+ ::Hello::CCM_ReceiverHome,
+ ::Hello::CCM_ReceiverHome_var,
+ ::Hello::Receiver,
+ ::Hello::Receiver_var,
+ ::Hello::CCM_Receiver,
+ ::Hello::CCM_Receiver_var,
+ Receiver_Servant
+ >
+ {
+ public:
+ /// Hack for VC6.
+ typedef CIAO::Home_Servant_Impl<
+ POA_Hello::ReceiverHome,
+ ::Hello::CCM_ReceiverHome,
+ ::Hello::CCM_ReceiverHome_var,
+ ::Hello::Receiver,
+ ::Hello::Receiver_var,
+ ::Hello::CCM_Receiver,
+ ::Hello::CCM_Receiver_var,
+ Receiver_Servant
+ > home_svnt_base;
+
+ ReceiverHome_Servant (
+ ::Hello::CCM_ReceiverHome_ptr exe,
+ ::CIAO::Session_Container *c);
+
+ virtual ~ReceiverHome_Servant (void);
+
+ // Home operations.
+
+ // Home factory and finder operations.
+
+ // Attribute operations.
+ };
+
+ extern "C" RECEIVER_SVNT_Export ::PortableServer::Servant
+ createReceiverHome_Servant (
+ ::Components::HomeExecutorBase_ptr p,
+ CIAO::Session_Container *c
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS);
+ }
+}
+
+#include /**/ "ace/post.h"
+
+#endif /* CIAO_GLUE_SESSION_RECEIVER_SVNT_H */
+
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.h.no-connections b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.h.no-connections
new file mode 100644
index 00000000000..ed3cd72fcad
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.h.no-connections
@@ -0,0 +1,258 @@
+// $Id$
+//
+// **** Code generated by the ****
+// **** Component Integrated ACE ORB (CIAO) CIDL Compiler ****
+// CIAO has been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// CIDL Compiler has been developed by:
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about CIAO is available at:
+// http://www.dre.vanderbilt.edu/CIAO
+
+#ifndef CIAO_GLUE_SESSION_RECEIVER_SVNT_H
+#define CIAO_GLUE_SESSION_RECEIVER_SVNT_H
+
+#include /**/ "ace/pre.h"
+
+#include "ReceiverEC.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "ciao/Container_Base.h"
+#include "ciao/Swapping_Container.h"
+#include "ciao/Servant_Impl_T.h"
+#include "ciao/Context_Impl_T.h"
+#include "ciao/Home_Servant_Impl_T.h"
+#include "ciao/Swapping_Servant_Home_Impl_T.h"
+#include "ace/Active_Map_Manager_T.h"
+
+#include "ReceiverS.h"
+
+namespace Receiver_Impl
+{
+ namespace CIAO_GLUE_Hello
+ {
+ class Receiver_Servant;
+
+ class RECEIVER_SVNT_Export Receiver_Context
+ : public virtual CIAO::Context_Impl<
+ ::Hello::CCM_Receiver_Context,
+ Receiver_Servant,
+ ::Hello::Receiver,
+ ::Hello::Receiver_var
+ >
+ {
+ public:
+ // We will allow the servant glue code we generate to access our state.
+ friend class Receiver_Servant;
+
+ /// Hack for VC6.
+ typedef CIAO::Context_Impl<
+ ::Hello::CCM_Receiver_Context,
+ Receiver_Servant,
+ ::Hello::Receiver,
+ ::Hello::Receiver_var
+ > ctx_svnt_base;
+
+ Receiver_Context (
+ ::Components::CCMHome_ptr home,
+ ::CIAO::Swapping_Container *c,
+ Receiver_Servant *sv);
+
+ virtual ~Receiver_Context (void);
+
+ // Operations for Receiver receptacles and event sources,
+ // defined in ::Hello::CCM_Receiver_Context.
+
+ // CIAO-specific.
+
+ static Receiver_Context *
+ _narrow (
+ ::Components::SessionContext_ptr p
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS);
+
+ protected:
+ // Methods that manage this component's connections and consumers.
+
+ protected:
+ };
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ class RECEIVER_SVNT_Export Receiver_Servant
+ : public virtual CIAO::Servant_Impl<
+ POA_Hello::Receiver,
+ ::Hello::CCM_Receiver,
+ ::Hello::CCM_Receiver_var,
+ Receiver_Context
+ >
+ {
+ public:
+ /// Hack for VC6.
+ typedef CIAO::Servant_Impl<
+ POA_Hello::Receiver,
+ ::Hello::CCM_Receiver,
+ ::Hello::CCM_Receiver_var,
+ Receiver_Context
+ > comp_svnt_base;
+
+ Receiver_Servant (
+ ::Hello::CCM_Receiver_ptr executor,
+ ::Components::CCMHome_ptr home,
+ ::CIAO::Swapping_Container *c);
+
+ virtual ~Receiver_Servant (void);
+
+ virtual void
+ set_attributes (
+ const ::Components::ConfigValues &descr
+ ACE_ENV_ARG_DECL);
+
+ // Supported operations.
+
+ // Public port operations.
+
+ // Component attribute operations.
+
+ // Operations for Receptacles interface.
+
+ virtual ::Components::Cookie *
+ connect (
+ const char *name,
+ CORBA::Object_ptr connection
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::AlreadyConnected,
+ ::Components::ExceededConnectionLimit));
+
+ virtual CORBA::Object_ptr
+ disconnect (
+ const char *name,
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::CookieRequired,
+ ::Components::NoConnection));
+
+ // Operations for Events interface.
+
+ virtual ::Components::Cookie *
+ subscribe (
+ const char *publisher_name,
+ ::Components::EventConsumerBase_ptr subscriber
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::ExceededConnectionLimit));
+
+ virtual ::Components::EventConsumerBase_ptr
+ unsubscribe (
+ const char *publisher_name,
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection));
+
+ virtual void
+ connect_consumer (
+ const char *emitter_name,
+ ::Components::EventConsumerBase_ptr consumer
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::AlreadyConnected,
+ ::Components::InvalidConnection));
+
+ // CIAO specific operations on the servant
+ CORBA::Object_ptr
+ get_facet_executor (const char *name
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException));
+
+ private:
+
+ private:
+
+ void
+ populate_port_tables (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+ };
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ class RECEIVER_SVNT_Export ReceiverHome_Servant
+ : public virtual CIAO::Swapping_Servant_Home_Impl<
+ POA_Hello::ReceiverHome,
+ ::Hello::CCM_ReceiverHome,
+ ::Hello::CCM_ReceiverHome_var,
+ ::Hello::Receiver,
+ ::Hello::Receiver_var,
+ ::Hello::CCM_Receiver,
+ ::Hello::CCM_Receiver_var,
+ Receiver_Servant
+ >
+ {
+ public:
+ /// Hack for VC6.
+ typedef CIAO::Swapping_Servant_Home_Impl<
+ POA_Hello::ReceiverHome,
+ ::Hello::CCM_ReceiverHome,
+ ::Hello::CCM_ReceiverHome_var,
+ ::Hello::Receiver,
+ ::Hello::Receiver_var,
+ ::Hello::CCM_Receiver,
+ ::Hello::CCM_Receiver_var,
+ Receiver_Servant
+ > home_svnt_base;
+
+ ReceiverHome_Servant (
+ ::Hello::CCM_ReceiverHome_ptr exe,
+ ::CIAO::Swapping_Container *c);
+
+ virtual ~ReceiverHome_Servant (void);
+
+ // Home operations.
+
+ // Home factory and finder operations.
+
+ // Attribute operations.
+ };
+
+ extern "C" RECEIVER_SVNT_Export ::PortableServer::Servant
+ createReceiverHome_Servant (
+ ::Components::HomeExecutorBase_ptr p,
+ CIAO::Swapping_Container *c
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS);
+ }
+}
+
+#include /**/ "ace/post.h"
+
+#endif /* CIAO_GLUE_SESSION_RECEIVER_SVNT_H */
+
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.h.with-connections b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.h.with-connections
new file mode 100644
index 00000000000..553ce363740
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.h.with-connections
@@ -0,0 +1,370 @@
+// $Id$
+//
+// **** Code generated by the ****
+// **** Component Integrated ACE ORB (CIAO) CIDL Compiler ****
+// CIAO has been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// CIDL Compiler has been developed by:
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about CIAO is available at:
+// http://www.dre.vanderbilt.edu/CIAO
+
+#ifndef CIAO_GLUE_SESSION_RECEIVER_SVNT_H
+#define CIAO_GLUE_SESSION_RECEIVER_SVNT_H
+
+#include /**/ "ace/pre.h"
+
+#include "ReceiverEC.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "ciao/Container_Base.h"
+#include "ciao/Swapping_Container.h"
+#include "ciao/Servant_Impl_T.h"
+#include "ciao/Home_Servant_Impl_Base.h"
+#include "ciao/Context_Impl_T.h"
+#include "ciao/Home_Servant_Impl_T.h"
+#include "ciao/Swapping_Servant_Home_Impl_T.h"
+#include "ace/Active_Map_Manager_T.h"
+
+#include "ReceiverS.h"
+
+namespace Receiver_Impl
+{
+ namespace CIAO_GLUE_Hello
+ {
+ class Receiver_Servant;
+
+ class RECEIVER_SVNT_Export Receiver_Context
+ : public virtual CIAO::Context_Impl<
+ ::Hello::CCM_Receiver_Context,
+ Receiver_Servant,
+ ::Hello::Receiver,
+ ::Hello::Receiver_var
+ >
+ {
+ public:
+ // We will allow the servant glue code we generate to access our state.
+ friend class Receiver_Servant;
+
+ /// Hack for VC6.
+ typedef CIAO::Context_Impl<
+ ::Hello::CCM_Receiver_Context,
+ Receiver_Servant,
+ ::Hello::Receiver,
+ ::Hello::Receiver_var
+ > ctx_svnt_base;
+
+ Receiver_Context (
+ ::Components::CCMHome_ptr home,
+ ::CIAO::Session_Container *c,
+ Receiver_Servant *sv);
+
+ virtual ~Receiver_Context (void);
+
+ // Operations for Receiver receptacles and event sources,
+ // defined in ::Hello::CCM_Receiver_Context.
+
+ virtual ::Hello::ReadMessage_ptr
+ get_connection_read_message (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // CIAO-specific.
+
+ static Receiver_Context *
+ _narrow (
+ ::Components::SessionContext_ptr p
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS);
+
+ protected:
+ // Methods that manage this component's connections and consumers.
+
+ /*
+ virtual ::Components::ConsumerDescriptions *
+ get_all_consumers (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+ */
+
+ virtual void
+ connect_read_message (
+ ::Hello::ReadMessage_ptr
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::AlreadyConnected,
+ ::Components::InvalidConnection));
+
+ virtual ::Hello::ReadMessage_ptr
+ disconnect_read_message (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::NoConnection));
+
+ protected:
+ // Simplex read_message connection.
+ ::Hello::ReadMessage_var
+ ciao_uses_read_message_;
+ };
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ class RECEIVER_SVNT_Export Receiver_Servant
+ : public virtual CIAO::Servant_Impl<
+ POA_Hello::Receiver,
+ ::Hello::CCM_Receiver,
+ ::Hello::CCM_Receiver_var,
+ Receiver_Context
+ >
+ {
+ public:
+ /// Hack for VC6.
+ typedef CIAO::Servant_Impl<
+ POA_Hello::Receiver,
+ ::Hello::CCM_Receiver,
+ ::Hello::CCM_Receiver_var,
+ Receiver_Context
+ > comp_svnt_base;
+
+ Receiver_Servant (
+ ::Hello::CCM_Receiver_ptr executor,
+ ::Components::CCMHome_ptr home,
+ ::CIAO::Home_Servant_Impl_Base *home_servant,
+ ::CIAO::Session_Container *c);
+
+ virtual ~Receiver_Servant (void);
+
+ virtual void
+ set_attributes (
+ const ::Components::ConfigValues &descr
+ ACE_ENV_ARG_DECL);
+
+ // Supported operations.
+
+ // Public port operations.
+
+ virtual void
+ connect_read_message (
+ ::Hello::ReadMessage_ptr c
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::AlreadyConnected,
+ ::Components::InvalidConnection));
+
+ virtual ::Hello::ReadMessage_ptr
+ disconnect_read_message (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::NoConnection));
+
+ /*
+ virtual ::Components::ConsumerDescriptions *
+ get_all_consumers (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+ */
+
+ virtual ::Hello::ReadMessage_ptr
+ get_connection_read_message (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // Servant class for the click_in consumer.
+ class RECEIVER_SVNT_Export TimeOutConsumer_click_in_Servant
+ : public virtual POA_Hello::TimeOutConsumer,
+ public virtual PortableServer::RefCountServantBase
+ {
+ public:
+ TimeOutConsumer_click_in_Servant (
+ ::Hello::CCM_Receiver_ptr executor,
+ ::Hello::CCM_Receiver_Context_ptr c);
+
+ virtual ~TimeOutConsumer_click_in_Servant (void);
+
+ virtual void
+ push_TimeOut (
+ ::Hello::TimeOut *evt
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // Inherited from ::Components::EventConsumerBase.
+ virtual void
+ push_event (::Components::EventBase *ev
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::BadEventType));
+
+ // Get component implementation.
+ virtual CORBA::Object_ptr
+ _get_component (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ protected:
+ ::Hello::CCM_Receiver_var
+ executor_;
+
+ ::Hello::CCM_Receiver_Context_var
+ ctx_;
+ };
+
+ virtual ::Hello::TimeOutConsumer_ptr
+ get_consumer_click_in (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // Component attribute operations.
+
+ // Operations for Receptacles interface.
+
+ virtual ::Components::Cookie *
+ connect (
+ const char *name,
+ CORBA::Object_ptr connection
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::AlreadyConnected,
+ ::Components::ExceededConnectionLimit));
+
+ virtual CORBA::Object_ptr
+ disconnect (
+ const char *name,
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::CookieRequired,
+ ::Components::NoConnection));
+
+ // Operations for Events interface.
+
+ virtual ::Components::Cookie *
+ subscribe (
+ const char *publisher_name,
+ ::Components::EventConsumerBase_ptr subscriber
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::ExceededConnectionLimit));
+
+ virtual ::Components::EventConsumerBase_ptr
+ unsubscribe (
+ const char *publisher_name,
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection));
+
+ virtual void
+ connect_consumer (
+ const char *emitter_name,
+ ::Components::EventConsumerBase_ptr consumer
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::AlreadyConnected,
+ ::Components::InvalidConnection));
+
+ // CIAO specific operations on the servant
+ CORBA::Object_ptr
+ get_facet_executor (const char *name
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException));
+
+ private:
+
+ ::Hello::TimeOutConsumer_var
+ consumes_click_in_;
+
+ private:
+
+ void
+ populate_port_tables (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ ::Components::EventConsumerBase_ptr
+ get_consumer_click_in_i (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+ };
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ class RECEIVER_SVNT_Export ReceiverHome_Servant
+ : public virtual CIAO::Swapping_Servant_Home_Impl<
+ POA_Hello::ReceiverHome,
+ ::Hello::CCM_ReceiverHome,
+ ::Hello::CCM_ReceiverHome_var,
+ ::Hello::Receiver,
+ ::Hello::Receiver_var,
+ ::Hello::CCM_Receiver,
+ ::Hello::CCM_Receiver_var,
+ Receiver_Servant
+ >
+ {
+ public:
+ /// Hack for VC6.
+ typedef CIAO::Swapping_Servant_Home_Impl<
+ POA_Hello::ReceiverHome,
+ ::Hello::CCM_ReceiverHome,
+ ::Hello::CCM_ReceiverHome_var,
+ ::Hello::Receiver,
+ ::Hello::Receiver_var,
+ ::Hello::CCM_Receiver,
+ ::Hello::CCM_Receiver_var,
+ Receiver_Servant
+ > home_svnt_base;
+
+ ReceiverHome_Servant (
+ ::Hello::CCM_ReceiverHome_ptr exe,
+ ::CIAO::Session_Container *c);
+
+ virtual ~ReceiverHome_Servant (void);
+
+ // Home operations.
+
+ // Home factory and finder operations.
+
+ // Attribute operations.
+ };
+
+ extern "C" RECEIVER_SVNT_Export ::PortableServer::Servant
+ createReceiverHome_Servant (
+ ::Components::HomeExecutorBase_ptr p,
+ CIAO::Session_Container *c
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS);
+ }
+}
+
+#include /**/ "ace/post.h"
+
+#endif /* CIAO_GLUE_SESSION_RECEIVER_SVNT_H */
+
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt_export.h b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt_export.h
new file mode 100644
index 00000000000..1c9eca2556d
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt_export.h
@@ -0,0 +1,54 @@
+
+// -*- C++ -*-
+// $Id$
+// Definition for Win32 Export directives.
+// This file is generated automatically by generate_export_file.pl RECEIVER_SVNT
+// ------------------------------
+#ifndef RECEIVER_SVNT_EXPORT_H
+#define RECEIVER_SVNT_EXPORT_H
+
+#include "ace/config-all.h"
+
+#if !defined (RECEIVER_SVNT_HAS_DLL)
+# define RECEIVER_SVNT_HAS_DLL 1
+#endif /* ! RECEIVER_SVNT_HAS_DLL */
+
+#if defined (RECEIVER_SVNT_HAS_DLL) && (RECEIVER_SVNT_HAS_DLL == 1)
+# if defined (RECEIVER_SVNT_BUILD_DLL)
+# define RECEIVER_SVNT_Export ACE_Proper_Export_Flag
+# define RECEIVER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
+# define RECEIVER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# else /* RECEIVER_SVNT_BUILD_DLL */
+# define RECEIVER_SVNT_Export ACE_Proper_Import_Flag
+# define RECEIVER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
+# define RECEIVER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# endif /* RECEIVER_SVNT_BUILD_DLL */
+#else /* RECEIVER_SVNT_HAS_DLL == 1 */
+# define RECEIVER_SVNT_Export
+# define RECEIVER_SVNT_SINGLETON_DECLARATION(T)
+# define RECEIVER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+#endif /* RECEIVER_SVNT_HAS_DLL == 1 */
+
+// Set RECEIVER_SVNT_NTRACE = 0 to turn on library specific tracing even if
+// tracing is turned off for ACE.
+#if !defined (RECEIVER_SVNT_NTRACE)
+# if (ACE_NTRACE == 1)
+# define RECEIVER_SVNT_NTRACE 1
+# else /* (ACE_NTRACE == 1) */
+# define RECEIVER_SVNT_NTRACE 0
+# endif /* (ACE_NTRACE == 1) */
+#endif /* !RECEIVER_SVNT_NTRACE */
+
+#if (RECEIVER_SVNT_NTRACE == 1)
+# define RECEIVER_SVNT_TRACE(X)
+#else /* (RECEIVER_SVNT_NTRACE == 1) */
+# if !defined (ACE_HAS_TRACE)
+# define ACE_HAS_TRACE
+# endif /* ACE_HAS_TRACE */
+# define RECEIVER_SVNT_TRACE(X) ACE_TRACE_IMPL(X)
+# include "ace/Trace.h"
+#endif /* (RECEIVER_SVNT_NTRACE == 1) */
+
+#endif /* RECEIVER_SVNT_EXPORT_H */
+
+// End of auto generated file.
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender.cidl b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender.cidl
new file mode 100644
index 00000000000..8ce22a223b0
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender.cidl
@@ -0,0 +1,17 @@
+//$Id$
+
+#ifndef SENDER_CIDL
+#define SENDER_CIDL
+
+#include "Sender.idl"
+
+composition session Sender_Impl
+{
+ home executor SenderHome_Exec
+ {
+ implements Hello::SenderHome;
+ manages Sender_Exec;
+ };
+};
+
+#endif /* SENDER_CIDL */
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender.idl b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender.idl
new file mode 100644
index 00000000000..e2c8ca64b0e
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender.idl
@@ -0,0 +1,32 @@
+//$Id$
+
+#ifndef CIAO_SENDER_IDL
+#define CIAO_SENDER_IDL
+
+
+#include "../Hello_Base/Hello_Base.idl"
+
+module Hello
+{
+ /* This is a Sender specific interface which will be used to get the
+ * process start.
+ */
+
+ interface trigger
+ {
+ void start ();
+ };
+
+ component Sender supports trigger
+ {
+ provides ReadMessage push_message;
+ publishes TimeOut click_out;
+ attribute string local_message;
+ };
+
+ home SenderHome manages Sender
+ {
+ };
+
+};
+#endif /*CIAO_SENDER_IDL*/
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender.mpc b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender.mpc
new file mode 100644
index 00000000000..cf456794089
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender.mpc
@@ -0,0 +1,103 @@
+// $Id$
+// This file is generated with "generate_component_mpc_extra.pl -p Hello_Base Sender"
+
+project(Hello_Base_Sender_DnC_stub): ciao_client_dnc {
+ after += Hello_Base_DnC_stub
+ sharedname = Sender_DnC_stub
+ idlflags += -Wb,stub_export_macro=SENDER_STUB_Export -Wb,stub_export_include=Sender_stub_export.h -Wb,skel_export_macro=SENDER_SVNT_Export -Wb,skel_export_include=Sender_svnt_export.h
+ dynamicflags = SENDER_STUB_BUILD_DLL
+ libs += Hello_Base_DnC_stub
+
+ IDL_Files {
+ Sender.idl
+ }
+
+ Source_Files {
+ SenderC.cpp
+
+ }
+}
+
+project(Hello_Base_Sender_DnC_svnt) : ciao_servant_dnc {
+ after += Hello_Base_DnC_svnt Hello_Base_Sender_DnC_stub
+ sharedname = Sender_DnC_svnt
+ libs += Sender_DnC_stub Hello_Base_DnC_stub Hello_Base_DnC_svnt
+
+ idlflags += -Wb,export_macro=SENDER_SVNT_Export -Wb,export_include=Sender_svnt_export.h
+ dynamicflags = SENDER_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ Sender.cidl
+ }
+
+ IDL_Files {
+ SenderE.idl
+ }
+
+ Source_Files {
+ SenderEC.cpp
+ SenderS.cpp
+ Sender_svnt.cpp
+ }
+}
+
+project(Hello_Base_Sender_DnC_exec) : ciao_component_dnc {
+ after += Hello_Base_Sender_DnC_svnt
+ sharedname = Sender_DnC_exec
+ libs += Sender_DnC_stub Sender_DnC_svnt Hello_Base_DnC_stub Hello_Base_DnC_svnt
+
+ idlflags += -Wb,export_macro=SENDER_EXEC_Export -Wb,export_include=Sender_exec_export.h
+ dynamicflags = SENDER_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Sender_exec.cpp
+ }
+}
+
+project(Hello_Base_Sender_DnC_exec_1) : ciao_component_dnc {
+ after += Hello_Base_Sender_DnC_svnt
+ sharedname = Sender_DnC_exec_1
+ libs += Sender_DnC_stub Sender_DnC_svnt Hello_Base_DnC_stub Hello_Base_DnC_svnt
+
+ idlflags += -Wb,export_macro=SENDER_EXEC_Export -Wb,export_include=Sender_exec_export.h
+ dynamicflags = SENDER_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Sender_exec_1.cpp
+ }
+}
+
+project(Hello_Base_Sender_DnC_exec_2) : ciao_component_dnc {
+ after += Hello_Base_Sender_DnC_svnt
+ sharedname = Sender_DnC_exec_2
+ libs += Sender_DnC_stub Sender_DnC_svnt Hello_Base_DnC_stub Hello_Base_DnC_svnt
+
+ idlflags += -Wb,export_macro=SENDER_EXEC_Export -Wb,export_include=Sender_exec_export.h
+ dynamicflags = SENDER_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Sender_exec_2.cpp
+ }
+}
+
+project (Hello_DnC_Starter) : ciao_client_dnc, valuetype{
+ exename = starter
+ after += Hello_Base_Sender_DnC_stub
+ libs += Sender_DnC_stub Hello_Base_DnC_stub
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ starter.cpp
+ }
+}
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/SenderE.idl.new_impl b/TAO/CIAO/DAnCE/examples/Hello/Sender/SenderE.idl.new_impl
new file mode 100644
index 00000000000..0ade2d3a1d0
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/SenderE.idl.new_impl
@@ -0,0 +1,71 @@
+// $Id$
+//
+// **** Code generated by the ****
+// **** Component Integrated ACE ORB (CIAO) CIDL Compiler ****
+// CIAO has been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// CIDL Compiler has been developed by:
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about CIAO is available at:
+// http://www.dre.vanderbilt.edu/CIAO
+
+#include "Sender.idl"
+module Hello
+{
+ local interface CCM_ReadMessage : ReadMessage
+ {
+ };
+};
+
+module Hello
+{
+ local interface CCM_Sender : ::Components::EnterpriseComponent, ::Hello::trigger
+ {
+ ::Hello::CCM_ReadMessage get_push_message ();
+ attribute string local_message;
+ };
+
+ local interface CCM_Sender_Context : ::Components::SessionContext
+ {
+ void push_click_out (in ::Hello::TimeOut e);
+ ::Components::ConsumerDescriptions get_registered_consumers
+ (in ::Components::FeatureName publisher_name);
+ void deactivate_facet (in ::Components::FeatureName name);
+ void update_port_activator (in ::Components::FeatureName name);
+ };
+
+ local interface CCM_SenderHomeImplicit
+ {
+ ::Components::EnterpriseComponent create () raises (::Components::CCMException);
+ };
+
+ local interface CCM_SenderHomeExplicit : ::Components::HomeExecutorBase
+ {
+ };
+
+ local interface CCM_SenderHome : CCM_SenderHomeExplicit, CCM_SenderHomeImplicit
+ {
+ };
+};
+
+module Sender_Impl
+{
+ typedef ::Hello::CCM_Sender_Context Sender_Exec_Context;
+ local interface Sender_Exec : ::Hello::CCM_Sender, ::Components::SessionComponent
+ {
+ };
+
+ local interface SenderHome_Exec : ::Hello::CCM_SenderHome
+ {
+ };
+};
+
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec.cpp b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec.cpp
new file mode 100644
index 00000000000..1acce82d312
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec.cpp
@@ -0,0 +1,207 @@
+//$Id$
+
+#include "Sender_exec.h"
+
+const char* first_exe_dll_name = "Sender_DnC_exec_1";
+const char* first_exe_entrypt = "createSenderExec_Impl";
+const char* second_exe_dll_name = "Sender_DnC_exec_2";
+const char* second_exe_entrypt = "createSenderExec_Impl";
+
+char*
+Sender_Impl::Message_Impl::get_message (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ ACE_DEBUG ((LM_DEBUG, "Sender sending out message. \n"));
+ return CORBA::string_dup (component_.message_.in ());
+}
+
+Sender_Impl::Sender_exec_i::~Sender_exec_i ()
+{
+}
+
+void
+Sender_Impl::Sender_exec_i::local_message (const char * local_message
+ ACE_ENV_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ message_ = CORBA::string_dup (local_message);
+}
+
+char *
+Sender_Impl::Sender_exec_i::local_message (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return CORBA::string_dup(message_);
+}
+
+Hello::CCM_ReadMessage_ptr
+Sender_Impl::Sender_exec_i::get_push_message
+(ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ ACE_DEBUG ((LM_DEBUG,
+ "Sender_Impl::Sender_exec.i::get_push_message called\n "));
+ return ( new Message_Impl (*this) );
+}
+
+void
+Sender_Impl::Sender_exec_i::start (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ Hello::TimeOut_var event = new OBV_Hello::TimeOut;
+ ACE_DEBUG ((LM_DEBUG, "Sender initiates the process.\n"));
+ this->context_->push_click_out (event ACE_ENV_ARG_PARAMETER);
+}
+
+void
+Sender_Impl::Sender_exec_i::set_session_context
+ (Components::SessionContext_ptr ctx
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG, "Sender_Impl::Sender_exec_i::set_session_context\n"));
+
+ this->context_ =
+ Sender_Impl::Sender_Exec_Context::_narrow (ctx
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ if (CORBA::is_nil (this->context_.in ()))
+ ACE_THROW (CORBA::INTERNAL ());
+}
+
+void
+Sender_Impl::Sender_exec_i::ciao_preactivate
+(ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG,
+ "Sender_Impl::Sender_exec_i::ciao_preactivate\n"));
+}
+
+void
+Sender_Impl::Sender_exec_i::ccm_activate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG,
+ "Sender_Impl::Sender_exec_i::ccm_activate\n"));
+}
+
+void
+Sender_Impl::Sender_exec_i::ciao_postactivate
+(ACE_ENV_SINGLE_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG,
+ "Sender_Impl::Sender_exec_i::ciao_postactivate\n"));
+}
+
+void
+Sender_Impl::Sender_exec_i::ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG, "Sender_Impl::Sender_exec_i::ccm_passivate\n"));
+}
+
+void
+Sender_Impl::Sender_exec_i::ccm_remove (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG, "Sender_Impl::Sender_exec_i::ccm_remove\n"));
+}
+
+
+Sender_Impl::SenderHome_exec_i::SenderHome_exec_i ()
+{
+}
+
+Sender_Impl::SenderHome_exec_i::~SenderHome_exec_i ()
+{
+}
+
+Sender_Impl::SenderSwap_exec_i::SenderSwap_exec_i ()
+ : count_ (0)
+{
+}
+
+Sender_Impl::SenderSwap_exec_i::~SenderSwap_exec_i ()
+{
+}
+
+::Components::EnterpriseComponent_ptr
+Sender_Impl::SenderSwap_exec_i::incarnate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // return new Sender_Impl::Sender_exec_i;
+
+ ExecFactory first_exec_creator = 0;
+ ExecFactory second_exec_creator = 0;
+ ACE_DLL first_dll, second_dll;
+
+ if (first_dll.open (first_exe_dll_name,
+ ACE_DEFAULT_SHLIB_MODE, 0) != 0)
+ {
+ ACE_DEBUG ((LM_DEBUG, "Could not open the DLL %s\n", first_exe_dll_name));
+ return 0;
+ }
+
+ if (second_dll.open (second_exe_dll_name,
+ ACE_DEFAULT_SHLIB_MODE, 0) != 0)
+ {
+ ACE_DEBUG ((LM_DEBUG, "Could not open the DLL %s\n",
+ second_exe_dll_name));
+ return 0;
+ }
+
+ if (first_exe_entrypt == 0 || second_exe_entrypt == 0)
+ {
+ ACE_DEBUG ((LM_DEBUG, "NIL entry points\n"));
+ return 0;
+ }
+
+ if (this->count_ == 0)
+ {
+ first_exec_creator = (ExecFactory) first_dll.symbol (first_exe_entrypt);
+ Components::EnterpriseComponent_var first_executor =
+ first_exec_creator (this);
+ count_++;
+ return first_executor._retn ();
+ }
+ else if (count_ == 1)
+ {
+ second_exec_creator = (ExecFactory)
+ second_dll.symbol (second_exe_entrypt);
+ Components::EnterpriseComponent_var second_executor =
+ second_exec_creator (this);
+ --count_;
+ return second_executor._retn ();
+ }
+}
+
+::Components::EnterpriseComponent_ptr
+Sender_Impl::SenderSwap_exec_i::etherealize (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // return new Sender_Impl::Sender_exec_i;
+}
+
+::Components::EnterpriseComponent_ptr
+Sender_Impl::SenderHome_exec_i::create (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG, "%P|%t) creating SenderHome \n"));
+ return new Sender_Impl::SenderSwap_exec_i;
+ //return new Sender_Impl::Sender_exec_i;
+}
+
+extern "C" SENDER_EXEC_Export ::Components::HomeExecutorBase_ptr
+createSenderHome_Impl (void)
+{
+ return new Sender_Impl::SenderHome_exec_i ();
+}
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec.h b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec.h
new file mode 100644
index 00000000000..f095481ea86
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec.h
@@ -0,0 +1,194 @@
+//$Id$
+//============================================================
+/**
+ * @file Sender_exec.h
+ *
+ * Header file for the Executor implementation.
+ */
+//============================================================
+
+#ifndef SENDER_EXEC_H
+#define SENDER_EXEC_H
+
+#include "SwapExecC.h"
+#include "SenderEC.h"
+#include "Sender_exec_export.h"
+#include "tao/LocalObject.h"
+#include "ace/DLL.h"
+#include "ciao/CCM_EventC.h"
+
+namespace Sender_Impl
+{
+ class SENDER_EXEC_Export Sender_exec_i :
+ public virtual Sender_Exec,
+ public virtual TAO_Local_RefCounted_Object
+ {
+
+ public:
+ /// Default constructor.
+ Sender_exec_i ()
+ : message_(CORBA::string_dup ("Default Message"))
+ {
+ }
+
+ /// Secondary construction.
+ Sender_exec_i (const char* local_message)
+ : message_ (CORBA::string_dup (local_message))
+ {
+ }
+
+ /// Default destructor.
+ virtual ~Sender_exec_i ();
+
+ /// Operation to set the value of the attribute
+ virtual void local_message (const char * local_message
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// Operation to get the value of the attribute
+ virtual char * local_message (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /* Operations for obtaining the interface reference. */
+ /* This method will be used in the assembly face so the
+ * ObjRef of this read_message facet will be sent to the
+ * client side(receptacle).
+ */
+ // Note: You can specify the return type as ::Hello::CCM_message *
+ virtual Hello::CCM_ReadMessage_ptr
+ get_push_message (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+
+ // Operation inside of the trigger interface.
+ virtual void start (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // Operations from Components::SessionComponent
+ virtual void set_session_context (Components::SessionContext_ptr ctx
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ccm_activate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ccm_remove (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ protected:
+ /// Copmponent specific context
+ Sender_Exec_Context_var context_;
+
+ private:
+ CORBA::String_var message_;
+
+ friend class Message_Impl;
+ };
+
+
+ //
+ //
+ //
+ class Message_Impl : public virtual Hello::CCM_ReadMessage,
+ public virtual TAO_Local_RefCounted_Object
+ {
+ public:
+ Message_Impl (Sender_exec_i& component)
+ : component_ (component)
+ {
+ }
+
+ virtual char *
+ get_message (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ private:
+ Sender_exec_i& component_;
+ };
+
+ class SenderSwap_exec_i;
+
+
+ typedef ::Components::EnterpriseComponent_ptr (*ExecFactory) (SenderSwap_exec_i *);
+
+ /**
+ * @class Sender_exec_i
+ *
+ * Sender executor implementation class.
+ */
+
+ class SENDER_EXEC_Export SenderSwap_exec_i :
+ public virtual CIAO::Swap_Exec,
+ public virtual TAO_Local_RefCounted_Object
+ {
+ public:
+ SenderSwap_exec_i ();
+
+ ~SenderSwap_exec_i ();
+
+ virtual ::Components::EnterpriseComponent_ptr
+ incarnate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual ::Components::EnterpriseComponent_ptr
+ etherealize (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ void consumers (::Components::ConsumerDescriptions *p)
+ {
+ this->consumers_ = p;
+ }
+
+ ::Components::ConsumerDescriptions *consumers (void)
+ {
+ return this->consumers_._retn ();
+ }
+
+ protected:
+ int count_;
+
+ ::Components::ConsumerDescriptions_var consumers_;
+ };
+
+ class SENDER_EXEC_Export SenderHome_exec_i :
+ public virtual SenderHome_Exec,
+ public virtual TAO_Local_RefCounted_Object
+ {
+ public:
+ /// Default ctor.
+ SenderHome_exec_i ();
+
+ /// Default dtor.
+ virtual ~SenderHome_exec_i ();
+
+ // Implicit home operations.
+
+ virtual ::Components::EnterpriseComponent_ptr
+ create (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+
+ };
+
+}
+
+extern "C" SENDER_EXEC_Export ::Components::HomeExecutorBase_ptr
+createSenderHome_Impl (void);
+
+#endif /* SENDER_EXEC_H */
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_1.cpp b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_1.cpp
new file mode 100644
index 00000000000..bf5fb58377b
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_1.cpp
@@ -0,0 +1,145 @@
+//$Id$
+
+#include "Sender_exec_1.h"
+#include "Sender_exec.h"
+#include "ciao/Servant_Activator.h"
+
+char*
+Sender_Impl::Message_Impl_1::get_message (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ ACE_DEBUG ((LM_DEBUG, "Sender 1 sending out message. \n"));
+ return CORBA::string_dup (component_.message_.in ());
+}
+
+Sender_Impl::Sender_exec_1_i::~Sender_exec_1_i ()
+{
+}
+
+void
+Sender_Impl::Sender_exec_1_i::local_message (const char * local_message
+ ACE_ENV_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ message_ = CORBA::string_dup (local_message);
+}
+
+char *
+Sender_Impl::Sender_exec_1_i::local_message (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return CORBA::string_dup(message_);
+}
+
+Hello::CCM_ReadMessage_ptr
+Sender_Impl::Sender_exec_1_i::get_push_message (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ ACE_DEBUG ((LM_DEBUG,
+ "Sender_Impl::Sender_exec_1_i::get_push_message called\n"));
+ return ( new Message_Impl_1 (*this) );
+}
+
+void
+Sender_Impl::Sender_exec_1_i::start (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ Hello::TimeOut_var event = new OBV_Hello::TimeOut;
+ ACE_DEBUG ((LM_DEBUG, "Sender 1 initiates the process.\n"));
+ this->context_->push_click_out (event ACE_ENV_ARG_PARAMETER);
+}
+
+void
+Sender_Impl::Sender_exec_1_i::set_session_context
+ (Components::SessionContext_ptr ctx
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG, "Sender_Impl::Sender_exec_1_i::set_session_context\n"));
+
+ this->context_ =
+ Sender_Impl::Sender_Exec_Context::_narrow (ctx
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ if (CORBA::is_nil (this->context_.in ()))
+ ACE_THROW (CORBA::INTERNAL ());
+}
+
+void
+Sender_Impl::Sender_exec_1_i::ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG,
+ "Sender_Impl::Sender_exec_1_i::ciao_preactivate\n"));
+}
+
+void
+Sender_Impl::Sender_exec_1_i::ccm_activate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG,
+ "Sender_Impl::Sender_exec_1_i::ccm_activate\n"));
+
+ CORBA::Object_var o =
+ this->context_->get_CCM_object (ACE_ENV_SINGLE_ARG_PARAMETER);
+}
+
+void
+Sender_Impl::Sender_exec_1_i::ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG,
+ "Sender_Impl::Sender_exec_1_i::ciao_postactivate\n"));
+}
+
+void
+Sender_Impl::Sender_exec_1_i::ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG, "Sender_Impl::Sender_exec_1_i::ccm_passivate\n"));
+ CORBA::Object_var comp_object =
+ this->context_->get_CCM_object (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+ Hello::Sender_var sender = Hello::Sender::_narrow (comp_object.in ()
+ ACE_ENV_ARG_PARAMETER);
+
+ Components::ConsumerDescriptions_var retval =
+ this->context_->get_registered_consumers ("click_out"
+ ACE_ENV_ARG_PARAMETER);
+ this->base_exec_->consumers (retval._retn ());
+ this->context_->deactivate_facet ("Hello_Sender_push_message");
+ this->context_->update_port_activator ("Hello_Sender_push_message");
+ /*
+ ::Components::ConsumerDescriptions_var cons_desc =
+ sender->get_all_consumers (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ ACE_DEBUG ((LM_DEBUG, "length of consumers is %d\n", cons_desc->length ()));
+ */
+ // this->base_exec_->consumers (cons_desc._retn ());
+}
+
+void
+Sender_Impl::Sender_exec_1_i::ccm_remove (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG, "Sender_Impl::Sender_exec_1_i::ccm_remove\n"));
+}
+
+extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr
+createSenderExec_Impl (Sender_Impl::SenderSwap_exec_i *p)
+{
+ Sender_Impl::Sender_exec_1_i *tmp =
+ new Sender_Impl::Sender_exec_1_i ();
+
+ tmp->swap_exec (p);
+
+ return tmp;
+}
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_1.h b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_1.h
new file mode 100644
index 00000000000..9455f07b236
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_1.h
@@ -0,0 +1,133 @@
+//$Id$
+//============================================================
+/**
+ * @file Sender_exec.h
+ *
+ * Header file for the Executor implementation.
+ */
+//============================================================
+
+#ifndef SENDER_EXEC_1_H
+#define SENDER_EXEC_1_H
+
+#include "SwapExecC.h"
+#include "SenderEC.h"
+#include "Sender_exec_export.h"
+#include "tao/LocalObject.h"
+
+namespace Sender_Impl
+{
+ class SenderSwap_exec_i;
+
+
+ class SENDER_EXEC_Export Sender_exec_1_i :
+ public virtual Sender_Exec,
+ public virtual TAO_Local_RefCounted_Object
+ {
+
+ public:
+ /// Default constructor.
+ Sender_exec_1_i () {};
+
+ /// Secondary construction.
+ Sender_exec_1_i (const char* local_message,
+ SenderSwap_exec_i *e)
+ : message_ (CORBA::string_dup (local_message))
+ , base_exec_ (e)
+ {
+ }
+
+ /// Default destructor.
+ virtual ~Sender_exec_1_i ();
+
+ /// Operation to set the value of the attribute
+ virtual void local_message (const char * local_message
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// Operation to get the value of the attribute
+ virtual char * local_message (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /* Operations for obtaining the interface reference. */
+ /* This method will be used in the assembly face so the
+ * ObjRef of this read_message facet will be sent to the
+ * client side(receptacle).
+ */
+ // Note: You can specify the return type as ::Hello::CCM_message *
+ virtual Hello::CCM_ReadMessage_ptr
+ get_push_message (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+
+ // Operation inside of the trigger interface.
+ virtual void start (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // Operations from Components::SessionComponent
+ virtual void set_session_context (Components::SessionContext_ptr ctx
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ccm_activate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ccm_remove (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ void swap_exec (SenderSwap_exec_i *p)
+ {
+ this->base_exec_ = p;
+ }
+
+ protected:
+ /// Copmponent specific context
+ Sender_Exec_Context_var context_;
+
+ private:
+ CORBA::String_var message_;
+
+ // my incarnator
+ SenderSwap_exec_i *base_exec_;
+
+ friend class Message_Impl_1;
+ };
+
+ class Message_Impl_1 : public virtual Hello::CCM_ReadMessage,
+ public virtual TAO_Local_RefCounted_Object
+ {
+ public:
+ Message_Impl_1 (Sender_exec_1_i& component)
+ : component_ (component)
+ {
+ }
+
+ virtual char *
+ get_message (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ private:
+ Sender_exec_1_i& component_;
+ };
+
+}
+
+extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr
+createSenderExec_Impl (Sender_Impl::SenderSwap_exec_i *p);
+
+#endif /* SENDER_EXEC_H */
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_2.cpp b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_2.cpp
new file mode 100644
index 00000000000..705cd3d4f4c
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_2.cpp
@@ -0,0 +1,145 @@
+//$Id$
+
+#include "Sender_exec_2.h"
+#include "Sender_exec.h"
+
+char*
+Sender_Impl::Message_Impl_2::get_message (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ ACE_DEBUG ((LM_DEBUG, "Sender 2 sending out message. \n"));
+ return CORBA::string_dup (component_.message_.in ());
+}
+
+Sender_Impl::Sender_exec_2_i::~Sender_exec_2_i ()
+{
+}
+
+void
+Sender_Impl::Sender_exec_2_i::local_message (const char * local_message
+ ACE_ENV_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ message_ = CORBA::string_dup (local_message);
+}
+
+char *
+Sender_Impl::Sender_exec_2_i::local_message (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return CORBA::string_dup(message_);
+}
+
+Hello::CCM_ReadMessage_ptr
+Sender_Impl::Sender_exec_2_i::get_push_message (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ ACE_DEBUG ((LM_DEBUG,
+ "Sender_Impl::Sender_exec_2_i::get_push_message called\n"));
+ return ( new Message_Impl_2 (*this) );
+}
+
+void
+Sender_Impl::Sender_exec_2_i::start (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ Hello::TimeOut_var event = new OBV_Hello::TimeOut;
+ ACE_DEBUG ((LM_DEBUG, "Sender 2 initiates the process.\n"));
+ this->context_->push_click_out (event ACE_ENV_ARG_PARAMETER);
+}
+
+void
+Sender_Impl::Sender_exec_2_i::set_session_context
+ (Components::SessionContext_ptr ctx
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG, "Sender_Impl::Sender_exec_2_i::set_session_context\n"));
+
+ this->context_ =
+ Sender_Impl::Sender_Exec_Context::_narrow (ctx
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ if (CORBA::is_nil (this->context_.in ()))
+ ACE_THROW (CORBA::INTERNAL ());
+}
+
+void
+Sender_Impl::Sender_exec_2_i::ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG,
+ "Sender_Impl::Sender_exec_2_i::ciao_preactivate\n"));
+}
+
+void
+Sender_Impl::Sender_exec_2_i::ccm_activate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG,
+ "Sender_Impl::Sender_exec_2_i::ccm_activate\n"));
+
+ ::Components::ConsumerDescriptions_var c =
+ this->base_exec_->consumers ();
+
+ if (CORBA::is_nil (this->context_.in ()))
+ ACE_THROW (CORBA::INTERNAL ());
+ ACE_CHECK;
+
+ CORBA::Object_var o =
+ this->context_->get_CCM_object (ACE_ENV_SINGLE_ARG_PARAMETER);
+
+ Hello::Sender_var sender =
+ Hello::Sender::_narrow (o.in ()
+ ACE_ENV_ARG_PARAMETER);
+
+ for (CORBA::ULong cnt = 0;
+ cnt != c->length ();
+ ++cnt)
+ {
+ sender->subscribe ("click_out",
+ (*c)[cnt]->consumer ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ }
+}
+
+void
+Sender_Impl::Sender_exec_2_i::ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG,
+ "Sender_Impl::Sender_exec_2_i::ciao_postactivate\n"));
+}
+
+void
+Sender_Impl::Sender_exec_2_i::ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG, "Sender_Impl::Sender_exec_2_i::ccm_passivate\n"));
+}
+
+void
+Sender_Impl::Sender_exec_2_i::ccm_remove (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG, "Sender_Impl::Sender_exec_2_i::ccm_remove\n"));
+}
+
+extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr
+createSenderExec_Impl (Sender_Impl::SenderSwap_exec_i *p)
+{
+ Sender_Impl::Sender_exec_2_i *tmp =
+ new Sender_Impl::Sender_exec_2_i ();
+
+ tmp->swap_exec (p);
+
+ return tmp;
+}
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_2.h b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_2.h
new file mode 100644
index 00000000000..e1932e6b90c
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_2.h
@@ -0,0 +1,135 @@
+//$Id$
+//============================================================
+/**
+ * @file Sender_exec.h
+ *
+ * Header file for the Executor implementation.
+ */
+//============================================================
+
+#ifndef SENDER_EXEC_2_H
+#define SENDER_EXEC_2_H
+
+#include "SwapExecC.h"
+#include "SenderEC.h"
+#include "Sender_exec_export.h"
+#include "tao/LocalObject.h"
+
+namespace Sender_Impl
+{
+ class SenderSwap_exec_i;
+
+
+ class SENDER_EXEC_Export Sender_exec_2_i :
+ public virtual Sender_Exec,
+ public virtual TAO_Local_RefCounted_Object
+ {
+
+ public:
+ /// Default constructor.
+ Sender_exec_2_i ()
+ : message_(CORBA::string_dup ("Default Message"))
+ {
+ }
+
+ /// Secondary construction.
+ Sender_exec_2_i (const char* local_message,
+ SenderSwap_exec_i *e)
+ : message_ (CORBA::string_dup (local_message))
+ , base_exec_ (e)
+ {
+ }
+
+ /// Default destructor.
+ virtual ~Sender_exec_2_i ();
+
+ /// Operation to set the value of the attribute
+ virtual void local_message (const char * local_message
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// Operation to get the value of the attribute
+ virtual char * local_message (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /* Operations for obtaining the interface reference. */
+ /* This method will be used in the assembly face so the
+ * ObjRef of this read_message facet will be sent to the
+ * client side(receptacle).
+ */
+ // Note: You can specify the return type as ::Hello::CCM_message *
+ virtual Hello::CCM_ReadMessage_ptr
+ get_push_message (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+
+ // Operation inside of the trigger interface.
+ virtual void start (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // Operations from Components::SessionComponent
+ virtual void set_session_context (Components::SessionContext_ptr ctx
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ccm_activate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ccm_remove (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ void swap_exec (SenderSwap_exec_i *p)
+ {
+ this->base_exec_ = p;
+ }
+
+ protected:
+ /// Copmponent specific context
+ Sender_Exec_Context_var context_;
+
+ private:
+ CORBA::String_var message_;
+
+ SenderSwap_exec_i *base_exec_;
+
+ friend class Message_Impl_2;
+ };
+
+ class Message_Impl_2 : public virtual Hello::CCM_ReadMessage,
+ public virtual TAO_Local_RefCounted_Object
+ {
+ public:
+ Message_Impl_2 (Sender_exec_2_i& component)
+ : component_ (component)
+ {
+ }
+
+ virtual char *
+ get_message (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ private:
+ Sender_exec_2_i& component_;
+ };
+
+}
+
+extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr
+createSenderExec_Impl (Sender_Impl::SenderSwap_exec_i *p);
+
+#endif /* SENDER_EXEC_H */
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_export.h b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_export.h
new file mode 100644
index 00000000000..dbaa7ea15bc
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_export.h
@@ -0,0 +1,54 @@
+
+// -*- C++ -*-
+// $Id$
+// Definition for Win32 Export directives.
+// This file is generated automatically by generate_export_file.pl SENDER_EXEC
+// ------------------------------
+#ifndef SENDER_EXEC_EXPORT_H
+#define SENDER_EXEC_EXPORT_H
+
+#include "ace/config-all.h"
+
+#if !defined (SENDER_EXEC_HAS_DLL)
+# define SENDER_EXEC_HAS_DLL 1
+#endif /* ! SENDER_EXEC_HAS_DLL */
+
+#if defined (SENDER_EXEC_HAS_DLL) && (SENDER_EXEC_HAS_DLL == 1)
+# if defined (SENDER_EXEC_BUILD_DLL)
+# define SENDER_EXEC_Export ACE_Proper_Export_Flag
+# define SENDER_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
+# define SENDER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# else /* SENDER_EXEC_BUILD_DLL */
+# define SENDER_EXEC_Export ACE_Proper_Import_Flag
+# define SENDER_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
+# define SENDER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# endif /* SENDER_EXEC_BUILD_DLL */
+#else /* SENDER_EXEC_HAS_DLL == 1 */
+# define SENDER_EXEC_Export
+# define SENDER_EXEC_SINGLETON_DECLARATION(T)
+# define SENDER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+#endif /* SENDER_EXEC_HAS_DLL == 1 */
+
+// Set SENDER_EXEC_NTRACE = 0 to turn on library specific tracing even if
+// tracing is turned off for ACE.
+#if !defined (SENDER_EXEC_NTRACE)
+# if (ACE_NTRACE == 1)
+# define SENDER_EXEC_NTRACE 1
+# else /* (ACE_NTRACE == 1) */
+# define SENDER_EXEC_NTRACE 0
+# endif /* (ACE_NTRACE == 1) */
+#endif /* !SENDER_EXEC_NTRACE */
+
+#if (SENDER_EXEC_NTRACE == 1)
+# define SENDER_EXEC_TRACE(X)
+#else /* (SENDER_EXEC_NTRACE == 1) */
+# if !defined (ACE_HAS_TRACE)
+# define ACE_HAS_TRACE
+# endif /* ACE_HAS_TRACE */
+# define SENDER_EXEC_TRACE(X) ACE_TRACE_IMPL(X)
+# include "ace/Trace.h"
+#endif /* (SENDER_EXEC_NTRACE == 1) */
+
+#endif /* SENDER_EXEC_EXPORT_H */
+
+// End of auto generated file.
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_stub_export.h b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_stub_export.h
new file mode 100644
index 00000000000..28c5d3131d0
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_stub_export.h
@@ -0,0 +1,54 @@
+
+// -*- C++ -*-
+// $Id$
+// Definition for Win32 Export directives.
+// This file is generated automatically by generate_export_file.pl SENDER_STUB
+// ------------------------------
+#ifndef SENDER_STUB_EXPORT_H
+#define SENDER_STUB_EXPORT_H
+
+#include "ace/config-all.h"
+
+#if !defined (SENDER_STUB_HAS_DLL)
+# define SENDER_STUB_HAS_DLL 1
+#endif /* ! SENDER_STUB_HAS_DLL */
+
+#if defined (SENDER_STUB_HAS_DLL) && (SENDER_STUB_HAS_DLL == 1)
+# if defined (SENDER_STUB_BUILD_DLL)
+# define SENDER_STUB_Export ACE_Proper_Export_Flag
+# define SENDER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
+# define SENDER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# else /* SENDER_STUB_BUILD_DLL */
+# define SENDER_STUB_Export ACE_Proper_Import_Flag
+# define SENDER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
+# define SENDER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# endif /* SENDER_STUB_BUILD_DLL */
+#else /* SENDER_STUB_HAS_DLL == 1 */
+# define SENDER_STUB_Export
+# define SENDER_STUB_SINGLETON_DECLARATION(T)
+# define SENDER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+#endif /* SENDER_STUB_HAS_DLL == 1 */
+
+// Set SENDER_STUB_NTRACE = 0 to turn on library specific tracing even if
+// tracing is turned off for ACE.
+#if !defined (SENDER_STUB_NTRACE)
+# if (ACE_NTRACE == 1)
+# define SENDER_STUB_NTRACE 1
+# else /* (ACE_NTRACE == 1) */
+# define SENDER_STUB_NTRACE 0
+# endif /* (ACE_NTRACE == 1) */
+#endif /* !SENDER_STUB_NTRACE */
+
+#if (SENDER_STUB_NTRACE == 1)
+# define SENDER_STUB_TRACE(X)
+#else /* (SENDER_STUB_NTRACE == 1) */
+# if !defined (ACE_HAS_TRACE)
+# define ACE_HAS_TRACE
+# endif /* ACE_HAS_TRACE */
+# define SENDER_STUB_TRACE(X) ACE_TRACE_IMPL(X)
+# include "ace/Trace.h"
+#endif /* (SENDER_STUB_NTRACE == 1) */
+
+#endif /* SENDER_STUB_EXPORT_H */
+
+// End of auto generated file.
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.cpp.new_impl b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.cpp.new_impl
new file mode 100644
index 00000000000..9c934f3cfc3
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.cpp.new_impl
@@ -0,0 +1,645 @@
+// $Id$
+//
+// **** Code generated by the ****
+// **** Component Integrated ACE ORB (CIAO) CIDL Compiler ****
+// CIAO has been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// CIDL Compiler has been developed by:
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about CIAO is available at:
+// http://www.dre.vanderbilt.edu/CIAO
+
+#include "Sender_svnt.h"
+#include "Cookies.h"
+#include "ciao/Servant_Activator.h"
+#include "ciao/Port_Activator_T.h"
+
+namespace Sender_Impl
+{
+ namespace CIAO_GLUE_Hello
+ {
+ template <typename T>
+ ReadMessage_Servant_T<T>::ReadMessage_Servant_T (
+ ::Hello::CCM_ReadMessage_ptr executor,
+ ::Components::CCMContext_ptr c)
+ : executor_ (::Hello::CCM_ReadMessage::_duplicate (executor)),
+ ctx_ (::Components::CCMContext::_duplicate (c))
+ {
+ }
+
+ template <typename T>
+ ReadMessage_Servant_T<T>::~ReadMessage_Servant_T (void)
+ {
+ }
+
+ template <typename T>
+ char *
+ ReadMessage_Servant_T<T>::get_message (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ return this->executor_->get_message (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+
+ template <typename T>
+ CORBA::Object_ptr
+ ReadMessage_Servant_T<T>::_get_component (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ ::Components::SessionContext_var sc =
+ ::Components::SessionContext::_narrow (
+ this->ctx_.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (CORBA::Object::_nil ());
+
+ if (! CORBA::is_nil (sc.in ()))
+ {
+ return sc->get_CCM_object (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+
+ ::Components::EntityContext_var ec =
+ ::Components::EntityContext::_narrow (
+ this->ctx_.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (CORBA::Object::_nil ());
+
+ if (! CORBA::is_nil (ec.in ()))
+ {
+ return ec->get_CCM_object (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+
+ ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
+ }
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ Sender_Context::Sender_Context (
+ ::Components::CCMHome_ptr home,
+ ::CIAO::Session_Container *c,
+ Sender_Servant *sv)
+ : ACE_NESTED_CLASS (CIAO, Context_Impl_Base (home, c)),
+ ctx_svnt_base (home, c, sv)
+ {
+ }
+
+ Sender_Context::~Sender_Context (void)
+ {
+ }
+
+ // Operations for Sender receptacles and event sources,
+ // defined in ::Hello::CCM_Sender_Context.
+
+ void
+ Sender_Context::push_click_out (
+ ::Hello::TimeOut *ev
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ ACE_Active_Map_Manager<
+ ::Hello::TimeOutConsumer_var>::iterator end =
+ this->ciao_publishes_click_out_map_.end ();
+
+ for (ACE_Active_Map_Manager<
+ ::Hello::TimeOutConsumer_var>::iterator iter =
+ this->ciao_publishes_click_out_map_.begin ();
+ iter != end;
+ ++iter)
+ {
+ ACE_Active_Map_Manager<
+ ::Hello::TimeOutConsumer_var>::ENTRY &entry = *iter;
+
+ ::Hello::TimeOutConsumer_var c =
+ ::Hello::TimeOutConsumer::_narrow (
+ entry.int_id_.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ entry.int_id_->push_TimeOut (
+ ev
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ }
+ }
+
+ ::Components::Cookie *
+ Sender_Context::subscribe_click_out (
+ ::Hello::TimeOutConsumer_ptr c
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::ExceededConnectionLimit))
+ {
+ if (CORBA::is_nil (c))
+ {
+ ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0);
+ }
+
+ ::Hello::TimeOutConsumer_var sub =
+ ::Hello::TimeOutConsumer::_duplicate (c);
+
+ ACE_Active_Map_Manager_Key key;
+ this->ciao_publishes_click_out_map_.bind (sub.in (), key);
+ sub._retn ();
+
+ ::Components::Cookie_var retv = new ::CIAO::Map_Key_Cookie (key);
+ return retv._retn ();
+ }
+
+ ::Hello::TimeOutConsumer_ptr
+ Sender_Context::unsubscribe_click_out (
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidConnection))
+ {
+ ::Hello::TimeOutConsumer_var retv;
+ ACE_Active_Map_Manager_Key key;
+
+ if (ck == 0 || ::CIAO::Map_Key_Cookie::extract (ck, key) == false)
+ {
+ ACE_THROW_RETURN (
+ ::Components::InvalidConnection (),
+ ::Hello::TimeOutConsumer::_nil ());
+ }
+
+ if (this->ciao_publishes_click_out_map_.unbind (key, retv) != 0)
+ {
+ ACE_THROW_RETURN (
+ ::Components::InvalidConnection (),
+ ::Hello::TimeOutConsumer::_nil ());
+ }
+
+ return retv._retn ();
+ }
+
+ // CIAO-specific.
+
+ Sender_Context *
+ Sender_Context::_narrow (
+ ::Components::SessionContext_ptr p
+ ACE_ENV_ARG_DECL_NOT_USED)
+ {
+ return dynamic_cast<Sender_Context *> (p);
+ }
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ Sender_Servant::Sender_Servant (
+ ::Hello::CCM_Sender_ptr exe,
+ ::Components::CCMHome_ptr h,
+ ::CIAO::Home_Servant_Impl_Base *home_servant,
+ ::CIAO::Session_Container *c)
+ : ACE_NESTED_CLASS (CIAO, Servant_Impl_Base (h, home_servant, c)),
+ comp_svnt_base (exe, h, home_servant, c)
+ {
+ this->context_ = new Sender_Context (h, c, this);
+
+ ACE_TRY_NEW_ENV
+ {
+ ::Components::SessionComponent_var scom =
+ ::Components::SessionComponent::_narrow (
+ exe
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (! ::CORBA::is_nil (scom.in ()))
+ {
+ scom->set_session_context (
+ this->context_
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+
+ this->populate_port_tables (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+
+ ACE_CATCHANY
+ {
+ }
+
+ ACE_ENDTRY;
+ }
+
+ Sender_Servant::~Sender_Servant (void)
+ {
+ }
+
+ void
+ Sender_Servant::set_attributes (
+ const ::Components::ConfigValues &descr
+ ACE_ENV_ARG_DECL_NOT_USED)
+ {
+ for (CORBA::ULong i = 0;
+ i < descr.length ();
+ ++i)
+ {
+ const char *descr_name = descr[i]->name ();
+ ::CORBA::Any &descr_value = descr[i]->value ();
+
+ if (ACE_OS::strcmp (descr_name, "local_message") == 0)
+ {
+ const char * _ciao_extract_val = 0;
+ descr_value >>= _ciao_extract_val;
+ this->local_message (_ciao_extract_val);
+ continue;
+ }
+
+ ACE_UNUSED_ARG (descr_name);
+ ACE_UNUSED_ARG (descr_value);
+ }
+ }
+
+ ::Hello::ReadMessage_ptr
+ Sender_Servant::provide_push_message (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ if (! ::CORBA::is_nil (this->provide_push_message_.in ()))
+ {
+ return ::Hello::ReadMessage::_duplicate (this->provide_push_message_.in ());
+ }
+
+ ::CORBA::Object_var obj =
+ this->provide_push_message_i (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (::Hello::ReadMessage::_nil ());
+
+ ::Hello::ReadMessage_var fo =
+ ::Hello::ReadMessage::_narrow (
+ obj.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (::Hello::ReadMessage::_nil ());
+
+ this->provide_push_message_ = fo;
+ return ::Hello::ReadMessage::_duplicate (this->provide_push_message_.in ());
+ }
+
+ ::CORBA::Object_ptr
+ Sender_Servant::provide_push_message_i (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ ::CORBA::Object_ptr ret =
+ this->lookup_facet ("push_message");
+
+ if (! ::CORBA::is_nil (ret))
+ {
+ return ret;
+ }
+
+ CIAO::Port_Activator_T<
+ CIAO_GLUE_Hello::ReadMessage_Servant,
+ ::Hello::CCM_ReadMessage,
+ ::Components::CCMContext,
+ Sender_Servant
+ > *tmp = 0;
+
+ typedef CIAO::Port_Activator_T<
+ CIAO_GLUE_Hello::ReadMessage_Servant,
+ ::Hello::CCM_ReadMessage,
+ ::Components::CCMContext,
+ Sender_Servant
+ >
+ MACRO_MADNESS_TYPEDEF;
+
+ ACE_NEW_THROW_EX (
+ tmp,
+ MACRO_MADNESS_TYPEDEF (
+ "Hello_Sender_push_message",
+ "push_message",
+ CIAO::Port_Activator::Facet,
+ 0,
+ this->context_,
+ this),
+ CORBA::NO_MEMORY ());
+
+ CIAO::Servant_Activator *sa =
+ this->container_->ports_servant_activator ();
+
+ if (!sa->register_port_activator (tmp))
+ {
+ return 0;
+ }
+
+ ::CORBA::Object_var obj =
+ this->container_->generate_reference (
+ "Hello_Sender_push_message",
+ "IDL:Hello/ReadMessage:1.0",
+ CIAO::Container::Facet_Consumer
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (::Hello::ReadMessage::_nil ());
+
+ this->add_facet (
+ "push_message",
+ obj.in ());
+
+ return obj._retn ();
+ }
+
+ ::Components::Cookie *
+ Sender_Servant::subscribe_click_out (
+ ::Hello::TimeOutConsumer_ptr c
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::ExceededConnectionLimit))
+ {
+ return this->context_->subscribe_click_out (
+ c
+ ACE_ENV_ARG_PARAMETER);
+ }
+
+ ::Hello::TimeOutConsumer_ptr
+ Sender_Servant::unsubscribe_click_out (
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidConnection))
+ {
+ return this->context_->unsubscribe_click_out (
+ ck
+ ACE_ENV_ARG_PARAMETER);
+ }
+
+ ::Components::Cookie *
+ Sender_Servant::connect (
+ const char *name,
+ ::CORBA::Object_ptr connection
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::AlreadyConnected,
+ ::Components::ExceededConnectionLimit))
+ {
+ // If the component has no receptacles, this will be unused.
+ ACE_UNUSED_ARG (connection);
+
+ if (name == 0)
+ {
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ CORBA::Object_ptr
+ Sender_Servant::disconnect (
+ const char *name,
+ ::Components::Cookie * ck
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::CookieRequired,
+ ::Components::NoConnection))
+ {
+ if (name == 0)
+ {
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::CORBA::Object::_nil ());
+ }
+
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::CORBA::Object::_nil ());
+
+ ACE_UNUSED_ARG (ck);
+ }
+
+ void
+ Sender_Servant::connect_consumer (
+ const char * emitter_name,
+ ::Components::EventConsumerBase_ptr consumer
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::AlreadyConnected,
+ ::Components::InvalidConnection))
+ {
+ if (emitter_name == 0)
+ {
+ ACE_THROW (::CORBA::BAD_PARAM ());
+ }
+
+ ACE_UNUSED_ARG (consumer);
+ ACE_THROW (::Components::InvalidName ());
+ }
+
+ ::Components::Cookie *
+ Sender_Servant::subscribe (
+ const char *publisher_name,
+ ::Components::EventConsumerBase_ptr subscribe
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::ExceededConnectionLimit))
+ {
+ // Just in case there are no if blocks
+ ACE_UNUSED_ARG (subscribe);
+
+ if (publisher_name == 0)
+ {
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ if (ACE_OS::strcmp (publisher_name, "click_out") == 0)
+ {
+ ::Hello::TimeOutConsumer_var _ciao_consumer =
+ ::Hello::TimeOutConsumer::_narrow (
+ subscribe
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ if (::CORBA::is_nil (_ciao_consumer.in ()))
+ {
+ ACE_THROW_RETURN (::Components::InvalidConnection (), 0);
+ }
+
+ return this->subscribe_click_out (
+ _ciao_consumer.in ()
+ ACE_ENV_ARG_PARAMETER);
+ }
+
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ ::Components::EventConsumerBase_ptr
+ Sender_Servant::unsubscribe (
+ const char *publisher_name,
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection))
+ {
+ // Just in case there are no if blocks
+ ACE_UNUSED_ARG (ck);
+
+ if (publisher_name == 0)
+ {
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::Components::EventConsumerBase::_nil ());
+ }
+
+ if (ACE_OS::strcmp (publisher_name, "click_out") == 0)
+ {
+ return this->unsubscribe_click_out (
+ ck
+ ACE_ENV_ARG_PARAMETER);
+ }
+
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::Components::EventConsumerBase::_nil ());
+ }
+
+ CORBA::Object_ptr
+ Sender_Servant::get_facet_executor (const char *name
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException))
+ {
+ if (name == 0)
+ {
+ ACE_THROW_RETURN (
+ ::CORBA::BAD_PARAM (),
+ ::CORBA::Object::_nil ());
+ }
+
+ if (ACE_OS::strcmp (name, "push_message") == 0)
+ {
+ return this->executor_->get_push_message (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+
+ return CORBA::Object::_nil ();
+ }
+
+ // Supported operations.
+
+ void
+ Sender_Servant::start (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ this->executor_->start (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+
+ // Component attribute operations.
+
+ char *
+ Sender_Servant::local_message (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ return this->executor_->local_message (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+
+ void
+ Sender_Servant::local_message (
+ const char * local_message
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ this->executor_->local_message (
+ local_message
+ ACE_ENV_ARG_PARAMETER);
+ }
+
+ // Private method to populate the port tables.
+ void
+ Sender_Servant::populate_port_tables (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ ACE_ENV_ARG_NOT_USED;
+ ::CORBA::Object_var obj_var;
+ ::Components::EventConsumerBase_var ecb_var;
+
+ obj_var =
+ this->provide_push_message_i (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+ }
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ SenderHome_Servant::SenderHome_Servant (
+ ::Hello::CCM_SenderHome_ptr exe,
+ ::CIAO::Session_Container *c)
+ : ACE_NESTED_CLASS (CIAO, Home_Servant_Impl_Base (c)),
+ home_svnt_base (exe, c)
+ {
+ }
+
+ SenderHome_Servant::~SenderHome_Servant (void)
+ {
+ }
+
+ // Home operations.
+
+ // Home supported interface operations.
+
+ // Home factory and finder operations.
+
+ // Home attribute operations.
+ }
+
+ extern "C" SENDER_SVNT_Export ::PortableServer::Servant
+ createSenderHome_Servant (
+ ::Components::HomeExecutorBase_ptr p,
+ CIAO::Session_Container *c
+ ACE_ENV_ARG_DECL)
+ {
+ if (p == 0)
+ {
+ return 0;
+ }
+
+ ::Hello::CCM_SenderHome_var x =
+ ::Hello::CCM_SenderHome::_narrow (
+ p
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ if (::CORBA::is_nil (x.in ()))
+ {
+ return 0;
+ }
+
+ return new
+ CIAO_GLUE_Hello::SenderHome_Servant (
+ x.in (),
+ c);
+ }
+}
+
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.cpp.no-connections b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.cpp.no-connections
new file mode 100644
index 00000000000..94723a55331
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.cpp.no-connections
@@ -0,0 +1,354 @@
+// $Id$
+//
+// **** Code generated by the ****
+// **** Component Integrated ACE ORB (CIAO) CIDL Compiler ****
+// CIAO has been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// CIDL Compiler has been developed by:
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about CIAO is available at:
+// http://www.dre.vanderbilt.edu/CIAO
+
+#include "Sender_svnt.h"
+#include "Cookies.h"
+#include "ciao/Servant_Activator.h"
+#include "ciao/Port_Activator_T.h"
+
+namespace Sender_Impl
+{
+ namespace CIAO_GLUE_Hello
+ {
+ Sender_Context::Sender_Context (
+ ::Components::CCMHome_ptr home,
+ ::CIAO::Swapping_Container *c,
+ Sender_Servant *sv)
+ : ACE_NESTED_CLASS (CIAO, Context_Impl_Base (home, c)),
+ ctx_svnt_base (home, c, sv)
+ {
+ }
+
+ Sender_Context::~Sender_Context (void)
+ {
+ }
+
+ // Operations for Sender receptacles and event sources,
+ // defined in ::Hello::CCM_Sender_Context.
+
+ // CIAO-specific.
+
+ Sender_Context *
+ Sender_Context::_narrow (
+ ::Components::SessionContext_ptr p
+ ACE_ENV_ARG_DECL_NOT_USED)
+ {
+ return dynamic_cast<Sender_Context *> (p);
+ }
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ Sender_Servant::Sender_Servant (
+ ::Hello::CCM_Sender_ptr exe,
+ ::Components::CCMHome_ptr h,
+ ::CIAO::Swapping_Container *c)
+ : ACE_NESTED_CLASS (CIAO, Servant_Impl_Base (c)),
+ comp_svnt_base (exe, c)
+ {
+ this->context_ = new Sender_Context (h, c, this);
+
+ ACE_TRY_NEW_ENV
+ {
+ ::Components::SessionComponent_var scom =
+ ::Components::SessionComponent::_narrow (
+ exe
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (! ::CORBA::is_nil (scom.in ()))
+ {
+ scom->set_session_context (
+ this->context_
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+
+ this->populate_port_tables (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+
+ ACE_CATCHANY
+ {
+ }
+
+ ACE_ENDTRY;
+ }
+
+ Sender_Servant::~Sender_Servant (void)
+ {
+ }
+
+ void
+ Sender_Servant::set_attributes (
+ const ::Components::ConfigValues &descr
+ ACE_ENV_ARG_DECL_NOT_USED)
+ {
+ for (CORBA::ULong i = 0;
+ i < descr.length ();
+ ++i)
+ {
+ const char *descr_name = descr[i]->name ();
+ ::CORBA::Any &descr_value = descr[i]->value ();
+
+ if (ACE_OS::strcmp (descr_name, "local_message") == 0)
+ {
+ const char * _ciao_extract_val = 0;
+ descr_value >>= _ciao_extract_val;
+ this->local_message (_ciao_extract_val);
+ continue;
+ }
+
+ ACE_UNUSED_ARG (descr_name);
+ ACE_UNUSED_ARG (descr_value);
+ }
+ }
+
+ ::Components::Cookie *
+ Sender_Servant::connect (
+ const char *name,
+ ::CORBA::Object_ptr connection
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::AlreadyConnected,
+ ::Components::ExceededConnectionLimit))
+ {
+ // If the component has no receptacles, this will be unused.
+ ACE_UNUSED_ARG (connection);
+
+ if (name == 0)
+ {
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ CORBA::Object_ptr
+ Sender_Servant::disconnect (
+ const char *name,
+ ::Components::Cookie * ck
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::CookieRequired,
+ ::Components::NoConnection))
+ {
+ if (name == 0)
+ {
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::CORBA::Object::_nil ());
+ }
+
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::CORBA::Object::_nil ());
+
+ ACE_UNUSED_ARG (ck);
+ }
+
+ void
+ Sender_Servant::connect_consumer (
+ const char * emitter_name,
+ ::Components::EventConsumerBase_ptr consumer
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::AlreadyConnected,
+ ::Components::InvalidConnection))
+ {
+ if (emitter_name == 0)
+ {
+ ACE_THROW (::CORBA::BAD_PARAM ());
+ }
+
+ ACE_UNUSED_ARG (consumer);
+ ACE_THROW (::Components::InvalidName ());
+ }
+
+ ::Components::Cookie *
+ Sender_Servant::subscribe (
+ const char *publisher_name,
+ ::Components::EventConsumerBase_ptr subscribe
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::ExceededConnectionLimit))
+ {
+ // Just in case there are no if blocks
+ ACE_UNUSED_ARG (subscribe);
+
+ if (publisher_name == 0)
+ {
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ ::Components::EventConsumerBase_ptr
+ Sender_Servant::unsubscribe (
+ const char *publisher_name,
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection))
+ {
+ // Just in case there are no if blocks
+ ACE_UNUSED_ARG (ck);
+
+ if (publisher_name == 0)
+ {
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::Components::EventConsumerBase::_nil ());
+ }
+
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::Components::EventConsumerBase::_nil ());
+ }
+
+ CORBA::Object_ptr
+ Sender_Servant::get_facet_executor (const char *name
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException))
+ {
+ if (name == 0)
+ {
+ ACE_THROW_RETURN (
+ ::CORBA::BAD_PARAM (),
+ ::CORBA::Object::_nil ());
+ }
+
+ return CORBA::Object::_nil ();
+ }
+
+ // Supported operations.
+
+ void
+ Sender_Servant::start (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ this->executor_->start (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+
+ // Component attribute operations.
+
+ char *
+ Sender_Servant::local_message (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ return this->executor_->local_message (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+
+ void
+ Sender_Servant::local_message (
+ const char * local_message
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ this->executor_->local_message (
+ local_message
+ ACE_ENV_ARG_PARAMETER);
+ }
+
+ // Private method to populate the port tables.
+ void
+ Sender_Servant::populate_port_tables (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ ACE_ENV_ARG_NOT_USED;
+ ::CORBA::Object_var obj_var;
+ ::Components::EventConsumerBase_var ecb_var;
+ }
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ SenderHome_Servant::SenderHome_Servant (
+ ::Hello::CCM_SenderHome_ptr exe,
+ ::CIAO::Swapping_Container *c)
+ : ACE_NESTED_CLASS (CIAO, Swapping_Servant_Home_Impl_Base (c)),
+ home_svnt_base (exe, c, "Sender_Impl_Hello_Sender",
+ "Sender_Impl_Hello_Sender")
+ {
+ }
+
+ SenderHome_Servant::~SenderHome_Servant (void)
+ {
+ }
+
+ // Home operations.
+
+ // Home supported interface operations.
+
+ // Home factory and finder operations.
+
+ // Home attribute operations.
+ }
+
+ extern "C" SENDER_SVNT_Export ::PortableServer::Servant
+ createSenderHome_Servant (
+ ::Components::HomeExecutorBase_ptr p,
+ CIAO::Swapping_Container *c
+ ACE_ENV_ARG_DECL)
+ {
+ if (p == 0)
+ {
+ return 0;
+ }
+
+ ::Hello::CCM_SenderHome_var x =
+ ::Hello::CCM_SenderHome::_narrow (
+ p
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ if (::CORBA::is_nil (x.in ()))
+ {
+ return 0;
+ }
+
+ return new
+ CIAO_GLUE_Hello::SenderHome_Servant (
+ x.in (),
+ c);
+ }
+}
+
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.cpp.with-connections b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.cpp.with-connections
new file mode 100644
index 00000000000..2f25588a3f5
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.cpp.with-connections
@@ -0,0 +1,736 @@
+// $Id$
+//
+// **** Code generated by the ****
+// **** Component Integrated ACE ORB (CIAO) CIDL Compiler ****
+// CIAO has been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// CIDL Compiler has been developed by:
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about CIAO is available at:
+// http://www.dre.vanderbilt.edu/CIAO
+
+#include "Sender_svnt.h"
+#include "Cookies.h"
+#include "ciao/Servant_Activator.h"
+#include "ciao/Dynamic_Component_Activator.h"
+#include "ciao/Port_Activator_T.h"
+
+namespace Sender_Impl
+{
+ namespace CIAO_GLUE_Hello
+ {
+ template <typename T>
+ ReadMessage_Servant_T<T>::ReadMessage_Servant_T (
+ ::Hello::CCM_ReadMessage_ptr executor,
+ ::Components::CCMContext_ptr c)
+ : executor_ (::Hello::CCM_ReadMessage::_duplicate (executor)),
+ ctx_ (::Components::CCMContext::_duplicate (c))
+ {
+ }
+
+ template <typename T>
+ ReadMessage_Servant_T<T>::~ReadMessage_Servant_T (void)
+ {
+ }
+
+ template <typename T>
+ char *
+ ReadMessage_Servant_T<T>::get_message (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ return this->executor_->get_message (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+
+ template <typename T>
+ CORBA::Object_ptr
+ ReadMessage_Servant_T<T>::_get_component (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ ::Components::SessionContext_var sc =
+ ::Components::SessionContext::_narrow (
+ this->ctx_.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (CORBA::Object::_nil ());
+
+ if (! CORBA::is_nil (sc.in ()))
+ {
+ return sc->get_CCM_object (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+
+ ::Components::EntityContext_var ec =
+ ::Components::EntityContext::_narrow (
+ this->ctx_.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (CORBA::Object::_nil ());
+
+ if (! CORBA::is_nil (ec.in ()))
+ {
+ return ec->get_CCM_object (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+
+ ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
+ }
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ Sender_Context::Sender_Context (
+ ::Components::CCMHome_ptr home,
+ ::CIAO::Session_Container *c,
+ Sender_Servant *sv)
+ : ACE_NESTED_CLASS (CIAO, Context_Impl_Base (home, c)),
+ ctx_svnt_base (home, c, sv)
+ {
+ }
+
+ Sender_Context::~Sender_Context (void)
+ {
+ }
+
+ // Operations for Sender receptacles and event sources,
+ // defined in ::Hello::CCM_Sender_Context.
+
+ void
+ Sender_Context::update_port_activator (
+ const char* obj_id
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ PortableServer::ObjectId_var oid =
+ PortableServer::string_to_ObjectId (obj_id);
+ CIAO::Servant_Activator *sa =
+ this->container_->ports_servant_activator ();
+ sa->update_port_activator (oid);
+ }
+
+ void
+ Sender_Context::deactivate_facet (
+ const char* obj_id
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ PortableServer::ObjectId_var oid =
+ PortableServer::string_to_ObjectId (obj_id);
+
+ this->container_->deactivate_facet (oid);
+ }
+
+ ::Components::ConsumerDescriptions *
+ Sender_Context::get_registered_consumers (
+ const char* publisher_name
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ ACE_UNUSED_ARG (publisher_name);
+ ::Components::ConsumerDescriptions *tmp = 0;
+ ACE_NEW_THROW_EX (tmp,
+ ::Components::ConsumerDescriptions
+ (this->ciao_publishes_click_out_map_.current_size ()),
+ CORBA::NO_MEMORY ());
+ ::Components::ConsumerDescriptions_var retval = tmp;
+
+ retval->length (this->ciao_publishes_click_out_map_.current_size ());
+ CORBA::ULong i = 0;
+
+ ACE_Active_Map_Manager<
+ ::Hello::TimeOutConsumer_var>::iterator end =
+ this->ciao_publishes_click_out_map_.end ();
+
+ for (ACE_Active_Map_Manager<
+ ::Hello::TimeOutConsumer_var>::iterator iter =
+ this->ciao_publishes_click_out_map_.begin ();
+ iter != end;
+ ++iter)
+ {
+ ACE_Active_Map_Manager<
+ ::Hello::TimeOutConsumer_var>::ENTRY &entry = *iter;
+
+ ::Hello::TimeOutConsumer_var c =
+ ::Hello::TimeOutConsumer::_narrow (
+ entry.int_id_.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ ::Components::ConsumerDescription *cd = 0;
+ ACE_NEW_THROW_EX (cd,
+ OBV_Components::ConsumerDescription (),
+ CORBA::NO_MEMORY ());
+ ::Components::ConsumerDescription_var safe = cd;
+
+ safe->name ("");
+ safe->type_id ("");
+ safe->consumer (c);
+
+ retval[i] = safe;
+ }
+ return retval._retn ();
+ }
+
+ void
+ Sender_Context::push_click_out (
+ ::Hello::TimeOut *ev
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ ACE_Active_Map_Manager<
+ ::Hello::TimeOutConsumer_var>::iterator end =
+ this->ciao_publishes_click_out_map_.end ();
+
+ for (ACE_Active_Map_Manager<
+ ::Hello::TimeOutConsumer_var>::iterator iter =
+ this->ciao_publishes_click_out_map_.begin ();
+ iter != end;
+ ++iter)
+ {
+ ACE_Active_Map_Manager<
+ ::Hello::TimeOutConsumer_var>::ENTRY &entry = *iter;
+
+ ::Hello::TimeOutConsumer_var c =
+ ::Hello::TimeOutConsumer::_narrow (
+ entry.int_id_.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ entry.int_id_->push_TimeOut (
+ ev
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ }
+ }
+
+ ::Components::Cookie *
+ Sender_Context::subscribe_click_out (
+ ::Hello::TimeOutConsumer_ptr c
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::ExceededConnectionLimit))
+ {
+ if (CORBA::is_nil (c))
+ {
+ ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0);
+ }
+
+ ::Hello::TimeOutConsumer_var sub =
+ ::Hello::TimeOutConsumer::_duplicate (c);
+
+ ACE_Active_Map_Manager_Key key;
+ this->ciao_publishes_click_out_map_.bind (sub.in (), key);
+ sub._retn ();
+
+ ::Components::Cookie_var retv = new ::CIAO::Map_Key_Cookie (key);
+ return retv._retn ();
+ }
+
+ ::Hello::TimeOutConsumer_ptr
+ Sender_Context::unsubscribe_click_out (
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidConnection))
+ {
+ ::Hello::TimeOutConsumer_var retv;
+ ACE_Active_Map_Manager_Key key;
+
+ if (ck == 0 || ::CIAO::Map_Key_Cookie::extract (ck, key) == false)
+ {
+ ACE_THROW_RETURN (
+ ::Components::InvalidConnection (),
+ ::Hello::TimeOutConsumer::_nil ());
+ }
+
+ if (this->ciao_publishes_click_out_map_.unbind (key, retv) != 0)
+ {
+ ACE_THROW_RETURN (
+ ::Components::InvalidConnection (),
+ ::Hello::TimeOutConsumer::_nil ());
+ }
+
+ return retv._retn ();
+ }
+
+ // CIAO-specific.
+
+ Sender_Context *
+ Sender_Context::_narrow (
+ ::Components::SessionContext_ptr p
+ ACE_ENV_ARG_DECL_NOT_USED)
+ {
+ return dynamic_cast<Sender_Context *> (p);
+ }
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ Sender_Servant::Sender_Servant (
+ ::Hello::CCM_Sender_ptr exe,
+ ::Components::CCMHome_ptr h,
+ ::CIAO::Home_Servant_Impl_Base *home_servant,
+ ::CIAO::Session_Container *c)
+ : ACE_NESTED_CLASS (CIAO, Servant_Impl_Base (h, home_servant, c)),
+ comp_svnt_base (exe, h, home_servant, c)
+ {
+ this->context_ = new Sender_Context (h, c, this);
+
+ ACE_TRY_NEW_ENV
+ {
+ ::Components::SessionComponent_var scom =
+ ::Components::SessionComponent::_narrow (
+ exe
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (! ::CORBA::is_nil (scom.in ()))
+ {
+ scom->set_session_context (
+ this->context_
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+
+ this->populate_port_tables (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+
+ ACE_CATCHANY
+ {
+ }
+
+ ACE_ENDTRY;
+ }
+
+ Sender_Servant::~Sender_Servant (void)
+ {
+ }
+
+ void
+ Sender_Servant::set_attributes (
+ const ::Components::ConfigValues &descr
+ ACE_ENV_ARG_DECL_NOT_USED)
+ {
+ this->activate_component ();
+ for (CORBA::ULong i = 0;
+ i < descr.length ();
+ ++i)
+ {
+ const char *descr_name = descr[i]->name ();
+ ::CORBA::Any &descr_value = descr[i]->value ();
+
+ if (ACE_OS::strcmp (descr_name, "local_message") == 0)
+ {
+ const char * _ciao_extract_val = 0;
+ descr_value >>= _ciao_extract_val;
+ this->local_message (_ciao_extract_val);
+ continue;
+ }
+
+ ACE_UNUSED_ARG (descr_name);
+ ACE_UNUSED_ARG (descr_value);
+ }
+ }
+
+ ::Hello::ReadMessage_ptr
+ Sender_Servant::provide_push_message (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ this->activate_component ();
+ if (! ::CORBA::is_nil (this->provide_push_message_.in ()))
+ {
+ return ::Hello::ReadMessage::_duplicate (this->provide_push_message_.in ());
+ }
+
+ ::CORBA::Object_var obj =
+ this->provide_push_message_i (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (::Hello::ReadMessage::_nil ());
+
+ ::Hello::ReadMessage_var fo =
+ ::Hello::ReadMessage::_narrow (
+ obj.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (::Hello::ReadMessage::_nil ());
+
+ this->provide_push_message_ = fo;
+ return ::Hello::ReadMessage::_duplicate (this->provide_push_message_.in ());
+ }
+
+ ::CORBA::Object_ptr
+ Sender_Servant::provide_push_message_i (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ ::CORBA::Object_ptr ret =
+ this->lookup_facet ("push_message");
+
+ if (! ::CORBA::is_nil (ret))
+ {
+ return ret;
+ }
+
+ CIAO::Port_Activator_T<
+ CIAO_GLUE_Hello::ReadMessage_Servant,
+ ::Hello::CCM_ReadMessage,
+ ::Components::CCMContext,
+ Sender_Servant
+ > *tmp = 0;
+
+ typedef CIAO::Port_Activator_T<
+ CIAO_GLUE_Hello::ReadMessage_Servant,
+ ::Hello::CCM_ReadMessage,
+ ::Components::CCMContext,
+ Sender_Servant
+ >
+ MACRO_MADNESS_TYPEDEF;
+
+ ACE_NEW_THROW_EX (
+ tmp,
+ MACRO_MADNESS_TYPEDEF (
+ "Hello_Sender_push_message",
+ "push_message",
+ CIAO::Port_Activator::Facet,
+ 0,
+ this->context_,
+ this),
+ CORBA::NO_MEMORY ());
+
+ CIAO::Servant_Activator *sa =
+ this->container_->ports_servant_activator ();
+
+ if (!sa->register_port_activator (tmp))
+ {
+ return 0;
+ }
+
+ ::CORBA::Object_var obj =
+ this->container_->generate_reference (
+ "Hello_Sender_push_message",
+ "IDL:Hello/ReadMessage:1.0",
+ CIAO::Container::Facet_Consumer
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (::Hello::ReadMessage::_nil ());
+
+ this->add_facet (
+ "push_message",
+ obj.in ());
+
+ return obj._retn ();
+ }
+
+ ::Components::Cookie *
+ Sender_Servant::subscribe_click_out (
+ ::Hello::TimeOutConsumer_ptr c
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::ExceededConnectionLimit))
+ {
+ this->activate_component ();
+ return this->context_->subscribe_click_out (
+ c
+ ACE_ENV_ARG_PARAMETER);
+ }
+
+ ::Hello::TimeOutConsumer_ptr
+ Sender_Servant::unsubscribe_click_out (
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidConnection))
+ {
+ this->activate_component ();
+ return this->context_->unsubscribe_click_out (
+ ck
+ ACE_ENV_ARG_PARAMETER);
+ }
+
+ ::Components::Cookie *
+ Sender_Servant::connect (
+ const char *name,
+ ::CORBA::Object_ptr connection
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::AlreadyConnected,
+ ::Components::ExceededConnectionLimit))
+ {
+ this->activate_component ();
+ // If the component has no receptacles, this will be unused.
+ ACE_UNUSED_ARG (connection);
+
+ if (name == 0)
+ {
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ CORBA::Object_ptr
+ Sender_Servant::disconnect (
+ const char *name,
+ ::Components::Cookie * ck
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::CookieRequired,
+ ::Components::NoConnection))
+ {
+ this->activate_component ();
+ if (name == 0)
+ {
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::CORBA::Object::_nil ());
+ }
+
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::CORBA::Object::_nil ());
+
+ ACE_UNUSED_ARG (ck);
+ }
+
+ void
+ Sender_Servant::connect_consumer (
+ const char * emitter_name,
+ ::Components::EventConsumerBase_ptr consumer
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::AlreadyConnected,
+ ::Components::InvalidConnection))
+ {
+ this->activate_component ();
+ if (emitter_name == 0)
+ {
+ ACE_THROW (::CORBA::BAD_PARAM ());
+ }
+
+ ACE_UNUSED_ARG (consumer);
+ ACE_THROW (::Components::InvalidName ());
+ }
+
+ ::Components::Cookie *
+ Sender_Servant::subscribe (
+ const char *publisher_name,
+ ::Components::EventConsumerBase_ptr subscribe
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::ExceededConnectionLimit))
+ {
+ this->activate_component ();
+ // Just in case there are no if blocks
+ ACE_UNUSED_ARG (subscribe);
+
+ if (publisher_name == 0)
+ {
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ if (ACE_OS::strcmp (publisher_name, "click_out") == 0)
+ {
+ ::Hello::TimeOutConsumer_var _ciao_consumer =
+ ::Hello::TimeOutConsumer::_narrow (
+ subscribe
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ if (::CORBA::is_nil (_ciao_consumer.in ()))
+ {
+ ACE_THROW_RETURN (::Components::InvalidConnection (), 0);
+ }
+
+ return this->subscribe_click_out (
+ _ciao_consumer.in ()
+ ACE_ENV_ARG_PARAMETER);
+ }
+
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ ::Components::EventConsumerBase_ptr
+ Sender_Servant::unsubscribe (
+ const char *publisher_name,
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection))
+ {
+ this->activate_component ();
+ // Just in case there are no if blocks
+ ACE_UNUSED_ARG (ck);
+
+ if (publisher_name == 0)
+ {
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::Components::EventConsumerBase::_nil ());
+ }
+
+ if (ACE_OS::strcmp (publisher_name, "click_out") == 0)
+ {
+ return this->unsubscribe_click_out (
+ ck
+ ACE_ENV_ARG_PARAMETER);
+ }
+
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::Components::EventConsumerBase::_nil ());
+ }
+
+ CORBA::Object_ptr
+ Sender_Servant::get_facet_executor (const char *name
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException))
+ {
+ this->activate_component ();
+ if (name == 0)
+ {
+ ACE_THROW_RETURN (
+ ::CORBA::BAD_PARAM (),
+ ::CORBA::Object::_nil ());
+ }
+
+ if (ACE_OS::strcmp (name, "push_message") == 0)
+ {
+ return this->executor_->get_push_message (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+
+ return CORBA::Object::_nil ();
+ }
+
+ // Supported operations.
+
+ void
+ Sender_Servant::start (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ this->activate_component ();
+ this->executor_->start (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+
+ // Component attribute operations.
+
+ char *
+ Sender_Servant::local_message (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ this->activate_component ();
+ return this->executor_->local_message (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+
+ void
+ Sender_Servant::local_message (
+ const char * local_message
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ this->activate_component ();
+ this->executor_->local_message (
+ local_message
+ ACE_ENV_ARG_PARAMETER);
+ }
+
+ // Private method to populate the port tables.
+ void
+ Sender_Servant::populate_port_tables (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ ACE_ENV_ARG_NOT_USED;
+ ::CORBA::Object_var obj_var;
+ ::Components::EventConsumerBase_var ecb_var;
+
+ obj_var =
+ this->provide_push_message_i (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+ }
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ SenderHome_Servant::SenderHome_Servant (
+ ::Hello::CCM_SenderHome_ptr exe,
+ ::CIAO::Session_Container *c)
+ : ACE_NESTED_CLASS (CIAO, Home_Servant_Impl_Base (c)),
+ home_svnt_base (exe, c, "Sender_Impl_Hello_Sender",
+ "Sender_Impl_Hello_Sender")
+ {
+ }
+
+ SenderHome_Servant::~SenderHome_Servant (void)
+ {
+ }
+
+ // Home operations.
+
+ // Home supported interface operations.
+
+ // Home factory and finder operations.
+
+ // Home attribute operations.
+ }
+
+ extern "C" SENDER_SVNT_Export ::PortableServer::Servant
+ createSenderHome_Servant (
+ ::Components::HomeExecutorBase_ptr p,
+ CIAO::Session_Container *c
+ ACE_ENV_ARG_DECL)
+ {
+ if (p == 0)
+ {
+ return 0;
+ }
+
+ ::Hello::CCM_SenderHome_var x =
+ ::Hello::CCM_SenderHome::_narrow (
+ p
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ if (::CORBA::is_nil (x.in ()))
+ {
+ return 0;
+ }
+
+ return new
+ CIAO_GLUE_Hello::SenderHome_Servant (
+ x.in (),
+ c);
+ }
+}
+
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.h.new_impl b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.h.new_impl
new file mode 100644
index 00000000000..35e25cf9fe0
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.h.new_impl
@@ -0,0 +1,366 @@
+// $Id$
+//
+// **** Code generated by the ****
+// **** Component Integrated ACE ORB (CIAO) CIDL Compiler ****
+// CIAO has been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// CIDL Compiler has been developed by:
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about CIAO is available at:
+// http://www.dre.vanderbilt.edu/CIAO
+
+#ifndef CIAO_GLUE_SESSION_SENDER_SVNT_H
+#define CIAO_GLUE_SESSION_SENDER_SVNT_H
+
+#include /**/ "ace/pre.h"
+
+#include "SenderEC.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "ciao/Container_Base.h"
+#include "ciao/Servant_Impl_T.h"
+#include "ciao/Context_Impl_T.h"
+#include "ciao/Home_Servant_Impl_Base.h"
+#include "ciao/Home_Servant_Impl_T.h"
+#include "ace/Active_Map_Manager_T.h"
+
+#include "SenderS.h"
+
+namespace Sender_Impl
+{
+ namespace CIAO_GLUE_Hello
+ {
+ template <typename T>
+ class ReadMessage_Servant_T
+ : public virtual POA_Hello::ReadMessage,
+ public virtual PortableServer::RefCountServantBase
+ {
+ public:
+ ReadMessage_Servant_T (
+ ::Hello::CCM_ReadMessage_ptr executor,
+ ::Components::CCMContext_ptr ctx);
+
+ virtual ~ReadMessage_Servant_T (void);
+
+ virtual char *
+ get_message (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+
+ // Get component implementation.
+ virtual CORBA::Object_ptr
+ _get_component (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+
+ protected:
+ // Facet executor.
+ ::Hello::CCM_ReadMessage_var executor_;
+
+ // Context object.
+ ::Components::CCMContext_var ctx_;
+ };
+
+ typedef SENDER_SVNT_Export ReadMessage_Servant_T<int> ReadMessage_Servant;
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ class Sender_Servant;
+
+ class SENDER_SVNT_Export Sender_Context
+ : public virtual CIAO::Context_Impl<
+ ::Hello::CCM_Sender_Context,
+ Sender_Servant,
+ ::Hello::Sender,
+ ::Hello::Sender_var
+ >
+ {
+ public:
+ // We will allow the servant glue code we generate to access our state.
+ friend class Sender_Servant;
+
+ /// Hack for VC6.
+ typedef CIAO::Context_Impl<
+ ::Hello::CCM_Sender_Context,
+ Sender_Servant,
+ ::Hello::Sender,
+ ::Hello::Sender_var
+ > ctx_svnt_base;
+
+ Sender_Context (
+ ::Components::CCMHome_ptr home,
+ ::CIAO::Session_Container *c,
+ Sender_Servant *sv);
+
+ virtual ~Sender_Context (void);
+
+ // Operations for Sender receptacles and event sources,
+ // defined in ::Hello::CCM_Sender_Context.
+
+ virtual void
+ push_click_out (
+ ::Hello::TimeOut *ev
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // CIAO-specific.
+
+ static Sender_Context *
+ _narrow (
+ ::Components::SessionContext_ptr p
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS);
+
+ protected:
+ // Methods that manage this component's connections and consumers.
+
+ virtual ::Components::Cookie *
+ subscribe_click_out (
+ ::Hello::TimeOutConsumer_ptr c
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::ExceededConnectionLimit));
+
+ virtual ::Hello::TimeOutConsumer_ptr
+ unsubscribe_click_out (
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidConnection));
+
+ protected:
+ ACE_Active_Map_Manager<
+ ::Hello::TimeOutConsumer_var>
+ ciao_publishes_click_out_map_;
+ };
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ class SENDER_SVNT_Export Sender_Servant
+ : public virtual CIAO::Servant_Impl<
+ POA_Hello::Sender,
+ ::Hello::CCM_Sender,
+ ::Hello::CCM_Sender_var,
+ Sender_Context
+ >
+ {
+ public:
+ /// Hack for VC6.
+ typedef CIAO::Servant_Impl<
+ POA_Hello::Sender,
+ ::Hello::CCM_Sender,
+ ::Hello::CCM_Sender_var,
+ Sender_Context
+ > comp_svnt_base;
+
+ Sender_Servant (
+ ::Hello::CCM_Sender_ptr executor,
+ ::Components::CCMHome_ptr home,
+ ::CIAO::Home_Servant_Impl_Base *home_servant,
+ ::CIAO::Session_Container *c);
+
+ virtual ~Sender_Servant (void);
+
+ virtual void
+ set_attributes (
+ const ::Components::ConfigValues &descr
+ ACE_ENV_ARG_DECL);
+
+ // Supported operations.
+
+ virtual void
+ start (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // Public port operations.
+
+ virtual ::Hello::ReadMessage_ptr
+ provide_push_message (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual ::Components::Cookie *
+ subscribe_click_out (
+ ::Hello::TimeOutConsumer_ptr c
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::ExceededConnectionLimit));
+
+ virtual ::Hello::TimeOutConsumer_ptr
+ unsubscribe_click_out (
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidConnection));
+
+ // Component attribute operations.
+
+ virtual char *
+ local_message (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual void
+ local_message (
+ const char *
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // Operations for Receptacles interface.
+
+ virtual ::Components::Cookie *
+ connect (
+ const char *name,
+ CORBA::Object_ptr connection
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::AlreadyConnected,
+ ::Components::ExceededConnectionLimit));
+
+ virtual CORBA::Object_ptr
+ disconnect (
+ const char *name,
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::CookieRequired,
+ ::Components::NoConnection));
+
+ // Operations for Events interface.
+
+ virtual ::Components::Cookie *
+ subscribe (
+ const char *publisher_name,
+ ::Components::EventConsumerBase_ptr subscriber
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::ExceededConnectionLimit));
+
+ virtual ::Components::EventConsumerBase_ptr
+ unsubscribe (
+ const char *publisher_name,
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection));
+
+ virtual void
+ connect_consumer (
+ const char *emitter_name,
+ ::Components::EventConsumerBase_ptr consumer
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::AlreadyConnected,
+ ::Components::InvalidConnection));
+
+ // CIAO specific operations on the servant
+ CORBA::Object_ptr
+ get_facet_executor (const char *name
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException));
+
+ private:
+
+ ::Hello::ReadMessage_var
+ provide_push_message_;
+
+ private:
+
+ void
+ populate_port_tables (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ ::CORBA::Object_ptr
+ provide_push_message_i (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+ };
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ class SENDER_SVNT_Export SenderHome_Servant
+ : public virtual CIAO::Home_Servant_Impl<
+ POA_Hello::SenderHome,
+ ::Hello::CCM_SenderHome,
+ ::Hello::CCM_SenderHome_var,
+ ::Hello::Sender,
+ ::Hello::Sender_var,
+ ::Hello::CCM_Sender,
+ ::Hello::CCM_Sender_var,
+ Sender_Servant
+ >
+ {
+ public:
+ /// Hack for VC6.
+ typedef CIAO::Home_Servant_Impl<
+ POA_Hello::SenderHome,
+ ::Hello::CCM_SenderHome,
+ ::Hello::CCM_SenderHome_var,
+ ::Hello::Sender,
+ ::Hello::Sender_var,
+ ::Hello::CCM_Sender,
+ ::Hello::CCM_Sender_var,
+ Sender_Servant
+ > home_svnt_base;
+
+ SenderHome_Servant (
+ ::Hello::CCM_SenderHome_ptr exe,
+ ::CIAO::Session_Container *c);
+
+ virtual ~SenderHome_Servant (void);
+
+ // Home operations.
+
+ // Home factory and finder operations.
+
+ // Attribute operations.
+ };
+
+ extern "C" SENDER_SVNT_Export ::PortableServer::Servant
+ createSenderHome_Servant (
+ ::Components::HomeExecutorBase_ptr p,
+ CIAO::Session_Container *c
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS);
+ }
+}
+
+#include /**/ "ace/post.h"
+
+#endif /* CIAO_GLUE_SESSION_SENDER_SVNT_H */
+
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.h.no-connections b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.h.no-connections
new file mode 100644
index 00000000000..c1ce0e63fd2
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.h.no-connections
@@ -0,0 +1,275 @@
+// $Id$
+//
+// **** Code generated by the ****
+// **** Component Integrated ACE ORB (CIAO) CIDL Compiler ****
+// CIAO has been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// CIDL Compiler has been developed by:
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about CIAO is available at:
+// http://www.dre.vanderbilt.edu/CIAO
+
+#ifndef CIAO_GLUE_SESSION_SENDER_SVNT_H
+#define CIAO_GLUE_SESSION_SENDER_SVNT_H
+
+
+#include /**/ "ace/pre.h"
+
+#include "SenderEC.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "ciao/Container_Base.h"
+#include "ciao/Swapping_Container.h"
+#include "ciao/Servant_Impl_T.h"
+#include "ciao/Context_Impl_T.h"
+#include "ciao/Home_Servant_Impl_T.h"
+#include "ciao/Swapping_Servant_Home_Impl_T.h"
+#include "ace/Active_Map_Manager_T.h"
+
+#include "SenderS.h"
+
+namespace Sender_Impl
+{
+ namespace CIAO_GLUE_Hello
+ {
+ class Sender_Servant;
+
+ class SENDER_SVNT_Export Sender_Context
+ : public virtual CIAO::Context_Impl<
+ ::Hello::CCM_Sender_Context,
+ Sender_Servant,
+ ::Hello::Sender,
+ ::Hello::Sender_var
+ >
+ {
+ public:
+ // We will allow the servant glue code we generate to access our state.
+ friend class Sender_Servant;
+
+ /// Hack for VC6.
+ typedef CIAO::Context_Impl<
+ ::Hello::CCM_Sender_Context,
+ Sender_Servant,
+ ::Hello::Sender,
+ ::Hello::Sender_var
+ > ctx_svnt_base;
+
+ Sender_Context (
+ ::Components::CCMHome_ptr home,
+ ::CIAO::Swapping_Container *c,
+ Sender_Servant *sv);
+
+ virtual ~Sender_Context (void);
+
+ // Operations for Sender receptacles and event sources,
+ // defined in ::Hello::CCM_Sender_Context.
+
+ // CIAO-specific.
+
+ static Sender_Context *
+ _narrow (
+ ::Components::SessionContext_ptr p
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS);
+
+ protected:
+ // Methods that manage this component's connections and consumers.
+
+ protected:
+ };
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ class SENDER_SVNT_Export Sender_Servant
+ : public virtual CIAO::Servant_Impl<
+ POA_Hello::Sender,
+ ::Hello::CCM_Sender,
+ ::Hello::CCM_Sender_var,
+ Sender_Context
+ >
+ {
+ public:
+ /// Hack for VC6.
+ typedef CIAO::Servant_Impl<
+ POA_Hello::Sender,
+ ::Hello::CCM_Sender,
+ ::Hello::CCM_Sender_var,
+ Sender_Context
+ > comp_svnt_base;
+
+ Sender_Servant (
+ ::Hello::CCM_Sender_ptr executor,
+ ::Components::CCMHome_ptr home,
+ ::CIAO::Swapping_Container *c);
+
+ virtual ~Sender_Servant (void);
+
+ virtual void
+ set_attributes (
+ const ::Components::ConfigValues &descr
+ ACE_ENV_ARG_DECL);
+
+ // Supported operations.
+
+ virtual void
+ start (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // Public port operations.
+
+ // Component attribute operations.
+
+ virtual char *
+ local_message (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual void
+ local_message (
+ const char *
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // Operations for Receptacles interface.
+
+ virtual ::Components::Cookie *
+ connect (
+ const char *name,
+ CORBA::Object_ptr connection
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::AlreadyConnected,
+ ::Components::ExceededConnectionLimit));
+
+ virtual CORBA::Object_ptr
+ disconnect (
+ const char *name,
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::CookieRequired,
+ ::Components::NoConnection));
+
+ // Operations for Events interface.
+
+ virtual ::Components::Cookie *
+ subscribe (
+ const char *publisher_name,
+ ::Components::EventConsumerBase_ptr subscriber
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::ExceededConnectionLimit));
+
+ virtual ::Components::EventConsumerBase_ptr
+ unsubscribe (
+ const char *publisher_name,
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection));
+
+ virtual void
+ connect_consumer (
+ const char *emitter_name,
+ ::Components::EventConsumerBase_ptr consumer
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::AlreadyConnected,
+ ::Components::InvalidConnection));
+
+ // CIAO specific operations on the servant
+ CORBA::Object_ptr
+ get_facet_executor (const char *name
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException));
+
+ private:
+
+ private:
+
+ void
+ populate_port_tables (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+ };
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ class SENDER_SVNT_Export SenderHome_Servant
+ : public virtual CIAO::Swapping_Servant_Home_Impl<
+ POA_Hello::SenderHome,
+ ::Hello::CCM_SenderHome,
+ ::Hello::CCM_SenderHome_var,
+ ::Hello::Sender,
+ ::Hello::Sender_var,
+ ::Hello::CCM_Sender,
+ ::Hello::CCM_Sender_var,
+ Sender_Servant
+ >
+ {
+ public:
+ /// Hack for VC6.
+ typedef CIAO::Swapping_Servant_Home_Impl<
+ POA_Hello::SenderHome,
+ ::Hello::CCM_SenderHome,
+ ::Hello::CCM_SenderHome_var,
+ ::Hello::Sender,
+ ::Hello::Sender_var,
+ ::Hello::CCM_Sender,
+ ::Hello::CCM_Sender_var,
+ Sender_Servant
+ > home_svnt_base;
+
+ SenderHome_Servant (
+ ::Hello::CCM_SenderHome_ptr exe,
+ ::CIAO::Swapping_Container *c);
+
+ virtual ~SenderHome_Servant (void);
+
+ // Home operations.
+
+ // Home factory and finder operations.
+
+ // Attribute operations.
+ };
+
+ extern "C" SENDER_SVNT_Export ::PortableServer::Servant
+ createSenderHome_Servant (
+ ::Components::HomeExecutorBase_ptr p,
+ CIAO::Swapping_Container *c
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS);
+ }
+}
+
+#include /**/ "ace/post.h"
+
+#endif /* CIAO_GLUE_SESSION_SENDER_SVNT_H */
+
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.h.with-connections b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.h.with-connections
new file mode 100644
index 00000000000..b6d834eba77
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.h.with-connections
@@ -0,0 +1,395 @@
+// $Id$
+//
+// **** Code generated by the ****
+// **** Component Integrated ACE ORB (CIAO) CIDL Compiler ****
+// CIAO has been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// CIDL Compiler has been developed by:
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about CIAO is available at:
+// http://www.dre.vanderbilt.edu/CIAO
+
+#ifndef CIAO_GLUE_SESSION_SENDER_SVNT_H
+#define CIAO_GLUE_SESSION_SENDER_SVNT_H
+
+#include /**/ "ace/pre.h"
+
+#include "SenderEC.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "ciao/Container_Base.h"
+#include "ciao/Swapping_Container.h"
+#include "ciao/Servant_Impl_T.h"
+#include "ciao/Context_Impl_T.h"
+#include "ciao/Home_Servant_Impl_T.h"
+#include "ciao/Home_Servant_Impl_Base.h"
+#include "ciao/Swapping_Servant_Home_Impl_T.h"
+#include "ace/Active_Map_Manager_T.h"
+
+#include "SenderS.h"
+
+namespace Sender_Impl
+{
+ namespace CIAO_GLUE_Hello
+ {
+ template <typename T>
+ class ReadMessage_Servant_T
+ : public virtual POA_Hello::ReadMessage,
+ public virtual PortableServer::RefCountServantBase
+ {
+ public:
+ ReadMessage_Servant_T (
+ ::Hello::CCM_ReadMessage_ptr executor,
+ ::Components::CCMContext_ptr ctx);
+
+ virtual ~ReadMessage_Servant_T (void);
+
+ virtual char *
+ get_message (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+
+ // Get component implementation.
+ virtual CORBA::Object_ptr
+ _get_component (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+
+ protected:
+ // Facet executor.
+ ::Hello::CCM_ReadMessage_var executor_;
+
+ // Context object.
+ ::Components::CCMContext_var ctx_;
+ };
+
+ typedef SENDER_SVNT_Export ReadMessage_Servant_T<int> ReadMessage_Servant;
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ class Sender_Servant;
+
+ class SENDER_SVNT_Export Sender_Context
+ : public virtual CIAO::Context_Impl<
+ ::Hello::CCM_Sender_Context,
+ Sender_Servant,
+ ::Hello::Sender,
+ ::Hello::Sender_var
+ >
+ {
+ public:
+ // We will allow the servant glue code we generate to access our state.
+ friend class Sender_Servant;
+
+ /// Hack for VC6.
+ typedef CIAO::Context_Impl<
+ ::Hello::CCM_Sender_Context,
+ Sender_Servant,
+ ::Hello::Sender,
+ ::Hello::Sender_var
+ > ctx_svnt_base;
+
+ Sender_Context (
+ ::Components::CCMHome_ptr home,
+ ::CIAO::Session_Container *c,
+ Sender_Servant *sv);
+
+ virtual ~Sender_Context (void);
+
+ // Operations for Sender receptacles and event sources,
+ // defined in ::Hello::CCM_Sender_Context.
+
+ virtual void
+ push_click_out (
+ ::Hello::TimeOut *ev
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual ::Components::ConsumerDescriptions *
+ get_registered_consumers (const char *publisher_name
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual void
+ deactivate_facet (const char *obj_id
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual void
+ update_port_activator (const char *obj_id
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // CIAO-specific.
+
+ static Sender_Context *
+ _narrow (
+ ::Components::SessionContext_ptr p
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS);
+
+ protected:
+ // Methods that manage this component's connections and consumers.
+
+ /*
+ virtual ::Components::ConsumerDescriptions *
+ get_all_consumers (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+ */
+
+ virtual ::Components::Cookie *
+ subscribe_click_out (
+ ::Hello::TimeOutConsumer_ptr c
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::ExceededConnectionLimit));
+
+ virtual ::Hello::TimeOutConsumer_ptr
+ unsubscribe_click_out (
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidConnection));
+
+ protected:
+ ACE_Active_Map_Manager<
+ ::Hello::TimeOutConsumer_var>
+ ciao_publishes_click_out_map_;
+ };
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ class SENDER_SVNT_Export Sender_Servant
+ : public virtual CIAO::Servant_Impl<
+ POA_Hello::Sender,
+ ::Hello::CCM_Sender,
+ ::Hello::CCM_Sender_var,
+ Sender_Context
+ >
+ {
+ public:
+ /// Hack for VC6.
+ typedef CIAO::Servant_Impl<
+ POA_Hello::Sender,
+ ::Hello::CCM_Sender,
+ ::Hello::CCM_Sender_var,
+ Sender_Context
+ > comp_svnt_base;
+
+ Sender_Servant (
+ ::Hello::CCM_Sender_ptr executor,
+ ::Components::CCMHome_ptr home,
+ ::CIAO::Home_Servant_Impl_Base *home_servant,
+ ::CIAO::Session_Container *c);
+
+ virtual ~Sender_Servant (void);
+
+ virtual void
+ set_attributes (
+ const ::Components::ConfigValues &descr
+ ACE_ENV_ARG_DECL);
+
+ // Supported operations.
+
+ virtual void
+ start (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // Public port operations.
+
+ virtual ::Hello::ReadMessage_ptr
+ provide_push_message (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual ::Components::Cookie *
+ subscribe_click_out (
+ ::Hello::TimeOutConsumer_ptr c
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::ExceededConnectionLimit));
+
+ virtual ::Hello::TimeOutConsumer_ptr
+ unsubscribe_click_out (
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidConnection));
+
+ // Component attribute operations.
+
+ virtual char *
+ local_message (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual void
+ local_message (
+ const char *
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /*
+ virtual ::Components::ConsumerDescriptions *
+ get_all_consumers (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+ */
+
+ // Operations for Receptacles interface.
+
+ virtual ::Components::Cookie *
+ connect (
+ const char *name,
+ CORBA::Object_ptr connection
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::AlreadyConnected,
+ ::Components::ExceededConnectionLimit));
+
+ virtual CORBA::Object_ptr
+ disconnect (
+ const char *name,
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::CookieRequired,
+ ::Components::NoConnection));
+
+ // Operations for Events interface.
+
+ virtual ::Components::Cookie *
+ subscribe (
+ const char *publisher_name,
+ ::Components::EventConsumerBase_ptr subscriber
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::ExceededConnectionLimit));
+
+ virtual ::Components::EventConsumerBase_ptr
+ unsubscribe (
+ const char *publisher_name,
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection));
+
+ virtual void
+ connect_consumer (
+ const char *emitter_name,
+ ::Components::EventConsumerBase_ptr consumer
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::AlreadyConnected,
+ ::Components::InvalidConnection));
+
+ // CIAO specific operations on the servant
+ CORBA::Object_ptr
+ get_facet_executor (const char *name
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException));
+
+ private:
+
+ ::Hello::ReadMessage_var
+ provide_push_message_;
+
+ private:
+
+ void
+ populate_port_tables (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ ::CORBA::Object_ptr
+ provide_push_message_i (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+ };
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ class SENDER_SVNT_Export SenderHome_Servant
+ : public virtual CIAO::Swapping_Servant_Home_Impl<
+ POA_Hello::SenderHome,
+ ::Hello::CCM_SenderHome,
+ ::Hello::CCM_SenderHome_var,
+ ::Hello::Sender,
+ ::Hello::Sender_var,
+ ::Hello::CCM_Sender,
+ ::Hello::CCM_Sender_var,
+ Sender_Servant
+ >
+ {
+ public:
+ /// Hack for VC6.
+ typedef CIAO::Swapping_Servant_Home_Impl<
+ POA_Hello::SenderHome,
+ ::Hello::CCM_SenderHome,
+ ::Hello::CCM_SenderHome_var,
+ ::Hello::Sender,
+ ::Hello::Sender_var,
+ ::Hello::CCM_Sender,
+ ::Hello::CCM_Sender_var,
+ Sender_Servant
+ > home_svnt_base;
+
+ SenderHome_Servant (
+ ::Hello::CCM_SenderHome_ptr exe,
+ ::CIAO::Session_Container *c);
+
+ virtual ~SenderHome_Servant (void);
+
+ // Home operations.
+
+ // Home factory and finder operations.
+
+ // Attribute operations.
+ };
+
+ extern "C" SENDER_SVNT_Export ::PortableServer::Servant
+ createSenderHome_Servant (
+ ::Components::HomeExecutorBase_ptr p,
+ CIAO::Session_Container *c
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS);
+ }
+}
+
+#include /**/ "ace/post.h"
+
+#endif /* CIAO_GLUE_SESSION_SENDER_SVNT_H */
+
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt_export.h b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt_export.h
new file mode 100644
index 00000000000..53236a883f2
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt_export.h
@@ -0,0 +1,54 @@
+
+// -*- C++ -*-
+// $Id$
+// Definition for Win32 Export directives.
+// This file is generated automatically by generate_export_file.pl SENDER_SVNT
+// ------------------------------
+#ifndef SENDER_SVNT_EXPORT_H
+#define SENDER_SVNT_EXPORT_H
+
+#include "ace/config-all.h"
+
+#if !defined (SENDER_SVNT_HAS_DLL)
+# define SENDER_SVNT_HAS_DLL 1
+#endif /* ! SENDER_SVNT_HAS_DLL */
+
+#if defined (SENDER_SVNT_HAS_DLL) && (SENDER_SVNT_HAS_DLL == 1)
+# if defined (SENDER_SVNT_BUILD_DLL)
+# define SENDER_SVNT_Export ACE_Proper_Export_Flag
+# define SENDER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
+# define SENDER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# else /* SENDER_SVNT_BUILD_DLL */
+# define SENDER_SVNT_Export ACE_Proper_Import_Flag
+# define SENDER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
+# define SENDER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# endif /* SENDER_SVNT_BUILD_DLL */
+#else /* SENDER_SVNT_HAS_DLL == 1 */
+# define SENDER_SVNT_Export
+# define SENDER_SVNT_SINGLETON_DECLARATION(T)
+# define SENDER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+#endif /* SENDER_SVNT_HAS_DLL == 1 */
+
+// Set SENDER_SVNT_NTRACE = 0 to turn on library specific tracing even if
+// tracing is turned off for ACE.
+#if !defined (SENDER_SVNT_NTRACE)
+# if (ACE_NTRACE == 1)
+# define SENDER_SVNT_NTRACE 1
+# else /* (ACE_NTRACE == 1) */
+# define SENDER_SVNT_NTRACE 0
+# endif /* (ACE_NTRACE == 1) */
+#endif /* !SENDER_SVNT_NTRACE */
+
+#if (SENDER_SVNT_NTRACE == 1)
+# define SENDER_SVNT_TRACE(X)
+#else /* (SENDER_SVNT_NTRACE == 1) */
+# if !defined (ACE_HAS_TRACE)
+# define ACE_HAS_TRACE
+# endif /* ACE_HAS_TRACE */
+# define SENDER_SVNT_TRACE(X) ACE_TRACE_IMPL(X)
+# include "ace/Trace.h"
+#endif /* (SENDER_SVNT_NTRACE == 1) */
+
+#endif /* SENDER_SVNT_EXPORT_H */
+
+// End of auto generated file.
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/starter.cpp b/TAO/CIAO/DAnCE/examples/Hello/Sender/starter.cpp
new file mode 100644
index 00000000000..3fe54c93bdd
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/starter.cpp
@@ -0,0 +1,108 @@
+//$Id$:
+
+#include "SenderC.h"
+#include "ace/Get_Opt.h"
+
+//IOR file of the Sender
+const char * ior = 0;
+const char * message = "starters message";
+
+
+int
+parse_args (int argc, char *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, "k:m");
+ int c = 0;
+
+ while ((c = get_opts ()) != -1)
+ {
+ switch (c)
+ {
+ case 'k':
+ ior = get_opts.opt_arg ();
+ break;
+
+ case 'm':
+ message = get_opts.opt_arg ();
+ break;
+
+ case '?': // display help for use of the server.
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s\n"
+ "-k <Sender IOR> (default is file://sender.ior)\n",
+ "-m <Message> (default is starters message)\n"
+ "\n",
+ argv [0]),
+ -1);
+ break;
+ }
+ }
+
+ if (ior == 0)
+ {
+ ior = "file://sender.ior";
+ }
+
+ return 0;
+}
+
+int
+main (int argc, char *argv[])
+{
+ ACE_TRY_NEW_ENV
+ {
+ // Initialize orb
+ CORBA::ORB_var orb = CORBA::ORB_init (argc, argv,
+ ""
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (parse_args (argc, argv) != 0)
+ {
+ return -1;
+ }
+
+ CORBA::Object_var obj =
+ orb->string_to_object (ior
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ Hello::Sender_var sender = Hello::Sender::_narrow (obj.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (CORBA::is_nil (sender.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Unable to acquire Sender's objref\n"),
+ -1);
+ }
+
+ char *return_message;
+ sender->local_message (message);
+ return_message = sender->local_message ();
+ ACE_DEBUG ((LM_DEBUG, "the message is %s\n", return_message));
+
+ sender->start (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ sender->remove ();
+
+ ACE_DEBUG ((LM_DEBUG, "creating one more servant here\n"));
+ sender->start (ACE_ENV_SINGLE_ARG_PARAMETER);
+ sender->remove ();
+ ACE_TRY_CHECK;
+
+ orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "Unknown exception \n");
+ return -1;
+ }
+ ACE_ENDTRY;
+
+ return 0;
+}
diff --git a/TAO/CIAO/DAnCE/examples/Hello/descriptors/Deployment.xsd b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Deployment.xsd
new file mode 100644
index 00000000000..c8a6399730b
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Deployment.xsd
@@ -0,0 +1,776 @@
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:Deployment="http://www.omg.org/Deployment"
+ targetNamespace="http://www.omg.org/Deployment">
+
+ <xsd:import namespace="http://www.omg.org/XMI" schemaLocation="XMI.xsd" />
+
+
+ <xsd:complexType name="Any">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="type" type="Deployment:DataType"/>
+ <xsd:element name="value" type="Deployment:DataValue"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="Any" type="Deployment:Any"/>
+ <xsd:complexType name="DataType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="kind" type="Deployment:TCKind"/>
+ <xsd:element name="enum" type="Deployment:EnumType"/>
+ <xsd:element name="objref" type="Deployment:ObjrefType"/>
+ <xsd:element name="boundedString" type="Deployment:BoundedStringType"/>
+ <xsd:element name="fixed" type="Deployment:FixedType"/>
+ <xsd:element name="array" type="Deployment:ArrayType"/>
+ <xsd:element name="sequence" type="Deployment:SequenceType"/>
+ <xsd:element name="alias" type="Deployment:AliasType"/>
+ <xsd:element name="struct" type="Deployment:StructType"/>
+ <xsd:element name="value" type="Deployment:ValueType"/>
+ <xsd:element name="union" type="Deployment:UnionType"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="DataType" type="Deployment:DataType"/>
+ <xsd:complexType name="DataValue">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="short" type="xsd:short"/>
+ <xsd:element name="long" type="xsd:int"/>
+ <xsd:element name="ushort" type="xsd:unsignedShort"/>
+ <xsd:element name="ulong" type="xsd:unsignedInt"/>
+ <xsd:element name="float" type="xsd:float"/>
+ <xsd:element name="double" type="xsd:double"/>
+ <xsd:element name="boolean" type="xsd:boolean"/>
+ <xsd:element name="octet" type="xsd:unsignedByte"/>
+ <xsd:element name="opaque" type="xsd:base64Binary"/>
+ <xsd:element name="objref" type="xsd:string"/>
+ <xsd:element name="enum" type="xsd:string"/>
+ <xsd:element name="string" type="xsd:string"/>
+ <xsd:element name="longlong" type="xsd:long"/>
+ <xsd:element name="ulonglong" type="xsd:unsignedLong"/>
+ <xsd:element name="longdouble" type="xsd:double"/>
+ <xsd:element name="fixed" type="xsd:string"/>
+ <xsd:element name="any" type="Deployment:Any"/>
+ <xsd:element name="typecode" type="Deployment:DataType"/>
+ <xsd:element name="element" type="Deployment:DataValue"/>
+ <xsd:element name="discriminator" type="Deployment:DataValue"/>
+ <xsd:element name="value" type="Deployment:DataValue"/>
+ <xsd:element name="boxedValue" type="Deployment:DataValue"/>
+ <xsd:element name="member" type="Deployment:NamedValue"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="DataValue" type="Deployment:DataValue"/>
+
+
+ <xsd:complexType name="EnumType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="typeId" type="xsd:string"/>
+ <xsd:element name="member" type="xsd:string"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="EnumType" type="Deployment:EnumType"/>
+ <xsd:complexType name="ObjrefType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="typeId" type="xsd:string"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+
+
+ <xsd:element name="ObjrefType" type="Deployment:ObjrefType"/>
+ <xsd:complexType name="BoundedStringType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="bound" type="xsd:string"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="BoundedStringType" type="Deployment:BoundedStringType"/>
+ <xsd:complexType name="FixedType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="digits" type="xsd:string"/>
+ <xsd:element name="scale" type="xsd:string"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="FixedType" type="Deployment:FixedType"/>
+ <xsd:complexType name="ArrayType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="length" type="xsd:string"/>
+ <xsd:element name="elementType" type="Deployment:DataType"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="ArrayType" type="Deployment:ArrayType"/>
+ <xsd:complexType name="SequenceType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="bound" type="xsd:string"/>
+ <xsd:element name="elementType" type="Deployment:DataType"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="SequenceType" type="Deployment:SequenceType"/>
+ <xsd:complexType name="AliasType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="typeId" type="xsd:string"/>
+ <xsd:element name="elementType" type="Deployment:DataType"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="AliasType" type="Deployment:AliasType"/>
+ <xsd:complexType name="StructType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="typeId" type="xsd:string"/>
+ <xsd:element name="member" type="Deployment:StructMemberType"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="StructType" type="Deployment:StructType"/>
+ <xsd:complexType name="StructMemberType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="type" type="Deployment:DataType"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="StructMemberType" type="Deployment:StructMemberType"/>
+ <xsd:complexType name="ValueType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="typeId" type="xsd:string"/>
+ <xsd:element name="modifier" type="xsd:string"/>
+ <xsd:element name="baseType" type="Deployment:DataType"/>
+ <xsd:element name="member" type="Deployment:ValueMemberType"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="ValueType" type="Deployment:ValueType"/>
+ <xsd:complexType name="ValueMemberType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="visibility" type="xsd:string"/>
+ <xsd:element name="type" type="Deployment:DataType"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="ValueMemberType" type="Deployment:ValueMemberType"/>
+ <xsd:complexType name="UnionType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="typeId" type="xsd:string"/>
+ <xsd:element name="default" type="Deployment:UnionMemberType"/>
+ <xsd:element name="discriminatorType" type="Deployment:DataType"/>
+ <xsd:element name="member" type="Deployment:UnionMemberType"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="UnionType" type="Deployment:UnionType"/>
+ <xsd:complexType name="UnionMemberType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="type" type="Deployment:DataType"/>
+ <xsd:element name="label" type="Deployment:DataValue"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="UnionMemberType" type="Deployment:UnionMemberType"/>
+ <xsd:complexType name="NamedValue">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="value" type="Deployment:DataValue"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="NamedValue" type="Deployment:NamedValue"/>
+ <xsd:complexType name="Bridge">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="label" type="xsd:string"/>
+ <xsd:element name="connect" type="Deployment:Interconnect"/>
+ <xsd:element name="resource" type="Deployment:Resource"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="Bridge" type="Deployment:Bridge"/>
+ <xsd:complexType name="Interconnect">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="label" type="xsd:string"/>
+ <xsd:element name="connection" type="Deployment:Bridge"/>
+ <xsd:element name="connect" type="Deployment:Node"/>
+ <xsd:element name="resource" type="Deployment:Resource"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="Interconnect" type="Deployment:Interconnect"/>
+ <xsd:complexType name="Node">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="label" type="xsd:string"/>
+ <xsd:element name="connection" type="Deployment:Interconnect"/>
+ <xsd:element name="sharedResource" type="Deployment:SharedResource"/>
+ <xsd:element name="resource" type="Deployment:Resource"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="Node" type="Deployment:Node"/>
+ <xsd:complexType name="Resource">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="resourceType" type="xsd:string"/>
+ <xsd:element name="property" type="Deployment:SatisfierProperty"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="Resource" type="Deployment:Resource"/>
+ <xsd:complexType name="SharedResource">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="resourceType" type="xsd:string"/>
+ <xsd:element name="node" type="Deployment:Node"/>
+ <xsd:element name="property" type="Deployment:SatisfierProperty"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="SharedResource" type="Deployment:SharedResource"/>
+ <xsd:complexType name="Domain">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="UUID" type="xsd:string"/>
+ <xsd:element name="label" type="xsd:string"/>
+ <xsd:element name="sharedResource" type="Deployment:SharedResource"/>
+ <xsd:element name="node" type="Deployment:Node"/>
+ <xsd:element name="interconnect" type="Deployment:Interconnect"/>
+ <xsd:element name="bridge" type="Deployment:Bridge"/>
+ <xsd:element name="infoProperty" type="Deployment:Property"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="Domain" type="Deployment:Domain"/>
+ <xsd:complexType name="PlanPropertyMapping">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="source" type="xsd:string"/>
+ <xsd:element name="externalName" type="xsd:string"/>
+ <xsd:element name="delegatesTo" type="Deployment:PlanSubcomponentPropertyReference"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="PlanPropertyMapping" type="Deployment:PlanPropertyMapping"/>
+ <xsd:complexType name="PlanSubcomponentPropertyReference">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="propertyName" type="xsd:string"/>
+ <xsd:element name="instance" type="Deployment:InstanceDeploymentDescription"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="PlanSubcomponentPropertyReference" type="Deployment:PlanSubcomponentPropertyReference"/>
+ <xsd:complexType name="PlanSubcomponentPortEndpoint">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="portName" type="xsd:string"/>
+ <xsd:element name="provider" type="xsd:string"/>
+ <xsd:element name="kind" type="Deployment:CCMComponentPortKind"/>
+ <xsd:element name="instance" type="Deployment:InstanceDeploymentDescription"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="PlanSubcomponentPortEndpoint" type="Deployment:PlanSubcomponentPortEndpoint"/>
+ <xsd:complexType name="PlanConnectionDescription">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="source" type="xsd:string"/>
+ <xsd:element name="deployRequirement" type="Deployment:Requirement"/>
+ <xsd:element name="externalEndpoint" type="Deployment:ComponentExternalPortEndpoint"/>
+ <xsd:element name="internalEndpoint" type="Deployment:PlanSubcomponentPortEndpoint"/>
+ <xsd:element name="externalReference" type="Deployment:ExternalReferenceEndpoint"/>
+ <xsd:element name="deployedResource" type="Deployment:ConnectionResourceDeploymentDescription"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="PlanConnectionDescription" type="Deployment:PlanConnectionDescription"/>
+ <xsd:complexType name="InstanceDeploymentDescription">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="node" type="xsd:string"/>
+ <xsd:element name="source" type="xsd:string"/>
+ <xsd:element name="implementation" type="Deployment:MonolithicDeploymentDescription"/>
+ <xsd:element name="configProperty" type="Deployment:Property"/>
+ <xsd:element name="deployedResource" type="Deployment:InstanceResourceDeploymentDescription"/>
+ <xsd:element name="deployedSharedResource" type="Deployment:InstanceResourceDeploymentDescription"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="InstanceDeploymentDescription" type="Deployment:InstanceDeploymentDescription"/>
+ <xsd:complexType name="MonolithicDeploymentDescription">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="source" type="xsd:string"/>
+ <xsd:element name="artifact" type="Deployment:ArtifactDeploymentDescription"/>
+ <xsd:element name="execParameter" type="Deployment:Property"/>
+ <xsd:element name="deployRequirement" type="Deployment:Requirement"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="MonolithicDeploymentDescription" type="Deployment:MonolithicDeploymentDescription"/>
+ <xsd:complexType name="ArtifactDeploymentDescription">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="location" type="xsd:string"/>
+ <xsd:element name="node" type="xsd:string"/>
+ <xsd:element name="source" type="xsd:string"/>
+ <xsd:element name="execParameter" type="Deployment:Property"/>
+ <xsd:element name="deployRequirement" type="Deployment:Requirement"/>
+ <xsd:element name="deployedResource" type="Deployment:ResourceDeploymentDescription"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="ArtifactDeploymentDescription" type="Deployment:ArtifactDeploymentDescription"/>
+
+
+ <xsd:complexType name="DeploymentPlan">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="UUID" type="xsd:string"/>
+ <xsd:element name="label" type="xsd:string"/>
+ <xsd:element name="realizes" type="Deployment:ComponentInterfaceDescription"/>
+ <xsd:element name="implementation" type="Deployment:MonolithicDeploymentDescription"/>
+ <xsd:element name="instance" type="Deployment:InstanceDeploymentDescription"/>
+ <xsd:element name="connection" type="Deployment:PlanConnectionDescription"/>
+ <xsd:element name="externalProperty" type="Deployment:PlanPropertyMapping"/>
+ <xsd:element name="dependsOn" type="Deployment:ImplementationDependency"/>
+ <xsd:element name="artifact" type="Deployment:ArtifactDeploymentDescription"/>
+ <xsd:element name="infoProperty" type="Deployment:Property"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="DeploymentPlan" type="Deployment:DeploymentPlan"/>
+
+
+ <xsd:complexType name="ResourceDeploymentDescription">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="requirementName" type="xsd:string"/>
+ <xsd:element name="resourceName" type="xsd:string"/>
+ <xsd:element name="resourceValue" type="Deployment:Any"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="ResourceDeploymentDescription" type="Deployment:ResourceDeploymentDescription"/>
+ <xsd:complexType name="InstanceResourceDeploymentDescription">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="resourceUsage" type="Deployment:ResourceUsageKind"/>
+ <xsd:element name="requirementName" type="xsd:string"/>
+ <xsd:element name="resourceName" type="xsd:string"/>
+ <xsd:element name="resourceValue" type="Deployment:Any"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="InstanceResourceDeploymentDescription" type="Deployment:InstanceResourceDeploymentDescription"/>
+ <xsd:complexType name="ConnectionResourceDeploymentDescription">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="targetName" type="xsd:string"/>
+ <xsd:element name="requirementName" type="xsd:string"/>
+ <xsd:element name="resourceName" type="xsd:string"/>
+ <xsd:element name="resourceValue" type="Deployment:Any"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="ConnectionResourceDeploymentDescription" type="Deployment:ConnectionResourceDeploymentDescription"/>
+ <xsd:complexType name="Capability">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="resourceType" type="xsd:string"/>
+ <xsd:element name="property" type="Deployment:SatisfierProperty"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="Capability" type="Deployment:Capability"/>
+ <xsd:complexType name="ComponentPropertyDescription">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="type" type="Deployment:DataType"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="ComponentPropertyDescription" type="Deployment:ComponentPropertyDescription"/>
+ <xsd:complexType name="ComponentPortDescription">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="specificType" type="xsd:string"/>
+ <xsd:element name="supportedType" type="xsd:string"/>
+ <xsd:element name="provider" type="xsd:string"/>
+ <xsd:element name="exclusiveProvider" type="xsd:string"/>
+ <xsd:element name="exclusiveUser" type="xsd:string"/>
+ <xsd:element name="optional" type="xsd:string"/>
+ <xsd:element name="kind" type="Deployment:CCMComponentPortKind"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="ComponentPortDescription" type="Deployment:ComponentPortDescription"/>
+ <xsd:complexType name="ComponentInterfaceDescription">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="label" type="xsd:string"/>
+ <xsd:element name="UUID" type="xsd:string"/>
+ <xsd:element name="specificType" type="xsd:string"/>
+ <xsd:element name="supportedType" type="xsd:string"/>
+ <xsd:element name="idlFile" type="xsd:string"/>
+ <xsd:element name="configProperty" type="Deployment:Property"/>
+ <xsd:element name="port" type="Deployment:ComponentPortDescription"/>
+ <xsd:element name="property" type="Deployment:ComponentPropertyDescription"/>
+ <xsd:element name="infoProperty" type="Deployment:Property"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="ComponentInterfaceDescription" type="Deployment:ComponentInterfaceDescription"/>
+ <xsd:complexType name="ImplementationArtifactDescription">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="label" type="xsd:string"/>
+ <xsd:element name="UUID" type="xsd:string"/>
+ <xsd:element name="location" type="xsd:string"/>
+ <xsd:element name="execParameter" type="Deployment:Property"/>
+ <xsd:element name="deployRequirement" type="Deployment:Requirement"/>
+ <xsd:element name="dependsOn" type="Deployment:NamedImplementationArtifact"/>
+ <xsd:element name="infoProperty" type="Deployment:Property"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="ImplementationArtifactDescription" type="Deployment:ImplementationArtifactDescription"/>
+ <xsd:complexType name="MonolithicImplementationDescription">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="execParameter" type="Deployment:Property"/>
+ <xsd:element name="primaryArtifact" type="Deployment:NamedImplementationArtifact"/>
+ <xsd:element name="deployRequirement" type="Deployment:ImplementationRequirement"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="MonolithicImplementationDescription" type="Deployment:MonolithicImplementationDescription"/>
+ <xsd:complexType name="AssemblyPropertyMapping">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="externalName" type="xsd:string"/>
+ <xsd:element name="delegatesTo" type="Deployment:SubcomponentPropertyReference"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="AssemblyPropertyMapping" type="Deployment:AssemblyPropertyMapping"/>
+ <xsd:complexType name="SubcomponentPropertyReference">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="propertyName" type="xsd:string"/>
+ <xsd:element name="instance" type="Deployment:SubcomponentInstantiationDescription"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="SubcomponentPropertyReference" type="Deployment:SubcomponentPropertyReference"/>
+ <xsd:complexType name="SubcomponentPortEndpoint">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="portName" type="xsd:string"/>
+ <xsd:element name="instance" type="Deployment:SubcomponentInstantiationDescription"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="SubcomponentPortEndpoint" type="Deployment:SubcomponentPortEndpoint"/>
+ <xsd:complexType name="AssemblyConnectionDescription">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="deployRequirement" type="Deployment:Requirement"/>
+ <xsd:element name="externalEndpoint" type="Deployment:ComponentExternalPortEndpoint"/>
+ <xsd:element name="internalEndpoint" type="Deployment:SubcomponentPortEndpoint"/>
+ <xsd:element name="externalReference" type="Deployment:ExternalReferenceEndpoint"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="AssemblyConnectionDescription" type="Deployment:AssemblyConnectionDescription"/>
+ <xsd:complexType name="SubcomponentInstantiationDescription">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="package" type="Deployment:ComponentPackageDescription"/>
+ <xsd:element name="configProperty" type="Deployment:Property"/>
+ <xsd:element name="selectRequirement" type="Deployment:Requirement"/>
+ <xsd:element name="reference" type="Deployment:ComponentPackageReference"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="SubcomponentInstantiationDescription" type="Deployment:SubcomponentInstantiationDescription"/>
+ <xsd:complexType name="ComponentAssemblyDescription">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="instance" type="Deployment:SubcomponentInstantiationDescription"/>
+ <xsd:element name="connection" type="Deployment:AssemblyConnectionDescription"/>
+ <xsd:element name="externalProperty" type="Deployment:AssemblyPropertyMapping"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="ComponentAssemblyDescription" type="Deployment:ComponentAssemblyDescription"/>
+ <xsd:complexType name="ComponentImplementationDescription">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="label" type="xsd:string"/>
+ <xsd:element name="UUID" type="xsd:string"/>
+ <xsd:element name="implements" type="Deployment:ComponentInterfaceDescription"/>
+ <xsd:element name="assemblyImpl" type="Deployment:ComponentAssemblyDescription"/>
+ <xsd:element name="monolithicImpl" type="Deployment:MonolithicImplementationDescription"/>
+ <xsd:element name="configProperty" type="Deployment:Property"/>
+ <xsd:element name="capability" type="Deployment:Capability"/>
+ <xsd:element name="dependsOn" type="Deployment:ImplementationDependency"/>
+ <xsd:element name="infoProperty" type="Deployment:Property"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="ComponentImplementationDescription" type="Deployment:ComponentImplementationDescription"/>
+ <xsd:complexType name="ComponentPackageReference">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="requiredUUID" type="xsd:string"/>
+ <xsd:element name="requiredName" type="xsd:string"/>
+ <xsd:element name="requiredType" type="xsd:string"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="ComponentPackageReference" type="Deployment:ComponentPackageReference"/>
+ <xsd:complexType name="ComponentPackageDescription">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="label" type="xsd:string"/>
+ <xsd:element name="UUID" type="xsd:string"/>
+ <xsd:element name="realizes" type="Deployment:ComponentInterfaceDescription"/>
+ <xsd:element name="configProperty" type="Deployment:Property"/>
+ <xsd:element name="implementation" type="Deployment:PackagedComponentImplementation"/>
+ <xsd:element name="infoProperty" type="Deployment:Property"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="ComponentPackageDescription" type="Deployment:ComponentPackageDescription"/>
+ <xsd:complexType name="PackageConfiguration">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="label" type="xsd:string"/>
+ <xsd:element name="UUID" type="xsd:string"/>
+ <xsd:element name="specializedConfig" type="Deployment:PackageConfiguration"/>
+ <xsd:element name="basePackage" type="Deployment:ComponentPackageDescription"/>
+ <xsd:element name="reference" type="Deployment:ComponentPackageReference"/>
+ <xsd:element name="selectRequirement" type="Deployment:Requirement"/>
+ <xsd:element name="configProperty" type="Deployment:Property"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="PackageConfiguration" type="Deployment:PackageConfiguration"/>
+ <xsd:complexType name="PackagedComponentImplementation">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="referencedImplementation" type="Deployment:ComponentImplementationDescription"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="PackagedComponentImplementation" type="Deployment:PackagedComponentImplementation"/>
+ <xsd:complexType name="NamedImplementationArtifact">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="referencedArtifact" type="Deployment:ImplementationArtifactDescription"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="NamedImplementationArtifact" type="Deployment:NamedImplementationArtifact"/>
+ <xsd:complexType name="ImplementationRequirement">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="resourceUsage" type="Deployment:ResourceUsageKind"/>
+ <xsd:element name="resourcePort" type="xsd:string"/>
+ <xsd:element name="componentPort" type="xsd:string"/>
+ <xsd:element name="resourceType" type="xsd:string"/>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="property" type="Deployment:Property"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="ImplementationRequirement" type="Deployment:ImplementationRequirement"/>
+ <xsd:complexType name="RequirementSatisfier">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="resourceType" type="xsd:string"/>
+ <xsd:element name="property" type="Deployment:SatisfierProperty"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="RequirementSatisfier" type="Deployment:RequirementSatisfier"/>
+ <xsd:complexType name="SatisfierProperty">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="kind" type="Deployment:SatisfierPropertyKind"/>
+ <xsd:element name="value" type="Deployment:Any"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="SatisfierProperty" type="Deployment:SatisfierProperty"/>
+ <xsd:complexType name="Requirement">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="resourceType" type="xsd:string"/>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="property" type="Deployment:Property"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="Requirement" type="Deployment:Requirement"/>
+ <xsd:complexType name="Property">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="value" type="Deployment:Any"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="Property" type="Deployment:Property"/>
+ <xsd:complexType name="ExternalReferenceEndpoint">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="location" type="xsd:string"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="ExternalReferenceEndpoint" type="Deployment:ExternalReferenceEndpoint"/>
+ <xsd:complexType name="ComponentExternalPortEndpoint">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="portName" type="xsd:string"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="ComponentExternalPortEndpoint" type="Deployment:ComponentExternalPortEndpoint"/>
+ <xsd:complexType name="ImplementationDependency">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="requiredType" type="xsd:string"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="ImplementationDependency" type="Deployment:ImplementationDependency"/>
+ <xsd:complexType name="TopLevelPackageDescription">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="package" type="Deployment:PackageConfiguration"/>
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" use="optional"/>
+ <xsd:attributeGroup ref="xmi:ObjectAttribs"/>
+ </xsd:complexType>
+ <xsd:element name="TopLevelPackageDescription" type="Deployment:TopLevelPackageDescription"/>
+ <xsd:simpleType name="TCKind">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="tk_null"/>
+ <xsd:enumeration value="tk_void"/>
+ <xsd:enumeration value="tk_short"/>
+ <xsd:enumeration value="tk_long"/>
+ <xsd:enumeration value="tk_ushort"/>
+ <xsd:enumeration value="tk_ulong"/>
+ <xsd:enumeration value="tk_float"/>
+ <xsd:enumeration value="tk_double"/>
+ <xsd:enumeration value="tk_boolean"/>
+ <xsd:enumeration value="tk_char"/>
+ <xsd:enumeration value="tk_octet"/>
+ <xsd:enumeration value="tk_any"/>
+ <xsd:enumeration value="tk_TypeCode"/>
+ <xsd:enumeration value="tk_Principal"/>
+ <xsd:enumeration value="tk_objref"/>
+ <xsd:enumeration value="tk_struct"/>
+ <xsd:enumeration value="tk_union"/>
+ <xsd:enumeration value="tk_enum"/>
+ <xsd:enumeration value="tk_string"/>
+ <xsd:enumeration value="tk_sequence"/>
+ <xsd:enumeration value="tk_array"/>
+ <xsd:enumeration value="tk_alias"/>
+ <xsd:enumeration value="tk_except"/>
+ <xsd:enumeration value="tk_longlong"/>
+ <xsd:enumeration value="tk_ulonglong"/>
+ <xsd:enumeration value="tk_longdouble"/>
+ <xsd:enumeration value="tk_wchar"/>
+ <xsd:enumeration value="tk_wstring"/>
+ <xsd:enumeration value="tk_wfixed"/>
+ <xsd:enumeration value="tk_value"/>
+ <xsd:enumeration value="tk_value_box"/>
+ <xsd:enumeration value="tk_native"/>
+ <xsd:enumeration value="tk_abstract_interface"/>
+ <xsd:enumeration value="tk_local_interface"/>
+ <xsd:enumeration value="tk_component"/>
+ <xsd:enumeration value="tk_home"/>
+ <xsd:enumeration value="tk_event"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="ResourceUsageKind">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="None"/>
+ <xsd:enumeration value="InstanceUsesResource"/>
+ <xsd:enumeration value="ResourceUsesInstance"/>
+ <xsd:enumeration value="PortUsesResource"/>
+ <xsd:enumeration value="ResourceUsesPort"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="CCMComponentPortKind">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="Facet"/>
+ <xsd:enumeration value="SimplexReceptacle"/>
+ <xsd:enumeration value="MultiplexReceptacle"/>
+ <xsd:enumeration value="EventEmitter"/>
+ <xsd:enumeration value="EventPublisher"/>
+ <xsd:enumeration value="EventConsumer"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="SatisfierPropertyKind">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="Quantity"/>
+ <xsd:enumeration value="Capacity"/>
+ <xsd:enumeration value="Minimum"/>
+ <xsd:enumeration value="Maximum"/>
+ <xsd:enumeration value="Attribute"/>
+ <xsd:enumeration value="Selection"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+</xsd:schema>
diff --git a/TAO/CIAO/DAnCE/examples/Hello/descriptors/Domain.cdd b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Domain.cdd
new file mode 100644
index 00000000000..882b29724cd
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Domain.cdd
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<Deployment:Domain
+ xmlns:Deployment="http://www.omg.org/Deployment"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd">
+<label>Hello Domain</label>
+<UUID>effd4bd0-6db0-4c50-9bb7-db9decebae1c</UUID>
+<node>
+ <name>Sender</name>
+ <label>Sender's Node</label>
+</node>
+<node>
+ <name>Receiver</name>
+ <label>Receiver's Node</label>
+</node>
+</Deployment:Domain>
diff --git a/TAO/CIAO/DAnCE/examples/Hello/descriptors/Hello.cdp b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Hello.cdp
new file mode 100644
index 00000000000..d15bdef91bf
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Hello.cdp
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<Deployment:DeploymentPlan
+ xmlns:Deployment="http://www.omg.org/Deployment"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd">
+ <label>Hello Deployment Plan</label>
+ <instance xmi:id="Sender_Instance">
+ <name>Sender_Instance</name>
+ <node>Sender</node>
+ </instance>
+ <instance xmi:id="Receiver_Instance">
+ <name>Receiver_Instance</name>
+ <node>Receiver</node>
+ </instance>
+</Deployment:DeploymentPlan>
diff --git a/TAO/CIAO/DAnCE/examples/Hello/descriptors/Hello.cid b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Hello.cid
new file mode 100644
index 00000000000..fb3ae013432
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Hello.cid
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<Deployment:ComponentImplementationDescription
+ xmlns:Deployment="http://www.omg.org/Deployment"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd">
+ <label>Hello Example Assembly</label>
+ <UUID>effd4bd0-6db0-4c50-9bb7-db9decebae1c</UUID>
+ <assemblyImpl>
+ <instance xmi:id="a_Sender">
+ <name>Sender_Instance</name>
+ <package href="Sender.cpd"/>
+ </instance>
+ <instance xmi:id="a_Receiver">
+ <name>Receiver_Instance</name>
+ <package href="Receiver.cpd"/>
+ </instance>
+ <connection>
+ <name>Messages</name>
+ <internalEndpoint>
+ <portName>read_message</portName>
+ <instance xmi:idref="a_Receiver"/>
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>push_message</portName>
+ <instance xmi:idref="a_Sender"/>
+ </internalEndpoint>
+ </connection>
+ <connection>
+ <name>Events</name>
+ <internalEndpoint>
+ <portName>click_in</portName>
+ <instance xmi:idref="a_Receiver"/>
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>click_out</portName>
+ <instance xmi:idref="a_Sender"/>
+ </internalEndpoint>
+ </connection>
+ </assemblyImpl>
+</Deployment:ComponentImplementationDescription>
diff --git a/TAO/CIAO/DAnCE/examples/Hello/descriptors/Hello.cpd b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Hello.cpd
new file mode 100644
index 00000000000..52b0e9a6c1d
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Hello.cpd
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<Deployment:ComponentPackageDescription
+ xmlns:Deployment="http://www.omg.org/Deployment"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd">
+ <label>Hello Example Package</label>
+ <UUID>823e4287-f53c-4caa-8619-f3dfda4c4998</UUID>
+ <implementation>
+ <name>Hello</name>
+ <referencedImplementation href="Hello.cid"/>
+ </implementation>
+</Deployment:ComponentPackageDescription>
diff --git a/TAO/CIAO/DAnCE/examples/Hello/descriptors/Hello.pcd b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Hello.pcd
new file mode 100644
index 00000000000..a0f5051444a
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Hello.pcd
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<Deployment:PackageConfiguration
+xmlns:Deployment="http://www.omg.org/Deployment"
+xmlns:xmi="http://www.omg.org/XMI"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd">
+ <label>Hello Example Configuration for Unix machines</label>
+ <UUID>559d65e8-0407-48c0-a158-dafe21360fef</UUID>
+ <basePackage href="Hello.cpd"/>
+</Deployment:PackageConfiguration>
diff --git a/TAO/CIAO/DAnCE/examples/Hello/descriptors/Libraries.iad b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Libraries.iad
new file mode 100644
index 00000000000..6112a23ca3b
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Libraries.iad
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<Deployment:ImplementationArtifactDescription xmlns:Deployment="http://www.omg.org/Deployment" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd">
+ <label>Common Libraries</label>
+ <UUID>6bae4fcd-c71c-44b4-a0d4-0e4199ce1a49</UUID>
+ <location>$ACE_ROOT/lib/libACE</location>
+ <location>$ACE_ROOT/lib/libTAO</location>
+ <location>$ACE_ROOT/lib/libCIAO_DnC_Client</location>
+</Deployment:ImplementationArtifactDescription>
diff --git a/TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver.ccd b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver.ccd
new file mode 100644
index 00000000000..a5167d03e7a
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver.ccd
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<Deployment:ComponentInterfaceDescription
+ xmlns:Deployment="http://www.omg.org/Deployment"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd">
+ <label>Receiver Component </label>
+ <UUID>589462ed-e88f-4f96-a7a7-359cdc333d63</UUID>
+ <specificType>IDL:Hello/Receiver:1.0</specificType>
+ <supportedType>IDL:Hello/Receiver:1.0</supportedType>
+ <idlFile>Receiver.idl</idlFile>
+ <port>
+ <name>click_in</name>
+ <exclusiveProvider>false</exclusiveProvider>
+ <exclusiveUser>false</exclusiveUser>
+ <optional>false</optional>
+ <provider>false</provider>
+ <supportedType>IDL:Hello/TimeOut:1.0</supportedType>
+ <specificType>IDL:Hello/TimeOut:1.0</specificType>
+ <kind>EventConsumer</kind>
+ </port>
+
+ <port>
+ <name>read_message</name>
+ <exclusiveProvider>false</exclusiveProvider>
+ <exclusiveUser>false</exclusiveUser>
+ <optional>false</optional>
+ <provider>false</provider>
+ <supportedType>IDL:Hello/ReadMessage:1.0</supportedType>
+ <specificType>IDL:Hello/ReadMessage:1.0</specificType>
+ <kind>SimplexReceptacle</kind>
+ </port>
+
+</Deployment:ComponentInterfaceDescription>
diff --git a/TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver.cid b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver.cid
new file mode 100644
index 00000000000..409baf5d65a
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver.cid
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<Deployment:ComponentImplementationDescription
+ xmlns:Deployment="http://www.omg.org/Deployment"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd">
+ <label>Receiver Implementation</label>
+ <UUID>0a52c9de-7852-42e4-aac7-bf478169a21a</UUID>
+ <implements href="Receiver.ccd"/>
+ <monolithicImpl>
+ <primaryArtifact>
+ <name>Receiver_Stub</name>
+ <referencedArtifact href="Receiver_Stub.iad"/>
+ </primaryArtifact>
+ <primaryArtifact>
+ <name>Receiver_Svnt</name>
+ <referencedArtifact href="Receiver_Svnt.iad"/>
+ </primaryArtifact>
+ <primaryArtifact>
+ <name>Receiver_Exec</name>
+ <referencedArtifact href="Receiver_Exec.iad"/>
+ </primaryArtifact>
+ </monolithicImpl>
+ <configProperty>
+ <name>ComponentIOR</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Receiver.ior</string>
+ </value>
+ </value>
+ </configProperty>
+</Deployment:ComponentImplementationDescription>
diff --git a/TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver.cpd b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver.cpd
new file mode 100644
index 00000000000..3cddb924834
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver.cpd
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<Deployment:ComponentPackageDescription
+ xmlns:Deployment="http://www.omg.org/Deployment"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd">
+ <label>Receiver Package</label>
+ <UUID>a5923ef4-9c62-4458-9fa4-869b53d834ca</UUID>
+ <realizes href="Receiver.ccd"/>
+ <implementation>
+ <name>Receiver</name>
+ <referencedImplementation href="Receiver.cid"/>
+ </implementation>
+</Deployment:ComponentPackageDescription>
diff --git a/TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver_Exec.iad b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver_Exec.iad
new file mode 100644
index 00000000000..6caa480b9db
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver_Exec.iad
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<Deployment:ImplementationArtifactDescription
+ xmlns:Deployment="http://www.omg.org/Deployment"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd">
+ <label>Receiver Executor Artifact</label>
+ <UUID>412f8156-7913-4651-9110-f7a3f98c7a83</UUID>
+ <location>Receiver_DnC_exec</location>
+ <dependsOn>
+ <name>ACE</name>
+ <referencedArtifact href="Libraries.iad"/>
+ </dependsOn>
+ <dependsOn>
+ <name>Receiver_Stub</name>
+ <referencedArtifact href="Receiver_Stub.iad"/>
+ </dependsOn>
+ <execParameter>
+ <name>entryPoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>createReceiverHome_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+</Deployment:ImplementationArtifactDescription>
diff --git a/TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver_Stub.iad b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver_Stub.iad
new file mode 100644
index 00000000000..80d7a509e8b
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver_Stub.iad
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<Deployment:ImplementationArtifactDescription
+ xmlns:Deployment="http://www.omg.org/Deployment"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd">
+ <label>Receiver Stub Artifact</label>
+ <UUID>4d02c22b-768e-4d1a-bf07-76da2f5d1fbf</UUID>
+ <location>Receiver_DnC_stub</location>
+ <dependsOn>
+ <name>ACE</name>
+ <referencedArtifact href="Libraries.iad"/>
+ </dependsOn>
+</Deployment:ImplementationArtifactDescription>
diff --git a/TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver_Svnt.iad b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver_Svnt.iad
new file mode 100644
index 00000000000..2bb0e867ddf
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver_Svnt.iad
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<Deployment:ImplementationArtifactDescription
+ xmlns:Deployment="http://www.omg.org/Deployment"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd">
+ <label>Receiver Servant Artifact</label>
+ <UUID>ad052b10-0806-43c7-9ccc-2dfeda0e0e03</UUID>
+ <location>Receiver_DnC_svnt</location>
+ <dependsOn>
+ <name>ACE</name>
+ <referencedArtifact href="Libraries.iad"/>
+ </dependsOn>
+ <dependsOn>
+ <name>Receiver_Stub</name>
+ <referencedArtifact href="Receiver_Stub.iad"/>
+ </dependsOn>
+ <execParameter>
+ <name>entryPoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>createReceiverHome_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+</Deployment:ImplementationArtifactDescription>
diff --git a/TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender.ccd b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender.ccd
new file mode 100644
index 00000000000..cf07fe0ef75
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender.ccd
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<Deployment:ComponentInterfaceDescription
+ xmlns:Deployment="http://www.omg.org/Deployment"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd">
+
+ <label>Sender Component</label>
+ <UUID>803f8fc7-55de-4a20-81eb-ae951d85b7f4</UUID>
+ <specificType>IDL:Hello/Sender:1.0</specificType>
+ <supportedType>IDL:Hello/Sender:1.0</supportedType>
+ <property>
+ <name>local_message</name>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ </property>
+ <port>
+ <name>supports</name>
+ <exclusiveProvider>false</exclusiveProvider>
+ <exclusiveUser>false</exclusiveUser>
+ <optional>false</optional>
+ <provider>true</provider>
+ <supportedType>IDL:Hello/trigger:1.0</supportedType>
+ <kind>Facet</kind>
+ </port>
+ <port>
+ <name>click_out</name>
+ <exclusiveProvider>false</exclusiveProvider>
+ <exclusiveUser>false</exclusiveUser>
+ <optional>false</optional>
+ <provider>true</provider>
+ <supportedType>IDL:Hello/TimeOut:1.0</supportedType>
+ <specificType>IDL:Hello/TimeOut:1.0</specificType>
+ <kind>EventPublisher</kind>
+ </port>
+ <port>
+ <name>push_message</name>
+ <exclusiveProvider>false</exclusiveProvider>
+ <exclusiveUser>false</exclusiveUser>
+ <optional>false</optional>
+ <provider>true</provider>
+ <supportedType>IDL:Hello/ReadMessage:1.0</supportedType>
+ <specificType>IDL:Hello/ReadMessage:1.0</specificType>
+ <kind>Facet</kind>
+ </port>
+
+</Deployment:ComponentInterfaceDescription>
diff --git a/TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender.cid b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender.cid
new file mode 100644
index 00000000000..45a79ef23a9
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender.cid
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<Deployment:ComponentImplementationDescription
+ xmlns:Deployment="http://www.omg.org/Deployment"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd">
+ <label>Sender Implementation</label>
+ <UUID>789e1be2-703f-4bd3-af50-b400eef91fd0</UUID>
+ <implements href="Sender.ccd"/>
+ <monolithicImpl>
+ <primaryArtifact>
+ <name>Sender_Stub</name>
+ <referencedArtifact href="Sender_Stub.iad"/>
+ </primaryArtifact>
+ <primaryArtifact>
+ <name>Sender_Svnt</name>
+ <referencedArtifact href="Sender_Svnt.iad"/>
+ </primaryArtifact>
+ <primaryArtifact>
+ <name>Sender_Exec</name>
+ <referencedArtifact href="Sender_Exec.iad"/>
+ </primaryArtifact>
+ </monolithicImpl>
+ <configProperty>
+ <name>local_message</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>default_message</string>
+ </value>
+ </value>
+ </configProperty>
+ <configProperty>
+ <name>ComponentIOR</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Sender.ior</string>
+ </value>
+ </value>
+ </configProperty>
+</Deployment:ComponentImplementationDescription>
diff --git a/TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender.cpd b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender.cpd
new file mode 100644
index 00000000000..df2c441be3f
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender.cpd
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<Deployment:ComponentPackageDescription
+ xmlns:Deployment="http://www.omg.org/Deployment"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd">
+ <label>Sender Package</label>
+ <UUID>07ebf947-2174-4a3b-bd37-bcb92986eaf4</UUID>
+ <realizes href="Sender.ccd"/>
+ <implementation>
+ <name>Sender</name>
+ <referencedImplementation href="Sender.cid"/>
+ </implementation>
+</Deployment:ComponentPackageDescription>
diff --git a/TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender_Exec.iad b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender_Exec.iad
new file mode 100644
index 00000000000..610b525e77a
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender_Exec.iad
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<Deployment:ImplementationArtifactDescription
+ xmlns:Deployment="http://www.omg.org/Deployment"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd">
+ <label>Sender Executor Artifact</label>
+ <UUID>5e4f2366-3810-4d4c-a269-5788a525cbe1</UUID>
+ <location>Sender_DnC_exec</location>
+ <dependsOn>
+ <name>ACE</name>
+ <referencedArtifact href="Libraries.iad"/>
+ </dependsOn>
+ <dependsOn>
+ <name>Sender_Stub</name>
+ <referencedArtifact href="Sender_Stub.iad"/>
+ </dependsOn>
+ <execParameter>
+ <name>entryPoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>createSenderHome_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+</Deployment:ImplementationArtifactDescription>
diff --git a/TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender_Stub.iad b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender_Stub.iad
new file mode 100644
index 00000000000..aab4e018f0e
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender_Stub.iad
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<Deployment:ImplementationArtifactDescription
+ xmlns:Deployment="http://www.omg.org/Deployment"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd">
+ <label>Sender Stub Artifact</label>
+ <UUID>93bbdf7d-d3f7-4227-bb75-b0562ac15b92</UUID>
+ <location>Sender_DnC_stub</location>
+ <dependsOn>
+ <name>ACE</name>
+ <referencedArtifact href="Libraries.iad"/>
+ </dependsOn>
+</Deployment:ImplementationArtifactDescription>
diff --git a/TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender_Svnt.iad b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender_Svnt.iad
new file mode 100644
index 00000000000..8fec927ebad
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender_Svnt.iad
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<Deployment:ImplementationArtifactDescription
+ xmlns:Deployment="http://www.omg.org/Deployment"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd">
+ <label>Sender Servant Artifact</label>
+ <UUID>04e4d246-e6eb-4b0e-8e32-60b996497cea</UUID>
+ <location>Sender_DnC_svnt</location>
+ <dependsOn>
+ <name>ACE</name>
+ <referencedArtifact href="Libraries.iad"/>
+ </dependsOn>
+ <dependsOn>
+ <name>Sender_Stub</name>
+ <referencedArtifact href="Sender_Stub.iad"/>
+ </dependsOn>
+ <execParameter>
+ <name>entryPoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>createSenderHome_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+</Deployment:ImplementationArtifactDescription>
diff --git a/TAO/CIAO/DAnCE/examples/Hello/descriptors/XMI.xsd b/TAO/CIAO/DAnCE/examples/Hello/descriptors/XMI.xsd
new file mode 100644
index 00000000000..f4adac91934
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/descriptors/XMI.xsd
@@ -0,0 +1,35 @@
+<?xml version="1.0" ?>
+<xsd:schema targetNamespace="http://www.omg.org/XMI" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation='http://www.w3.org/2001/XMLSchema XMLSchema.xsd'>
+ <xsd:attribute name="id" type="xsd:ID" />
+ <xsd:attributeGroup name="IdentityAttribs">
+ <xsd:attribute form="qualified" name="label" type="xsd:string" use="optional" />
+ <xsd:attribute form="qualified" name="uuid" type="xsd:string" use="optional" />
+ </xsd:attributeGroup>
+ <xsd:attributeGroup name="LinkAttribs">
+ <xsd:attribute name="href" type="xsd:string" use="optional" />
+ <xsd:attribute form="qualified" name="idref" type="xsd:IDREF" use="optional" />
+ </xsd:attributeGroup>
+ <xsd:attributeGroup name="ObjectAttribs">
+ <xsd:attributeGroup ref="xmi:IdentityAttribs" />
+ <xsd:attributeGroup ref="xmi:LinkAttribs" />
+ <xsd:attribute fixed="2.0" form="qualified" name="version" type="xsd:string" use="optional" />
+ <xsd:attribute form="qualified" name="type" type="xsd:QName" use="optional" />
+ </xsd:attributeGroup>
+ <xsd:complexType name="Extension">
+ <xsd:choice maxOccurs="unbounded" minOccurs="0">
+ <xsd:any processContents="lax" />
+ </xsd:choice>
+ <xsd:attribute ref="xmi:id" />
+ <xsd:attributeGroup ref="xmi:ObjectAttribs" />
+ <xsd:attribute name="extender" type="xsd:string" use="optional" />
+ <xsd:attribute name="extenderID" type="xsd:string" use="optional" />
+ </xsd:complexType>
+ <xsd:element name="Extension" type="xmi:Extension" />
+ <xsd:complexType name="Any">
+ <xsd:choice maxOccurs="unbounded" minOccurs="0">
+ <xsd:any processContents="skip" />
+ </xsd:choice>
+ <xsd:anyAttribute processContents="skip" />
+ </xsd:complexType>
+</xsd:schema>
diff --git a/TAO/CIAO/DAnCE/examples/Hello/descriptors/hello.dat b/TAO/CIAO/DAnCE/examples/Hello/descriptors/hello.dat
new file mode 100644
index 00000000000..0402b2fd2e0
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/descriptors/hello.dat
@@ -0,0 +1,3 @@
+Sender corbaloc:iiop:localhost:10000/NodeManager
+Receiver corbaloc:iiop:localhost:20000/NodeManager
+
diff --git a/TAO/CIAO/DAnCE/examples/Hello/descriptors/package.tpd b/TAO/CIAO/DAnCE/examples/Hello/descriptors/package.tpd
new file mode 100644
index 00000000000..d447a2abb4a
--- /dev/null
+++ b/TAO/CIAO/DAnCE/examples/Hello/descriptors/package.tpd
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<Deployment:TopLevelPackageDescription
+xmlns:Deployment="http://www.omg.org/Deployment"
+xmlns:xmi="http://www.omg.org/XMI"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd">
+ <package href="Hello.pcd"/>
+</Deployment:TopLevelPackageDescription>
diff --git a/TAO/CIAO/NEWS b/TAO/CIAO/NEWS
new file mode 100644
index 00000000000..20ecc15d66f
--- /dev/null
+++ b/TAO/CIAO/NEWS
@@ -0,0 +1,191 @@
+PLANNED MAJOR CHANGES "SOMETIME IN THE FUTURE" (i.e., exact beta not known)
+===========================================================================
+
+. Integrate Real-time Event Channel into CIAO and DAnCE.
+
+USER VISIBLE CHANGES BETWEEN CIAO-0.4.3 and CIAO-0.4.4
+======================================================
+
+. Minor bugfixes.
+
+USER VISIBLE CHANGES BETWEEN CIAO-0.4.2 and CIAO-0.4.3
+======================================================
+
+. CIDLC can generate empty executor implementations for a given
+ composition, which makes it easier to write executors. This can be
+ trigerred by passing --gen-exec-impl option while invoking CIDLC.
+
+. Generated container code has been refactored into base classes,
+ thereby reducing the amount of code generated by CIDLC.
+
+. A new tool for generating equivalent IDL2 declarations from IDL3
+ declarations has been added.
+
+. Fixed a problem with DAnCE that prevented ports from getting activated
+ properly.
+
+. Added support for eventtype factories within CIDLC.
+
+. DAncE compiles clean and works with VC6 and Borland compilers.
+
+. Fixed compile errors and memory related errors on many platforms.
+
+
+USER VISIBLE CHANGES BETWEEN CIAO-0.4.1 and CIAO-0.4.2
+======================================================
+
+. Overall
+ - Support for g++ 3.4.1.
+ - Support added for latest HP aCC compiler.
+
+. CCM Deployment and Configuration specification has largely been
+ implemented. The implementation is called "DAnCE", the Deployment
+ and Configuration Engine. For more information about DAnCE, and a
+ list of supported features, please refer to
+ $CIAO_ROOT/docs/releasenotes/dance.html.
+
+. CIDL compiler
+ . Added missing generation of servant code for operations and
+ attributes of ancestors of interfaces supported and used as ports.
+ . Added missing generation of factory operation(s) from inherited
+ home(s).
+ . Added support for "uses multiple" in generated code.
+ . Fixed bugs in generation of inherited: [Bug 1800]
+ home operations
+ attribute operations
+ port operations
+ home factory operations
+ supported operations
+ . Added automatic registration of value factories for event
+ consumers.
+ . Added support for emits-related navigation.
+ . Fixed bug with multiple facets that provide the same interface.
+ . Implemented get_all_facets() and get_all_consumers() navigation
+ methods.
+
+USER VISIBLE CHANGES BETWEEN CIAO-0.4 and CIAO-0.4.1
+====================================================
+
+CIAO
+----
+
+. Added support for statically configuring an assembly. Please see
+ $CIAO_ROOT/docs/static_toc_ciao.html for details.
+
+CIDL:
+-----
+. Fixed incorrect generation of ACE environment macros in servant glue
+ code operations.
+
+. Fixed incorrect code generation in the body of a servant operation
+ that delegates to the executor class.
+
+. Added support for attributes in facets and supported
+ interfaces.
+
+. Fixed bug in code servant glue code generation when there are
+ multiple nested modules in the IDL and/or CIDL files.
+
+. Added missing code generation of enum type names.
+
+. Fixed a bug in the generation of the scoped name of a local variable
+ which is a _var of an executor interface for a facet. These types
+ are required by the CCM spec to be generated in the same scope as
+ the interface that underlies the facet.
+
+. Fixed a bug in the generation of *S.h file includes corresponding to
+ IDL files included in the CIDL file.
+
+. Added ACE style Makefiles.
+
+. Added support for bounded strings
+
+MPC
+===
+. Removed all of the project type specific and unnecessary keywords.
+
+. Changed the defaulting rules for idl files (generated source files
+ will be automatically added even if idl files are explicitly
+ listed).
+
+. The makefiles generated by the gnuace type are now named GNUmakefile
+ instead of Makefile.
+
+. The IDL_Files section is no longer a built-in MPC type. It is a
+ custom build type defined in taoidldefaults.mpb.
+
+. Added support for Borland Makefiles that aren't tied to ACE_wrappers
+ (the bmake project type).
+
+. Added wild-cards to the default.rel file. Now, environment
+ variables that end in _ROOT are automatically considered as if they
+ were used with the -relative option.
+
+. Added an environment variable,
+ MPC_DEPENDENCY_COMBINED_STATIC_LIBRARY, to force MPC to put
+ inter-project dependencies in static vc6 and vc71 workspaces.
+
+. Added an html project type (originally by Justin Michel) to aid in
+ the debugging of mpc files.
+
+. Added a new keyword, pure_libs, that is put into a project
+ unmodified (unlike the libs and lit_libs keywords).
+
+. The behavior obtained through the use of the -hierarchy option is
+ now the default for all "make" based project types. This includes
+ borland, bmake, gnuace, make and nmake.
+
+. Added support for referencing workspace files (.mwc) from within
+ other workspaces.
+
+. Added an option, -genins, that causes MPC to generate .ins files
+ that can be used with prj_install.pl. This will help users install
+ portions of their projects into alternate directories.
+
+. Modified the gnuace workspace output to be based on directory
+ recursion instead of having inter-project dependencies built into
+ each workspace level GNUmakefile.
+
+. Added a new keyword, dependent, for use within a Define_Custom that
+ causes MPC to add a dependency to generated files upon the custom
+ command.
+
+. Assignments within a 'specific' section that are not recognized MPC
+ keywords are assumed to be template value overrides (similar to
+ using the -value_template option).
+
+. Partial support for Visual SlickEdit has been added.
+
+. Various bug fixes and optimizations have been added as well.
+
+USER VISIBLE CHANGES BETWEEN CIAO-0.3.6 and CIAO-0.4
+====================================================
+
+. Added Makefiles to build the ciao and tools subdirs by default.
+
+. The suport for the following IDL features have been added to the
+ CIDL since the last beta
+
+ - exception (exception declaration and raises() specification)
+ - valuetype
+ - enum
+ - const declaration
+ - const expression and literals
+ - native
+ - home finder
+ - oneway operation
+ - readonly attribute
+ - type declaration inside interfaces, valuetypes
+ - union
+
+ CIDL doesn't yet support the following features
+
+ - Complete error detection and recovery
+ - Attribute exception specification
+ - Array
+ - Bounded sequence
+ - Fixed type
+ - Floating-point and Fixed-point constant expressions & literal.
+
+ though we plan to add this support over the next several months,
+ depending on user/sponsor needs.
diff --git a/TAO/CIAO/PROBLEM-REPORT-FORM b/TAO/CIAO/PROBLEM-REPORT-FORM
new file mode 100644
index 00000000000..db55e35f3fb
--- /dev/null
+++ b/TAO/CIAO/PROBLEM-REPORT-FORM
@@ -0,0 +1,94 @@
+[Please use the PRF form below to submit bug reports, problem
+ reports, etc., to the CIAO developers and interested users.
+ Send to ciao-users@cs.wustl.edu. If you are using OCI or PrismTech's
+ versions of CIAO do not send bugs to this mailing list, but
+ instead contact those companies for support. Please also send your
+ PRF as plain ASCII text, _not_ uuencoded or as an attachment.
+
+ We prefer that all bug reports be submitted through our bug tracking
+ system. See $ACE_ROOT/docs/usage-bugzilla.html for more information
+ about how to do this. If you are unsure as to whether your problem
+ is a real bug or not then please submit your question to the mailing
+ list using the following form. Not using the problem report form
+ will make it harder or impossible to identify the problem, and in
+ many cases we will be unable to help at all. Also please try to
+ browse bugzilla and the ChangeLog files to find out if your problem
+ has been solved in a more recent version of CIAO.
+
+ To ensure that you see responses, please do one of the following:
+
+ 1) Subscribe to the ciao-users mail list, by sending email with
+ contents "subscribe ciao-users" to majordomo@cs.wustl.edu.
+
+ 2) Or, monitor the comp.soft-sys.ace newsgroup for responses.
+
+ Replace/remove all the explanatory text in brackets before mailing.
+
+ Please send this form as ASCII text only. Do _not_ send it as an
+ attachment, or as tar'ed, compressed and/or uuencoded text. And
+ limit line lengths to less than 80 characters.
+
+ PLEASE make your Subject: line as descriptive as possible.
+ Subjects like "CIAO bug" or "bug report" are not helpful!
+ Also, do _not_ include the word "help" in the Subject!]
+
+ When including your config.h and platform_macros.GNU files as requested
+ below, only include the contents if you use the recommended method of
+ including the platform-specific file in your file. If you use a link
+ to the platform-specific file, simply state which one - DO NOT include
+ an entire platform-specific configuration file in the form.
+
+8<----------8<----------8<----------8<----------8<----------8<----------8<----
+
+To: ciao-users@cs.wustl.edu
+Subject: [area]: [synopsis]
+
+ CIAO VERSION: 0.4.4
+ TAO VERSION : 1.4.4
+ ACE VERSION : 5.4.4
+
+ HOST MACHINE and OPERATING SYSTEM:
+ If on Windows based OS's, which version of WINSOCK do you
+ use?:
+
+ TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
+ COMPILER NAME AND VERSION (AND PATCHLEVEL):
+
+ THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
+ specific file, simply state which one]:
+
+ THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if you
+ use a link to a platform-specific file, simply state which one
+ (unless this isn't used in this case, e.g., with Microsoft Visual
+ C++)]:
+
+ CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
+ (used by MPC when you generate your own makefiles):
+
+ AREA/CLASS/EXAMPLE AFFECTED:
+[What example failed? What module failed to compile?]
+
+ DOES THE PROBLEM AFFECT:
+ COMPILATION?
+ If so, what do your $ACE_ROOT/ace/config.h and
+ $ACE_ROOT/include/makeinclude/platform_macros.GNU contain?
+ LINKING?
+ On Unix systems, did you run make realclean first?
+ EXECUTION?
+ OTHER (please specify)?
+[Please indicate whether ACE/TAO/CIAO, your application, or both are affected.]
+
+ SYNOPSIS:
+[Brief description of the problem]
+
+ DESCRIPTION:
+[Detailed description of problem. Don't just say "<blah>
+doesn't work, here's a fix," explain what your program does
+to get to the <blah> state. ]
+
+ REPEAT BY:
+[What you did to get the error; include test program or session
+transcript if at all possible. ]
+
+ SAMPLE FIX/WORKAROUND:
+[If available ]
diff --git a/TAO/CIAO/Release b/TAO/CIAO/Release
new file mode 100644
index 00000000000..2198eab5e2a
--- /dev/null
+++ b/TAO/CIAO/Release
@@ -0,0 +1,53 @@
+#----------------------------------------------------------------------------
+# $Id$
+#
+# Top-level Makefile for the CIAO
+#----------------------------------------------------------------------------
+
+#### The "release" targets can be used to create the ACE+TAO+CIAO kit. By
+#### default, it creates a new beta release. To create a new minor or
+#### major release, add "REL=minor" or "REL=major", respectively, to
+#### the make invocation.
+
+CONTROLLED_FILES = CIAO
+
+RELEASE_FILES = $(addprefix ACE_wrappers/TAO/,$(CONTROLLED_FILES))
+
+.PHONY: CIAO tag
+
+REL = beta
+MAKE = make -f Release
+CHECK =
+APPLY_NEW_TAG = tag
+
+#### The call to make_release below doesn't actually create the kit.
+allsources: $(APPLY_NEW_TAG)
+ @cd $(ACE_ROOT) && $(MAKE) -s ciaosources
+
+tag:
+ @$(ACE_ROOT)/bin/make_release $(CHECK) -k ciao -v $(REL) -u
+
+######################################################################
+#### The following target is to create a CIAO distribution
+#### It just delegates to our well known target
+#####################################################################
+CIAO: $(allsources)
+
+
+.PHONY: show_controlled_files show_release_files show_release_lib_files
+
+show_controlled_files:
+ @echo $(CONTROLLED_FILES)
+
+show_release_files:
+ @echo $(RELEASE_FILES)
+
+show_release_lib_files:
+ @echo ""
+
+show_release_tag_files:
+ @echo ""
+
+CIAO-INSTALL: CIAO-INSTALL.html
+ @lynx -dump $< > CIAO-INSTALL
+
diff --git a/TAO/CIAO/VERSION b/TAO/CIAO/VERSION
new file mode 100644
index 00000000000..93594ac9a1c
--- /dev/null
+++ b/TAO/CIAO/VERSION
@@ -0,0 +1,11 @@
+This is CIAO version 0.4.4, released Thu Feb 10 07:11:04 2005.
+
+If you have any problems with or questions about CIAO, please send
+e-mail to the CIAO mailing list (ciao-users@cs.wustl.edu), using the
+form found in the file CIAO/PROBLEM-REPORT-FORM. To ensure that you
+see responses, please do one of the following:
+
+ 1) Subscribe to the ciao-users mail list, by sending email with
+ contents "subscribe ciao-users" to majordomo@cs.wustl.edu.
+
+ 2) Or, monitor the comp.soft-sys.ace newsgroup for responses.
diff --git a/TAO/CIAO/bin/replace_dummy_with_dummylabel.sh b/TAO/CIAO/bin/replace_dummy_with_dummylabel.sh
new file mode 100755
index 00000000000..3f699576154
--- /dev/null
+++ b/TAO/CIAO/bin/replace_dummy_with_dummylabel.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+find . -name "*.mpc" > mpc_files
+for i in `cat mpc_files`
+do
+ sed -e 's/requires += dummy$/requires += dummy_label/g' $i > tmp
+ cat tmp > $i
+done
+
+rm -f mpc_files
+rm -f tmp
diff --git a/TAO/CIAO/ciao/CCM_Core.mpc b/TAO/CIAO/ciao/CCM_Core.mpc
new file mode 100644
index 00000000000..78183923d84
--- /dev/null
+++ b/TAO/CIAO/ciao/CCM_Core.mpc
@@ -0,0 +1,114 @@
+// -*- MPC -*-
+// $Id$
+
+project (CIAO_Client) : taolib_with_idl, valuetype, ifr_client {
+ sharedname = CIAO_Client
+ idlflags += -Sc -Wb,stub_export_include=CIAO_Client_Export.h -Wb,stub_export_macro=CIAO_CLIENT_Export -Wb,skel_export_include=CIAO_Container_Export.h -Wb,skel_export_macro=CIAO_CONTAINER_Export
+ dynamicflags = CIAO_CLIENT_BUILD_DLL
+
+ // This is necessary for MPC to pull in rules.ciao.GNU
+ includes += $(CIAO_ROOT)
+
+ IDL_Files {
+ CCM_Base.idl
+ CCM_Event.idl
+ CCM_Component.idl
+ CIAO_Value.idl
+ }
+
+ Source_Files {
+ CCM_BaseC.cpp
+ CCM_EventC.cpp
+ CCM_ComponentC.cpp
+ CIAO_ValueC.cpp
+ Client_init.cpp
+ }
+
+ Header_Files {
+ CIAO_Client_Export.h
+ CIAO_common.h
+ }
+
+ Template_Files {
+ }
+}
+
+project (CIAO_Container) : orbsvcslib, portableserver, security, valuetype, ifr_client {
+ after += CIAO_Client
+ sharedname = CIAO_Container
+ libs += CIAO_Client
+ idlflags += -Sc -Wb,export_include=CIAO_Container_Export.h
+ idlflags += -Wb,export_macro=CIAO_CONTAINER_Export
+ dynamicflags = CIAO_CONTAINER_BUILD_DLL
+
+ // This is necessary for MPC to pull in rules.ciao.GNU
+ includes += $(CIAO_ROOT)
+
+ IDL_Files {
+ CCM_Transaction.idl
+ CosPersistentState.idl
+ CCM_Container.idl
+ CCM_Container_Ex.idl
+ }
+
+ Source_Files {
+ CCM_TransactionC.cpp
+ CosPersistentStateC.cpp
+ CCM_ContainerC.cpp
+ CCM_Container_ExC.cpp
+ CCM_BaseS.cpp
+ CCM_EventS.cpp
+ CCM_ComponentS.cpp
+ Cookies.cpp
+ }
+
+ Template_Files {
+ }
+}
+
+project (CIAO_Server) : orbsvcslib, portableserver, valuetype, ifr_client, security, utils {
+ after += CIAO_Container
+ includes += $(CIAO_ROOT)
+ sharedname = CIAO_Server
+ libs += CIAO_Client CIAO_Container
+ idlflags += -Sc -Wb,export_include=CIAO_Server_Export.h -Wb,export_macro=CIAO_SERVER_Export
+
+ dynamicflags = CIAO_SERVER_BUILD_DLL
+
+ IDL_Files {
+ CCM_Deployment.idl
+ CIAO_Servers.idl
+ }
+
+ Source_Files {
+ CCM_DeploymentC.cpp
+ CCM_DeploymentS.cpp
+ CIAO_ServersC.cpp
+ CIAO_ServersS.cpp
+ ComponentInstallation_Impl.cpp
+ ComponentServer_Impl.cpp
+ Container_Base.cpp
+ Container_Impl.cpp
+ Context_Impl_Base.cpp
+ Home_Servant_Impl_Base.cpp
+ Servant_Impl_Base.cpp
+ Servant_Activator.cpp
+ Port_Activator.cpp
+ Server_init.cpp
+ ServerActivator_Impl.cpp
+ StandardConfigurator_Impl.cpp
+ }
+
+ Header_Files {
+ CIAO_Server_Export.h
+ CIAO_common.h
+ }
+
+ Template_Files {
+ Context_Impl_T.cpp
+ Home_Servant_Impl_T.cpp
+ Object_Set_T.cpp
+ Servant_Impl_T.cpp
+ Servant_Activator_T.cpp
+ }
+}
diff --git a/TAO/CIAO/ciao/Component_Base.idl b/TAO/CIAO/ciao/Component_Base.idl
new file mode 100644
index 00000000000..df173894f03
--- /dev/null
+++ b/TAO/CIAO/ciao/Component_Base.idl
@@ -0,0 +1,788 @@
+// $Id$
+
+/**
+ * @@ Compile this file with:
+ *
+ * tao_idl -Gv -I W:/ACE_wrappers/TAO -I W:/ACE_wrappers/TAO/orbsvcs/orbsvcs Component_Base.idl
+ *
+ * This file has been split into
+ * CIAO_Base.pidl
+ * CIAO_Event.pidl
+ * CIAO_Component.pidl
+ * CIAO_Transaction.pidl
+ * CIAO_Container.pidl
+ * CIAO_Container_Ex.pidl
+ * CIAO_Deployment.pidl
+ */
+
+// import ::CORBA
+// import ::SecurityLevel2
+// import ::CosPersistentState
+// import ::PortableServer
+// import ::CosNotification
+// import ::CosNotifyChannelAdmin
+
+#include <orb.idl>
+#include <SecurityLevel2.idl>
+#include <CosPersistentState.idl>
+// #include <CosNotification.idl>
+// #include <CosNotifyChannelAdmin.idl>
+
+/**
+ * Temporarily fix for lacking of typePrefix keyword.
+ * Search for the word "typePrefix" when tao_idl starts
+ * supporting the keyword.
+ */
+#pragma prefix "omg.org"
+
+module Components {
+
+ /**
+ * @@ Commented out temporarily for lack of typePrefix support.
+ */
+ // typePrefix Components "omg.org"
+ typedef string FeatureName;
+ typedef sequence<FeatureName> NameList;
+
+ valuetype Cookie
+ {
+ private CORBA::OctetSeq cookieValue;
+ };
+
+ valuetype PortDescription
+ {
+ public FeatureName Name;
+ public CORBA::RepositoryId type_id;
+ };
+
+ valuetype FacetDescription : PortDescription
+ {
+ public Object facet_ref;
+ };
+
+ typedef sequence<FacetDescription> FacetDescriptions;
+
+ typedef unsigned long FailureReason;
+
+ exception InvalidName {};
+ exception InvalidConnection {};
+ exception ExceededConnectionLimit {};
+ exception AlreadyConnected {};
+ exception NoConnection {};
+ exception CookieRequired {};
+ exception CreateFailure {
+ FailureReason reason;
+ };
+ exception FinderFailure
+ {
+ FailureReason reason;
+ };
+ exception RemoveFailure
+ {
+ FailureReason reason;
+ };
+ exception DuplicateKeyValue {};
+ exception InvalidKey {};
+ exception UnknownKeyValue {};
+ exception NoKeyAvailable {};
+ exception BadEventType
+ {
+ CORBA::RepositoryId expected_event_type;
+ };
+ exception HomeNotFound {};
+ exception WrongComponentType {};
+
+ typedef FailureReason InvalidConfigurationReason;
+ const InvalidConfigurationReason UnknownConfigValueName = 0;
+ const InvalidConfigurationReason InvalidConfigValueType = 1;
+ const InvalidConfigurationReason ConfigValueRequired = 2;
+ const InvalidConfigurationReason ConfigValueNotExpected = 3;
+ exception InvalidConfiguration
+ {
+ InvalidConfigurationReason reason;
+ FeatureName name;
+ };
+ exception IllegalState {};
+
+ interface Navigation
+ {
+ Object provide_facet (in FeatureName name)
+ raises (InvalidName);
+ FacetDescriptions get_all_facets();
+ FacetDescriptions get_named_facets (in NameList names)
+ raises (InvalidName);
+ boolean same_component (in Object object_ref);
+ };
+
+ valuetype ConnectionDescription
+ {
+ public Cookie ck;
+ public Object objref;
+ };
+ typedef sequence<ConnectionDescription> ConnectionDescriptions;
+
+ valuetype ReceptacleDescription : PortDescription
+ {
+ public boolean is_multiple;
+ public ConnectionDescriptions connections;
+ };
+ typedef sequence<ReceptacleDescription> ReceptacleDescriptions;
+
+ interface Receptacles
+ {
+ Cookie connect (in FeatureName name, in Object connection )
+ raises (InvalidName,
+ InvalidConnection,
+ AlreadyConnected,
+ ExceededConnectionLimit);
+
+ // @@ Changed to return the previously connected object reference -- basef on RTF 1.1.
+ Object disconnect (in FeatureName name, in Cookie ck)
+ raises (InvalidName,
+ InvalidConnection,
+ CookieRequired,
+ NoConnection);
+
+ ConnectionDescriptions get_connections (in FeatureName name)
+ raises (InvalidName);
+
+ ReceptacleDescriptions get_all_receptacles ();
+
+ ReceptacleDescriptions get_named_receptacles (in NameList names)
+ raises (InvalidName);
+ };
+
+ abstract valuetype EventBase {};
+
+ interface EventConsumerBase
+ {
+ void push_event (in EventBase evt) raises (BadEventType);
+ };
+
+ valuetype ConsumerDescription : PortDescription
+ {
+ public EventConsumerBase consumer;
+ };
+ typedef sequence<ConsumerDescription> ConsumerDescriptions;
+
+ valuetype EmitterDescription : PortDescription
+ {
+ public EventConsumerBase consumer;
+ };
+ typedef sequence<EmitterDescription> EmitterDescriptions;
+
+ valuetype SubscriberDescription
+ {
+ public Cookie ck;
+ public EventConsumerBase consumer;
+ };
+ typedef sequence<SubscriberDescription> SubscriberDescriptions;
+
+ valuetype PublisherDescription : PortDescription
+ {
+ public SubscriberDescriptions consumer;
+ };
+ typedef sequence<PublisherDescription> PublisherDescriptions;
+
+ interface Events
+ {
+ EventConsumerBase get_consumer (in FeatureName sink_name)
+ raises (InvalidName);
+
+ Cookie subscribe (in FeatureName publisher_name,
+ in EventConsumerBase subscriber)
+ raises (InvalidName,
+ AlreadyConnected,
+ InvalidConnection,
+ ExceededConnectionLimit);
+
+ EventConsumerBase unsubscribe (in FeatureName publisher_name,
+ in Cookie ck)
+ raises (InvalidName,
+ InvalidConnection);
+
+ void connect_consumer (in FeatureName emitter_name,
+ in EventConsumerBase consumer)
+ raises (InvalidName,
+ AlreadyConnected,
+ InvalidConnection);
+
+ EventConsumerBase disconnect_consumer (in FeatureName source_name)
+ raises (InvalidName,
+ NoConnection);
+
+ ConsumerDescriptions get_all_consumers ();
+
+ ConsumerDescriptions get_named_consumers (in NameList names)
+ raises (InvalidName);
+
+ EmitterDescriptions get_all_emitters ();
+
+ EmitterDescriptions get_named_emitters (in NameList names)
+ raises (InvalidName);
+
+ PublisherDescriptions get_all_publishers ();
+
+ PublisherDescriptions get_named_publishers (in NameList names)
+ raises (InvalidName);
+ };
+
+ abstract valuetype PrimaryKeyBase {};
+
+ interface CCMObject; //forward reference
+
+ interface CCMHome
+ {
+ CORBA::IRObject get_component_def ();
+ CORBA::IRObject get_home_def ();
+ void remove_component ( in CCMObject comp)
+ raises (RemoveFailure);
+ };
+ typedef sequence<CCMHome> CCMHomes;
+
+ interface KeylessCCMHome
+ {
+ CCMObject create_component()
+ raises (CreateFailure);
+ };
+
+ interface HomeFinder
+ {
+ CCMHome find_home_by_component_type (in CORBA::RepositoryId comp_repid)
+ raises (HomeNotFound);
+
+ CCMHome find_home_by_home_type (in CORBA::RepositoryId home_repid)
+ raises (HomeNotFound);
+
+ CCMHome find_home_by_name (in string home_name)
+ raises (HomeNotFound);
+ };
+
+ interface Configurator
+ {
+ void configure (in CCMObject comp)
+ raises (WrongComponentType);
+ };
+
+ valuetype ConfigValue
+ {
+ public FeatureName name;
+ public any value;
+ };
+
+ typedef sequence<ConfigValue> ConfigValues;
+
+ interface StandardConfigurator : Configurator
+ {
+ void set_configuration (in ConfigValues descr);
+ };
+
+ interface HomeConfiguration : CCMHome
+ {
+ void set_configurator (in Configurator cfg);
+ void set_configuration_values (in ConfigValues config);
+ void complete_component_configuration (in boolean b);
+ void disable_home_configuration();
+ };
+
+ valuetype ComponentPortDescription
+ {
+ public FacetDescriptions facets;
+ public ReceptacleDescriptions receptacles;
+ public ConsumerDescriptions consumers;
+ public EmitterDescriptions emitters;
+ public PublisherDescriptions publishers;
+ };
+
+ interface CCMObject : Navigation, Receptacles, Events
+ {
+ CORBA::IRObject get_component_def ( );
+ CCMHome get_ccm_home( );
+ PrimaryKeyBase get_primary_key( )
+ raises (NoKeyAvailable);
+ void configuration_complete( )
+ raises (InvalidConfiguration);
+ void remove()
+ raises (RemoveFailure);
+ ComponentPortDescription get_all_ports ();
+ };
+
+
+ // @@ Enumeration and DefaultEnumeration are only for EJB to CCM
+ // mapping? At any rate, we should be able to skip them for now.
+ abstract valuetype Enumeration
+ {
+ boolean has_more_elements();
+ CCMObject next_element();
+ };
+
+ typedef sequence<CCMObject> CCMObjectSeq;
+
+ valuetype DefaultEnumeration : Enumeration
+ {
+ private CCMObjectSeq objects;
+ };
+
+ // @@ Components::Transaction is still there.
+ module Transaction
+ {
+
+ typedef sequence<octet> TranToken;
+
+ exception NoTransaction {};
+ exception NotSupported {};
+ exception SystemError {};
+ exception RollbackError {};
+ exception HeuristicMixed {};
+ exception HeuristicRollback {};
+ exception Security {};
+ exception InvalidToken {};
+
+ enum Status
+ {
+ ACTIVE,
+ MARKED_ROLLBACK,
+ PREPARED,
+ COMMITTED,
+ ROLLED_BACK,
+ NO_TRANSACTION,
+ PREPARING,
+ COMMITTING,
+ ROLLING_BACK
+ };
+
+ local interface UserTransaction {
+ void begin ()
+ raises (NotSupported,
+ SystemError);
+
+ void commit ()
+ raises (RollbackError,
+ NoTransaction,
+ HeuristicMixed,
+ HeuristicRollback,
+ Security,
+ SystemError);
+
+ void rollback ()
+ raises (NoTransaction,
+ Security,
+ SystemError);
+
+ void set_rollback_only ()
+ raises (NoTransaction,
+ SystemError);
+
+ Status get_status()
+ raises (SystemError);
+
+ void set_timeout (in long to)
+ raises (SystemError);
+
+ TranToken suspend ()
+ raises (NoTransaction,
+ SystemError);
+
+ void resume (in TranToken txtoken)
+ raises (InvalidToken,
+ SystemError);
+ };
+ };
+
+ // *************** Basic Container interfaces ***************
+
+ typedef SecurityLevel2::Credentials Principal;
+
+ local interface CCMContext
+ {
+ Principal get_caller_principal();
+
+ CCMHome get_CCM_home();
+
+ boolean get_rollback_only()
+ raises (IllegalState);
+
+ Transaction::UserTransaction get_user_transaction()
+ raises (IllegalState);
+
+ boolean is_caller_in_role (in string role);
+
+ void set_rollback_only()
+ raises (IllegalState);
+ };
+
+ enum CCMExceptionReason
+ {
+ SYSTEM_ERROR,
+ CREATE_ERROR,
+ REMOVE_ERROR,
+ DUPLICATE_KEY,
+ FIND_ERROR,
+ OBJECT_NOT_FOUND,
+ NO_SUCH_ENTITY
+ };
+
+ exception CCMException
+ {
+ CCMExceptionReason reason;
+ };
+
+ local interface EnterpriseComponent {};
+
+ local interface SessionContext : CCMContext
+ {
+ Object get_CCM_object()
+ raises (IllegalState);
+ };
+
+ local interface SessionComponent : EnterpriseComponent
+ {
+ void set_session_context ( in SessionContext ctx)
+ raises (CCMException);
+
+ void ccm_activate()
+ raises (CCMException);
+
+ void ccm_passivate()
+ raises (CCMException);
+
+ void ccm_remove ()
+ raises (CCMException);
+ };
+
+ local interface SessionSynchronization
+ {
+ void after_begin ()
+ raises (CCMException);
+
+ void before_completion ()
+ raises (CCMException);
+
+ void after_completion (in boolean committed)
+ raises (CCMException);
+ };
+
+ local interface EntityContext : CCMContext
+ {
+ Object get_CCM_object ()
+ raises (IllegalState);
+
+ PrimaryKeyBase get_primary_key ()
+ raises (IllegalState);
+ };
+
+ local interface EntityComponent : EnterpriseComponent
+ {
+ void set_entity_context (in EntityContext ctx)
+ raises (CCMException);
+
+ void unset_entity_context ()
+ raises (CCMException);
+
+ void ccm_activate ()
+ raises (CCMException);
+
+ void ccm_load ()
+ raises (CCMException);
+
+ void ccm_store ()
+ raises (CCMException);
+
+ void ccm_passivate ()
+ raises (CCMException);
+
+ void ccm_remove ()
+ raises (CCMException);
+ };
+
+ // *************** Extended Container Interfaces ***************
+
+ enum BadComponentReferenceReason
+ {
+ NON_LOCAL_REFERENCE,
+ NON_COMPONENT_REFERENCE,
+ WRONG_CONTAINER
+ };
+
+ typedef CosPersistentState::CatalogBase CatalogBase;
+ typedef CosPersistentState::_TypeId _TypeId;
+
+ typedef short SegmentId;
+ const SegmentId COMPONENT_SEGMENT = 0;
+
+ typedef short FacetId;
+ const FacetId COMPONENT_FACET = 0;
+
+ typedef sequence<octet> IdData;
+ typedef CosPersistentState::Pid PersistentId;
+
+ typedef short StateIdType;
+ const StateIdType PERSISTENT_ID = 0;
+
+ exception BadComponentReference
+ {
+ BadComponentReferenceReason reason;
+ };
+ exception PolicyMismatch {};
+ exception PersistenceNotAvailable {};
+ exception UnknownActualHome {};
+ exception ProxyHomeNotSupported {};
+ exception InvalidStateIdData {};
+
+ local interface HomeRegistration
+ {
+ void register_home (in CCMHome home_ref,
+ in string home_name);
+
+ void unregister_home (in CCMHome home_ref);
+ };
+
+ local interface CCM2Context : CCMContext
+ {
+ HomeRegistration get_home_registration ();
+
+ void req_passivate ()
+ raises (PolicyMismatch);
+
+ CatalogBase get_persistence (in _TypeId catalog_type_id)
+ raises (PersistenceNotAvailable);
+ };
+
+ local interface ProxyHomeRegistration : HomeRegistration
+ {
+ void register_proxy_home (in CCMHome rhome,
+ in CCMHome ahome)
+ raises (UnknownActualHome,
+ ProxyHomeNotSupported);
+ };
+
+ local interface Session2Context : SessionContext, CCM2Context
+ {
+ Object create_ref (in CORBA::RepositoryId repid);
+
+ Object create_ref_from_oid (in CORBA::OctetSeq oid,
+ in CORBA::RepositoryId repid);
+
+ CORBA::OctetSeq get_oid_from_ref (in Object objref)
+ raises (IllegalState,
+ BadComponentReference);
+ };
+
+ abstract valuetype StateIdValue
+ {
+ StateIdType get_sid_type();
+ IdData get_sid_data();
+ };
+
+ local interface StateIdFactory
+ {
+ StateIdValue create (in IdData data)
+ raises (InvalidStateIdData);
+ };
+
+ valuetype PersistentIdValue : StateIdValue
+ {
+ private PersistentId pid;
+
+ PersistentId get_pid();
+ factory init (in PersistentId pid);
+ };
+
+ valuetype SegmentDescr
+ {
+ private StateIdValue sid;
+ private SegmentId seg;
+
+ StateIdValue get_sid();
+ SegmentId get_seg_id();
+ factory init (in StateIdValue sid,
+ in SegmentId seg);
+ };
+
+ typedef sequence<SegmentDescr> SegmentDescrSeq;
+
+ local interface ComponentId
+ {
+ FacetId get_target_facet();
+
+ SegmentId get_target_segment();
+
+ StateIdValue get_target_state_id (in StateIdFactory sid_factory)
+ raises (InvalidStateIdData);
+
+ StateIdValue get_segment_state_id (in SegmentId seg,
+ in StateIdFactory sid_factory)
+ raises (InvalidStateIdData);
+
+ ComponentId create_with_new_target (in FacetId new_target_facet,
+ in SegmentId new_target_segment);
+
+ SegmentDescrSeq get_segment_descrs (in StateIdFactory sid_factory)
+ raises (InvalidStateIdData);
+ };
+
+ local interface Entity2Context : EntityContext, CCM2Context
+ {
+ ComponentId get_component_id ()
+ raises (IllegalState);
+
+ ComponentId create_component_id (in FacetId target_facet,
+ in SegmentId target_segment,
+ in SegmentDescrSeq seq_descrs);
+
+ ComponentId create_monolithic_component_id (in FacetId target_facet,
+ in StateIdValue sid);
+
+ Object create_ref_from_cid (in CORBA::RepositoryId repid,
+ in ComponentId cid);
+
+ ComponentId get_cid_from_ref (in Object objref)
+ raises (BadComponentReference);
+ };
+
+ local interface ExecutorLocator : EnterpriseComponent
+ {
+ Object obtain_executor (in string name)
+ raises (CCMException);
+
+ void release_executor (in Object exc)
+ raises (CCMException);
+
+ void configuration_complete()
+ raises (InvalidConfiguration);
+ };
+
+ local interface HomeExecutorBase
+ {
+ };
+
+ // *************** Packaging and Deployment ***************
+
+ module Deployment
+ {
+ typedef string UUID;
+ typedef string Location;
+
+ enum AssemblyState
+ {
+ INACTIVE,
+ INSERVICE
+ };
+
+ exception UnknownImplId {};
+ exception InvalidLocation {};
+ exception InstallationFailure
+ {
+ FailureReason reason;
+ };
+ exception InvalidAssembly {};
+
+ interface ComponentInstallation
+ {
+ void install(in UUID implUUID,
+ in Location component_loc)
+ raises (InvalidLocation,
+ InstallationFailure);
+
+ void replace(in UUID implUUID,
+ in Location component_loc)
+ raises (InvalidLocation,
+ InstallationFailure);
+
+ void remove(in UUID implUUID)
+ raises (UnknownImplId,
+ RemoveFailure);
+
+ Location get_implementation (in UUID implUUID)
+ raises (UnknownImplId,
+ InstallationFailure);
+ };
+
+ interface Assembly
+ {
+ void build()
+ raises (CreateFailure);
+
+ void tear_down()
+ raises (RemoveFailure);
+
+ AssemblyState get_state();
+ };
+
+ interface AssemblyFactory
+ {
+ Cookie create_assembly(in Location assembly_loc)
+ raises (InvalidLocation,
+ CreateFailure);
+
+ Assembly lookup(in Cookie c)
+ raises (InvalidAssembly);
+
+ void destroy(in Cookie c)
+ raises (InvalidAssembly,
+ RemoveFailure);
+ };
+
+ interface ComponentServer; // Forward decl.
+ typedef sequence<ComponentServer> ComponentServers;
+
+ interface ServerActivator
+ {
+ ComponentServer create_component_server (in ConfigValues config)
+ raises (CreateFailure,
+ InvalidConfiguration);
+
+ void remove_component_server (in ComponentServer server)
+ raises (RemoveFailure);
+
+ ComponentServers get_component_servers ();
+ };
+
+ interface Container; // Forward decl.
+ typedef sequence<Container> Containers;
+
+ interface ComponentServer
+ {
+ readonly attribute ConfigValues configuration;
+
+ ServerActivator get_server_activator ();
+ Container create_container (in ConfigValues config)
+ raises (CreateFailure,
+ InvalidConfiguration);
+
+ void remove_container (in Container cref)
+ raises (RemoveFailure);
+
+ Containers get_containers ();
+
+ void remove ()
+ raises (RemoveFailure);
+ };
+
+ exception ImplEntryPointNotFound {};
+
+ interface Container
+ {
+ readonly attribute ConfigValues configuration;
+
+ ComponentServer get_component_server ();
+
+ CCMHome install_home (in UUID id,
+ in string entrypt,
+ in ConfigValues config)
+ raises (UnknownImplId,
+ ImplEntryPointNotFound,
+ InstallationFailure,
+ InvalidConfiguration);
+
+ void remove_home (in CCMHome href)
+ raises (RemoveFailure);
+
+ CCMHomes get_homes ();
+ void remove ()
+ raises (RemoveFailure);
+
+ };
+
+ };
+};
diff --git a/TAO/CIAO/ciao/Container_Base.cpp b/TAO/CIAO/ciao/Container_Base.cpp
new file mode 100644
index 00000000000..abad0fa788a
--- /dev/null
+++ b/TAO/CIAO/ciao/Container_Base.cpp
@@ -0,0 +1,431 @@
+// $Id$
+
+#include "Container_Base.h"
+#include "ace/DLL.h"
+#include "tao/Utils/PolicyList_Destroyer.h"
+#include "ace/OS_NS_stdio.h"
+#include "ace/SString.h"
+#include "Servant_Activator.h"
+
+#if !defined (__ACE_INLINE__)
+# include "Container_Base.inl"
+#endif /* __ACE_INLINE__ */
+
+namespace CIAO
+{
+
+////////////////////////////////////////////////////////////////
+ Container::Container (CORBA::ORB_ptr o)
+ : orb_ (CORBA::ORB::_duplicate (o))
+ {
+ }
+
+ Container::~Container ()
+ {
+ }
+
+ PortableServer::POA_ptr
+ Container::the_POA (void) const
+ {
+ return this->component_poa_.in ();
+ }
+
+ CORBA::ORB_ptr
+ Container::the_ORB (void) const
+ {
+ return this->orb_.in ();
+ }
+
+ ///////////////////////////////////////////////////////////////
+
+ ACE_Atomic_Op <ACE_SYNCH_MUTEX, long>
+ Session_Container::serial_number_ (0);
+
+ Session_Container::Session_Container (CORBA::ORB_ptr o,
+ bool static_config_flag,
+ const Static_Config_EntryPoints_Maps* maps)
+ : Container (o),
+ number_ (0),
+ static_config_flag_ (static_config_flag),
+ static_entrypts_maps_ (maps),
+ sa_ (0)
+ {
+ }
+
+ Session_Container::~Session_Container ()
+ {
+ }
+
+ int
+ Session_Container::init (const char *name,
+ const CORBA::PolicyList *more_policies
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ char buffer[MAXPATHLEN];
+
+ if (name == 0)
+ {
+ this->number_ = ++Session_Container::serial_number_;
+ ACE_OS::sprintf (buffer, "CIAO::Session_Container-%ld",
+ this->number_);
+ name = buffer;
+ }
+
+ CORBA::Object_var poa_object =
+ this->orb_->resolve_initial_references("RootPOA"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
+
+ if (CORBA::is_nil (poa_object.in ()))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ " (%P|%t) Unable to initialize the POA.\n"),
+ -1);
+
+ PortableServer::POA_var root_poa =
+ PortableServer::POA::_narrow (poa_object.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
+
+ this->create_component_POA (name,
+ more_policies,
+ root_poa.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
+
+ this->create_facet_consumer_POA (root_poa.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
+
+ PortableServer::POAManager_var poa_manager =
+ root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
+
+ poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
+
+ return 0;
+ }
+
+ void
+ Session_Container::create_component_POA (const char *name,
+ const CORBA::PolicyList *p,
+ PortableServer::POA_ptr root
+ ACE_ENV_ARG_DECL)
+ {
+ // Set up proper poa policies here. Default policies seems to be
+ // fine for session container. If you add some other default
+ // policies here, then you need to "add" more_policies below
+ // instead of simply assigning more_policies to the init policy
+ // list.
+ CORBA::PolicyList policies (0);
+
+ if (p != 0)
+ policies = *p;
+
+ PortableServer::POAManager_var poa_manager =
+ root->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ this->component_poa_ =
+ root->create_POA (name,
+ poa_manager.in (),
+ policies
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ }
+
+ void
+ Session_Container::create_facet_consumer_POA (
+ PortableServer::POA_ptr root
+ ACE_ENV_ARG_DECL)
+ {
+ PortableServer::POAManager_var poa_manager =
+ root->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ TAO::Utils::PolicyList_Destroyer policies (3);
+ policies.length (3);
+
+ policies[0] =
+ root->create_id_assignment_policy (PortableServer::USER_ID
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ policies[1] =
+ root->create_request_processing_policy (PortableServer::USE_SERVANT_MANAGER
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // Servant Retention Policy
+ policies[2] =
+ root->create_servant_retention_policy (PortableServer::RETAIN
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ this->facet_cons_poa_ =
+ root->create_POA ("facet_consumer_poa",
+ poa_manager.in (),
+ policies
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ ACE_NEW_THROW_EX (this->sa_,
+ Servant_Activator (this->orb_.in ()),
+ CORBA::NO_MEMORY ());
+
+ this->facet_cons_poa_->set_servant_manager (
+ this->sa_
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ }
+
+ CORBA::Object_ptr
+ Session_Container::install_servant (PortableServer::Servant p,
+ Container::OA_Type t
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ PortableServer::POA_ptr tmp = 0;
+
+ if (t == Container::Component)
+ tmp = this->component_poa_.in ();
+ else
+ tmp = this->facet_cons_poa_.in ();
+
+ PortableServer::ObjectId_var oid
+ = tmp->activate_object (p
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ CORBA::Object_var objref
+ = tmp->id_to_reference (oid.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ return objref._retn ();
+ }
+
+ CORBA::Object_ptr
+ Session_Container::install_component (PortableServer::Servant p,
+ PortableServer::ObjectId_out oid
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ PortableServer::ObjectId_var id =
+ this->component_poa_->activate_object (p
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ CORBA::Object_var objref
+ = this->component_poa_->id_to_reference (id.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ oid = id._retn ();
+
+ return objref._retn ();
+ }
+
+
+ //@@ Apparently we need to be cautious when handling the exception
+ // thrown here. We should make sure that new DnC interfaces
+ // NodeApplication/NodeApplicationManager etc will cache the new
+ // exceptions--> rethrow of new exceptions is needed.
+ // --Tao
+ Components::CCMHome_ptr
+ Session_Container::ciao_install_home (const char *exe_dll_name,
+ const char *exe_entrypt,
+ const char *sv_dll_name,
+ const char *sv_entrypt
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::Deployment::UnknownImplId,
+ Components::Deployment::ImplEntryPointNotFound,
+ Components::Deployment::InstallationFailure))
+ {
+
+ HomeFactory hcreator = 0;
+ ServantFactory screator = 0;
+
+ if (this->static_config_flag_ == 0)
+ {
+ ACE_DLL executor_dll, servant_dll;
+
+ if (exe_dll_name == 0 || sv_dll_name == 0)
+ ACE_THROW_RETURN (Components::Deployment::UnknownImplId (),
+ Components::CCMHome::_nil ());
+
+ if (executor_dll.open (exe_dll_name,
+ ACE_DEFAULT_SHLIB_MODE,
+ 0) != 0
+ || servant_dll.open (sv_dll_name,
+ ACE_DEFAULT_SHLIB_MODE,
+ 0) != 0)
+ {
+ ACE_THROW_RETURN (Components::Deployment::UnknownImplId (),
+ Components::CCMHome::_nil ());
+ }
+
+ if (exe_entrypt == 0 || sv_entrypt == 0)
+ ACE_THROW_RETURN (Components::Deployment::ImplEntryPointNotFound (),
+ Components::CCMHome::_nil ());
+
+ // @@ (OO) Please use a static_cast<> here instead of a C-style
+ // cast. ANSI C++ casts are the preferred (and modern)
+ // way of casting in ACE/TAO/CIAO.
+ hcreator = (HomeFactory) executor_dll.symbol (exe_entrypt);
+ screator = (ServantFactory) servant_dll.symbol (sv_entrypt);
+ }
+ else
+ {
+ if (static_entrypts_maps_ == 0 ||
+ static_entrypts_maps_->home_creator_funcptr_map_ == 0 ||
+ static_entrypts_maps_->home_servant_creator_funcptr_map_ == 0)
+ ACE_THROW_RETURN (Components::Deployment::ImplEntryPointNotFound (),
+ Components::CCMHome::_nil ());
+
+ ACE_CString exe_entrypt_str (exe_entrypt);
+ static_entrypts_maps_->home_creator_funcptr_map_->
+ find (exe_entrypt_str, hcreator);
+
+ ACE_CString sv_entrypt_str (sv_entrypt);
+ static_entrypts_maps_->home_servant_creator_funcptr_map_->
+ find (sv_entrypt_str, screator);
+ }
+
+ if (hcreator == 0 || screator == 0)
+ ACE_THROW_RETURN (Components::Deployment::ImplEntryPointNotFound (),
+ Components::CCMHome::_nil ());
+
+ Components::HomeExecutorBase_var home_executor = hcreator ();
+ if (CORBA::is_nil (home_executor.in ()))
+ ACE_THROW_RETURN (Components::Deployment::InstallationFailure (),
+ Components::CCMHome::_nil ());
+
+ PortableServer::Servant home_servant = screator (home_executor.in (),
+ this
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (Components::CCMHome::_nil ());
+
+ if (home_servant == 0)
+ ACE_THROW_RETURN (Components::Deployment::InstallationFailure (),
+ Components::CCMHome::_nil ());
+
+ PortableServer::ServantBase_var safe (home_servant);
+
+ CORBA::Object_var objref =
+ this->install_servant (home_servant,
+ Container::Component
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (Components::CCMHome::_nil ());
+
+ Components::CCMHome_var homeref =
+ Components::CCMHome::_narrow (objref.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ return homeref._retn ();
+
+ }
+
+ void
+ Session_Container::ciao_uninstall_home (Components::CCMHome_ptr homeref
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ this->uninstall (homeref,
+ Container::Component
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ }
+
+ void
+ Session_Container::uninstall (CORBA::Object_ptr objref,
+ Container::OA_Type t
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ PortableServer::POA_ptr tmp = 0;
+
+ if (t == Container::Component)
+ tmp = this->component_poa_.in ();
+ else
+ tmp = this->facet_cons_poa_.in ();
+
+ PortableServer::ObjectId_var oid =
+ tmp->reference_to_id (objref
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ tmp->deactivate_object (oid.in ()
+ ACE_ENV_ARG_PARAMETER);
+ }
+
+ void
+ Session_Container::uninstall (PortableServer::Servant svt,
+ Container::OA_Type t
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ PortableServer::POA_ptr tmp = 0;
+
+ if (t == Container::Component)
+ tmp = this->component_poa_.in ();
+ else
+ tmp = this->facet_cons_poa_.in ();
+
+ PortableServer::ObjectId_var oid
+ = tmp->servant_to_id (svt
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ tmp->deactivate_object (oid.in ()
+ ACE_ENV_ARG_PARAMETER);
+ }
+
+ void
+ Session_Container::uninstall_component (Components::CCMObject_ptr objref,
+ PortableServer::ObjectId_out oid
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+
+ PortableServer::ObjectId_var id =
+ this->component_poa_->reference_to_id (objref
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ this->component_poa_->deactivate_object (id.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ oid = id._retn ();
+ }
+
+ CORBA::Object_ptr
+ Session_Container::generate_reference (const char *obj_id,
+ const char *repo_id,
+ Container::OA_Type t
+ ACE_ENV_ARG_DECL)
+ {
+ PortableServer::POA_ptr tmp = 0;
+
+ if (t == Container::Component)
+ tmp = this->component_poa_.in ();
+ else
+ tmp = this->facet_cons_poa_.in ();
+
+ PortableServer::ObjectId_var oid =
+ PortableServer::string_to_ObjectId (obj_id);
+
+ CORBA::Object_var objref =
+ tmp->create_reference_with_id (oid.in (),
+ repo_id
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (CORBA::Object::_nil ());
+
+ return objref._retn ();
+ }
+
+}
diff --git a/TAO/CIAO/ciao/Container_Impl.cpp b/TAO/CIAO/ciao/Container_Impl.cpp
new file mode 100644
index 00000000000..c6feed5c3bf
--- /dev/null
+++ b/TAO/CIAO/ciao/Container_Impl.cpp
@@ -0,0 +1,280 @@
+// $Id$
+#include "Container_Impl.h"
+
+#include "ace/Auto_Ptr.h"
+#include "ace/OS_NS_string.h"
+
+#if !defined (__ACE_INLINE__)
+# include "Container_Impl.inl"
+#endif /* __ACE_INLINE__ */
+
+
+CIAO::Container_Impl::~Container_Impl ()
+{
+ // @@ remove all home?
+}
+
+PortableServer::POA_ptr
+CIAO::Container_Impl::_default_POA (void)
+{
+ return PortableServer::POA::_duplicate (this->poa_.in ());
+}
+
+int
+CIAO::Container_Impl::init (const ::Components::ConfigValues &options,
+ Components::Deployment::ComponentInstallation_ptr inst
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ this->config_ = options;
+ this->installation_ =
+ Components::Deployment::ComponentInstallation::_duplicate (inst);
+
+ // @@ Initialize container and create the internal container
+ // implementation that actually interacts with installed
+ // homes/components.
+
+ // @@ We will need a container factory here later on when we support
+ // more kinds of container implementations.
+
+ // @@ Fish out the ComponentServer object reference from <options>.
+
+ ACE_NEW_THROW_EX (this->container_,
+ CIAO::Session_Container (this->orb_.in (),
+ this->static_config_flag_,
+ this->static_entrypts_maps_),
+ CORBA::INTERNAL ());
+ ACE_CHECK_RETURN (-1);
+
+ return this->container_->init (0,
+ 0
+ ACE_ENV_ARG_PARAMETER);
+}
+
+::Components::ConfigValues *
+CIAO::Container_Impl::configuration (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ Components::ConfigValues *retval;
+
+ ACE_NEW_THROW_EX (retval,
+ Components::ConfigValues (),
+ CORBA::INTERNAL ());
+ ACE_CHECK_RETURN (0);
+
+ *retval = this->config_;
+
+ return retval;
+}
+
+::Components::Deployment::ComponentServer_ptr
+CIAO::Container_Impl::get_component_server (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return Components::Deployment::ComponentServer::_duplicate (this->comserv_.in ());
+}
+
+::Components::CCMHome_ptr
+CIAO::Container_Impl::install_home (const char * id,
+ const char * entrypt,
+ const Components::ConfigValues & config
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::Deployment::UnknownImplId,
+ Components::Deployment::ImplEntryPointNotFound,
+ Components::Deployment::InstallationFailure,
+ Components::InvalidConfiguration))
+{
+ // use id to locate the softpkg from the ComponentInstallation interface.
+ // depending on where we want to parse the softpkg descriptor, we
+ // can either use the <entrypt> directly (if we parse the softpkg in
+ // Assembly), simply verify that is correct, or even discard this
+ // value.
+
+ // @@ Here we need to resolve paths to both component executors and
+ // component servants (that matches the container type) for the
+ // executor and their entry points before we can install the home.
+ struct home_installation_info config_info;
+ this->parse_config_values (id,
+ config,
+ config_info
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ Components::CCMHome_var newhome
+ = this->container_->ciao_install_home
+ (config_info.executor_dll_.in (),
+ entrypt,
+ config_info.servant_dll_.in (),
+ config_info.servant_entrypt_.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ {
+ ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 0);
+
+ this->home_set_.add (newhome.in ());
+ }
+ return newhome._retn ();
+}
+
+void
+CIAO::Container_Impl::remove_home (Components::CCMHome_ptr href
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::RemoveFailure))
+{
+ ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->lock_);
+
+ if (this->home_set_.object_in_set (href) == 0)
+ ACE_THROW (CORBA::BAD_PARAM ());
+
+ // @@ Finalizing home... how? Removing all the components, but how?
+ // It looks like the component home will also need to keep a record
+ // of all the components it creates.
+
+ this->container_->ciao_uninstall_home (href
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // @@ Still need to remove the home if the previous operation fails?
+ if (this->home_set_.remove (href) == -1)
+ ACE_THROW (::Components::RemoveFailure ());
+}
+
+::Components::CCMHomes *
+CIAO::Container_Impl::get_homes (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 0);
+
+ Components::CCMHomes_var retval;
+
+ ACE_NEW_THROW_EX (retval.out (),
+ Components::CCMHomes (),
+ CORBA::INTERNAL ());
+ ACE_CHECK_RETURN (0);
+
+ CORBA::ULong len = this->home_set_.size ();
+ retval->length (len); // resize
+
+#if 0
+ // TAO is broken here. Both <replace>, <get_buffer> and friends are missing.
+ this->home_set_.copy (len, retval->get_buffer (0));
+#else
+ for (CORBA::ULong i = 0; i < len; ++i)
+ {
+ retval[i] = this->home_set_.at (i);
+ }
+#endif
+
+ return retval._retn ();
+}
+
+void
+CIAO::Container_Impl::remove (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::RemoveFailure))
+{
+ // @@ Need to remove all CCMHome
+
+ // ACE_THROW (CORBA::NO_IMPLEMENT ());
+
+ ACE_DEBUG ((LM_DEBUG, "CIAO::Container_Impl::remove\n"));
+}
+
+void
+CIAO::Container_Impl::parse_config_values (const char *id,
+ const Components::ConfigValues &options,
+ struct home_installation_info &component_install_info
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::Deployment::UnknownImplId,
+ Components::Deployment::ImplEntryPointNotFound,
+ Components::InvalidConfiguration))
+{
+ CORBA::String_var servant_uuid;
+
+ for (CORBA::ULong i = 0; i < options.length (); ++i)
+ {
+ CORBA::String_var *info = 0;
+ const char *str_in = 0;
+
+ // @@ The following code need cleaning up.
+ if (ACE_OS::strcmp (options[i]->name (), "CIAO-servant-UUID") == 0)
+ info = &servant_uuid;
+ else if (ACE_OS::strcmp (options[i]->name (), "CIAO-servant-entrypt") == 0)
+ info = &component_install_info.servant_entrypt_;
+ else
+ {
+ Components::InvalidConfiguration *exc = 0;
+ ACE_NEW_THROW_EX (exc,
+ Components::InvalidConfiguration,
+ CORBA::NO_MEMORY ());
+ exc->name = CORBA::string_dup (options[i]->name ());
+ exc->reason = Components::UnknownConfigValueName;
+#if defined (ACE_HAS_EXCEPTIONS)
+ auto_ptr<Components::InvalidConfiguration> safety (exc);
+ exc->_raise ();
+#else
+ ACE_TRY_ENV.exception (exc);
+#endif /*ACE_HAS_EXCEPTIONS*/
+ }
+
+ if (options[i]->value () >>= str_in)
+ {
+ *info = CORBA::string_dup (str_in);
+#if 0
+ ACE_DEBUG ((LM_DEBUG, "*parse_config_values got (%s) = %s\n",
+ options[i]->name (),
+ str_in));
+#endif /* 0 */
+ }
+ else
+ {
+ Components::InvalidConfiguration *exc = 0;
+ ACE_NEW_THROW_EX (exc,
+ Components::InvalidConfiguration,
+ CORBA::NO_MEMORY ());
+ exc->name = CORBA::string_dup (options[i]->name ());
+ exc->reason = Components::UnknownConfigValueName;
+#if defined (ACE_HAS_EXCEPTIONS)
+ auto_ptr<Components::InvalidConfiguration> safety (exc);
+ exc->_raise ();
+#else
+ ACE_TRY_ENV.exception (exc);
+#endif /*ACE_HAS_EXCEPTIONS*/
+ }
+ }
+
+ if (this->static_config_flag_ == 0)
+ {
+ component_install_info.executor_dll_ =
+ this->installation_->get_implementation (id
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ component_install_info.servant_dll_ =
+ this->installation_->get_implementation (servant_uuid.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ if (component_install_info.executor_dll_.in () == 0 ||
+ component_install_info.servant_dll_.in () == 0 ||
+ component_install_info.servant_entrypt_.in () == 0)
+ {
+ Components::InvalidConfiguration *exc = 0;
+ ACE_NEW_THROW_EX (exc,
+ Components::InvalidConfiguration,
+ CORBA::NO_MEMORY ());
+ exc->name = CORBA::string_dup ("home_installation_info");
+ exc->reason = Components::ConfigValueRequired;
+#if defined (ACE_HAS_EXCEPTIONS)
+ auto_ptr<Components::InvalidConfiguration> safety (exc);
+ exc->_raise ();
+#else
+ ACE_TRY_ENV.exception (exc);
+#endif /*ACE_HAS_EXCEPTIONS*/
+ }
+ }
+}
diff --git a/TAO/CIAO/ciao/Port_Activator_T.cpp b/TAO/CIAO/ciao/Port_Activator_T.cpp
new file mode 100644
index 00000000000..257ea137204
--- /dev/null
+++ b/TAO/CIAO/ciao/Port_Activator_T.cpp
@@ -0,0 +1,69 @@
+// $Id$
+#ifndef CIAO_PORT_ACTIVATOR_T_CPP
+#define CIAO_PORT_ACTIVATOR_T_CPP
+
+#include "Port_Activator_T.h"
+#include "tao/CORBA_String.h"
+#include "ace/OS_NS_string.h"
+
+namespace CIAO
+{
+ template <typename SERV,
+ typename EXEC,
+ typename CONTEXT,
+ typename COMP_SERV>
+ Port_Activator_T<SERV, EXEC, CONTEXT, COMP_SERV>::Port_Activator_T (
+ const char *oid,
+ const char *name,
+ Port_Activator::Type t,
+ EXEC *e,
+ CONTEXT *c,
+ COMP_SERV *cc)
+ : Port_Activator (oid, name, t)
+ , executor_ (e)
+ , context_ (c)
+ , comp_serv_ (cc)
+ {
+ }
+
+ template <typename SERV,
+ typename EXEC,
+ typename CONTEXT,
+ typename COMP_SERV>
+ PortableServer::Servant
+ Port_Activator_T<SERV, EXEC, CONTEXT, COMP_SERV>::activate (
+ const PortableServer::ObjectId &oid
+ ACE_ENV_ARG_DECL)
+ {
+ CORBA::String_var str =
+ PortableServer::ObjectId_to_string (oid);
+
+ // An additional check, may not be necessary. Being on the safe
+ // side.
+ if (ACE_OS::strcmp (this->oid_.in (),
+ str.in ()) == 0)
+ {
+ if (this->executor_ == 0 &&
+ this->t_ == Port_Activator::Facet)
+ {
+ CORBA::Object_var tmp =
+ this->comp_serv_->get_facet_executor (this->name_);
+
+ this->executor_ = EXEC::_narrow (tmp.in ());
+ }
+
+ SERVANT *s = 0;
+
+ ACE_NEW_THROW_EX (s,
+ SERVANT (this->executor_,
+ this->context_),
+ CORBA::NO_MEMORY ());
+ return s;
+ }
+
+ ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (),
+ 0);
+ }
+}
+
+#endif /*SERVANT_ACTIVATOR_T_CPP*/
diff --git a/TAO/CIAO/ciao/Servant_Activator.cpp b/TAO/CIAO/ciao/Servant_Activator.cpp
new file mode 100644
index 00000000000..03899555bfd
--- /dev/null
+++ b/TAO/CIAO/ciao/Servant_Activator.cpp
@@ -0,0 +1,132 @@
+#include "Servant_Activator.h"
+#include "CIAO_common.h"
+#include "Port_Activator.h"
+#include "ace/Log_Msg.h"
+#include "ace/OS_NS_string.h"
+
+ACE_RCSID (ciao,
+ Servant_Activator,
+ "$Id$")
+
+namespace CIAO
+{
+ Servant_Activator::Servant_Activator (CORBA::ORB_ptr o)
+ : orb_ (CORBA::ORB::_duplicate (o))
+ // @@ TODO, avoid this magic number
+ , pa_ (64)
+ , slot_index_ (0)
+ {
+ }
+
+ Servant_Activator::~Servant_Activator (void)
+ {
+ {
+ ACE_GUARD (TAO_SYNCH_MUTEX,
+ guard,
+ this->mutex_);
+
+ const unsigned int sz = this->slot_index_;
+
+ for (unsigned int t = 0; t != sz; ++t)
+ {
+ Port_Activator *&tmp = this->pa_[t];
+
+ delete tmp;
+ }
+ }
+ }
+
+ PortableServer::Servant
+ Servant_Activator::incarnate (const PortableServer::ObjectId &oid,
+ PortableServer::POA_ptr
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ PortableServer::ForwardRequest))
+ {
+ CORBA::String_var str =
+ PortableServer::ObjectId_to_string (oid);
+
+ if (CIAO::debug_level () > 10)
+ ACE_DEBUG ((LM_DEBUG,
+ "CIAO (%P|%t) - Servant_Activator::incarnate, "
+ "activating port name [%s] \n",
+ str.in ()));
+
+ {
+ ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
+ guard,
+ this->mutex_,
+ 0);
+
+ const unsigned int sz = this->slot_index_;
+
+ Port_Activator *tmp = 0;
+
+ for (unsigned int t = 0; t != sz; ++t)
+ {
+ if (this->pa_.get (tmp, t) == -1)
+ ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (),
+ 0);
+
+ if (tmp == 0)
+ {
+ if (CIAO::debug_level () > 10)
+ ACE_ERROR ((LM_ERROR,
+ "CIAO (%P|%t) - Servant_Activator::incarnate (),"
+ " value from the array is null \n"));
+ continue;
+ }
+ if (ACE_OS::strcmp (tmp->name (),
+ str.in ()) == 0)
+ // We should try avoiding making outbound calls with the
+ // lock held. Oh well, let us get some sense of sanity in
+ // CIAO to do think about these.
+ return this->pa_[t]->activate (oid
+ ACE_ENV_ARG_PARAMETER);
+ }
+ }
+ ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (),
+ 0);
+ }
+
+ void
+ Servant_Activator::etherealize (const PortableServer::ObjectId &,
+ PortableServer::POA_ptr ,
+ PortableServer::Servant ,
+ CORBA::Boolean ,
+ CORBA::Boolean
+ ACE_ENV_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ /// Need to investigate what needs to be handled here..
+ }
+
+ bool
+ Servant_Activator::register_port_activator (Port_Activator *pa)
+ {
+ ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
+ guard,
+ this->mutex_,
+ false);
+
+ // @@ TODO, need to implement a better algorithm here.
+ //
+ if (this->slot_index_ >= this->pa_.size ())
+ this->pa_.size ((this->slot_index_ + 1));
+
+ if (this->pa_.set (pa, this->slot_index_) == 0)
+ {
+ ++this->slot_index_;
+
+ if (CIAO::debug_level () > 10)
+ ACE_DEBUG ((LM_DEBUG,
+ "CIAO (%P|%t) - Servant_Activator::register_port_activator,"
+ " the slot_index_ is [%d] \n",
+ this->slot_index_));
+
+ return true;
+ }
+
+ return false;
+ }
+}
diff --git a/TAO/CIAO/ciao/Servant_Activator.h b/TAO/CIAO/ciao/Servant_Activator.h
new file mode 100644
index 00000000000..27ed074b1b7
--- /dev/null
+++ b/TAO/CIAO/ciao/Servant_Activator.h
@@ -0,0 +1,108 @@
+// -*- C++ -*-
+
+//=============================================================================
+/**
+ * @file Servant_Activator.h
+ *
+ * $Id$
+ *
+ * @authors Balachandran Natarajan <bala@dre.vanderbilt.edu>
+ */
+//=============================================================================
+
+#ifndef CIAO_SERVANT_ACTIVATOR_H
+#define CIAO_SERVANT_ACTIVATOR_H
+#include /**/ "ace/pre.h"
+
+#include "ace/Array_Base.h"
+#include "ciao/CIAO_Server_Export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "tao/PortableServer/PortableServer.h"
+#include "tao/PortableServer/ServantActivatorC.h"
+#include "tao/PortableServer/ForwardRequestC.h"
+#include "tao/LocalObject.h"
+
+#if defined(_MSC_VER)
+#pragma warning(push)
+#pragma warning(disable:4250)
+#endif /* _MSC_VER */
+
+namespace CIAO
+{
+ class Port_Activator;
+
+ /**
+ * @class Servant_Activator
+ *
+ * @brief Activator that is registered with the POA for facet and
+ * consumer servants.
+ *
+ * This class acts like a factory in some sense. This factory is
+ * registered with the POA with RETAIN policy. When the factory gets
+ * a call back as part of the upcall, this factory looks at the
+ * list of port activators registered, uses the OID to pick the
+ * right one (yes a linear algorithm is used), calls activate () on
+ * it which returns the servant for *that* port.
+ */
+ class CIAO_SERVER_Export Servant_Activator
+ : public virtual PortableServer::ServantActivator
+ , public virtual TAO_Local_RefCounted_Object
+ {
+ public:
+ Servant_Activator (CORBA::ORB_ptr o);
+
+ virtual ~Servant_Activator (void);
+
+ /// Template methods overridden to get callbacks.
+ /**
+ * If you would like to know the details of the following two
+ * methods, please PortableServer documentation. This is probably
+ * not the place to document what these mean.
+ */
+ PortableServer::Servant incarnate (
+ const PortableServer::ObjectId &oid,
+ PortableServer::POA_ptr poa
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ PortableServer::ForwardRequest));
+
+ void etherealize (const PortableServer::ObjectId &oid,
+ PortableServer::POA_ptr adapter,
+ PortableServer::Servant servant,
+ CORBA::Boolean cleanup_in_progress,
+ CORBA::Boolean remaining_activations
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// Local helper methods
+ bool register_port_activator (Port_Activator *pa);
+
+ private:
+ /// Pointer to our ORB
+ CORBA::ORB_var orb_;
+
+ /// @@ This should be changed at some point of time so that we
+ /// don't land up with a linear algorithm
+ typedef ACE_Array_Base<Port_Activator *> Port_Activators;
+
+ /// Array of port activators
+ Port_Activators pa_;
+
+ /// Running index of the slot that has been just filled in.
+ size_t slot_index_;
+
+ /// Mutex that synchronizes access to the array.
+ ACE_SYNCH_MUTEX mutex_;
+ };
+}
+
+#if defined(_MSC_VER)
+#pragma warning(pop)
+#endif /* _MSC_VER */
+
+#include /**/ "ace/post.h"
+#endif /*CIAO_SERVANT_ACTIVATOR_H*/
diff --git a/TAO/CIAO/ciao/ServerActivator_Impl.h b/TAO/CIAO/ciao/ServerActivator_Impl.h
new file mode 100644
index 00000000000..7ff3c783d7d
--- /dev/null
+++ b/TAO/CIAO/ciao/ServerActivator_Impl.h
@@ -0,0 +1,266 @@
+// -*- C++ -*-
+
+//=============================================================================
+/**
+ * @file ServerActivator_Impl.h
+ *
+ * $Id$
+ *
+ * This file contains implementation for the servant of
+ * Components::Deployment::ServerActivator interface.
+ *
+ * @author Nanbor Wang <nanbor@cs.wustl.edu>
+ */
+//=============================================================================
+
+
+#ifndef CIAO_SERVERACTIVATOR_IMPL_H
+#define CIAO_SERVERACTIVATOR_IMPL_H
+#include /**/ "ace/pre.h"
+
+#include "ace/config-all.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "CCM_DeploymentS.h"
+#include "CIAO_ServersS.h"
+#include "Object_Set_T.h"
+
+#include "ace/SString.h"
+
+
+namespace CIAO
+{
+ /**
+ * @class Activator_Callback
+ *
+ * @brief A call back interface for ComponentServer.
+ *
+ * Notice that this implementation is *NOT* thread-safe.
+ */
+ class CIAO_SERVER_Export Activator_Callback_Impl
+ : public virtual POA_CIAO::Activator_Callback,
+ public virtual PortableServer::RefCountServantBase
+ {
+ public:
+ friend class ServerActivator_Impl;
+
+ /// Constructor.
+ Activator_Callback_Impl (CORBA::ORB_ptr o,
+ PortableServer::POA_ptr p,
+ Components::Deployment::ServerActivator_ptr s,
+ const Components::ConfigValues &cofig);
+
+ /// Destructor.
+ ~Activator_Callback_Impl ();
+
+ /// Get the containing POA. This operation does *not*
+ /// increase the reference count of the POA.
+ virtual PortableServer::POA_ptr _default_POA (void);
+
+ /// Record the ComponentServer reference returned by the newly
+ /// spawned ComponentServer and give it back a reference to ServerActivator.
+ Components::Deployment::ServerActivator_ptr
+ register_component_server (Components::Deployment::ComponentServer_ptr svr,
+ Components::ConfigValues_out config
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ protected:
+ Components::Deployment::ComponentServer_ptr get_server_ref (void);
+
+ CORBA::ORB_var orb_;
+
+ PortableServer::POA_var poa_;
+
+ /// This servant only lives as long as a call to the
+ /// create_component_server method in ServerActivator, so there's
+ /// no need to duplicate the object reference here.
+ Components::Deployment::ServerActivator_ptr activator_;
+
+ Components::Deployment::ComponentServer_var server_;
+
+ Components::ConfigValues_var config_;
+ };
+
+ /**
+ * @class ServerActivator_Impl
+ *
+ * @brief Servant implementation for Components::Deployment::ServerActivator
+ *
+ * This class implements the Components::Deployment::ServerActivator
+ * interface as defined by the CCM spcification. As the interface
+ * implies, this is actually part of the deployment interface and is
+ * used to manage the lifecycle of containers running on the server.
+ */
+ class CIAO_SERVER_Export ServerActivator_Impl
+ : public virtual POA_Components::Deployment::ServerActivator,
+ public virtual PortableServer::RefCountServantBase
+ {
+ public:
+ /// Constructor
+ ServerActivator_Impl (CORBA::ORB_ptr o,
+ PortableServer::POA_ptr p);
+
+ /// Destructor
+ virtual ~ServerActivator_Impl (void);
+
+ /// Get the containing POA. This operation does *not*
+ /// increase the reference count of the POA.
+ virtual PortableServer::POA_ptr _default_POA (void);
+
+ /**
+ * Initialize the ServerActivator. The currently implementation
+ * of ServerActivator can only activate CIAO's own
+ * ComponentServer processes. You should specify the location
+ * (pathname) of the ComponentServer and the delay
+ * ServerActivator should wait (in second) for ComponentServer to
+ * call back.
+ *
+ * @param server_location A null-termiated char * string pointing
+ * to the pathname of a ComponentServer executable.
+
+ * @param delay instructs how long (in second) a ServerActivator
+ * should wait for a newly spawned ComponentServer to pass back
+ * its IOR.
+ *
+ * @param installation_ior A null-terminated char * string
+ * pointing to the stringified IOR of a ComponentInstallation that
+ * ComponentServer can use to location component implementation DLL.
+ *
+ * @param default_svcconf A null-terminated char * string pointing
+ * to the pathname of the default svcconf file a ComponentServer
+ * should use (specified using -ORBSvcConfFile) if no hint is given.
+ *
+ * @param svcconf_map_file A null-terminated char * string
+ * pointing to the pathname of a (hint, svcconf pathname) map.
+ */
+ int init (const char *server_location,
+ CORBA::ULong delay,
+ const char *installation_ior,
+ const char *default_svcconf,
+ const char *svcconf_map_file,
+ const char *extra_cmdline_flags
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// Components::Deployment::ServerActivator defined attributes/operations.
+
+ virtual Components::Deployment::ComponentServer_ptr
+ create_component_server (const Components::ConfigValues & config
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CreateFailure,
+ Components::InvalidConfiguration));
+
+ virtual void remove_component_server (Components::Deployment::ComponentServer_ptr server
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::RemoveFailure));
+
+ virtual Components::Deployment::ComponentServers *
+ get_component_servers (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// Return the cached ServerActivator object reference. Do not
+ /// release this object reference, or put it into an var.
+ Components::Deployment::ServerActivator_ptr
+ _ciao_get_objref (void);
+
+ const char *_ciao_get_ior (void);
+
+ protected:
+ /**
+ * Contains the information extracted from
+ * create_component_server's ConfigValue argument that
+ * ServerActivation cares.
+ */
+ typedef struct CS_config
+ {
+ // ConfigValue::name: CIAO-svcconf-id
+ CORBA::String_var svcconf_hint_;
+
+ // ConfigValue::Name: CIAO-rtcad-filename
+ CORBA::String_var rtcad_filename_;
+ } CompServ_Config_Info;
+
+ /**
+ * Initialize svc_conf_map_ with the supplied filename.
+ */
+ int init_svcconf_map (const char *map_file);
+
+ /**
+ * Returns the pathname to the effective svc.conf file based on
+ * "hint." It may return the default svc.conf file when there's
+ * no hint (hint == 0) and we do have a default svc.conf path.
+ */
+ const char *lookup_svcconf_pathname (const char *hint) const;
+
+ /**
+ * Parse the ConfigValue arguement of the function
+ * create_component_server and extractg the information into
+ */
+ void parse_config_value (const Components::ConfigValues &options,
+ CompServ_Config_Info &config_info
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::InvalidConfiguration));
+
+
+ protected:
+ /// location of the ComponentServer.
+ CORBA::String_var server_path_;
+
+ /// Keep a pointer to the managing ORB serving this servant.
+ CORBA::ORB_var orb_;
+
+ /// Keep a pointer to the managing POA.
+ PortableServer::POA_var poa_;
+
+ /// Child poa that uses active object map.
+ PortableServer::POA_var callback_poa_;
+
+ /// Cached the IOR string to ComponentInstallation Interface
+ CORBA::String_var installation_ior_;
+
+ /// Specify the time in second ServerActivator will wait for a
+ /// child ComponentServer to callback. Default is 5 second.
+ CORBA::ULong spawn_delay_;
+
+ /// Cache a object reference to this servant.
+ Components::Deployment::ServerActivator_var objref_;
+
+ /// Cache the ior of the previous reference
+ CORBA::String_var ior_;
+
+ /// Synchronize access to the object set.
+ TAO_SYNCH_MUTEX lock_;
+
+ /// Default svc.conf filename.
+ ACE_CString default_svcconf_file_;
+
+ /// Extra command line flags
+ ACE_CString extra_flags_;
+
+ typedef ACE_Hash_Map_Manager_Ex<ACE_CString,
+ ACE_CString,
+ ACE_Hash<ACE_CString>,
+ ACE_Equal_To<ACE_CString>,
+ ACE_Null_Mutex> SVCCONF_MAP;
+
+ /// Map of (canonical svc.conf id, svc.conf) mapping
+ SVCCONF_MAP svc_conf_map_;
+
+ /// Keep a list of managed ComponentServer objects.
+ Object_Set<Components::Deployment::ComponentServer, Components::Deployment::ComponentServer_var> cs_set_;
+ };
+}
+
+#if defined (__ACE_INLINE__)
+# include "ServerActivator_Impl.inl"
+#endif /* __ACE_INLINE__ */
+
+#include /**/ "ace/post.h"
+#endif /* CIAO_SERVERACTIVATOR_IMPL_H */
diff --git a/TAO/CIAO/ciao/StandardConfigurator_Impl.h b/TAO/CIAO/ciao/StandardConfigurator_Impl.h
new file mode 100644
index 00000000000..99e8e6bd892
--- /dev/null
+++ b/TAO/CIAO/ciao/StandardConfigurator_Impl.h
@@ -0,0 +1,79 @@
+// -*- C++ -*-
+
+//=============================================================================
+/**
+ * @file StandardConfigurator_Impl.h
+ *
+ * $Id$:StandardConfigurator_Impl.h,v 1.0 2004/08/12 20:00:00 jules
+ *
+ * This file contains implementation for the servant of
+ * Components::StandardConfigurator interface.
+ *
+ * @author Jules White <jules@dre.vanderbilt.edu>
+ */
+//=============================================================================
+
+
+#ifndef CIAO_STANDARDCONFIGURATOR_IMPL_H
+#define CIAO_STANDARDCONFIGURATOR_IMPL_H
+# include /**/ "ace/pre.h"
+
+#include "CCM_ComponentS.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "CIAO_Server_Export.h"
+#include "Servant_Impl_Base.h"
+
+namespace CIAO
+{
+
+
+ /**
+ * @class StandardConfigurator_Impl
+ *
+ * @brief Servant implementation for Components::StandardConfigurator
+ *
+ * This class implements the Components::StandardConfigurator
+ * interface as defined by the CCM spcification. This class aids
+ * in setting the initial values of component attributes that are
+ * defined in the meta data.
+ */
+ class CIAO_SERVER_Export StandardConfigurator_Impl
+ : public virtual POA_Components::StandardConfigurator,
+ public virtual PortableServer::RefCountServantBase
+ {
+ public:
+ /// Constructor
+ StandardConfigurator_Impl (Servant_Impl_Base* toconfigure);
+
+ /// Destructor
+ virtual ~StandardConfigurator_Impl (void);
+
+
+ /// This method will call set_attributes on the component that is
+ /// being configured, i.e, the template method from
+ /// StandardConfigurator interface.
+ virtual void set_configuration (
+ const Components::ConfigValues & descr
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ void configure (
+ Components::CCMObject_ptr comp
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::WrongComponentType));
+
+ private:
+ /// The component whose attributes are going to be configured via
+ /// set_attributes
+ Servant_Impl_Base* component_;
+ };
+
+}
+
+#include /**/ "ace/post.h"
+#endif /* CIAO_STANDARDCONFIGURATOR_IMPL_H */
diff --git a/TAO/CIAO/ciao/Version.h b/TAO/CIAO/ciao/Version.h
new file mode 100644
index 00000000000..07555ab0b41
--- /dev/null
+++ b/TAO/CIAO/ciao/Version.h
@@ -0,0 +1,7 @@
+// $Id$
+// This is an automatically generated file.
+
+#define CIAO_MAJOR_VERSION 0
+#define CIAO_MINOR_VERSION 4
+#define CIAO_BETA_VERSION 4
+#define CIAO_VERSION "0.4.4"
diff --git a/TAO/CIAO/docs/schema/Modified_Deployment.xsd b/TAO/CIAO/docs/schema/Modified_Deployment.xsd
new file mode 100644
index 00000000000..2e960712a9f
--- /dev/null
+++ b/TAO/CIAO/docs/schema/Modified_Deployment.xsd
@@ -0,0 +1,790 @@
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.w3.org/2001/XMLSchema XMLSchema.xsd"
+ xmlns:Deployment="http://www.omg.org/Deployment"
+ targetNamespace="http://www.omg.org/Deployment">
+
+
+ <xsd:simpleType name="TCKind">
+ <xsd:restriction base="xsd:NCName">
+ <xsd:enumeration value="tk_null"/>
+ <xsd:enumeration value="tk_void"/>
+ <xsd:enumeration value="tk_short"/>
+ <xsd:enumeration value="tk_long"/>
+ <xsd:enumeration value="tk_ushort"/>
+ <xsd:enumeration value="tk_ulong"/>
+ <xsd:enumeration value="tk_float"/>
+ <xsd:enumeration value="tk_double"/>
+ <xsd:enumeration value="tk_boolean"/>
+ <xsd:enumeration value="tk_char"/>
+ <xsd:enumeration value="tk_octet"/>
+ <xsd:enumeration value="tk_any"/>
+ <xsd:enumeration value="tk_TypeCode"/>
+ <xsd:enumeration value="tk_Principal"/>
+ <xsd:enumeration value="tk_objref"/>
+ <xsd:enumeration value="tk_struct"/>
+ <xsd:enumeration value="tk_union"/>
+ <xsd:enumeration value="tk_enum"/>
+ <xsd:enumeration value="tk_string"/>
+ <xsd:enumeration value="tk_sequence"/>
+ <xsd:enumeration value="tk_array"/>
+ <xsd:enumeration value="tk_alias"/>
+ <xsd:enumeration value="tk_except"/>
+ <xsd:enumeration value="tk_longlong"/>
+ <xsd:enumeration value="tk_ulonglong"/>
+ <xsd:enumeration value="tk_longdouble"/>
+ <xsd:enumeration value="tk_wchar"/>
+ <xsd:enumeration value="tk_wstring"/>
+ <xsd:enumeration value="tk_wfixed"/>
+ <xsd:enumeration value="tk_value"/>
+ <xsd:enumeration value="tk_value_box"/>
+ <xsd:enumeration value="tk_native"/>
+ <xsd:enumeration value="tk_abstract_interface"/>
+ <xsd:enumeration value="tk_local_interface"/>
+ <xsd:enumeration value="tk_component"/>
+ <xsd:enumeration value="tk_home"/>
+ <xsd:enumeration value="tk_event"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:complexType name="DataType">
+ <xsd:choice>
+ <xsd:element name="kind" type="Deployment:TCKind"/>
+<!--
+@@ not used, what for?
+
+ <xsd:element name="enum" type="Deployment:EnumType"/>
+ <xsd:element name="objref" type="Deployment:ObjrefType"/>
+ <xsd:element name="boundedString" type="Deployment:BoundedStringType"/>
+ <xsd:element name="fixed" type="Deployment:FixedType"/>
+ <xsd:element name="array" type="Deployment:ArrayType"/>
+ <xsd:element name="sequence" type="Deployment:SequenceType"/>
+ <xsd:element name="alias" type="Deployment:AliasType"/>
+ <xsd:element name="struct" type="Deployment:StructType"/>
+ <xsd:element name="value" type="Deployment:ValueType"/>
+ <xsd:element name="union" type="Deployment:UnionType"/>
+-->
+ </xsd:choice>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="DataValue">
+ <xsd:choice>
+ <xsd:element name="short" type="xsd:short"/>
+ <xsd:element name="long" type="xsd:int"/>
+ <xsd:element name="ushort" type="xsd:unsignedShort"/>
+ <xsd:element name="ulong" type="xsd:unsignedInt"/>
+ <xsd:element name="float" type="xsd:float"/>
+ <xsd:element name="double" type="xsd:double"/>
+ <xsd:element name="boolean" type="xsd:boolean"/>
+ <xsd:element name="octet" type="xsd:unsignedByte"/>
+ <!-- xsd:element name="opaque" type="xsd:base64Binary"/ -->
+ <xsd:element name="objref" type="xsd:string"/>
+ <xsd:element name="enum" type="xsd:string"/>
+ <xsd:element name="string" type="xsd:string"/>
+ <xsd:element name="longlong" type="xsd:long"/>
+ <xsd:element name="ulonglong" type="xsd:unsignedLong"/>
+ <xsd:element name="longdouble" type="xsd:double"/>
+ <xsd:element name="fixed" type="xsd:string"/>
+
+<!--
+@@ recursive
+ <xsd:element name="any" type="Deployment:Any"/>
+-->
+
+ <xsd:element name="typecode" type="Deployment:DataType"/>
+
+<!--
+@@ recursive
+ <xsd:element name="element" type="Deployment:DataValue"/>
+ <xsd:element name="discriminator" type="Deployment:DataValue"/>
+ <xsd:element name="value" type="Deployment:DataValue"/>
+ <xsd:element name="boxedValue" type="Deployment:DataValue"/>
+ <xsd:element name="member" type="Deployment:NamedValue"/>
+-->
+ </xsd:choice>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="Any">
+ <xsd:sequence>
+ <xsd:element name="type" type="Deployment:DataType"/>
+ <xsd:element name="value" type="Deployment:DataValue"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="Property">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="value" type="Deployment:Any"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+<!-- End of base definitions. -->
+
+ <xsd:complexType name="Node">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="label" type="xsd:string"/>
+<!--
+@@ recursive, not used
+ <xsd:element name="connection" type="Deployment:Interconnect"/>
+ <xsd:element name="sharedResource" type="Deployment:SharedResource"/>
+ <xsd:element name="resource" type="Deployment:Resource"/>
+-->
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:simpleType name="SatisfierPropertyKind">
+ <xsd:restriction base="xsd:NCName">
+ <xsd:enumeration value="Quantity"/>
+ <xsd:enumeration value="Capacity"/>
+ <xsd:enumeration value="Minimum"/>
+ <xsd:enumeration value="Maximum"/>
+ <xsd:enumeration value="Attribute"/>
+ <xsd:enumeration value="Selection"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+
+ <xsd:complexType name="SatisfierProperty">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="kind" type="Deployment:SatisfierPropertyKind"/>
+ <xsd:element name="value" type="Deployment:Any"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="Resource">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="resourceType" type="xsd:string"/>
+ <xsd:element name="property" type="Deployment:SatisfierProperty"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="SharedResource">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="resourceType" type="xsd:string"/>
+ <xsd:element name="node" type="Deployment:Node"/>
+ <xsd:element name="property" type="Deployment:SatisfierProperty"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="Domain">
+ <xsd:sequence>
+ <xsd:element name="label" type="xsd:string"/>
+ <xsd:element name="UUID" type="xsd:string"/>
+ <xsd:element name="sharedResource" type="Deployment:SharedResource" minOccurs="0"/>
+ <xsd:element name="node" type="Deployment:Node" maxOccurs="unbounded"/>
+<!--
+@@ recursive, not used
+ <xsd:element name="interconnect" type="Deployment:Interconnect"/>
+ <xsd:element name="bridge" type="Deployment:Bridge"/>
+-->
+ <xsd:element name="infoProperty" type="Deployment:Property" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="Requirement">
+ <xsd:sequence>
+ <xsd:element name="resourceType" type="xsd:string"/>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="property" type="Deployment:Property"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+<!-- Deployment -->
+
+ <xsd:complexType name="ResourceDeploymentDescription">
+ <xsd:sequence>
+ <xsd:element name="requirementName" type="xsd:string"/>
+ <xsd:element name="resourceName" type="xsd:string"/>
+ <xsd:element name="resourceValue" type="Deployment:Any"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="ArtifactDeploymentDescription">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="source" type="xsd:string"/>
+ <xsd:element name="node" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="location" type="xsd:string" maxOccurs="unbounded"/>
+ <xsd:element name="execParameter" type="Deployment:Property" minOccurs="0"/>
+ <xsd:element name="deployRequirement" type="Deployment:Requirement" minOccurs="0"/>
+ <xsd:element name="deployedResource" type="Deployment:ResourceDeploymentDescription" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="MonolithicDeploymentDescription">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="source" type="xsd:string"/>
+ <xsd:element name="artifact" type="xsd:IDREF" maxOccurs="unbounded"/> <!-- ArtifactDeploymentDescription -->
+ <xsd:element name="execParameter" type="Deployment:Property" minOccurs="0"/>
+ <xsd:element name="deployRequirement" type="Deployment:Requirement" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <xsd:simpleType name="ResourceUsageKind">
+ <xsd:restriction base="xsd:NCName">
+ <xsd:enumeration value="None"/>
+ <xsd:enumeration value="InstanceUsesResource"/>
+ <xsd:enumeration value="ResourceUsesInstance"/>
+ <xsd:enumeration value="PortUsesResource"/>
+ <xsd:enumeration value="ResourceUsesPort"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+
+ <xsd:complexType name="InstanceResourceDeploymentDescription">
+ <xsd:sequence>
+ <xsd:element name="resourceUsage" type="Deployment:ResourceUsageKind"/>
+ <xsd:element name="requirementName" type="xsd:string"/>
+ <xsd:element name="resourceName" type="xsd:string"/>
+ <xsd:element name="resourceValue" type="Deployment:Any"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="InstanceDeploymentDescription">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="node" type="xsd:string"/>
+ <xsd:element name="source" type="xsd:string"/>
+ <xsd:element name="implementation" type="xsd:IDREF"/> <!-- MonolithicDeploymentDescription -->
+ <xsd:element name="configProperty" type="Deployment:Property" minOccurs="0"/>
+ <xsd:element name="deployedResource" type="Deployment:InstanceResourceDeploymentDescription" minOccurs="0"/>
+ <xsd:element name="deployedSharedResource" type="Deployment:InstanceResourceDeploymentDescription" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <xsd:simpleType name="CCMComponentPortKind">
+ <xsd:restriction base="xsd:NCName">
+ <xsd:enumeration value="Facet"/>
+ <xsd:enumeration value="SimplexReceptacle"/>
+ <xsd:enumeration value="MultiplexReceptacle"/>
+ <xsd:enumeration value="EventEmitter"/>
+ <xsd:enumeration value="EventPublisher"/>
+ <xsd:enumeration value="EventConsumer"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+
+ <xsd:complexType name="ComponentPortDescription">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="specificType" type="xsd:string"/>
+ <xsd:element name="supportedType" type="xsd:string"/>
+ <xsd:element name="provider" type="xsd:string"/>
+ <xsd:element name="exclusiveProvider" type="xsd:string"/>
+ <xsd:element name="exclusiveUser" type="xsd:string"/>
+ <xsd:element name="optional" type="xsd:string"/>
+ <xsd:element name="kind" type="Deployment:CCMComponentPortKind"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="ComponentPropertyDescription">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="type" type="Deployment:DataType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="ComponentInterfaceDescription">
+ <xsd:choice>
+ <xsd:sequence>
+ <xsd:element name="label" type="xsd:string"/>
+ <xsd:element name="UUID" type="xsd:string"/>
+ <xsd:element name="specificType" type="xsd:string"/>
+ <xsd:element name="supportedType" type="xsd:string" maxOccurs="unbounded" />
+ <xsd:element name="idlFile" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="configProperty" type="Deployment:Property" minOccurs="0"/>
+ <xsd:element name="port" type="Deployment:ComponentPortDescription" maxOccurs="unbounded"/>
+ <xsd:element name="property" type="Deployment:ComponentPropertyDescription" minOccurs="0"/>
+ <xsd:element name="infoProperty" type="Deployment:Property" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:element name="contentLocation" type="xsd:string"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="ComponentExternalPortEndpoint">
+ <xsd:sequence>
+ <xsd:element name="portName" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="PlanSubcomponentPortEndpoint">
+ <xsd:sequence>
+ <xsd:element name="portName" type="xsd:string"/>
+ <xsd:element name="provider" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="kind" type="Deployment:CCMComponentPortKind"/>
+ <xsd:element name="instance" type="xsd:IDREF"/> <!-- InstanceDeploymentDescription -->
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="ExternalReferenceEndpoint">
+ <xsd:sequence>
+ <xsd:element name="location" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="ConnectionResourceDeploymentDescription">
+ <xsd:sequence>
+ <xsd:element name="targetName" type="xsd:string"/>
+ <xsd:element name="requirementName" type="xsd:string"/>
+ <xsd:element name="resourceName" type="xsd:string"/>
+ <xsd:element name="resourceValue" type="Deployment:Any"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="PlanConnectionDescription">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="source" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="deployRequirement" type="Deployment:Requirement" minOccurs="0"/>
+ <xsd:element name="externalEndpoint" type="Deployment:ComponentExternalPortEndpoint" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="internalEndpoint" type="Deployment:PlanSubcomponentPortEndpoint" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="externalReference" type="Deployment:ExternalReferenceEndpoint" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="deployedResource" type="Deployment:ConnectionResourceDeploymentDescription" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="ImplementationDependency">
+ <xsd:sequence>
+ <xsd:element name="requiredType" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="DeploymentPlan">
+ <xsd:sequence>
+ <xsd:element name="label" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="UUID" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="realizes" type="Deployment:ComponentInterfaceDescription" />
+ <xsd:element name="implementation" type="Deployment:MonolithicDeploymentDescription" maxOccurs="unbounded" />
+ <xsd:element name="instance" type="Deployment:InstanceDeploymentDescription" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="connection" type="Deployment:PlanConnectionDescription" minOccurs="0" maxOccurs="unbounded"/>
+ <!-- potentially recursive, not used
+ <xsd:element name="externalProperty" type="Deployment:PlanPropertyMapping"/>
+ -->
+ <xsd:element name="dependsOn" type="Deployment:ImplementationDependency" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="artifact" type="Deployment:ArtifactDeploymentDescription" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="infoProperty" type="Deployment:Property" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+
+
+<!-- Implementation -->
+
+
+ <xsd:complexType name="Capability">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="resourceType" type="xsd:string"/>
+ <xsd:element name="property" type="Deployment:SatisfierProperty"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="NamedImplementationArtifact">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <!-- @@ recursive NIA->IAD->NIA -->
+ <xsd:element name="referencedArtifact" type="Deployment:ImplementationArtifactDescription"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="ImplementationArtifactDescription">
+ <xsd:choice>
+ <xsd:sequence>
+ <xsd:element name="label" type="xsd:string"/>
+ <xsd:element name="UUID" type="xsd:string"/>
+
+ <!-- @@ There probably should be only one location? -->
+ <xsd:element name="location" type="xsd:string" maxOccurs="unbounded"/>
+ <xsd:element name="execParameter" type="Deployment:Property" minOccurs="0"/>
+ <xsd:element name="deployRequirement" type="Deployment:Requirement" minOccurs="0"/>
+ <xsd:element name="dependsOn" type="Deployment:NamedImplementationArtifact" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="infoProperty" type="Deployment:Property" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:element name="contentLocation" type="xsd:string"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="ImplementationRequirement">
+ <xsd:sequence>
+ <xsd:element name="resourceUsage" type="Deployment:ResourceUsageKind"/>
+ <xsd:element name="resourcePort" type="xsd:string"/>
+ <xsd:element name="componentPort" type="xsd:string"/>
+ <xsd:element name="resourceType" type="xsd:string"/>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="property" type="Deployment:Property"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="MonolithicImplementationDescription">
+ <xsd:sequence>
+ <xsd:element name="execParameter" type="Deployment:Property" minOccurs="0"/>
+ <xsd:element name="primaryArtifact" type="Deployment:NamedImplementationArtifact" maxOccurs="unbounded"/>
+ <xsd:element name="deployRequirement" type="Deployment:ImplementationRequirement" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="PackagedComponentImplementation">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <!-- @@ recursive CPD->PCI->CID->CAD->SID->CPD -->
+ <xsd:element name="referencedImplementation" type="Deployment:ComponentImplementationDescription"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="ComponentPackageDescription">
+ <xsd:choice>
+ <xsd:sequence>
+ <xsd:element name="label" type="xsd:string"/>
+ <xsd:element name="UUID" type="xsd:string"/>
+ <xsd:element name="realizes" type="Deployment:ComponentInterfaceDescription" minOccurs="0"/>
+ <xsd:element name="configProperty" type="Deployment:Property" minOccurs="0"/>
+ <xsd:element name="implementation" type="Deployment:PackagedComponentImplementation"/>
+ <xsd:element name="infoProperty" type="Deployment:Property" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:element name="contentLocation" type="xsd:string"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="ComponentPackageReference">
+ <xsd:sequence>
+ <xsd:element name="requiredUUID" type="xsd:string"/>
+ <xsd:element name="requiredName" type="xsd:string"/>
+ <xsd:element name="requiredType" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="SubcomponentInstantiationDescription">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="package" type="Deployment:ComponentPackageDescription"/>
+ <xsd:element name="configProperty" type="Deployment:Property" minOccurs="0"/>
+ <xsd:element name="selectRequirement" type="Deployment:Requirement" minOccurs="0"/>
+ <xsd:element name="reference" type="Deployment:ComponentPackageReference" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="SubcomponentPortEndpoint">
+ <xsd:sequence>
+ <xsd:element name="portName" type="xsd:string"/>
+ <xsd:element name="instance" type="xsd:IDREF"/> <!-- SubcomponentInstantiationDescription -->
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="AssemblyConnectionDescription">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="deployRequirement" type="Deployment:Requirement" minOccurs="0"/>
+ <xsd:element name="externalEndpoint" type="Deployment:ComponentExternalPortEndpoint" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="internalEndpoint" type="Deployment:SubcomponentPortEndpoint" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="externalReference" type="Deployment:ExternalReferenceEndpoint" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="SubcomponentPropertyReference">
+ <xsd:sequence>
+ <xsd:element name="propertyName" type="xsd:string"/>
+ <xsd:element name="instance" type="Deployment:SubcomponentInstantiationDescription"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="AssemblyPropertyMapping">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="externalName" type="xsd:string"/>
+ <xsd:element name="delegatesTo" type="Deployment:SubcomponentPropertyReference"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="ComponentAssemblyDescription">
+ <xsd:sequence>
+ <xsd:element name="instance" type="Deployment:SubcomponentInstantiationDescription" maxOccurs="unbounded"/>
+ <xsd:element name="connection" type="Deployment:AssemblyConnectionDescription" maxOccurs="unbounded"/>
+ <xsd:element name="externalProperty" type="Deployment:AssemblyPropertyMapping" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="ComponentImplementationDescription">
+ <xsd:choice>
+ <xsd:sequence>
+ <xsd:element name="label" type="xsd:string"/>
+ <xsd:element name="UUID" type="xsd:string"/>
+ <xsd:element name="implements" type="Deployment:ComponentInterfaceDescription" minOccurs="0"/>
+ <xsd:choice>
+ <xsd:element name="assemblyImpl" type="Deployment:ComponentAssemblyDescription"/>
+ <xsd:element name="monolithicImpl" type="Deployment:MonolithicImplementationDescription"/>
+ </xsd:choice>
+ <xsd:element name="configProperty" type="Deployment:Property" minOccurs="0"/>
+ <xsd:element name="capability" type="Deployment:Capability" minOccurs="0"/>
+ <xsd:element name="dependsOn" type="Deployment:ImplementationDependency" minOccurs="0"/>
+ <xsd:element name="infoProperty" type="Deployment:Property" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:element name="contentLocation" type="xsd:string"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+
+<!-- Package -->
+
+
+ <xsd:complexType name="PackageConfiguration">
+ <xsd:choice>
+ <xsd:sequence>
+ <xsd:element name="label" type="xsd:string"/>
+ <xsd:element name="UUID" type="xsd:string"/>
+<!--
+@@ recursive, not used
+ <xsd:element name="specializedConfig" type="Deployment:PackageConfiguration"/>
+-->
+
+ <xsd:element name="basePackage" type="Deployment:ComponentPackageDescription"/>
+ <xsd:element name="reference" type="Deployment:ComponentPackageReference" minOccurs="0"/>
+ <xsd:element name="selectRequirement" type="Deployment:Requirement" minOccurs="0"/>
+ <xsd:element name="configProperty" type="Deployment:Property" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:element name="contentLocation" type="xsd:string"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="TopLevelPackageDescription">
+ <xsd:sequence>
+ <xsd:element name="package" type="Deployment:PackageConfiguration" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+<!-- Top-level elements. -->
+
+
+ <xsd:element name="domain" type="Deployment:Domain"/>
+ <xsd:element name="deploymentPlan" type="Deployment:DeploymentPlan"/>
+ <xsd:element name="implementationArtifactDescription" type="Deployment:ImplementationArtifactDescription" />
+ <xsd:element name="componentInterfaceDescription" type="Deployment:ComponentInterfaceDescription"/>
+ <xsd:element name="componentImplementationDescription" type="Deployment:ComponentImplementationDescription"/>
+ <xsd:element name="componentPackageDescription" type="Deployment:ComponentPackageDescription"/>
+ <xsd:element name="packageConfiguration" type="Deployment:PackageConfiguration"/>
+ <xsd:element name="topLevelPackageDescription" type="Deployment:TopLevelPackageDescription"/>
+
+
+
+<!-- VAULT
+
+Place for strange things. Nobody knows what they are for...
+
+-->
+
+<!--
+
+ <xsd:complexType name="EnumType">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="typeId" type="xsd:string"/>
+ <xsd:element name="member" type="xsd:string" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="ObjrefType">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="typeId" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="BoundedStringType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="bound" type="xsd:string"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="FixedType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="digits" type="xsd:string"/>
+ <xsd:element name="scale" type="xsd:string"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="ArrayType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="length" type="xsd:string"/>
+ <xsd:element name="elementType" type="Deployment:DataType"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+ <xsd:complexType name="SequenceType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="bound" type="xsd:string"/>
+ <xsd:element name="elementType" type="Deployment:DataType"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+ <xsd:complexType name="AliasType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="typeId" type="xsd:string"/>
+ <xsd:element name="elementType" type="Deployment:DataType"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+ <xsd:complexType name="StructType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="typeId" type="xsd:string"/>
+ <xsd:element name="member" type="Deployment:StructMemberType"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+ <xsd:complexType name="StructMemberType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="type" type="Deployment:DataType"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+ <xsd:complexType name="ValueType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="typeId" type="xsd:string"/>
+ <xsd:element name="modifier" type="xsd:string"/>
+ <xsd:element name="baseType" type="Deployment:DataType"/>
+ <xsd:element name="member" type="Deployment:ValueMemberType"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+ <xsd:complexType name="ValueMemberType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="visibility" type="xsd:string"/>
+ <xsd:element name="type" type="Deployment:DataType"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+ <xsd:complexType name="UnionType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="typeId" type="xsd:string"/>
+ <xsd:element name="default" type="Deployment:UnionMemberType"/>
+ <xsd:element name="discriminatorType" type="Deployment:DataType"/>
+ <xsd:element name="member" type="Deployment:UnionMemberType"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+ <xsd:complexType name="UnionMemberType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="type" type="Deployment:DataType"/>
+ <xsd:element name="label" type="Deployment:DataValue"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="NamedValue">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="value" type="Deployment:DataValue"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="Bridge">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="label" type="xsd:string"/>
+ <xsd:element name="connect" type="Deployment:Interconnect"/>
+ <xsd:element name="resource" type="Deployment:Resource"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="Interconnect">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="label" type="xsd:string"/>
+ <xsd:element name="connection" type="Deployment:Bridge"/>
+ <xsd:element name="connect" type="Deployment:Node"/>
+ <xsd:element name="resource" type="Deployment:Resource"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+ <xsd:complexType name="PlanPropertyMapping">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="source" type="xsd:string"/>
+ <xsd:element name="externalName" type="xsd:string"/>
+ <xsd:element name="delegatesTo" type="Deployment:PlanSubcomponentPropertyReference"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="PlanSubcomponentPropertyReference">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="propertyName" type="xsd:string"/>
+ <xsd:element name="instance" type="Deployment:InstanceDeploymentDescription"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+-->
+
+<!--
+
+ This type is not referenced anywhere.
+
+ <xsd:complexType name="RequirementSatisfier">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="resourceType" type="xsd:string"/>
+ <xsd:element name="property" type="Deployment:SatisfierProperty"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+-->
+
+</xsd:schema>
diff --git a/TAO/CIAO/docs/tutorial/Hello/hello_exec.cpp b/TAO/CIAO/docs/tutorial/Hello/hello_exec.cpp
new file mode 100644
index 00000000000..6a43ad843d8
--- /dev/null
+++ b/TAO/CIAO/docs/tutorial/Hello/hello_exec.cpp
@@ -0,0 +1,114 @@
+// $Id$
+
+#include "hello_exec.h"
+
+#include "ace/OS_NS_string.h"
+
+
+hello_example::HelloWorld_Impl::HelloWorld_Impl ()
+{
+}
+
+hello_example::HelloWorld_Impl::~HelloWorld_Impl ()
+{
+}
+
+char *
+hello_example::HelloWorld_Impl::sayhello (const char *username
+ ACE_ENV_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ static const char *fmt = "Hello World message for ";
+
+ CORBA::String_var str =
+ CORBA::string_alloc (ACE_OS::strlen (fmt) +
+ ACE_OS::strlen (username) +
+ 1);
+
+ ACE_OS::strcpy (str.inout (), fmt);
+ ACE_OS::strcat (str.inout (), username);
+
+ return str._retn ();
+}
+
+
+void
+hello_example::HelloWorld_Impl::set_session_context (
+ Components::SessionContext_ptr ctx
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ ACE_DEBUG ((LM_DEBUG,
+ "hello_example::HelloWorld_Impl::set_session_context\n"));
+
+ this->context_ =
+ hello_example::HelloWorld_Exec_Context::_narrow (ctx
+ ACE_ENV_ARG_PARAMETER);
+
+ ACE_CHECK;
+
+ if (CORBA::is_nil (this->context_.in ()))
+ ACE_THROW (CORBA::INTERNAL ());
+ // Urm, we actually discard exceptions thown from this operation.
+}
+
+void
+hello_example::HelloWorld_Impl::ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+}
+
+void
+hello_example::HelloWorld_Impl::ccm_activate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+}
+
+void
+hello_example::HelloWorld_Impl::ciao_postactivate (
+ ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+}
+
+void
+hello_example::HelloWorld_Impl::ccm_passivate (
+ ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+}
+
+void
+hello_example::HelloWorld_Impl::ccm_remove (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+}
+
+
+hello_example::HelloHome_Impl::HelloHome_Impl ()
+{
+}
+
+hello_example::HelloHome_Impl::~HelloHome_Impl ()
+{
+}
+
+Components::EnterpriseComponent_ptr
+hello_example::HelloHome_Impl::create (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((Components::CCMException,
+ CORBA::SystemException))
+{
+ return new hello_example::HelloWorld_Impl ();
+}
+
+extern "C" HELLO_EXEC_Export ::Components::HomeExecutorBase_ptr
+createHelloHome_Impl (void)
+{
+ return new hello_example::HelloHome_Impl ();
+}
diff --git a/TAO/CIAO/examples/Hello/Hello_Base/Hello_Base.idl b/TAO/CIAO/examples/Hello/Hello_Base/Hello_Base.idl
new file mode 100644
index 00000000000..d82a23b6c8d
--- /dev/null
+++ b/TAO/CIAO/examples/Hello/Hello_Base/Hello_Base.idl
@@ -0,0 +1,26 @@
+//$Id$:
+/**
+ * @file Hello_Base.idl
+ * Definition of common interfaces used by the Hello example
+ *
+ * @auther Tao Lu <lu@dre.vanderbilt.edu>
+ */
+
+#ifndef HELLO_IDL
+#define HELLO_IDL
+
+#include <Components.idl>
+
+module Hello
+{
+ interface message
+ {
+ string get_message ();
+ };
+
+ eventtype timeout
+ {
+ };
+};
+
+#endif /* HELLO_IDL */
diff --git a/TAO/CIAO/examples/Hello/Hello_Base/Hello_Base.mpc b/TAO/CIAO/examples/Hello/Hello_Base/Hello_Base.mpc
new file mode 100644
index 00000000000..76832e2de5b
--- /dev/null
+++ b/TAO/CIAO/examples/Hello/Hello_Base/Hello_Base.mpc
@@ -0,0 +1,66 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -n Hello_Base"
+
+project(Hello_Base_stub): ciao_client {
+
+ sharedname = Hello_Base_stub
+ idlflags += -Sc \
+ -Wb,stub_export_macro=HELLO_BASE_STUB_Export \
+ -Wb,stub_export_include=Hello_Base_stub_export.h \
+ -Wb,skel_export_macro=HELLO_BASE_SVNT_Export \
+ -Wb,skel_export_include=Hello_Base_svnt_export.h
+ dynamicflags = HELLO_BASE_STUB_BUILD_DLL
+
+ IDL_Files {
+ Hello_Base.idl
+ }
+
+ Source_Files {
+ Hello_BaseC.cpp
+ }
+
+ Header_Files {
+ Hello_BaseC.h
+ Hello_Base_stub_export.h
+ }
+
+ Inline_Files {
+ Hello_BaseC.inl
+ }
+
+ Template_Files {
+ }
+}
+
+project(Hello_Base_svnt) : ciao_server {
+ after += Hello_Base_stub
+ sharedname = Hello_Base_svnt
+ libs += Hello_Base_stub
+
+ idlflags += -Sc \
+ -Wb,stub_export_macro=HELLO_BASE_STUB_Export \
+ -Wb,stub_export_include=Hello_Base_stub_export.h \
+ -Wb,skel_export_macro=HELLO_BASE_SVNT_Export \
+ -Wb,skel_export_include=Hello_Base_svnt_export.h
+ dynamicflags = HELLO_BASE_SVNT_BUILD_DLL
+
+ IDL_Files {
+ Hello_Base.idl
+ }
+
+ Source_Files {
+ Hello_BaseS.cpp
+ }
+
+ Header_Files {
+ Hello_BaseS.h
+ Hello_Base_svnt_export.h
+ }
+
+ Inline_Files {
+ Hello_BaseS.inl
+ }
+
+ Template_Files {
+ }
+}
diff --git a/TAO/CIAO/examples/Hello/Receiver/Receiver.idl b/TAO/CIAO/examples/Hello/Receiver/Receiver.idl
new file mode 100644
index 00000000000..e5e1e02607a
--- /dev/null
+++ b/TAO/CIAO/examples/Hello/Receiver/Receiver.idl
@@ -0,0 +1,30 @@
+//$Id$:
+/**
+ * @file Receiver.idl
+ *
+ * @author Tao Lu <lu@dre.vanderbilt.edu>
+ */
+
+#ifndef RECEIVER_IDL
+#define RECEIVER_IDL
+
+#include "../Hello_Base/Hello_Base.idl"
+
+module Hello
+{
+ component Receiver
+ {
+ uses message read_message;
+
+ // Not use in test, just used to test 'uses multiple'.
+ uses multiple message gather_messages;
+
+ consumes timeout click_in;
+ };
+
+ home ReceiverHome manages Receiver
+ {
+ };
+
+};
+#endif /*RECEIVER_IDL*/
diff --git a/TAO/CIAO/examples/Hello/Receiver/Receiver.mpc b/TAO/CIAO/examples/Hello/Receiver/Receiver.mpc
new file mode 100644
index 00000000000..f347716ac40
--- /dev/null
+++ b/TAO/CIAO/examples/Hello/Receiver/Receiver.mpc
@@ -0,0 +1,109 @@
+// $Id$
+// This file is generated with "generate_component_mpc_extra.pl -p Hello_Base Receiver"
+
+project(Hello_Base_Receiver_stub): ciao_client {
+ after += Hello_Base_stub
+ sharedname = Receiver_stub
+ idlflags += -Sc \
+ -Wb,stub_export_macro=RECEIVER_STUB_Export \
+ -Wb,stub_export_include=Receiver_stub_export.h \
+ -Wb,skel_export_macro=RECEIVER_SVNT_Export \
+ -Wb,skel_export_include=Receiver_svnt_export.h
+ dynamicflags = RECEIVER_STUB_BUILD_DLL
+ libs += Hello_Base_stub
+
+ IDL_Files {
+ Receiver.idl
+ }
+
+ Source_Files {
+ ReceiverC.cpp
+ }
+
+ Header_Files {
+ ReceiverC.h
+ Receiver_stub_export.h
+ }
+
+ Inline_Files {
+ ReceiverC.inl
+ }
+
+ Template_Files {
+ }
+}
+
+project(Hello_Base_Receiver_svnt) : ciao_servant {
+ after += Hello_Base_svnt \
+ Hello_Base_Receiver_stub
+ sharedname = Receiver_svnt
+ libs += Receiver_stub \
+ Hello_Base_stub \
+ Hello_Base_svnt
+
+ idlflags += -Sc \
+ -Wb,export_macro=RECEIVER_SVNT_Export \
+ -Wb,export_include=Receiver_svnt_export.h
+ dynamicflags = RECEIVER_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ Receiver.cidl
+ }
+
+ IDL_Files {
+ ReceiverE.idl
+ }
+
+ Source_Files {
+ ReceiverEC.cpp
+ ReceiverS.cpp
+ Receiver_svnt.cpp
+ }
+
+ Header_Files {
+ ReceiverEC.h
+ ReceiverS.h
+ Receiver_svnt.h
+ Receiver_svnt_export.h
+ }
+
+ Inline_Files {
+ ReceiverEC.inl
+ ReceiverS.inl
+ }
+
+ Template_Files {
+ }
+}
+
+
+project(Hello_Base_Receiver_exec) : ciao_component {
+ after += Hello_Base_Receiver_svnt
+ sharedname = Receiver_exec
+ libs += Receiver_stub \
+ Receiver_svnt \
+ Hello_Base_stub \
+ Hello_Base_svnt
+
+ idlflags += -Wb,export_macro=RECEIVER_EXEC_Export \
+ -Wb,export_include=Receiver_exec_export.h
+ dynamicflags = RECEIVER_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Receiver_exec.cpp
+ }
+
+ Header_Files {
+ Receiver_exec.h
+ Receiver_exec_export.h
+ }
+
+ Inline_Files {
+ }
+
+ Template_Files {
+ }
+}
diff --git a/TAO/CIAO/examples/Hello/Sender/New_Sender_svnt.cpp b/TAO/CIAO/examples/Hello/Sender/New_Sender_svnt.cpp
new file mode 100644
index 00000000000..aa2c2b8081c
--- /dev/null
+++ b/TAO/CIAO/examples/Hello/Sender/New_Sender_svnt.cpp
@@ -0,0 +1,352 @@
+// $Id$
+//
+// **** Code generated by the ****
+// **** Component Integrated ACE ORB (CIAO) CIDL Compiler ****
+// CIAO has been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// CIDL Compiler has been developed by:
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about CIAO is available at:
+// http://www.dre.vanderbilt.edu/CIAO
+
+#include "Sender_svnt.h"
+#include "Cookies.h"
+#include "ciao/Servant_Activator.h"
+#include "ciao/Port_Activator_T.h"
+
+namespace Sender_Impl
+{
+ namespace CIAO_GLUE_Hello
+ {
+ Sender_Context::Sender_Context (
+ ::Components::CCMHome_ptr home,
+ ::CIAO::Swapping_Container *c,
+ Sender_Servant *sv)
+ : Context_Impl_Base (home, c),
+ ctx_svnt_base (home, c, sv)
+ {
+ }
+
+ Sender_Context::~Sender_Context (void)
+ {
+ }
+
+ // Operations for Sender receptacles and event sources,
+ // defined in ::Hello::CCM_Sender_Context.
+
+ // CIAO-specific.
+
+ Sender_Context *
+ Sender_Context::_narrow (
+ ::Components::SessionContext_ptr p
+ ACE_ENV_ARG_DECL_NOT_USED)
+ {
+ return dynamic_cast<Sender_Context *> (p);
+ }
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ Sender_Servant::Sender_Servant (
+ ::Hello::CCM_Sender_ptr exe,
+ ::Components::CCMHome_ptr h,
+ ::CIAO::Swapping_Container *c)
+ : Servant_Impl_Base (c),
+ comp_svnt_base (exe, c)
+ {
+ this->context_ = new Sender_Context (h, c, this);
+
+ ACE_TRY_NEW_ENV
+ {
+ ::Components::SessionComponent_var scom =
+ ::Components::SessionComponent::_narrow (
+ exe
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (! ::CORBA::is_nil (scom.in ()))
+ {
+ scom->set_session_context (
+ this->context_
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+
+ this->populate_port_tables (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+
+ ACE_CATCHANY
+ {
+ }
+
+ ACE_ENDTRY;
+ }
+
+ Sender_Servant::~Sender_Servant (void)
+ {
+ }
+
+ void
+ Sender_Servant::set_attributes (
+ const ::Components::ConfigValues &descr
+ ACE_ENV_ARG_DECL_NOT_USED)
+ {
+ for (CORBA::ULong i = 0;
+ i < descr.length ();
+ ++i)
+ {
+ const char *descr_name = descr[i]->name ();
+ ::CORBA::Any &descr_value = descr[i]->value ();
+
+ if (ACE_OS::strcmp (descr_name, "local_message") == 0)
+ {
+ const char * _ciao_extract_val = 0;
+ descr_value >>= _ciao_extract_val;
+ this->local_message (_ciao_extract_val);
+ continue;
+ }
+
+ ACE_UNUSED_ARG (descr_name);
+ ACE_UNUSED_ARG (descr_value);
+ }
+ }
+
+ ::Components::Cookie *
+ Sender_Servant::connect (
+ const char *name,
+ ::CORBA::Object_ptr connection
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::AlreadyConnected,
+ ::Components::ExceededConnectionLimit))
+ {
+ // If the component has no receptacles, this will be unused.
+ ACE_UNUSED_ARG (connection);
+
+ if (name == 0)
+ {
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ CORBA::Object_ptr
+ Sender_Servant::disconnect (
+ const char *name,
+ ::Components::Cookie * ck
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::CookieRequired,
+ ::Components::NoConnection))
+ {
+ if (name == 0)
+ {
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::CORBA::Object::_nil ());
+ }
+
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::CORBA::Object::_nil ());
+
+ ACE_UNUSED_ARG (ck);
+ }
+
+ void
+ Sender_Servant::connect_consumer (
+ const char * emitter_name,
+ ::Components::EventConsumerBase_ptr consumer
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::AlreadyConnected,
+ ::Components::InvalidConnection))
+ {
+ if (emitter_name == 0)
+ {
+ ACE_THROW (::CORBA::BAD_PARAM ());
+ }
+
+ ACE_UNUSED_ARG (consumer);
+ ACE_THROW (::Components::InvalidName ());
+ }
+
+ ::Components::Cookie *
+ Sender_Servant::subscribe (
+ const char *publisher_name,
+ ::Components::EventConsumerBase_ptr subscribe
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::ExceededConnectionLimit))
+ {
+ // Just in case there are no if blocks
+ ACE_UNUSED_ARG (subscribe);
+
+ if (publisher_name == 0)
+ {
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ ACE_THROW_RETURN (::Components::InvalidName (), 0);
+ }
+
+ ::Components::EventConsumerBase_ptr
+ Sender_Servant::unsubscribe (
+ const char *publisher_name,
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection))
+ {
+ // Just in case there are no if blocks
+ ACE_UNUSED_ARG (ck);
+
+ if (publisher_name == 0)
+ {
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::Components::EventConsumerBase::_nil ());
+ }
+
+ ACE_THROW_RETURN (
+ ::Components::InvalidName (),
+ ::Components::EventConsumerBase::_nil ());
+ }
+
+ CORBA::Object_ptr
+ Sender_Servant::get_facet_executor (const char *name
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException))
+ {
+ if (name == 0)
+ {
+ ACE_THROW_RETURN (
+ ::CORBA::BAD_PARAM (),
+ ::CORBA::Object::_nil ());
+ }
+
+ return CORBA::Object::_nil ();
+ }
+
+ // Supported operations.
+
+ void
+ Sender_Servant::start (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ this->executor_->start (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+
+ // Component attribute operations.
+
+ char *
+ Sender_Servant::local_message (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ return this->executor_->local_message (
+ ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+
+ void
+ Sender_Servant::local_message (
+ const char * local_message
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ this->executor_->local_message (
+ local_message
+ ACE_ENV_ARG_PARAMETER);
+ }
+
+ // Private method to populate the port tables.
+ void
+ Sender_Servant::populate_port_tables (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ ::CORBA::Object_var obj_var;
+ ::Components::EventConsumerBase_var ecb_var;
+ }
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ SenderHome_Servant::SenderHome_Servant (
+ ::Hello::CCM_SenderHome_ptr exe,
+ ::CIAO::Swapping_Container *c)
+ : Swapping_Servant_Impl_Base (c),
+ home_svnt_base (exe, c)
+ {
+ }
+
+ SenderHome_Servant::~SenderHome_Servant (void)
+ {
+ }
+
+ // Home operations.
+
+ // Home supported interface operations.
+
+ // Home factory and finder operations.
+
+ // Home attribute operations.
+ }
+
+ extern "C" SENDER_SVNT_Export ::PortableServer::Servant
+ createSenderHome_Servant (
+ ::Components::HomeExecutorBase_ptr p,
+ CIAO::Swapping_Container *c
+ ACE_ENV_ARG_DECL)
+ {
+ if (p == 0)
+ {
+ return 0;
+ }
+
+ ::Hello::CCM_SenderHome_var x =
+ ::Hello::CCM_SenderHome::_narrow (
+ p
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ if (::CORBA::is_nil (x.in ()))
+ {
+ return 0;
+ }
+
+ return new
+ CIAO_GLUE_Hello::SenderHome_Servant (
+ x.in (),
+ c);
+ }
+}
+
diff --git a/TAO/CIAO/examples/Hello/Sender/New_Sender_svnt.h b/TAO/CIAO/examples/Hello/Sender/New_Sender_svnt.h
new file mode 100644
index 00000000000..2b836472b87
--- /dev/null
+++ b/TAO/CIAO/examples/Hello/Sender/New_Sender_svnt.h
@@ -0,0 +1,273 @@
+// $Id$
+//
+// **** Code generated by the ****
+// **** Component Integrated ACE ORB (CIAO) CIDL Compiler ****
+// CIAO has been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// CIDL Compiler has been developed by:
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about CIAO is available at:
+// http://www.dre.vanderbilt.edu/CIAO
+
+#ifndef CIAO_GLUE_SESSION_SENDER_SVNT_H
+#define CIAO_GLUE_SESSION_SENDER_SVNT_H
+
+#include /**/ "ace/pre.h"
+
+#include "SenderEC.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "ciao/Container_Base.h"
+#include "ciao/Swapping_Container.h"
+#include "ciao/Servant_Impl_T.h"
+#include "ciao/Context_Impl_T.h"
+#include "ciao/Home_Servant_Impl_T.h"
+#include "ciao/Swapping_Servant_Impl_T.h"
+#include "ace/Active_Map_Manager_T.h"
+
+#include "SenderS.h"
+
+namespace Sender_Impl
+{
+ namespace CIAO_GLUE_Hello
+ {
+ class Sender_Servant;
+
+ class SENDER_SVNT_Export Sender_Context
+ : public virtual CIAO::Context_Impl<
+ ::Hello::CCM_Sender_Context,
+ Sender_Servant,
+ ::Hello::Sender,
+ ::Hello::Sender_var
+ >
+ {
+ public:
+ // We will allow the servant glue code we generate to access our state.
+ friend class Sender_Servant;
+
+ /// Hack for VC6.
+ typedef CIAO::Context_Impl<
+ ::Hello::CCM_Sender_Context,
+ Sender_Servant,
+ ::Hello::Sender,
+ ::Hello::Sender_var
+ > ctx_svnt_base;
+
+ Sender_Context (
+ ::Components::CCMHome_ptr home,
+ ::CIAO::Swapping_Container *c,
+ Sender_Servant *sv);
+
+ virtual ~Sender_Context (void);
+
+ // Operations for Sender receptacles and event sources,
+ // defined in ::Hello::CCM_Sender_Context.
+
+ // CIAO-specific.
+
+ static Sender_Context *
+ _narrow (
+ ::Components::SessionContext_ptr p
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS);
+
+ protected:
+ // Methods that manage this component's connections and consumers.
+
+ protected:
+ };
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ class SENDER_SVNT_Export Sender_Servant
+ : public virtual CIAO::Servant_Impl<
+ POA_Hello::Sender,
+ ::Hello::CCM_Sender,
+ ::Hello::CCM_Sender_var,
+ Sender_Context
+ >
+ {
+ public:
+ /// Hack for VC6.
+ typedef CIAO::Servant_Impl<
+ POA_Hello::Sender,
+ ::Hello::CCM_Sender,
+ ::Hello::CCM_Sender_var,
+ Sender_Context
+ > comp_svnt_base;
+
+ Sender_Servant (
+ ::Hello::CCM_Sender_ptr executor,
+ ::Components::CCMHome_ptr home,
+ ::CIAO::Swapping_Container *c);
+
+ virtual ~Sender_Servant (void);
+
+ virtual void
+ set_attributes (
+ const ::Components::ConfigValues &descr
+ ACE_ENV_ARG_DECL);
+
+ // Supported operations.
+
+ virtual void
+ start (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+ // Public port operations.
+
+ // Component attribute operations.
+
+ virtual char *
+ local_message (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual void
+ local_message (
+ const char *
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // Operations for Receptacles interface.
+
+ virtual ::Components::Cookie *
+ connect (
+ const char *name,
+ CORBA::Object_ptr connection
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::AlreadyConnected,
+ ::Components::ExceededConnectionLimit));
+
+ virtual CORBA::Object_ptr
+ disconnect (
+ const char *name,
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::CookieRequired,
+ ::Components::NoConnection));
+
+ // Operations for Events interface.
+
+ virtual ::Components::Cookie *
+ subscribe (
+ const char *publisher_name,
+ ::Components::EventConsumerBase_ptr subscriber
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection,
+ ::Components::ExceededConnectionLimit));
+
+ virtual ::Components::EventConsumerBase_ptr
+ unsubscribe (
+ const char *publisher_name,
+ ::Components::Cookie *ck
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::InvalidConnection));
+
+ virtual void
+ connect_consumer (
+ const char *emitter_name,
+ ::Components::EventConsumerBase_ptr consumer
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException,
+ ::Components::InvalidName,
+ ::Components::AlreadyConnected,
+ ::Components::InvalidConnection));
+
+ // CIAO specific operations on the servant
+ CORBA::Object_ptr
+ get_facet_executor (const char *name
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ ::CORBA::SystemException));
+
+ private:
+
+ private:
+
+ void
+ populate_port_tables (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+ };
+ }
+
+ namespace CIAO_GLUE_Hello
+ {
+ class SENDER_SVNT_Export SenderHome_Servant
+ : public virtual CIAO::Swapping_Servant_Impl<
+ POA_Hello::SenderHome,
+ ::Hello::CCM_SenderHome,
+ ::Hello::CCM_SenderHome_var,
+ ::Hello::Sender,
+ ::Hello::Sender_var,
+ ::Hello::CCM_Sender,
+ ::Hello::CCM_Sender_var,
+ Sender_Servant
+ >
+ {
+ public:
+ /// Hack for VC6.
+ typedef CIAO::Swapping_Servant_Impl<
+ POA_Hello::SenderHome,
+ ::Hello::CCM_SenderHome,
+ ::Hello::CCM_SenderHome_var,
+ ::Hello::Sender,
+ ::Hello::Sender_var,
+ ::Hello::CCM_Sender,
+ ::Hello::CCM_Sender_var,
+ Sender_Servant
+ > home_svnt_base;
+
+ SenderHome_Servant (
+ ::Hello::CCM_SenderHome_ptr exe,
+ ::CIAO::Swapping_Container *c);
+
+ virtual ~SenderHome_Servant (void);
+
+ // Home operations.
+
+ // Home factory and finder operations.
+
+ // Attribute operations.
+ };
+
+ extern "C" SENDER_SVNT_Export ::PortableServer::Servant
+ createSenderHome_Servant (
+ ::Components::HomeExecutorBase_ptr p,
+ CIAO::Swapping_Container *c
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS);
+ }
+}
+
+#include /**/ "ace/post.h"
+
+#endif /* CIAO_GLUE_SESSION_SENDER_SVNT_H */
+
diff --git a/TAO/CIAO/examples/Hello/Sender/Sender.mpc b/TAO/CIAO/examples/Hello/Sender/Sender.mpc
new file mode 100644
index 00000000000..d9cacb770a9
--- /dev/null
+++ b/TAO/CIAO/examples/Hello/Sender/Sender.mpc
@@ -0,0 +1,131 @@
+// $Id$
+// This file is generated with "generate_component_mpc_extra.pl -p Hello_Base Sender"
+
+project(Hello_Base_Sender_stub): ciao_client {
+ after += Hello_Base_stub
+ sharedname = Sender_stub
+ idlflags += -Sc \
+ -Wb,stub_export_macro=SENDER_STUB_Export \
+ -Wb,stub_export_include=Sender_stub_export.h \
+ -Wb,skel_export_macro=SENDER_SVNT_Export \
+ -Wb,skel_export_include=Sender_svnt_export.h
+ dynamicflags = SENDER_STUB_BUILD_DLL
+ libs += Hello_Base_stub
+
+ IDL_Files {
+ Sender.idl
+ }
+
+ Source_Files {
+ SenderC.cpp
+ }
+
+ Header_Files {
+ SenderC.h
+ Sender_stub_export.h
+ }
+
+ Inline_Files {
+ SenderC.inl
+ }
+
+ Template_Files {
+ }
+}
+
+project(Hello_Base_Sender_svnt) : ciao_servant {
+ after += Hello_Base_svnt Hello_Base_Sender_stub
+ sharedname = Sender_svnt
+ libs += Sender_stub \
+ Hello_Base_stub \
+ Hello_Base_svnt
+
+ idlflags += -Sc \
+ -Wb,export_macro=SENDER_SVNT_Export \
+ -Wb,export_include=Sender_svnt_export.h
+ dynamicflags = SENDER_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ Sender.cidl
+ }
+
+ IDL_Files {
+ SenderE.idl
+ }
+
+ Source_Files {
+ SenderEC.cpp
+ SenderS.cpp
+ Sender_svnt.cpp
+ }
+
+ Header_Files {
+ SenderEC.h
+ SenderS.h
+ Sender_svnt.h
+ Sender_svnt_export.h
+ }
+
+ Inline_Files {
+ SenderEC.inl
+ SenderS.inl
+ }
+
+ Template_Files {
+ }
+}
+
+project(Hello_Base_Sender_exec) : ciao_component {
+ after += Hello_Base_Sender_svnt
+ sharedname = Sender_exec
+ libs += Sender_stub \
+ Sender_svnt \
+ Hello_Base_stub \
+ Hello_Base_svnt
+
+ idlflags += -Sc \
+ -Wb,export_macro=SENDER_EXEC_Export \
+ -Wb,export_include=Sender_exec_export.h
+ dynamicflags = SENDER_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Sender_exec.cpp
+ }
+
+ Header_Files {
+ Sender_exec.h
+ Sender_exec_export.h
+ }
+
+ Inline_Files {
+ }
+
+ Template_Files {
+ }
+}
+
+project (Hello_Starter) : ciao_client, valuetype {
+ exename = starter
+ after += Hello_Base_Sender_stub
+ libs += Sender_stub \
+ Hello_Base_stub
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ starter.cpp
+ }
+
+ Header_Files {
+ }
+
+ Inline_Files {
+ }
+
+ Template_Files {
+ }
+}
diff --git a/TAO/CIAO/examples/Hello/step-by-step.html b/TAO/CIAO/examples/Hello/step-by-step.html
new file mode 100644
index 00000000000..24560995648
--- /dev/null
+++ b/TAO/CIAO/examples/Hello/step-by-step.html
@@ -0,0 +1,156 @@
+<!--//$Id$ -->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <title>Step-By-Step of How to build a CIAO application</title>
+</head>
+
+<body
+ text = "#000000"
+ link = "#000fff"
+ vLink= "#ff0f0f"
+ aLink = "#0000ff"
+ bgColor = "#ffffff">
+
+<hr>
+<h2>Simple <a href="http://www.dre.vanderbilt.edu/CIAO">CIAO</a> tutorial</h2>
+<hr>
+<b>Note:</b>
+<li><a href="http://www.dre.vanderbilt.edu/cosmic">CoSMIC</a> tools are not used in this tutorial.</li>
+<li>This is only a <em>GENERAL</em> way of building up a CIAO application. The user could always change the process in his own way. For example: the IDL file content, the project structure etc.</li>
+<li>To download the code please refer to the CVS repository at <code>$CIAO_ROOT/examples/Hello</code>.</li>
+<li>If you just want to try the example you could jump to the <em>Make</em> then the <em>Run</em> section.</li>
+<hr>
+
+<h2>Example Description</h2>
+This Hello example is contructed in the following ways:
+<li>1. There are 2 components in the system: Sender and Receiver</li>
+<li>2. The Sender will send out the timeout event to the Receiver.</li>
+<li>3. Upon receiving the timeout event, the Receiver will go and fetch data from the Sender. </li>
+<li>4. The user could deploy multiple instances of the Receiver without changing any C++/idl source code.</li>
+<hr>
+
+<h2>Step-By-Step</h2>
+<hr>
+<ul><h3>Hello_Base</h3>
+<li>1. Write an IDL file (<code>Hello_Base.idl</code>) which contains all the interfaces and events common to all the components. The reason we do this is becuse the generated lib of this idl file will be linked in by all the components in the system. To reduce the size of the component lib we have to include only the necesary part. In this example, we have an eventtype <code>timeout</code> and an interface <code>ReadMessage</code>, which are used by both the Sender and the Receiver, so we put both of them in Hello.idl.</li>
+
+<li>2. Look at the <code>Hello_Base.mpc</code> file to get an idea how the Hello_Base_stub and Hello_Base_svnt projects are organized. <a href="http://downloads.ociweb.com/MPC/MakeProjectCreator.pdf">MPC</a> is a utility we used to generate makefiles or VC project/solution files for all <a href="http://www.cs.wustl.edu/~schmidt/ACE.html">ACE</a>, <a href="http://www.cs.wustl.edu/~schmidt/TAO.html">TAO</a> and <a href="http://www.cs.wustl.edu/~schmidt/CIAO.html">CIAO</a> libraries.</li>
+</ul>
+
+<hr>
+
+<ul><h3>For Every Components</h3>
+
+<li>1. Use: <br>
+<ul>
+<code>$CIAO_ROOT/bin/generate_component_mpc.pl -p Hello_Base Sender <br>
+ $$CIAO_ROOT/bin/generate_component_mpc.pl -p Hello_Base Receiver
+</code><br></ul>
+Note:
+<ul>
+<li>I have different directories for <code>"Hello_Base", "Sender", "Receiver"</code> respectively.</li>
+
+<li>For every <code>_stub</code> project, add:<br>
+ <code>"libs += Hello_Base_stub"</code><br>
+
+</ul>
+
+<li>2. Use the export script to generate the export files. (3 files per component).</li>
+
+<li>3. Write an idl file for every compoent. Here you can put the component specific IDL definitions in this file. In this example we have a interface <code>trigger</code> specific to the Sender. Please note that the Sender component <code>"supports"</code> (IDL keyword) this interface. </li>
+
+<li>4. Write the CIDL file for every component.</li>
+
+<li>5. Write <code>_exec.h</code> and <code>_exec.cpp</code> files which actually implement the component.</li>
+<br>
+<br>
+Writing all those files could be troublesome to a new CCM user. The best way of learning this is to read the example source code. If you are familliar with CORBA programming, it should not take too much time before you can declare yourself as a CCM programmer.
+
+<hr>
+
+<h3>The Entry Point</h3>
+After both components are implemented we still need a small program to initialize the process. In Sender.idl there is a Sender specific interface with a single method in it created for this purpose. Hence there is a CORBA client application called <code>starter</code>. The <code>starter</code> will make a invocation on a supported interface called <code>trigger</code> on the Sender component to get the whole distributed application started. The <code>starter</code> will first the Sender component object reference through the ior string. Please see the the last part of <code>Hello/Sender/Sender.mpc</code> file for details.
+
+<hr>
+
+<h3>Make</h3>
+<li>Go to the directory <code>$CIAO_ROOT/examples/Hello</code> and do:<br>
+ <code>$ACE_ROOT/bin/mwc.pl</code> (use -type option if you are using a compiler/IDE other than gnuace -which by default generates GNU makefiles)</li>
+ <br>For example, using <code>$ACE_ROOT/bin/mwc.pl -type vc71</code> if you are using Visual C++ 7.1 IDE.</li>
+<li>Look at the generated Makefile(*unx) , Solution/workspace files(Windows) and you got it.</li>
+
+<hr>
+
+<h3>Assemble</h3>
+Now we can step forward to build the assembly. Here we are going to build the simplest case only, which is 1 Receiver and 1 Sender. If you are interested in CIAO you could try 1 Sender with multiple Receiver. However, you need to change the Sender.idl to make it <em>publishes</em> timeout event instead of <em>emits</em> event.
+
+<br>
+<br>
+
+<li>1. Make a new directory with name <em>descriptors</em> in your workspace</li>
+<li>2. Construct the <em>CIAO_Installation_Data.ini</em> file. You can use <code>uuidgen</code> to generate the UUIDs</li>
+
+<li>3. For every component generate the <em>.csd</em> and <em>.ssd</em> files. Follow the example carefully and make sure that you use the right UUIDs</li>
+
+<li>4. Write the <em>.cad</em> file which describes the assembly. You can choose to use <a href="http://www.dre.vanderbilt.edu/~lu/CADML">CADML</a> to generate the file.
+<br>
+Note: Please pay attention to the inter-relationship among different files, especially the relationship between the <em>.cad</em> file and <em>idl</em> file.
+</li>
+
+<hr>
+<h3>Run</h3>
+Finally you are ready to test the application you have made.
+<br><br>
+1. Run the example with a single CIAO_Daemon
+<ul>
+In <code>./descriptors</code> directory: <code>./run_test_default.pl</code> dose the following for you.
+<li>1. <code>${CIAO_ROOT}/tools/Daemon/CIAO_Daemon -ORBEndpoint iiop://localhost:20000 -n ${CIAO_ROOT}/tools/ComponentServer/ComponentServer </code></li>
+<li>2. <code>${CIAO_ROOT}/tools/Assembly_Deployer/Assembly_Manager -o ior -c test.dat</code></li>
+<li>3. <code>${CIAO_ROOT}/tools/Assembly_Deployer/Assembly_Deployer -k file://ior -a default.cad</code></li>
+<li>4. <code>../Sender/starter</code> Note: you can repeat this step.</li>
+
+If you want to get debug information from the component server, please see run_test_debug.pl which adds debug flag while running the component server.
+</ul>
+<br>
+
+2. Run the example with 2 CIAO_Daemons but on the same machine.
+<ul>
+ In <code>./descriptors</code> directory: <code>./run_test_remote.pl</code> dose the following for you.
+ <li>1. <code>${CIAO_ROOT}/tools/Daemon/CIAO_Daemon -ORBEndpoint iiop://localhost:20000 -n ${CIAO_ROOT}/tools/ComponentServer/ComponentServer </code></li>
+ <li>2. <code>${CIAO_ROOT}/tools/Daemon/CIAO_Daemon -ORBEndpoint iiop://localhost:12000 -n ${CIAO_ROOT}/tools/ComponentServer/ComponentServer </code></li>
+ <li>3. <code>${CIAO_ROOT}/tools/Assembly_Deployer/Assembly_Manager -o ior -c test.dat</code></li>
+ <li>4. <code>${CIAO_ROOT}/tools/Assembly_Deployer/Assembly_Deployer -k file://ior -a remote.cad</code></li>
+ <li>5. <code>../Sender/starter</code> Note: you can repeat this step.</li>
+</ul>
+
+
+<br>
+
+3. Run the example with 2 CIAO_Daemons on two different hosts.
+<ul>
+ In <code>./descriptors</code> directory:<br>
+ Here you have to open the <em>remote.dat</em> and fill in the right URL for your hosts. You can change the port number as well, of course you will have to use the corresponding right address in your -ORBEndpoint option in the following step1 and 2.
+
+ <li>1. On host "Default" <code>${CIAO_ROOT}/tools/Daemon/CIAO_Daemon -ORBEndpoint iiop://URL:20000 -n ${CIAO_ROOT}/tools/ComponentServer/ComponentServer </code></li>
+ <li>2. On host "Remote" <code>${CIAO_ROOT}/tools/Daemon/CIAO_Daemon -ORBEndpoint iiop://URL:12000 -n ${CIAO_ROOT}/tools/ComponentServer/ComponentServer </code></li>
+ For step 3 and step4 it doesn't matter where they are executed.
+ <li>3. <code>${CIAO_ROOT}/tools/Assembly_Deployer/Assembly_Manager -o ior -c test.dat</code></li>
+ <li>4. <code>${CIAO_ROOT}/tools/Assembly_Deployer/Assembly_Deployer -k file://ior -a remote.cad</code></li>
+ Step5 must be executed on the same host where the Sender is deployed. If you are using my <em>remote.cad</em> file then the host is the <code>Default</code> one.
+ <li>5. <code>../Sender/starter</code> Note: you can repeat this step.</li>
+</ul>
+
+<br>
+
+4. Run the example with 2 receivers deployed on the same ComponentServer.
+<ul>
+ In <code>./descriptors</code> directory: <code>./run_test_multirecv.pl</code>
+</ul>
+
+<hr>
+<b>Email: </b><a href="mailto:"</a<ADDRESS>ciao-users@cse.wustl.edu</ADDRESS>
+</body>
+</html>
+
diff --git a/TAO/CIAO/examples/OEP/BasicSP/BMClosedED/BMClosedED.mpc b/TAO/CIAO/examples/OEP/BasicSP/BMClosedED/BMClosedED.mpc
new file mode 100644
index 00000000000..3a34534e512
--- /dev/null
+++ b/TAO/CIAO/examples/OEP/BasicSP/BMClosedED/BMClosedED.mpc
@@ -0,0 +1,68 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -l .. -p HUDisplay -i BMClosedED"
+// This file has been manually modified to add a second component implementation.
+
+project(BMClosedED_stub): ciao_client {
+ after += BasicSP_stub
+ sharedname = BMClosedED_stub
+
+ idlflags += -Wb,stub_export_macro=BMCLOSEDED_STUB_Export
+ idlflags += -Wb,stub_export_include=BMClosedED_stub_export.h
+ idlflags += -Wb,skel_export_macro=BMCLOSEDED_SVNT_Export
+ idlflags += -Wb,skel_export_include=BMClosedED_svnt_export.h
+
+ dynamicflags = BMCLOSEDED_STUB_BUILD_DLL
+
+ libs += BasicSP_stub
+
+ IDL_Files {
+ BMClosedED.idl
+ }
+
+ Source_Files {
+ BMClosedEDC.cpp
+ }
+}
+
+project(BMClosedED_svnt) : ciao_servant {
+ after += BasicSP_svnt BMClosedED_stub
+ sharedname = BMClosedED_svnt
+ libs += BMClosedED_stub BasicSP_stub BasicSP_svnt
+ libpaths += ..
+ idlflags += -Wb,export_macro=BMCLOSEDED_SVNT_Export -Wb,export_include=BMClosedED_svnt_export.h
+ dynamicflags = BMCLOSEDED_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ BMClosedED.cidl
+ }
+
+ IDL_Files {
+ BMClosedEDE.idl
+ }
+
+ Source_Files {
+ BMClosedEDEC.cpp
+ BMClosedEDS.cpp
+ BMClosedED_svnt.cpp
+ }
+}
+
+
+project(BMClosedED_exec) : ciao_component {
+ after += BMClosedED_svnt
+ sharedname = BMClosedED_exec
+ libs += BMClosedED_stub BMClosedED_svnt BasicSP_stub BasicSP_svnt
+ libpaths += ..
+ idlflags += -Wb,export_macro=BMCLOSEDED_EXEC_Export -Wb,export_include=BMClosedED_exec_export.h
+ dynamicflags = BMCLOSEDED_EXEC_BUILD_DLL
+
+ IDL_Files {
+ BMClosedEDEI.idl
+ }
+
+ Source_Files {
+ BMClosedEDEIC.cpp
+ BMClosedED_exec.cpp
+ }
+}
+
diff --git a/TAO/CIAO/examples/OEP/BasicSP/BMClosedED/BMClosedED_exec.cpp b/TAO/CIAO/examples/OEP/BasicSP/BMClosedED/BMClosedED_exec.cpp
new file mode 100644
index 00000000000..a08164ffc10
--- /dev/null
+++ b/TAO/CIAO/examples/OEP/BasicSP/BMClosedED/BMClosedED_exec.cpp
@@ -0,0 +1,198 @@
+// $Id$
+
+#include "ciao/CIAO_common.h"
+#include "BMClosedED_exec.h"
+
+#include "ace/OS_NS_string.h"
+
+#define DISPLACEMENT 256
+
+/// Default constructor.
+MyImpl::BMClosedED_exec_i::BMClosedED_exec_i ()
+{
+}
+
+/// Default destructor.
+MyImpl::BMClosedED_exec_i::~BMClosedED_exec_i ()
+{
+}
+
+// Operations from HUDisplay::BMClosedED
+
+BasicSP::CCM_ReadData_ptr
+MyImpl::BMClosedED_exec_i::get_dataout (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return BasicSP::CCM_ReadData::_duplicate (this);
+}
+
+void
+MyImpl::BMClosedED_exec_i::push_in_avail (BasicSP::DataAvailable *
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+
+ if (CIAO::debug_level () > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "BMClosedED - Doing computations \n"));
+
+ ACE_DEBUG ((LM_DEBUG,
+ "BMClosedED - Doing data fetch \n"));
+ }
+
+ // Refresh position
+ BasicSP::ReadData_var dat
+ = this->context_->get_connection_datain (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ if (CORBA::is_nil (dat.in ()))
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "BMClosedED - got nil from get_connection \n"));
+
+ ACE_THROW (CORBA::BAD_INV_ORDER ());
+ }
+
+ CORBA::String_var str =
+ dat->get_data (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ if (CIAO::debug_level () > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "BMClosedED - Display data is [%s] \n",
+ str.in ()));
+ }
+
+ if (ACE_OS::strcmp (str, "BM DEVICE DATA") == 0)
+ {
+ this->str_ = CORBA::string_dup ("BM CLOSED ED DATA");
+ }
+
+ // Notify others.
+ BasicSP::DataAvailable_var event =
+ new OBV_BasicSP::DataAvailable;
+
+ this->context_->push_out_avail (event
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+// Operations from HUDisplay::position
+
+char *
+MyImpl::BMClosedED_exec_i::get_data (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return CORBA::string_dup (this->str_.inout ());
+}
+
+// Operations from Components::SessionComponent
+void
+MyImpl::BMClosedED_exec_i::set_session_context (
+ Components::SessionContext_ptr ctx
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ if (CIAO::debug_level () > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "MyImpl::BMClosedED_exec_i::set_session_context\n"));
+ }
+
+ this->context_ =
+ BasicSP::CCM_BMClosedED_Context::_narrow (ctx
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ if (CORBA::is_nil (this->context_.in ()))
+ {
+ ACE_THROW (CORBA::INTERNAL ());
+ }
+ // Urm, we actually discard exceptions thown from this operation.
+}
+
+void
+MyImpl::BMClosedED_exec_i::ciao_preactivate (
+ ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+}
+
+void
+MyImpl::BMClosedED_exec_i::ccm_activate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ if (CIAO::debug_level () > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "MyImpl::BMClosedED_exec_i::ccm_activate\n"));
+ }
+}
+
+void
+MyImpl::BMClosedED_exec_i::ciao_postactivate (
+ ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+}
+
+void
+MyImpl::BMClosedED_exec_i::ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ // if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG,
+ "MyImpl::BMClosedED_exec_i::ccm_passivate\n"));
+}
+
+void
+MyImpl::BMClosedED_exec_i::ccm_remove (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ // if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG,
+ "MyImpl::BMClosedED_exec_i::ccm_remove\n"));
+}
+
+/// Default ctor.
+MyImpl::BMClosedEDHome_exec_i::BMClosedEDHome_exec_i ()
+{
+}
+
+/// Default dtor.
+MyImpl::BMClosedEDHome_exec_i::~BMClosedEDHome_exec_i ()
+{
+}
+
+// Explicit home operations.
+
+// Implicit home operations.
+
+::Components::EnterpriseComponent_ptr
+MyImpl::BMClosedEDHome_exec_i::create (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ Components::EnterpriseComponent_ptr tmp =
+ Components::EnterpriseComponent::_nil ();
+ ACE_NEW_THROW_EX (tmp,
+ MyImpl::BMClosedED_exec_i,
+ CORBA::NO_MEMORY ());
+ return tmp;
+}
+
+
+extern "C" BMCLOSEDED_EXEC_Export ::Components::HomeExecutorBase_ptr
+createBMClosedEDHome_Impl (void)
+{
+ return new MyImpl::BMClosedEDHome_exec_i;
+}
diff --git a/TAO/CIAO/examples/OEP/BasicSP/BMDevice/BMDevice.mpc b/TAO/CIAO/examples/OEP/BasicSP/BMDevice/BMDevice.mpc
new file mode 100644
index 00000000000..af2e66ae3a6
--- /dev/null
+++ b/TAO/CIAO/examples/OEP/BasicSP/BMDevice/BMDevice.mpc
@@ -0,0 +1,76 @@
+// $Id$
+
+project(BMDevice_stub): ciao_client {
+ after += BasicSP_stub
+
+ sharedname = BMDevice_stub
+
+ libs += BasicSP_stub
+
+ idlflags += -Wb,stub_export_macro=BMDEVICE_STUB_Export
+ idlflags += -Wb,stub_export_include=BMDevice_stub_export.h
+ idlflags += -Wb,skel_export_macro=BMDEVICE_SVNT_Export
+ idlflags += -Wb,skel_export_include=BMDevice_svnt_export.h
+
+ libpaths += ..
+ libs += BasicSP_stub
+ dynamicflags = BMDEVICE_STUB_BUILD_DLL
+
+ IDL_Files {
+ BMDevice.idl
+ }
+
+ Source_Files {
+ BMDeviceC.cpp
+ }
+}
+
+project(BMDevice_svnt) : ciao_servant {
+ after += BMDevice_stub BasicSP_stub
+ sharedname = BMDevice_svnt
+
+ libs += BMDevice_stub BasicSP_stub BasicSP_svnt
+
+ libpaths += ..
+
+ idlflags += -Wb,export_macro=BMDEVICE_SVNT_Export
+ idlflags += -Wb,export_include=BMDevice_svnt_export.h
+ dynamicflags = BMDEVICE_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ BMDevice.cidl
+ }
+
+ IDL_Files {
+ BMDeviceE.idl
+ }
+
+ Source_Files {
+ BMDeviceEC.cpp
+ BMDeviceS.cpp
+ BMDevice_svnt.cpp
+ }
+}
+
+
+project(BMDevice_exec) : ciao_component {
+ after += BMDevice_svnt
+ sharedname = BMDevice_exec
+ libs += BMDevice_stub BMDevice_svnt BasicSP_stub BasicSP_svnt
+ libpaths += ..
+ idlflags += -Wb,export_macro=BMDEVICE_EXEC_Export
+ idlflags += -Wb,export_include=BMDevice_exec_export.h
+ dynamicflags = BMDEVICE_EXEC_BUILD_DLL
+
+ IDL_Files {
+ BMDeviceEI.idl
+ }
+
+ Source_Files {
+ BMDeviceES.cpp
+ BMDeviceEIC.cpp
+ BMDeviceEIS.cpp
+ BMDevice_exec.cpp
+ }
+}
+
diff --git a/TAO/CIAO/examples/OEP/BasicSP/BMDisplay/BMDisplay.mpc b/TAO/CIAO/examples/OEP/BasicSP/BMDisplay/BMDisplay.mpc
new file mode 100644
index 00000000000..539650f007f
--- /dev/null
+++ b/TAO/CIAO/examples/OEP/BasicSP/BMDisplay/BMDisplay.mpc
@@ -0,0 +1,68 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -l .. -p BasicSP -i BMDisplay"
+
+project(BMDisplay_stub): ciao_client {
+ after += BasicSP_stub
+
+ sharedname = BMDisplay_stub
+
+ idlflags += -Wb,stub_export_macro=BMDISPLAY_STUB_Export
+ idlflags += -Wb,stub_export_include=BMDisplay_stub_export.h
+ idlflags += -Wb,skel_export_macro=BMDISPLAY_SVNT_Export
+ idlflags += -Wb,skel_export_include=BMDisplay_svnt_export.h
+
+ libs += BasicSP_stub
+
+ dynamicflags = BMDISPLAY_STUB_BUILD_DLL
+
+ IDL_Files {
+ BMDisplay.idl
+ }
+
+ Source_Files {
+ BMDisplayC.cpp
+ }
+}
+
+project(BMDisplay_svnt) : ciao_servant {
+ after += BasicSP_svnt BMDisplay_stub
+ sharedname = BMDisplay_svnt
+ libs += BMDisplay_stub BasicSP_stub BasicSP_svnt
+ libpaths += ..
+ idlflags += -Wb,export_macro=BMDISPLAY_SVNT_Export -Wb,export_include=BMDisplay_svnt_export.h
+ dynamicflags = BMDISPLAY_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ BMDisplay.cidl
+ }
+
+ IDL_Files {
+ BMDisplayE.idl
+ }
+
+ Source_Files {
+ BMDisplayEC.cpp
+ BMDisplayS.cpp
+ BMDisplay_svnt.cpp
+ }
+}
+
+
+project(BMDisplay_exec) : ciao_component {
+ after += BMDisplay_svnt
+ sharedname = BMDisplay_exec
+ libs += BMDisplay_stub BMDisplay_svnt BasicSP_stub BasicSP_svnt
+ libpaths += ..
+ idlflags += -Wb,export_macro=BMDISPLAY_EXEC_Export -Wb,export_include=BMDisplay_exec_export.h
+ dynamicflags = BMDISPLAY_EXEC_BUILD_DLL
+
+ IDL_Files {
+ BMDisplayEI.idl
+ }
+
+ Source_Files {
+ BMDisplayEIC.cpp
+ BMDisplay_exec.cpp
+ }
+}
+
diff --git a/TAO/CIAO/examples/OEP/BasicSP/EC/EC.mpc b/TAO/CIAO/examples/OEP/BasicSP/EC/EC.mpc
new file mode 100644
index 00000000000..3544eac4714
--- /dev/null
+++ b/TAO/CIAO/examples/OEP/BasicSP/EC/EC.mpc
@@ -0,0 +1,101 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -l .. -p BasicSP -i -c EC"
+
+project(EC_stub): ciao_client {
+ after += BasicSP_stub
+ sharedname = EC_stub
+
+ libs += BasicSP_stub
+
+ idlflags += -Wb,stub_export_macro=EC_STUB_Export
+ idlflags += -Wb,stub_export_include=EC_stub_export.h
+ idlflags += -Wb,skel_export_macro=EC_SVNT_Export
+ idlflags += -Wb,skel_export_include=EC_svnt_export.h
+
+ dynamicflags = EC_STUB_BUILD_DLL
+
+ IDL_Files {
+ EC.idl
+ }
+
+ Source_Files {
+ ECC.cpp
+ }
+}
+
+project(EC_svnt) : ciao_servant {
+ after += BasicSP_svnt EC_stub
+ sharedname = EC_svnt
+ libs += EC_stub BasicSP_stub BasicSP_svnt
+ libpaths += ..
+ idlflags += -Wb,export_macro=EC_SVNT_Export
+ idlflags += -Wb,export_include=EC_svnt_export.h
+
+ dynamicflags = EC_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ EC.cidl
+ }
+
+ IDL_Files {
+ ECE.idl
+ }
+
+ Source_Files {
+ ECEC.cpp
+ ECS.cpp
+ EC_svnt.cpp
+ }
+}
+
+
+project(EC_exec) : ciao_component {
+ after += EC_svnt
+ sharedname = EC_exec
+ libs += EC_stub BasicSP_stub EC_svnt
+ libpaths += ..
+ idlflags += -Wb,export_macro=EC_EXEC_Export
+ idlflags += -Wb,export_include=EC_exec_export.h
+ dynamicflags = EC_EXEC_BUILD_DLL
+
+ IDL_Files {
+ ECEI.idl
+ }
+
+ Source_Files {
+ ECEIC.cpp
+ EC_exec.cpp
+ }
+}
+
+
+
+project (EC_client) : ciao_client, valuetype {
+ exename = client
+ after += EC_stub
+ libs += EC_stub BasicSP_stub
+ libpaths += ..
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ client.cpp
+ }
+}
+
+
+project (EC_controller) : ciao_client, valuetype {
+ exename = controller
+ after += EC_stub
+ libs += EC_stub BasicSP_stub
+ libpaths += ..
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ controller.cpp
+ }
+}
+
diff --git a/TAO/CIAO/examples/OEP/BasicSP/EC/EC_exec.cpp b/TAO/CIAO/examples/OEP/BasicSP/EC/EC_exec.cpp
new file mode 100644
index 00000000000..d4930ceec3c
--- /dev/null
+++ b/TAO/CIAO/examples/OEP/BasicSP/EC/EC_exec.cpp
@@ -0,0 +1,300 @@
+// $Id$
+
+#include "EC_exec.h"
+#include "CIAO_common.h"
+#include "ace/Timer_Queue.h"
+#include "ace/Reactor.h"
+
+//=================================================================
+
+MyImpl::timeout_Handler::timeout_Handler (MyImpl::EC_exec_i *cb)
+ : active_ (0),
+ done_ (0),
+ tid_ (0),
+ pulse_callback_ (cb)
+{
+ // Nothing
+ this->reactor (new ACE_Reactor);
+}
+
+MyImpl::timeout_Handler::~timeout_Handler ()
+{
+ delete this->reactor ();
+ this->reactor (0);
+}
+
+int
+MyImpl::timeout_Handler::open_h ()
+{
+ return this->activate ();
+}
+
+int
+MyImpl::timeout_Handler::close_h()
+{
+ this->done_ = 1;
+ this->reactor ()->notify ();
+
+ if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG, "Waiting\n"));
+ return this->wait ();
+}
+
+int
+MyImpl::timeout_Handler::start (CORBA::Long hertz)
+{
+ if (hertz == 0 || this->active_ != 0) // Not valid
+ return -1;
+
+ long usec = 1000000 / hertz;
+
+ this->tid_ = this->reactor ()->schedule_timer (this,
+ 0,
+ ACE_Time_Value (0, usec),
+ ACE_Time_Value (0, usec));
+
+ this->active_ = 1;
+ return 0;
+}
+
+int
+MyImpl::timeout_Handler::stop (void)
+{
+ if (this->active_ == 0) // Not valid.
+ return -1;
+
+ this->reactor ()->cancel_timer (this);
+
+ this->active_ = 0;
+ return 0;
+}
+
+int
+MyImpl::timeout_Handler::active (void)
+{
+ return this->active_;
+}
+
+int
+MyImpl::timeout_Handler::handle_close (ACE_HANDLE handle,
+ ACE_Reactor_Mask close_mask)
+{
+ if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("[%x] handle = %d, close_mask = %d\n"),
+ this,
+ handle,
+ close_mask));
+
+ return 0;
+}
+
+int
+MyImpl::timeout_Handler::handle_timeout (const ACE_Time_Value &,
+ const void *)
+{
+ this->pulse_callback_->pulse ();
+
+// ACE_DEBUG ((LM_DEBUG,
+// ACE_TEXT ("[%x] with count #%05d timed out at %d.%d!\n"),
+// this,
+// tv.sec (),
+// tv.usec ()));
+
+ return 0;
+}
+
+int
+MyImpl::timeout_Handler::svc (void)
+{
+ this->reactor ()->owner (ACE_OS::thr_self ());
+
+ while (!this->done_)
+ this->reactor ()->handle_events ();
+
+ return 0;
+}
+
+//=================================================================
+
+MyImpl::EC_exec_i::EC_exec_i ()
+ : hertz_ (0),
+ pulser_ (this)
+{
+
+}
+
+MyImpl::EC_exec_i::EC_exec_i (CORBA::Long hz)
+ : hertz_ (hz),
+ pulser_ (this)
+{
+}
+
+MyImpl::EC_exec_i::~EC_exec_i ()
+{
+}
+
+CORBA::Long
+MyImpl::EC_exec_i::hertz (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return this->hertz_;
+}
+
+void
+MyImpl::EC_exec_i::hertz (CORBA::Long hertz
+ ACE_ENV_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ this->hertz_ = hertz;
+}
+
+// Operations from supported interface(s)
+
+void
+MyImpl::EC_exec_i::start (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ if (this->hertz_ == 0 || this->pulser_.active())
+ ACE_THROW (CORBA::BAD_INV_ORDER ());
+
+ // @@ Start the rate generator
+ this->pulser_.start (this->hertz_);
+}
+
+void
+MyImpl::EC_exec_i::stop (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ if (! this->pulser_.active ())
+ ACE_THROW (CORBA::BAD_INV_ORDER ());
+
+ // @@ stop the rate generator
+ this->pulser_.stop ();
+}
+
+CORBA::Boolean
+MyImpl::EC_exec_i::active (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return this->pulser_.active ();
+}
+
+// Operations from Components::SessionComponent
+
+void
+MyImpl::EC_exec_i::set_session_context (Components::SessionContext_ptr ctx
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG, "MyImpl::EC_exec_i::set_session_context\n"));
+
+ this->context_ =
+ BasicSP::CCM_EC_Context::_narrow (ctx
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ if (CORBA::is_nil (this->context_.in ()))
+ ACE_THROW (CORBA::INTERNAL ());
+ // Urm, we actually discard exceptions thown from this operation.
+
+}
+
+void
+MyImpl::EC_exec_i::ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+}
+
+void
+MyImpl::EC_exec_i::ccm_activate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG, "MyImpl::EC_exec_i::ccm_activate\n"));
+
+ this->pulser_.open_h ();
+}
+
+void
+MyImpl::EC_exec_i::ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+}
+
+void
+MyImpl::EC_exec_i::ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG, "MyImpl::EC_exec_i::ccm_passivate\n"));
+ this->pulser_.close_h ();
+}
+
+void
+MyImpl::EC_exec_i::ccm_remove (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG, "MyImpl::EC_exec_i::ccm_remove\n"));
+}
+
+void
+MyImpl::EC_exec_i::pulse (void)
+{
+ ACE_TRY_NEW_ENV
+ {
+ if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("Pushing BasicSP::TimeOut event!\n")));
+
+ BasicSP::TimeOut_var ev = new OBV_BasicSP::TimeOut ();
+
+ this->context_->push_timeout (ev.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ // @@ do nothing?
+ }
+ ACE_ENDTRY;
+}
+
+MyImpl::ECHome_exec_i::ECHome_exec_i ()
+{
+}
+
+MyImpl::ECHome_exec_i::~ECHome_exec_i ()
+{
+}
+
+::Components::EnterpriseComponent_ptr
+MyImpl::ECHome_exec_i::new_EC (CORBA::Long hertz
+ ACE_ENV_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return new MyImpl::EC_exec_i (hertz);
+}
+
+::Components::EnterpriseComponent_ptr
+MyImpl::ECHome_exec_i::create (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ return new MyImpl::EC_exec_i ();
+}
+
+
+extern "C" EC_EXEC_Export ::Components::HomeExecutorBase_ptr
+createECHome_Impl (void)
+{
+ return new MyImpl::ECHome_exec_i ();
+}
diff --git a/TAO/CIAO/examples/OEP/BasicSP/EC/EC_exec.h b/TAO/CIAO/examples/OEP/BasicSP/EC/EC_exec.h
new file mode 100644
index 00000000000..057f8f70f14
--- /dev/null
+++ b/TAO/CIAO/examples/OEP/BasicSP/EC/EC_exec.h
@@ -0,0 +1,190 @@
+// $Id$
+
+//============================================================
+/**
+ * @file EC_exec.h
+ *
+ * Header file for the actualy EC and ECHome component
+ * implementation.
+ *
+ * @author Balachandran Natarajan <bala@dre.vanderbilt.edu>
+ */
+//============================================================
+
+#ifndef EC_EXEC_H
+#define EC_EXEC_H
+
+#include "ECEIC.h"
+#include "tao/LocalObject.h"
+#include "ace/Thread_Manager.h"
+#include "ace/Task.h"
+
+namespace MyImpl
+{
+ // Forward decl.
+ class EC_exec_i;
+
+ /**
+ * @brief Active pulse generater
+ */
+ class timeout_Handler : public ACE_Task_Base
+ {
+ public:
+ // Default constructor
+ timeout_Handler (EC_exec_i *cb);
+ ~timeout_Handler ();
+
+ int open_h (void);
+
+ int close_h (void);
+
+ int start (CORBA::Long hertz);
+
+ int stop (void);
+
+ int active (void);
+
+ // Handle the timeout.
+ virtual int handle_timeout (const ACE_Time_Value &tv,
+ const void *arg);
+
+ // Called when <Time_Handler> is removed.
+ virtual int handle_close (ACE_HANDLE handle,
+ ACE_Reactor_Mask close_mask);
+
+ virtual int svc (void);
+
+ private:
+ /// Tracking whether we are actively generating pulse or not.
+ long active_;
+
+ /// Flag to indicate completion of this active object.
+ int done_;
+
+ /// The timer id we are waiting.
+ int tid_;
+
+ EC_exec_i *pulse_callback_;
+
+ ACE_Thread_Manager thr_mgr_;
+ };
+
+ /**
+ * @class EC_exec_i
+ *
+ * EC executor implementation class.
+ */
+ class EC_EXEC_Export EC_exec_i :
+ public virtual BasicSP::EC_Exec,
+ public virtual TAO_Local_RefCounted_Object
+ {
+ public:
+ /// Default constructor.
+ EC_exec_i ();
+
+ /// Initialize with a default frequency.
+ EC_exec_i (CORBA::Long hz);
+
+ /// Default destructor.
+ ~EC_exec_i ();
+
+ // Attribute operations.
+
+ virtual CORBA::Long hertz (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual void hertz (CORBA::Long hertz
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // Operations from supported interface(s)
+
+ virtual void start (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual void stop (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual CORBA::Boolean active (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // Operations from Components::SessionComponent
+
+ virtual void set_session_context (Components::SessionContext_ptr ctx
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ccm_activate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+
+ virtual void ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ccm_remove (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ /// Helper function to be called back by timeout_Handler
+ void pulse (void);
+
+ protected:
+ /// Frequency
+ CORBA::Long hertz_;
+
+ /// Copmponent specific context
+ BasicSP::CCM_EC_Context_var context_;
+
+ /// An active object that actually trigger the generation of
+ /// periodic events.
+ timeout_Handler pulser_;
+ };
+
+ /**
+ * @class ECHome_exec_i
+ *
+ * EC home executor implementation class.
+ */
+ class EC_EXEC_Export ECHome_exec_i :
+ public virtual BasicSP::CCM_ECHome,
+ public virtual TAO_Local_RefCounted_Object
+ {
+ public:
+ /// Default ctor.
+ ECHome_exec_i ();
+
+ /// Default dtor.
+ ~ECHome_exec_i ();
+
+ // Explicit home operations.
+
+ virtual ::Components::EnterpriseComponent_ptr
+ new_EC (CORBA::Long hertz
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // Implicit home operations.
+
+ virtual ::Components::EnterpriseComponent_ptr
+ create (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+ };
+
+}
+
+extern "C" EC_EXEC_Export ::Components::HomeExecutorBase_ptr
+createECHome_Impl (void);
+
+#endif /* CIAO_ECGEN_EXEC_H */
diff --git a/TAO/CIAO/examples/OEP/Display/GPS/GPS.mpc b/TAO/CIAO/examples/OEP/Display/GPS/GPS.mpc
new file mode 100644
index 00000000000..3b7a859de56
--- /dev/null
+++ b/TAO/CIAO/examples/OEP/Display/GPS/GPS.mpc
@@ -0,0 +1,92 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -l .. -p HUDisplay -i GPS"
+// This file has been manually modified to add a second component implementation.
+
+project(GPS_stub): ciao_client {
+ after += HUDisplay_stub
+ sharedname = GPS_stub
+
+ libs += HUDisplay_stub
+
+ idlflags += -Wb,stub_export_macro=GPS_STUB_Export
+ idlflags += -Wb,stub_export_include=GPS_stub_export.h
+ idlflags += -Wb,skel_export_macro=GPS_SVNT_Export
+ idlflags += -Wb,skel_export_include=GPS_svnt_export.h
+
+ dynamicflags = GPS_STUB_BUILD_DLL
+
+ IDL_Files {
+ GPS.idl
+ }
+
+ Source_Files {
+ GPSC.cpp
+ }
+}
+
+project(GPS_svnt) : ciao_servant {
+ after += HUDisplay_svnt GPS_stub
+ sharedname = GPS_svnt
+
+ libs += GPS_stub HUDisplay_stub HUDisplay_svnt
+
+ libpaths += ..
+
+ idlflags += -Wb,export_macro=GPS_SVNT_Export
+ idlflags += -Wb,export_include=GPS_svnt_export.h
+
+ dynamicflags = GPS_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ GPS.cidl
+ }
+
+ IDL_Files {
+ GPSE.idl
+ }
+
+ Source_Files {
+ GPSEC.cpp
+ GPSS.cpp
+ GPS_svnt.cpp
+ }
+}
+
+
+project(GPS_exec) : ciao_component {
+ after += GPS_svnt
+ sharedname = GPS_exec
+ libs += GPS_stub GPS_svnt HUDisplay_stub HUDisplay_svnt
+ libpaths += ..
+ idlflags += -Wb,export_macro=GPS_EXEC_Export
+ idlflags += -Wb,export_include=GPS_exec_export.h
+ dynamicflags = GPS_EXEC_BUILD_DLL
+
+ IDL_Files {
+ GPSEI.idl
+ }
+
+ Source_Files {
+ GPSEIC.cpp
+ GPS_exec.cpp
+ }
+}
+
+project(GPS_tracing_exec) : ciao_component {
+ after += GPS_svnt
+ sharedname = GPS_tracing_exec
+ libs += GPS_stub GPS_svnt HUDisplay_stub HUDisplay_svnt
+ libpaths += ..
+ idlflags += -Wb,export_macro=GPS_EXEC_Export
+ idlflags += -Wb,export_include=GPS_exec_export.h
+ dynamicflags = GPS_EXEC_BUILD_DLL
+
+ IDL_Files {
+ GPSEI.idl
+ }
+
+ Source_Files {
+ GPSEIC.cpp
+ GPS_tracing_exec.cpp
+ }
+}
diff --git a/TAO/CIAO/examples/OEP/Display/NavDisplay/NavDisplay.mpc b/TAO/CIAO/examples/OEP/Display/NavDisplay/NavDisplay.mpc
new file mode 100644
index 00000000000..aa7d123f11d
--- /dev/null
+++ b/TAO/CIAO/examples/OEP/Display/NavDisplay/NavDisplay.mpc
@@ -0,0 +1,68 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -l .. -p HUDisplay -i NavDisplay"
+
+project(NavDisplay_stub): ciao_client {
+ after += HUDisplay_stub
+ sharedname = NavDisplay_stub
+
+ libs += HUDisplay_stub
+
+ idlflags += -Wb,stub_export_macro=NAVDISPLAY_STUB_Export
+ idlflags += -Wb,stub_export_include=NavDisplay_stub_export.h
+ idlflags += -Wb,skel_export_macro=NAVDISPLAY_SVNT_Export
+ idlflags += -Wb,skel_export_include=NavDisplay_svnt_export.h
+
+ dynamicflags = NAVDISPLAY_STUB_BUILD_DLL
+
+ IDL_Files {
+ NavDisplay.idl
+ }
+
+ Source_Files {
+ NavDisplayC.cpp
+ }
+}
+
+project(NavDisplay_svnt) : ciao_servant {
+ after += HUDisplay_svnt NavDisplay_stub
+ sharedname = NavDisplay_svnt
+ libs += NavDisplay_stub HUDisplay_stub HUDisplay_svnt
+ libpaths += ..
+ idlflags += -Wb,export_macro=NAVDISPLAY_SVNT_Export
+ idlflags += -Wb,export_include=NavDisplay_svnt_export.h
+ dynamicflags = NAVDISPLAY_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ NavDisplay.cidl
+ }
+
+ IDL_Files {
+ NavDisplayE.idl
+ }
+
+ Source_Files {
+ NavDisplayEC.cpp
+ NavDisplayS.cpp
+ NavDisplay_svnt.cpp
+ }
+}
+
+
+project(NavDisplay_exec) : ciao_component {
+ after += NavDisplay_svnt
+ sharedname = NavDisplay_exec
+ libs += NavDisplay_stub NavDisplay_svnt HUDisplay_stub HUDisplay_svnt
+ libpaths += ..
+ idlflags += -Wb,export_macro=NAVDISPLAY_EXEC_Export
+ idlflags += -Wb,export_include=NavDisplay_exec_export.h
+ dynamicflags = NAVDISPLAY_EXEC_BUILD_DLL
+
+ IDL_Files {
+ NavDisplayEI.idl
+ }
+
+ Source_Files {
+ NavDisplayEIC.cpp
+ NavDisplay_exec.cpp
+ }
+}
diff --git a/TAO/CIAO/examples/OEP/Display/NavDisplayGUI_exec/DetailView.cpp b/TAO/CIAO/examples/OEP/Display/NavDisplayGUI_exec/DetailView.cpp
new file mode 100644
index 00000000000..95125600100
--- /dev/null
+++ b/TAO/CIAO/examples/OEP/Display/NavDisplayGUI_exec/DetailView.cpp
@@ -0,0 +1,165 @@
+// $Id$
+
+#include "DetailView.h"
+#include <qlayout.h>
+#include <qpushbutton.h>
+#include <qtabwidget.h>
+#include <qtable.h>
+#include <qlabel.h>
+#include <qlineedit.h>
+#include <qspinbox.h>
+
+
+DetailView::DetailView(QWidget *parent, const char *name)
+: QWidget(parent, name), current_unit(NULL)
+{
+ QGridLayout *grid = new QGridLayout(this, 8, 10);
+
+ // Create a label containing a QMovie
+ separatorlabel = new QLabel(this, "label0" );
+
+ grid->addMultiCellWidget(separatorlabel, 0, 0, 0, 9);
+
+ QLabel *sem_id_label = new QLabel("FDN:", this);
+ grid->addWidget(sem_id_label, 1, 0);
+ sem_id_val = new QLineEdit(this);
+ sem_id_val->setReadOnly(1);
+ grid->addMultiCellWidget(sem_id_val, 1, 1, 1, 7);
+
+ QLabel *descr_label = new QLabel("Description:", this);
+ grid->addWidget(descr_label, 2, 0);
+ descr_edit = new QLineEdit(this);
+ grid->addMultiCellWidget(descr_edit, 2, 2, 1, 7);
+
+ QLabel *x_label = new QLabel("X coordinate:", this);
+ grid->addWidget(x_label, 3, 0);
+ x_edit = new QSpinBox(this);
+ x_edit->setMinValue(0);
+ x_edit->setMaxValue(65535);
+ grid->addWidget(x_edit, 3, 1);
+
+ QLabel *y_label = new QLabel("Y coordinate:", this);
+ grid->addWidget(y_label, 3, 3);
+ y_edit = new QSpinBox(this);
+ y_edit->setMinValue(0);
+ y_edit->setMaxValue(65535);
+ grid->addWidget(y_edit, 3, 4);
+
+ QLabel *z_label = new QLabel("Z coordinate:", this);
+ grid->addWidget(z_label, 3, 6);
+ z_edit = new QSpinBox(this);
+ z_edit->setMinValue(0);
+ z_edit->setMaxValue(65535);
+ grid->addWidget(z_edit, 3, 7);
+
+ // Create a label containing a QMovie
+ QString path_to_movie;
+ char *ace_root = getenv("ACE_ROOT");
+ if(ace_root)
+ {
+ path_to_movie += ace_root;
+ path_to_movie += "/TAO/CIAO/examples/handcrafted/Display/NavDisplayGUI_exec/trolltech.gif";
+ }
+ else
+ {
+ path_to_movie = "../NavDisplayGUI_exec/trolltech.gif";
+ }
+ movie = QMovie(path_to_movie);
+ movielabel = new QLabel(this, "label1" );
+ movie.connectStatus(this, SLOT(movieStatus(int)));
+ movie.connectUpdate(this, SLOT(movieUpdate(const QRect&)));
+ movielabel->setFrameStyle( QFrame::Box | QFrame::Plain );
+ movielabel->setMovie(movie);
+ movielabel->setFixedSize( 128+movielabel->frameWidth()*2,
+ 64+movielabel->frameWidth()*2 );
+ grid->addMultiCellWidget(new QLabel("", this), 1, 4, 8, 8);
+ grid->addMultiCellWidget(movielabel, 1, 4, 9, 9);
+
+
+ QPushButton *apply = new QPushButton("Apply", this);
+ apply->setDefault(1);
+ grid->addWidget(apply, 7, 9);
+
+ connect(apply, SIGNAL(clicked()), this, SLOT(apply()));
+
+ QTabWidget *tabs = new QTabWidget(this);
+
+
+ child_list = new QTable(0, 6, tabs);
+ child_list->setSelectionMode(QTable::Single);
+ child_list->horizontalHeader()->setLabel(0, "FDN");
+ child_list->horizontalHeader()->setLabel(1, "Description");
+ child_list->horizontalHeader()->setLabel(2, "X Coordinate");
+ child_list->horizontalHeader()->setLabel(3, "Y Coordinate");
+ child_list->horizontalHeader()->setLabel(4, "Z Coordinate");
+ child_list->horizontalHeader()->setLabel(5, "Color");
+
+ parent_list = new QTable(0, 6, tabs);
+ parent_list->setSelectionMode(QTable::Single);
+ parent_list->horizontalHeader()->setLabel(0, "FDN");
+ parent_list->horizontalHeader()->setLabel(1, "Description");
+ parent_list->horizontalHeader()->setLabel(2, "X Coordinate");
+ parent_list->horizontalHeader()->setLabel(3, "Y Coordinate");
+ parent_list->horizontalHeader()->setLabel(4, "Z Coordinate");
+ parent_list->horizontalHeader()->setLabel(5, "Color");
+
+ tabs->addTab(child_list, "Property set &1");
+ tabs->addTab(parent_list, "Property set &2");
+
+ grid->addMultiCellWidget(new QLabel(this), 4, 4, 0, 9);
+ grid->addMultiCellWidget(tabs, 5, 5, 0, 9);
+}
+
+
+DetailView::~DetailView()
+{
+}
+
+
+void
+DetailView::currentNode(NavUnit *unit)
+{
+ UnitLocation loc = unit->getLocation();
+ descr_edit->setText(unit->getShortDescr());
+ this->updateLocation(loc);
+}
+
+void
+DetailView::updateLocation(const UnitLocation &loc)
+{
+ x_edit->setValue(static_cast<int>(loc.x_));
+ y_edit->setValue(static_cast<int>(loc.y_));
+ z_edit->setValue(static_cast<int>(loc.z_));
+}
+
+void
+DetailView::apply()
+{
+}
+
+
+void
+DetailView::movieUpdate( const QRect& )
+{
+ // Uncomment this to test animated icons on your window manager
+ //setIcon( movie.framePixmap() );
+}
+
+
+void
+DetailView::movieStatus( int s )
+{
+ switch ( s ) {
+ case QMovie::SourceEmpty:
+ case QMovie::UnrecognizedFormat:
+ {
+ QPixmap pm("tt-logo.png");
+ movielabel->setPixmap(pm);
+ movielabel->setFixedSize(pm.size());
+ }
+ break;
+ default:
+ if ( movielabel->movie() ) // for flicker-free animation:
+ movielabel->setBackgroundMode( NoBackground );
+ }
+}
diff --git a/TAO/CIAO/examples/OEP/Display/NavDisplayGUI_exec/NavDisplayGUI.mpc b/TAO/CIAO/examples/OEP/Display/NavDisplayGUI_exec/NavDisplayGUI.mpc
new file mode 100644
index 00000000000..cb5cea1b621
--- /dev/null
+++ b/TAO/CIAO/examples/OEP/Display/NavDisplayGUI_exec/NavDisplayGUI.mpc
@@ -0,0 +1,44 @@
+// $Id$
+project(NavDisplayGUI_exec) : ciao_component, qt {
+ after += NavDisplay_exec
+ requires += qt
+ sharedname = NavDisplayGUI_exec
+ libs += NavDisplay_stub NavDisplay_svnt HUDisplay_stub HUDisplay_svnt
+ libpaths += .. ../NavDisplay
+ dynamicflags = NAVDISPLAY_EXEC_BUILD_DLL QT_DLL
+ includes += ../NavDisplay
+ idlflags += -I ../NavDisplay -Wb,export_macro=NAVDISPLAY_EXEC_Export -Wb,export_include=NavDisplay_exec_export.h
+
+ IDL_Files {
+ gendir = .
+ ../NavDisplay/NavDisplayEI.idl
+ }
+
+ Source_Files {
+ NavDisplayEIC.cpp
+ AddNavUnitCmd.cpp
+ DetailView.cpp
+ MapView.cpp
+ NavUnit.cpp
+ NodeItem.cpp
+ QuitCmd.cpp
+ RootPanel.cpp
+ UpdatePositionCmd.cpp
+ Worker.cpp
+ NavDisplayGUI_exec.cpp
+ }
+
+ MOC_Files {
+ DetailView.h
+ MapView.h
+ NodeItem.h
+ RootPanel.h
+ }
+ Source_Files {
+ DetailView_moc.cpp
+ MapView_moc.cpp
+ NodeItem_moc.cpp
+ RootPanel_moc.cpp
+ }
+
+}
diff --git a/TAO/CIAO/examples/OEP/Display/NavDisplayGUI_exec/NavDisplayGUI_exec.cpp b/TAO/CIAO/examples/OEP/Display/NavDisplayGUI_exec/NavDisplayGUI_exec.cpp
new file mode 100644
index 00000000000..224e0cac41b
--- /dev/null
+++ b/TAO/CIAO/examples/OEP/Display/NavDisplayGUI_exec/NavDisplayGUI_exec.cpp
@@ -0,0 +1,208 @@
+// $Id$
+
+#include "NavDisplayGUI_exec.h"
+#include "CIAO_common.h"
+#include <qapplication.h>
+#include <qevent.h>
+
+#include "UpdatePositionCmd.h"
+#include "QuitCmd.h"
+#include "AddNavUnitCmd.h"
+#include "Worker.h"
+
+static const char *argv[] =
+{
+ "NavDisplayGUI"
+};
+
+/// Default constructor.
+MyImpl::NavDisplayGUI_exec_impl::NavDisplayGUI_exec_impl ()
+: unit_(1, "Model T3+"), loc_(50, 20, 0)
+{
+ if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG, "MyImpl::NavDisplayGUI_exec_impl::NavDisplayGUI_exec_impl ()\n"));
+}
+
+/// Default destructor.
+MyImpl::NavDisplayGUI_exec_impl::~NavDisplayGUI_exec_impl ()
+{
+ if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG, "MyImpl::NavDisplayGUI_exec_impl::~NavDisplayGUI_exec_impl ()\n"));
+}
+
+// Operations from HUDisplay::NavDisplay
+
+void
+MyImpl::NavDisplayGUI_exec_impl::push_Refresh (
+ HUDisplay::tick * /* ev */
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ //ACE_DEBUG ((LM_DEBUG, "ENTER: MyImpl::NavDisplayGUI_exec_impl::push_Refresh()\n"));
+
+ // Refresh position
+ HUDisplay::position_var loc =
+ this->context_->get_connection_GPSLocation (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ CORBA::Long lx = loc->posx (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ CORBA::Long ly = loc->posy (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ mutex_.acquire();
+
+ loc_.x_ = lx % 500;
+ loc_.y_ = ly % 300;
+
+ this->unit_.setLocation(loc_);
+
+ mutex_.release();
+
+ //ACE_DEBUG ((LM_DEBUG, "DISPLAY: Current Location is: %d %d\n", int(attrs.x_), int(attrs.y_)));
+
+ RootPanel *root_pane = worker_->getMainWindow();
+ if(root_pane)
+ {
+ UpdatePositionCmd *cmd = UpdatePositionCmd::create(
+ root_pane, &(this->unit_));
+ QCustomEvent *evt = new QCustomEvent(QEvent::User, cmd);
+ QApplication::postEvent(root_pane, evt);
+ }
+
+ //ACE_DEBUG ((LM_DEBUG, "LEAVE: MyImpl::NavDisplayGUI_exec_impl::push_Refresh()\n"));
+}
+
+// Operations from Components::SessionComponent
+void
+MyImpl::NavDisplayGUI_exec_impl::set_session_context (Components::SessionContext_ptr ctx
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG, "MyImpl::NavDisplayGUI_exec_impl::set_session_context\n"));
+
+ this->context_ =
+ HUDisplay::CCM_NavDisplay_Context::_narrow (ctx
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ if (CORBA::is_nil (this->context_.in ()))
+ ACE_THROW (CORBA::INTERNAL ());
+ // Urm, we actually discard exceptions thown from this operation.
+}
+
+void
+MyImpl::NavDisplayGUI_exec_impl::ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+}
+
+void
+MyImpl::NavDisplayGUI_exec_impl::ccm_activate (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG, "ENTER: MyImpl::NavDisplayGUI_exec_impl::ccm_activate\n"));
+
+ worker_ = new Worker(sizeof(argv)/sizeof(argv[0]), const_cast<char **> (argv));
+
+ if (worker_->activate(THR_NEW_LWP | THR_JOINABLE, 1) != 0)
+ {
+ ACE_DEBUG((LM_ERROR,
+ "Cannot activate client threads\n"));
+ ACE_THROW(Components::CCMException());
+ }
+
+ worker_->waitUntillInitialized();
+
+ AddNavUnitCmd *cmd = AddNavUnitCmd::create(
+ worker_->getMainWindow(), &(this->unit_));
+ QCustomEvent *evt = new QCustomEvent(QEvent::User, cmd);
+ QApplication::postEvent(worker_->getMainWindow(), evt);
+
+
+ if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG, "LEAVE: MyImpl::NavDisplayGUI_exec_impl::ccm_activate\n"));
+}
+
+void
+MyImpl::NavDisplayGUI_exec_impl::ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+}
+
+void
+MyImpl::NavDisplayGUI_exec_impl::ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG, "MyImpl::NavDisplayGUI_exec_impl::ccm_passivate\n"));
+
+ RootPanel *target = worker_->getMainWindow();
+ if(target)
+ {
+ QuitCmd *cmd = QuitCmd::create(target);
+ QCustomEvent *evt = new QCustomEvent(QEvent::User, cmd);
+ QApplication::postEvent(target, evt);
+ worker_->thr_mgr()->wait();
+ }
+
+ delete worker_;
+}
+
+void
+MyImpl::NavDisplayGUI_exec_impl::ccm_remove (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG, "MyImpl::NavDisplayGUI_exec_impl::ccm_remove\n"));
+}
+
+/// Default ctor.
+MyImpl::NavDisplayGUIHome_exec_impl::NavDisplayGUIHome_exec_impl ()
+{
+ if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG,
+ "MyImpl::NavDisplayGUI_exec_impl::NavDisplayGUIHome_exec_impl ()\n"));
+}
+
+/// Default dtor.
+MyImpl::NavDisplayGUIHome_exec_impl::~NavDisplayGUIHome_exec_impl ()
+{
+ if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG,
+ "MyImpl::NavDisplayGUI_exec_impl::~NavDisplayGUIHome_exec_impl ()\n"));
+}
+
+// Explicit home operations.
+
+// Implicit home operations.
+
+::Components::EnterpriseComponent_ptr
+MyImpl::NavDisplayGUIHome_exec_impl::create (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG,
+ "MyImpl::NavDisplayGUIHome_exec_impl::create()\n"));
+
+ return new MyImpl::NavDisplayGUI_exec_impl;
+}
+
+
+extern "C" NAVDISPLAY_EXEC_Export ::Components::HomeExecutorBase_ptr
+createNavDisplayHome_Impl (void)
+{
+ if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG, "createNavDisplayHome_Impl()\n"));
+ return new MyImpl::NavDisplayGUIHome_exec_impl;
+}
diff --git a/TAO/CIAO/examples/OEP/Display/NavDisplayGUI_exec/README b/TAO/CIAO/examples/OEP/Display/NavDisplayGUI_exec/README
new file mode 100644
index 00000000000..c5cb76a6fd9
--- /dev/null
+++ b/TAO/CIAO/examples/OEP/Display/NavDisplayGUI_exec/README
@@ -0,0 +1,15 @@
+This example is the Qt-based GUI implementation of NavDisplay component.
+
+It is NOT necessary to compile ACE/TAO/CIAO with Qt support,
+since this example does not relyes on Qt Reactor and
+communicates with GUI part using QApplication::postMessage() and
+simple Command Pattern based framework. But be sure that QTDIR
+environment variable is pointed to your Qt installation directory.
+
+If you need to build this component, make sure you have the necessary
+Qt libraries/tools installed, and define
+
+qt = 1
+
+in $(ACE_ROOT)/bin/MakeProjectCreator/config/default.features before
+creating the workspace/project for this example.
diff --git a/TAO/CIAO/examples/OEP/Display/RateGen/RateGen.mpc b/TAO/CIAO/examples/OEP/Display/RateGen/RateGen.mpc
new file mode 100644
index 00000000000..649aa038b66
--- /dev/null
+++ b/TAO/CIAO/examples/OEP/Display/RateGen/RateGen.mpc
@@ -0,0 +1,99 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -l .. -p HUDisplay -i -c RateGen"
+
+project(RateGen_stub): ciao_client {
+ after += HUDisplay_stub
+ sharedname = RateGen_stub
+
+ idlflags += -Wb,stub_export_macro=RATEGEN_STUB_Export
+ idlflags += -Wb,stub_export_include=RateGen_stub_export.h
+ idlflags += -Wb,skel_export_macro=RATEGEN_SVNT_Export
+ idlflags += -Wb,skel_export_include=RateGen_svnt_export.h
+
+ dynamicflags = RATEGEN_STUB_BUILD_DLL
+
+ libs += HUDisplay_stub
+
+ IDL_Files {
+ RateGen.idl
+ }
+
+ Source_Files {
+ RateGenC.cpp
+ }
+}
+
+project(RateGen_svnt) : ciao_servant {
+ after += HUDisplay_svnt RateGen_stub
+ sharedname = RateGen_svnt
+ libs += RateGen_stub HUDisplay_stub HUDisplay_svnt
+ libpaths += ..
+ idlflags += -Wb,export_macro=RATEGEN_SVNT_Export
+ idlflags += -Wb,export_include=RateGen_svnt_export.h
+ dynamicflags = RATEGEN_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ RateGen.cidl
+ }
+
+ IDL_Files {
+ RateGenE.idl
+ }
+
+ Source_Files {
+ RateGenEC.cpp
+ RateGenS.cpp
+ RateGen_svnt.cpp
+ }
+}
+
+
+project(RateGen_exec) : ciao_component {
+ after += RateGen_svnt
+ sharedname = RateGen_exec
+ libs += RateGen_stub HUDisplay_stub RateGen_svnt
+ libpaths += ..
+ idlflags += -Wb,export_macro=RATEGEN_EXEC_Export
+ idlflags += -Wb,export_include=RateGen_exec_export.h
+ dynamicflags = RATEGEN_EXEC_BUILD_DLL
+
+ IDL_Files {
+ RateGenEI.idl
+ }
+
+ Source_Files {
+ RateGenEIC.cpp
+ RateGen_exec.cpp
+ }
+}
+
+
+
+project (RateGen_client) : ciao_client, valuetype {
+ exename = client
+ after += RateGen_stub
+ libs += RateGen_stub HUDisplay_stub
+ libpaths += ..
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ client.cpp
+ }
+}
+
+
+project (RateGen_controller) : ciao_client, valuetype {
+ exename = controller
+ after += RateGen_stub
+ libs += RateGen_stub HUDisplay_stub
+ libpaths += ..
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ controller.cpp
+ }
+}
diff --git a/TAO/CIAO/examples/OEP/Display/RateGen/RateGen_exec.cpp b/TAO/CIAO/examples/OEP/Display/RateGen/RateGen_exec.cpp
new file mode 100644
index 00000000000..a79c4d0a3b1
--- /dev/null
+++ b/TAO/CIAO/examples/OEP/Display/RateGen/RateGen_exec.cpp
@@ -0,0 +1,341 @@
+// $Id$
+
+#include "RateGen_exec.h"
+#include "CIAO_common.h"
+#include "ace/Timer_Queue.h"
+#include "ace/Reactor.h"
+
+//=================================================================
+
+MyImpl::Pulse_Handler::Pulse_Handler (MyImpl::RateGen_exec_i *cb)
+ : active_ (0),
+ done_ (0),
+ tid_ (0),
+ pulse_callback_ (cb)
+{
+ // Nothing
+ this->reactor (new ACE_Reactor);
+}
+
+MyImpl::Pulse_Handler::~Pulse_Handler ()
+{
+ delete this->reactor ();
+ this->reactor (0);
+}
+
+int
+MyImpl::Pulse_Handler::open_h ()
+{
+ return this->activate ();
+}
+
+int
+MyImpl::Pulse_Handler::close_h ()
+{
+ this->done_ = 1;
+ this->reactor ()->notify ();
+
+ if (CIAO::debug_level () > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG, "Waiting\n"));
+ }
+
+ return this->wait ();
+}
+
+int
+MyImpl::Pulse_Handler::start (CORBA::Long hertz)
+{
+ if (hertz == 0 || this->active_ != 0) // Not valid
+ {
+ return -1;
+ }
+
+ long usec = 1000000 / hertz;
+
+ this->tid_ = this->reactor ()->schedule_timer (this,
+ 0,
+ ACE_Time_Value (0, usec),
+ ACE_Time_Value (0, usec));
+
+ this->active_ = 1;
+ return 0;
+}
+
+int
+MyImpl::Pulse_Handler::stop (void)
+{
+ if (this->active_ == 0) // Not valid.
+ {
+ return -1;
+ }
+
+ this->reactor ()->cancel_timer (this);
+
+ this->active_ = 0;
+ return 0;
+}
+
+int
+MyImpl::Pulse_Handler::active (void)
+{
+ return this->active_;
+}
+
+int
+MyImpl::Pulse_Handler::handle_close (ACE_HANDLE handle,
+ ACE_Reactor_Mask close_mask)
+{
+ if (CIAO::debug_level () > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("[%x] handle = %d, close_mask = %d\n"),
+ this,
+ handle,
+ close_mask));
+ }
+
+ return 0;
+}
+
+int
+MyImpl::Pulse_Handler::handle_timeout (const ACE_Time_Value &,
+ const void *)
+{
+ this->pulse_callback_->pulse ();
+
+// ACE_DEBUG ((LM_DEBUG,
+// ACE_TEXT ("[%x] with count #%05d timed out at %d.%d!\n"),
+// this,
+// tv.sec (),
+// tv.usec ()));
+
+ return 0;
+}
+
+int
+MyImpl::Pulse_Handler::svc (void)
+{
+ this->reactor ()->owner (ACE_OS::thr_self ());
+
+ while (!this->done_)
+ {
+ this->reactor ()->handle_events ();
+ }
+
+ return 0;
+}
+
+//=================================================================
+
+MyImpl::RateGen_exec_i::RateGen_exec_i ()
+ : hertz_ (0),
+ pulser_ (this)
+{
+
+}
+
+MyImpl::RateGen_exec_i::RateGen_exec_i (CORBA::Long hz)
+ : hertz_ (hz),
+ pulser_ (this)
+{
+}
+
+MyImpl::RateGen_exec_i::~RateGen_exec_i ()
+{
+}
+
+CORBA::Long
+MyImpl::RateGen_exec_i::hertz (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return this->hertz_;
+}
+
+void
+MyImpl::RateGen_exec_i::hertz (CORBA::Long hertz
+ ACE_ENV_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ this->hertz_ = hertz;
+}
+
+// Operations from supported interface(s)
+
+void
+MyImpl::RateGen_exec_i::start (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ if (this->hertz_ == 0 || this->pulser_.active())
+ {
+ ACE_THROW (CORBA::BAD_INV_ORDER ());
+ }
+
+ // @@ Start the rate generator
+ this->pulser_.start (this->hertz_);
+}
+
+void
+MyImpl::RateGen_exec_i::stop (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ if (! this->pulser_.active ())
+ {
+ ACE_THROW (CORBA::BAD_INV_ORDER ());
+ }
+
+ // @@ stop the rate generator
+ this->pulser_.stop ();
+}
+
+CORBA::Boolean
+MyImpl::RateGen_exec_i::active (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return this->pulser_.active ();
+}
+
+// Operations from Components::SessionComponent
+
+void
+MyImpl::RateGen_exec_i::set_session_context (
+ Components::SessionContext_ptr ctx
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ if (CIAO::debug_level () > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "MyImpl::RateGen_exec_i::set_session_context\n"));
+ }
+
+ this->context_ =
+ HUDisplay::CCM_RateGen_Context::_narrow (ctx
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ if (CORBA::is_nil (this->context_.in ()))
+ {
+ ACE_THROW (CORBA::INTERNAL ());
+ }
+ // Urm, we actually discard exceptions thown from this operation.
+
+}
+
+void
+MyImpl::RateGen_exec_i::ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+}
+
+void
+MyImpl::RateGen_exec_i::ccm_activate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ if (CIAO::debug_level () > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "MyImpl::RateGen_exec_i::ccm_activate\n"));
+ }
+
+ this->pulser_.open_h ();
+}
+
+void
+MyImpl::RateGen_exec_i::ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+}
+
+void
+MyImpl::RateGen_exec_i::ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ if (CIAO::debug_level () > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "MyImpl::RateGen_exec_i::ccm_passivate\n"));
+ }
+
+ this->pulser_.close_h ();
+}
+
+void
+MyImpl::RateGen_exec_i::ccm_remove (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ if (CIAO::debug_level () > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "MyImpl::RateGen_exec_i::ccm_remove\n"));
+ }
+}
+
+void
+MyImpl::RateGen_exec_i::pulse (void)
+{
+ ACE_TRY_NEW_ENV
+ {
+ if (CIAO::debug_level () > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("Pushing HUDisplay::tick event!\n")));
+ }
+
+ HUDisplay::tick_var ev = new OBV_HUDisplay::tick ();
+
+ this->context_->push_Pulse (ev.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ // @@ do nothing?
+ }
+ ACE_ENDTRY;
+
+}
+
+MyImpl::RateGenHome_exec_i::RateGenHome_exec_i ()
+{
+}
+
+MyImpl::RateGenHome_exec_i::~RateGenHome_exec_i ()
+{
+}
+
+::Components::EnterpriseComponent_ptr
+MyImpl::RateGenHome_exec_i::new_RateGen (CORBA::Long /* hertz */
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ Components::EnterpriseComponent_ptr tmp = 0;
+ ACE_NEW_THROW_EX (tmp,
+ MyImpl::RateGen_exec_i,
+ CORBA::NO_MEMORY ());
+ ACE_CHECK_RETURN (tmp);
+
+ return tmp;
+}
+
+::Components::EnterpriseComponent_ptr
+MyImpl::RateGenHome_exec_i::create (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ return new MyImpl::RateGen_exec_i ();
+}
+
+
+extern "C" RATEGEN_EXEC_Export ::Components::HomeExecutorBase_ptr
+createRateGenHome_Impl (void)
+{
+ return new MyImpl::RateGenHome_exec_i ();
+}
diff --git a/TAO/CIAO/examples/OEP/Display/RateGen/RateGen_exec.h b/TAO/CIAO/examples/OEP/Display/RateGen/RateGen_exec.h
new file mode 100644
index 00000000000..7e29d047e75
--- /dev/null
+++ b/TAO/CIAO/examples/OEP/Display/RateGen/RateGen_exec.h
@@ -0,0 +1,187 @@
+// $Id$
+
+/**
+ * @file RateGen_exec.h
+ *
+ * Header file for the actualy RateGen and RateGenHome component
+ * implementation.
+ *
+ * @author Nanbor Wang <nanbor@cse.wustl.edu>
+ */
+
+#ifndef RATEGEN_EXEC_H
+#define RATEGEN_EXEC_H
+
+#include "RateGenEIC.h"
+#include "tao/LocalObject.h"
+#include "ace/Thread_Manager.h"
+#include "ace/Task.h"
+
+namespace MyImpl
+{
+ // Forward decl.
+ class RateGen_exec_i;
+
+ /**
+ * @brief Active pulse generater
+ */
+ class Pulse_Handler : public ACE_Task_Base
+ {
+ public:
+ // Default constructor
+ Pulse_Handler (RateGen_exec_i *cb);
+ ~Pulse_Handler ();
+
+ int open_h (void);
+
+ int close_h (void);
+
+ int start (CORBA::Long hertz);
+
+ int stop (void);
+
+ int active (void);
+
+ // Handle the timeout.
+ virtual int handle_timeout (const ACE_Time_Value &tv,
+ const void *arg);
+
+ // Called when <Time_Handler> is removed.
+ virtual int handle_close (ACE_HANDLE handle,
+ ACE_Reactor_Mask close_mask);
+
+ virtual int svc (void);
+
+ private:
+ /// Tracking whether we are actively generating pulse or not.
+ long active_;
+
+ /// Flag to indicate completion of this active object.
+ int done_;
+
+ /// The timer id we are waiting.
+ int tid_;
+
+ RateGen_exec_i *pulse_callback_;
+
+ ACE_Thread_Manager thr_mgr_;
+ };
+
+ /**
+ * @class RateGen_exec_i
+ *
+ * RateGen executor implementation class.
+ */
+ class RATEGEN_EXEC_Export RateGen_exec_i :
+ public virtual HUDisplay::RateGen_Exec,
+ public virtual TAO_Local_RefCounted_Object
+ {
+ public:
+ /// Default constructor.
+ RateGen_exec_i ();
+
+ /// Initialize with a default frequency.
+ RateGen_exec_i (CORBA::Long hz);
+
+ /// Default destructor.
+ ~RateGen_exec_i ();
+
+ // Attribute operations.
+
+ virtual CORBA::Long hertz (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual void hertz (CORBA::Long hertz
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // Operations from supported interface(s)
+
+ virtual void start (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual void stop (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual CORBA::Boolean active (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // Operations from Components::SessionComponent
+
+ virtual void set_session_context (Components::SessionContext_ptr ctx
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ccm_activate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ virtual void ccm_remove (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+
+ /// Helper function to be called back by Pulse_Handler
+ void pulse (void);
+
+ protected:
+ /// Frequency
+ CORBA::Long hertz_;
+
+ /// Copmponent specific context
+ HUDisplay::CCM_RateGen_Context_var context_;
+
+ /// An active object that actually trigger the generation of
+ /// periodic events.
+ Pulse_Handler pulser_;
+ };
+
+ /**
+ * @class RateGenHome_exec_i
+ *
+ * RateGen home executor implementation class.
+ */
+ class RATEGEN_EXEC_Export RateGenHome_exec_i :
+ public virtual HUDisplay::CCM_RateGenHome,
+ public virtual TAO_Local_RefCounted_Object
+ {
+ public:
+ /// Default ctor.
+ RateGenHome_exec_i ();
+
+ /// Default dtor.
+ ~RateGenHome_exec_i ();
+
+ // Explicit home operations.
+
+ virtual ::Components::EnterpriseComponent_ptr
+ new_RateGen (CORBA::Long hertz
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ // Implicit home operations.
+
+ virtual ::Components::EnterpriseComponent_ptr
+ create (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException));
+ };
+
+}
+
+extern "C" RATEGEN_EXEC_Export ::Components::HomeExecutorBase_ptr
+createRateGenHome_Impl (void);
+
+#endif /* RATEGEN_EXEC_H */
diff --git a/TAO/CIAO/examples/OEP/Display/descriptors/NOTE-win.txt b/TAO/CIAO/examples/OEP/Display/descriptors/NOTE-win.txt
new file mode 100644
index 00000000000..463c05cb080
--- /dev/null
+++ b/TAO/CIAO/examples/OEP/Display/descriptors/NOTE-win.txt
@@ -0,0 +1,91 @@
+Conventional test:
+==================
+
+Remote Daemon:
+--------------
+
+ w:\TAO\CIAO\examples\OEP\Display\descriptors\
+ title Remote Daemon
+ .....\tools\Daemon\CIAO_Daemon -ORBEndpoint iiop://localhost:12000 -n ../../../../tools/ComponentServer/ComponentServer
+
+Local Daemon:
+--------------
+
+ w:\TAO\CIAO\examples\OEP\Display\descriptors\
+ title Local Daemon
+ .....\tools\Daemon\CIAO_Daemon -ORBEndpoint iiop://localhost:10000 -n ../../../../tools/ComponentServer/ComponentServer
+
+
+Assembly Manager
+-----------------
+
+ w:\TAO\CIAO\examples\OEP\Display\descriptors\
+ title Assembly Manager
+ .....\tools\Assembly_Deployer\Assembly_Manager -o ior -c test.dat
+
+Assembly Deployer
+-----------------
+
+
+ w:\TAO\CIAO\examples\OEP\Display\descriptors\
+ title Assembly Deployer
+ .....\tools\Assembly_Deployer\Assembly_Deployer -k file://ior -a HUDisplay.cad -o IDfile
+
+client
+------
+
+ w:\TAO\CIAO\examples\OEP\Display\descriptors\
+ title Client
+ ..\RateGen\controller -o
+
+
+Tearing down the application:
+-----------------------------
+
+ .....\tools\Assembly_Deployer\Assembly_Deployer -k file://ior -d IDfile
+
+
+RT-server-test:
+===============
+
+Remote Daemon:
+--------------
+
+ w:\TAO\CIAO\examples\OEP\Display\descriptors\
+ title Remote Daemon
+ .....\tools\Daemon\CIAO_Daemon -ORBEndpoint iiop://localhost:12000 -n ../../../../tools/RTComponentServer/RTComponentServer -m svcmap.dat
+
+Local Daemon:
+--------------
+
+ w:\TAO\CIAO\examples\OEP\Display\descriptors\
+ title Local Daemon
+ .....\tools\Daemon\CIAO_Daemon -ORBEndpoint iiop://localhost:10000 -n ../../../../tools/RTComponentServer/RTComponentServer -m svcmap.dat
+
+
+Assembly Manager
+-----------------
+
+ w:\TAO\CIAO\examples\OEP\Display\descriptors\
+ title Assembly Manager
+ .....\tools\Assembly_Deployer\Assembly_Manager -o ior -c test.dat
+
+Assembly Deployer
+-----------------
+
+
+ w:\TAO\CIAO\examples\OEP\Display\descriptors\
+ title Assembly Deployer
+ .....\tools\Assembly_Deployer\Assembly_Deployer -k file://ior -a HUDisplay-rtcad.cad -o IDfile
+
+client
+------
+
+ w:\TAO\CIAO\examples\OEP\Display\descriptors\
+ title Controller
+ ..\RateGen\controller -o
+
+Tearing down the application:
+-----------------------------
+
+ .....\tools\Assembly_Deployer\Assembly_Deployer -k file://ior -d IDfile
diff --git a/TAO/CIAO/examples/OEP/Display/descriptors/NOTE.txt b/TAO/CIAO/examples/OEP/Display/descriptors/NOTE.txt
new file mode 100644
index 00000000000..902735238e3
--- /dev/null
+++ b/TAO/CIAO/examples/OEP/Display/descriptors/NOTE.txt
@@ -0,0 +1,140 @@
+This directory contains various XML descriptors and configuration
+files required to compose the HUDisplay application in a variety of
+different ways. Let's go over a few important files first:
+
+test.dat:
+---------
+
+ This file describes the deployment daemons CIAO's Assembly_Manager
+ will contact to instantiate ComponentServer's, home's, and component
+ instances. Each line specify the name of a installation
+ "destination" (I used this to specify <processcollocation>
+ destination in various *.cad files) and the corresponding IOR for
+ the CIAO_Daemon. The first entry is the "default" destination the
+ deployment framework will use.
+
+ For example, test.dat now contains:
+
+ Default corbaloc:iiop:localhost:10000/ServerActivator
+ Remote corbaloc:iiop:localhost:12000/ServerActivator
+
+ You can copy and modify the copy to deploy the components in various
+ different locations to let the application truely "distributed".
+ For example, changing the remote ServerActivator to:
+ corbaloc:iiop:deuce.doc.wustl.edu:13000/ServerActivator
+
+ Remember to start up the Assembly_Manager in Step 2 using the
+ revised "test.dat" you created, and start up the CIAO_Daemon's in
+ Step 1 according to the specification.
+
+*.cad:
+------
+
+ These files specify how an application should be composed. The
+ specification includes, where to install a component, what
+ implementation to use, and how to connect components together.
+ Currently, we have:
+
+ BasicSP.cad: Plain vanilla assembly descriptor. This file install
+ all components using the "Default" (the first daemon)
+ in 'test.dat. You can see the application output
+ from the default daemon shell.
+
+Unfortunately, there's no run_test.pl for starting and running these
+example configurations/assemblies as these daemons/managers programs
+are still under development. You will need several shell windows for
+them. All the following step should be run from this subdirectory
+($CIAO_ROOT/examples/OEP/Display/descriptors/). Here are the
+steps to demonstrate the examples:
+
+Step 1:
+=======
+
+ You need to start up the CIAO daemon as specified in the
+ deployment configuration file 'test.dat' (Notice the endpoint
+ specification.) If you run more than one daemon (each with its
+ own host port), I recommend running each CIAO_Daemon in its own
+ shell window so you can tell where a component in the example
+ application is running. Here are some hints on how to start the
+ daemon:
+
+ ${CIAO_ROOT}/tools/Daemon/CIAO_Daemon -ORBEndpoint iiop://localhost:10000 -n ../../../../tools/ComponentServer/ComponentServer
+
+ and on Windows
+
+ %CIAO_ROOT%/tools/Daemon/CIAO_Daemon -ORBEndpoint iiop://localhost:10000 -n ../../../../tools/ComponentServer/ComponentServer
+
+ Note that the environment variable CIAO_ROOT must be set
+ (to TAO_ROOT/CIAO).
+
+Step 2:
+=======
+
+ Next, you will need to start up the Assembly_Manager which actually
+ does the assembly work. This should also be started in a separate
+ shell window.
+
+ ${CIAO_ROOT}/tools/Assembly_Deployer/Assembly_Manager -o ior -c test.dat
+
+ or
+
+ %CIAO_ROOT%/tools/Assembly_Deployer/Assembly_Manager -o ior -c test.dat
+
+Step 3:
+=======
+
+ You then need to instruct the Assembly_Manager to deploy a specific
+ component assembly descriptor. For example:
+
+ ${CIAO_ROOT}/tools/Assembly_Deployer/Assembly_Deployer -k file://ior -a BasicSP.cad -o IDfile
+
+ or
+
+ %CIAO_ROOT%/tools/Assembly_Deployer/Assembly_Deployer -k file://ior -a BasicSP.cad -o IDfile
+
+Step 4:
+=======
+
+ All the .cad files instruct the Assembly_Manager to write the IOR of
+ the RateGen component to a file called "rategen.ior" in this
+ directory. You will then need to use a controller program in a
+ separate shell window to switch on/off the Rate Generator. Cont
+
+ Execute the controller with:
+
+ ..\EC\controller -o # To switch on the EC component
+
+ See its source to check what options are available to start up the
+ controller. (Hints: you can control the rate (hertz) of the Rate
+ Generator component.)
+
+ Once the controller is running, check out the Daemon window for
+ text-based BMClosedED and BMDisplay components. Once you are
+ happy with it, you can stop the EC component by executing the
+ controller as:
+
+ ../EC/controller -f # To switch off the EC component
+
+ Repeat this step again to instruct the EC component to start
+ generating events.
+
+Step 5:
+=======
+
+ Once you are done with the test. Use the following command to
+ tear_down the application, kill all ComponentServer's, and terminate
+ both the Assembly_Deployer and Assembly_Manager process.
+
+ ${CIAO_ROOT}/tools/Assembly_Deployer/Assembly_Deployer -k file://ior -d IDfile
+
+ or
+
+ %CIAO_ROOT%/tools/Assembly_Deployer/Assembly_Deployer -k file://ior -d IDfile
+
+ Repeat Step 2-5 using different configurations and assembly
+ descriptors.
+
+Step 6:
+=======
+
+ Terminate CIAO_Daemon (either using ^C or DaemonController.)
diff --git a/TAO/CIAO/examples/handcrafted/BasicSP_EC/BMClosedED/BMClosedED.mpc b/TAO/CIAO/examples/handcrafted/BasicSP_EC/BMClosedED/BMClosedED.mpc
new file mode 100644
index 00000000000..5ebab1cc4e2
--- /dev/null
+++ b/TAO/CIAO/examples/handcrafted/BasicSP_EC/BMClosedED/BMClosedED.mpc
@@ -0,0 +1,66 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -l .. -p HUDisplay -i BMClosedED"
+// This file has been manually modified to add a second component implementation.
+
+project(BasicSP_EC_BMClosedED_stub): ciao_client {
+ requires += dummy_label
+ after += BasicSP_EC_stub
+ sharedname = BMClosedED_stub
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+ idlflags += -Wb,stub_export_macro=BMCLOSEDED_STUB_Export -Wb,stub_export_include=BMClosedED_stub_export.h -Wb,skel_export_macro=BMCLOSEDED_SVNT_Export -Wb,skel_export_include=BMClosedED_svnt_export.h
+ dynamicflags = BMCLOSEDED_STUB_BUILD_DLL
+ libs += TAO_RTEvent
+
+ IDL_Files {
+ BMClosedED.idl
+ }
+
+ Source_Files {
+ BMClosedEDC.cpp
+ }
+}
+
+project(BasicSP_EC_BMClosedED_svnt) : ciao_servant {
+ requires += dummy_label
+ after += BasicSP_EC_svnt BasicSP_EC_BMClosedED_stub
+ sharedname = BMClosedED_svnt
+ libs += BMClosedED_stub BasicSP_stub BasicSP_svnt TAO_RTEvent
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+ idlflags += -Wb,export_macro=BMCLOSEDED_SVNT_Export -Wb,export_include=BMClosedED_svnt_export.h
+ dynamicflags = BMCLOSEDED_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ BMClosedED.cidl
+ }
+
+ IDL_Files {
+ BMClosedEDE.idl
+ }
+
+ Source_Files {
+ BMClosedEDEC.cpp
+ BMClosedEDS.cpp
+ BMClosedED_svnt.cpp
+ }
+}
+
+
+project(BasicSP_EC_BMClosedED_exec) : ciao_component {
+ requires += dummy_label
+ after += BasicSP_EC_BMClosedED_svnt
+ sharedname = BMClosedED_exec
+ libs += BMClosedED_stub BMClosedED_svnt BasicSP_stub BasicSP_svnt TAO_RTEvent
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+ idlflags += -Wb,export_macro=BMCLOSEDED_EXEC_Export -Wb,export_include=BMClosedED_exec_export.h
+ dynamicflags = BMCLOSEDED_EXEC_BUILD_DLL
+
+ IDL_Files {
+ BMClosedEDEI.idl
+ }
+
+ Source_Files {
+ BMClosedEDEIC.cpp
+ BMClosedED_exec.cpp
+ }
+}
+
diff --git a/TAO/CIAO/examples/handcrafted/BasicSP_EC/BMDevice/BMDevice.mpc b/TAO/CIAO/examples/handcrafted/BasicSP_EC/BMDevice/BMDevice.mpc
new file mode 100644
index 00000000000..048916c3025
--- /dev/null
+++ b/TAO/CIAO/examples/handcrafted/BasicSP_EC/BMDevice/BMDevice.mpc
@@ -0,0 +1,67 @@
+// $Id$
+
+project(BasicSP_EC_BMDevice_stub): ciao_client {
+ after += BasicSP_EC_stub
+ sharedname = BMDevice_stub
+ requires += dummy_label
+
+ idlflags += -Wb,stub_export_macro=BMDEVICE_STUB_Export -Wb,stub_export_include=BMDevice_stub_export.h -Wb,skel_export_macro=BMDEVICE_SVNT_Export -Wb,skel_export_include=BMDevice_svnt_export.h
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+ libs += BasicSP_stub TAO_RTEvent
+ dynamicflags = BMDEVICE_STUB_BUILD_DLL
+
+ IDL_Files {
+ BMDevice.idl
+ }
+
+ Source_Files {
+ BMDeviceC.cpp
+ }
+}
+
+project(BasicSP_EC_BMDevice_svnt) : ciao_servant {
+ after += BasicSP_EC_BMDevice_stub BasicSP_EC_stub
+ sharedname = BMDevice_svnt
+ libs += BMDevice_stub BasicSP_stub BasicSP_svnt TAO_RTEvent
+ requires += dummy_label
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+ idlflags += -Wb,export_macro=BMDEVICE_SVNT_Export -Wb,export_include=BMDevice_svnt_export.h
+ dynamicflags = BMDEVICE_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ BMDevice.cidl
+ }
+
+ IDL_Files {
+ BMDeviceE.idl
+ }
+
+ Source_Files {
+ BMDeviceEC.cpp
+ BMDeviceS.cpp
+ BMDevice_svnt.cpp
+ }
+}
+
+
+project(BasicSP_EC_BMDevice_exec) : ciao_component {
+ after += BasicSP_EC_BMDevice_svnt
+ sharedname = BMDevice_exec
+ requires += dummy_label
+ libs += BMDevice_stub BMDevice_svnt BasicSP_stub BasicSP_svnt TAO_RTEvent
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+ idlflags += -Wb,export_macro=BMDEVICE_EXEC_Export -Wb,export_include=BMDevice_exec_export.h
+ dynamicflags = BMDEVICE_EXEC_BUILD_DLL
+
+ IDL_Files {
+ BMDeviceEI.idl
+ }
+
+ Source_Files {
+ BMDeviceES.cpp
+ BMDeviceEIC.cpp
+ BMDeviceEIS.cpp
+ BMDevice_exec.cpp
+ }
+}
+
diff --git a/TAO/CIAO/examples/handcrafted/BasicSP_EC/BMDisplay/BMDisplay.mpc b/TAO/CIAO/examples/handcrafted/BasicSP_EC/BMDisplay/BMDisplay.mpc
new file mode 100644
index 00000000000..7083ae3cbd7
--- /dev/null
+++ b/TAO/CIAO/examples/handcrafted/BasicSP_EC/BMDisplay/BMDisplay.mpc
@@ -0,0 +1,65 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -l .. -p BasicSP -i BMDisplay"
+
+project(BasicSP_EC_BMDisplay_stub): ciao_client {
+ after += BasicSP_EC_stub
+ requires += dummy_label
+ sharedname = BMDisplay_stub
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+ idlflags += -Wb,stub_export_macro=BMDISPLAY_STUB_Export -Wb,stub_export_include=BMDisplay_stub_export.h -Wb,skel_export_macro=BMDISPLAY_SVNT_Export -Wb,skel_export_include=BMDisplay_svnt_export.h
+ dynamicflags = BMDISPLAY_STUB_BUILD_DLL
+ libs += TAO_RTEvent
+
+ IDL_Files {
+ BMDisplay.idl
+ }
+
+ Source_Files {
+ BMDisplayC.cpp
+ }
+}
+
+project(BasicSP_EC_BMDisplay_svnt) : ciao_servant {
+ after += BasicSP_EC_svnt BasicSP_EC_BMDisplay_stub
+ requires += dummy_label
+ sharedname = BMDisplay_svnt
+ libs += BMDisplay_stub BasicSP_stub BasicSP_svnt TAO_RTEvent
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+ idlflags += -Wb,export_macro=BMDISPLAY_SVNT_Export -Wb,export_include=BMDisplay_svnt_export.h
+ dynamicflags = BMDISPLAY_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ BMDisplay.cidl
+ }
+
+ IDL_Files {
+ BMDisplayE.idl
+ }
+
+ Source_Files {
+ BMDisplayEC.cpp
+ BMDisplayS.cpp
+ BMDisplay_svnt.cpp
+ }
+}
+
+
+project(BasicSP_EC_BMDisplay_exec) : ciao_component {
+ after += BasicSP_EC_BMDisplay_svnt
+ requires += dummy_label
+ sharedname = BMDisplay_exec
+ libs += BMDisplay_stub BMDisplay_svnt BasicSP_stub BasicSP_svnt TAO_RTEvent
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+ idlflags += -Wb,export_macro=BMDISPLAY_EXEC_Export -Wb,export_include=BMDisplay_exec_export.h
+ dynamicflags = BMDISPLAY_EXEC_BUILD_DLL
+
+ IDL_Files {
+ BMDisplayEI.idl
+ }
+
+ Source_Files {
+ BMDisplayEIC.cpp
+ BMDisplay_exec.cpp
+ }
+}
+
diff --git a/TAO/CIAO/examples/handcrafted/BasicSP_EC/BasicSP.mpc b/TAO/CIAO/examples/handcrafted/BasicSP_EC/BasicSP.mpc
new file mode 100644
index 00000000000..e7b8ab087da
--- /dev/null
+++ b/TAO/CIAO/examples/handcrafted/BasicSP_EC/BasicSP.mpc
@@ -0,0 +1,35 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -n HUDisplay"
+
+project(BasicSP_EC_stub): ciao_client {
+
+ requires += dummy_label
+ sharedname = BasicSP_stub
+ idlflags += -Wb,stub_export_macro=BASICSP_STUB_Export -Wb,stub_export_include=BasicSP_stub_export.h -Wb,skel_export_macro=BASICSP_SVNT_Export -Wb,skel_export_include=BasicSP_svnt_export.h
+ dynamicflags = BASICSP_STUB_BUILD_DLL
+ libpaths += ..\..\..\..\..\lib,..\..\..\..\tao\IFR_Client,..\..\..\..\tao\Valuetype,..\..\..\..\tao,..\..\..\..\..\ace,..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\tao\PortableServer,..\..\..\..\tao\IORInterceptor,..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\ACEXML\common,..\..\..\..\tao\IORTable
+ libs += TAO_RTEvent
+
+ IDL_Files {
+ BasicSP.idl
+ }
+
+ Source_Files {
+ BasicSPC.cpp
+ }
+}
+
+project(BasicSP_EC_svnt) : ciao_server {
+ requires += dummy_label
+ after += BasicSP_stub
+ sharedname = BasicSP_svnt
+ libs += BasicSP_stub TAO_RTEvent
+ libpaths += ..\..\..\..\..\lib,..\..\..\..\tao\IFR_Client,..\..\..\..\tao\Valuetype,..\..\..\..\tao,..\..\..\..\..\ace,..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\tao\PortableServer,..\..\..\..\tao\IORInterceptor,..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\ACEXML\common,..\..\..\..\tao\IORTable
+
+ idlflags += -Wb,export_macro=BASICSP_SVNT_Export -Wb,export_include=BasicSP_svnt_export.h
+ dynamicflags = BASICSP_SVNT_BUILD_DLL
+
+ Source_Files {
+ BasicSPS.cpp
+ }
+}
diff --git a/TAO/CIAO/examples/handcrafted/BasicSP_EC/EC/EC.mpc b/TAO/CIAO/examples/handcrafted/BasicSP_EC/EC/EC.mpc
new file mode 100644
index 00000000000..84f5ac0880c
--- /dev/null
+++ b/TAO/CIAO/examples/handcrafted/BasicSP_EC/EC/EC.mpc
@@ -0,0 +1,75 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -l .. -p BasicSP_EC -i -c EC"
+
+project(BasicSP_EC_EC_stub): ciao_client {
+ after += BasicSP_EC_stub
+ requires += dummy_label
+ sharedname = EC_stub
+ idlflags += -Wb,stub_export_macro=EC_STUB_Export -Wb,stub_export_include=EC_stub_export.h -Wb,skel_export_macro=EC_SVNT_Export -Wb,skel_export_include=EC_svnt_export.h
+
+ IDL_Files {
+ EC.idl
+ }
+
+ Source_Files {
+ ECC.cpp
+ }
+}
+
+project(BasicSP_ECEC_svnt) : ciao_servant {
+ after += BasicSP_EC_svnt EC_stub
+ requires += dummy_label
+ sharedname = EC_svnt
+ libs += EC_stub BasicSP_EC_stub BasicSP_EC_svnt
+ libpaths += ..
+ idlflags += -Wb,export_macro=EC_SVNT_Export -Wb,export_include=EC_svnt_export.h
+
+ CIDL_Files {
+ EC.cidl
+ }
+
+ IDL_Files {
+ ECE.idl
+ }
+
+ Source_Files {
+ ECEC.cpp
+ ECS.cpp
+ EC_svnt.cpp
+ }
+}
+
+
+project(BasicSP_EC_EC_exec) : ciao_component {
+ after += EC_svnt
+ requires += dummy_label
+ sharedname = EC_exec
+ libs += EC_stub EC_svnt BasicSP_EC_stub BasicSP_EC_svnt
+ libpaths += ..
+ idlflags += -Wb,export_macro=EC_EXEC_Export -Wb,export_include=EC_exec_export.h
+ IDL_Files {
+ ECEI.idl
+ }
+
+ Source_Files {
+ ECEIC.cpp
+ EC_exec.cpp
+ }
+}
+
+
+
+project (BasicSP_EC_EC_client) : ciao_client {
+ exename = client
+ requires += dummy_label
+ after += EC_stub BasicSP_EC_stub
+ libpaths += ..
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ client.cpp
+ }
+}
+
diff --git a/TAO/CIAO/examples/handcrafted/BasicSP_EC2/BMClosedED/BMClosedED.mpc b/TAO/CIAO/examples/handcrafted/BasicSP_EC2/BMClosedED/BMClosedED.mpc
new file mode 100644
index 00000000000..3cdde7c608d
--- /dev/null
+++ b/TAO/CIAO/examples/handcrafted/BasicSP_EC2/BMClosedED/BMClosedED.mpc
@@ -0,0 +1,66 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -l .. -p HUDisplay -i BMClosedED"
+// This file has been manually modified to add a second component implementation.
+
+project(BasicSP_EC2_BMClosedED_stub): ciao_client {
+ after += BasicSP_EC2_stub
+ requires += dummy_label
+ sharedname = BMClosedED_stub
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+ idlflags += -Wb,stub_export_macro=BMCLOSEDED_STUB_Export -Wb,stub_export_include=BMClosedED_stub_export.h -Wb,skel_export_macro=BMCLOSEDED_SVNT_Export -Wb,skel_export_include=BMClosedED_svnt_export.h
+ dynamicflags = BMCLOSEDED_STUB_BUILD_DLL
+ libs += TAO_RTEvent
+
+ IDL_Files {
+ BMClosedED.idl
+ }
+
+ Source_Files {
+ BMClosedEDC.cpp
+ }
+}
+
+project(BasicSp_Ec2_BMClosedED_svnt) : ciao_servant {
+ after += BasicSP_EC2_svnt BasicSP_EC2_BMClosedED_stub
+ requires += dummy_label
+ sharedname = BMClosedED_svnt
+ libs += BMClosedED_stub BasicSP_stub BasicSP_svnt TAO_RTEvent
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+ idlflags += -Wb,export_macro=BMCLOSEDED_SVNT_Export -Wb,export_include=BMClosedED_svnt_export.h
+ dynamicflags = BMCLOSEDED_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ BMClosedED.cidl
+ }
+
+ IDL_Files {
+ BMClosedEDE.idl
+ }
+
+ Source_Files {
+ BMClosedEDEC.cpp
+ BMClosedEDS.cpp
+ BMClosedED_svnt.cpp
+ }
+}
+
+
+project(BasicSP_EC2_BMClosedED_exec) : ciao_component {
+ after += BasicSP_EC2_BMClosedED_svnt
+ sharedname = BMClosedED_exec
+ requires += dummy_label
+ libs += BMClosedED_stub BMClosedED_svnt BasicSP_stub BasicSP_svnt TAO_RTEvent
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+ idlflags += -Wb,export_macro=BMCLOSEDED_EXEC_Export -Wb,export_include=BMClosedED_exec_export.h
+ dynamicflags = BMCLOSEDED_EXEC_BUILD_DLL
+
+ IDL_Files {
+ BMClosedEDEI.idl
+ }
+
+ Source_Files {
+ BMClosedEDEIC.cpp
+ BMClosedED_exec.cpp
+ }
+}
+
diff --git a/TAO/CIAO/examples/handcrafted/BasicSP_EC2/BMDevice/BMDevice.mpc b/TAO/CIAO/examples/handcrafted/BasicSP_EC2/BMDevice/BMDevice.mpc
new file mode 100644
index 00000000000..c88559d19b4
--- /dev/null
+++ b/TAO/CIAO/examples/handcrafted/BasicSP_EC2/BMDevice/BMDevice.mpc
@@ -0,0 +1,67 @@
+// $Id$
+
+project(BasicSP_EC2_BMDevice_stub): ciao_client {
+ after += BasicSP_EC2_stub
+ requires += dummy_label
+ sharedname = BMDevice_stub
+
+ idlflags += -Wb,stub_export_macro=BMDEVICE_STUB_Export -Wb,stub_export_include=BMDevice_stub_export.h -Wb,skel_export_macro=BMDEVICE_SVNT_Export -Wb,skel_export_include=BMDevice_svnt_export.h
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+ libs += BasicSP_stub TAO_RTEvent
+ dynamicflags = BMDEVICE_STUB_BUILD_DLL
+
+ IDL_Files {
+ BMDevice.idl
+ }
+
+ Source_Files {
+ BMDeviceC.cpp
+ }
+}
+
+project(BasicSP_EC2_BMDevice_svnt) : ciao_servant {
+ after += BasicSP_EC2_BMDevice_stub BasicSP_EC2_stub
+ requires += dummy_label
+ sharedname = BMDevice_svnt
+ libs += BMDevice_stub BasicSP_stub BasicSP_svnt TAO_RTEvent
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+ idlflags += -Wb,export_macro=BMDEVICE_SVNT_Export -Wb,export_include=BMDevice_svnt_export.h
+ dynamicflags = BMDEVICE_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ BMDevice.cidl
+ }
+
+ IDL_Files {
+ BMDeviceE.idl
+ }
+
+ Source_Files {
+ BMDeviceEC.cpp
+ BMDeviceS.cpp
+ BMDevice_svnt.cpp
+ }
+}
+
+
+project(BasicSP_EC2_BMDevice_exec) : ciao_component {
+ after += BasicSP_EC2_BMDevice_svnt
+ requires += dummy_label
+ sharedname = BMDevice_exec
+ libs += BMDevice_stub BMDevice_svnt BasicSP_stub BasicSP_svnt TAO_RTEvent
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+ idlflags += -Wb,export_macro=BMDEVICE_EXEC_Export -Wb,export_include=BMDevice_exec_export.h
+ dynamicflags = BMDEVICE_EXEC_BUILD_DLL
+
+ IDL_Files {
+ BMDeviceEI.idl
+ }
+
+ Source_Files {
+ BMDeviceES.cpp
+ BMDeviceEIC.cpp
+ BMDeviceEIS.cpp
+ BMDevice_exec.cpp
+ }
+}
+
diff --git a/TAO/CIAO/examples/handcrafted/BasicSP_EC2/BMDisplay/BMDisplay.mpc b/TAO/CIAO/examples/handcrafted/BasicSP_EC2/BMDisplay/BMDisplay.mpc
new file mode 100644
index 00000000000..a9c947d66a7
--- /dev/null
+++ b/TAO/CIAO/examples/handcrafted/BasicSP_EC2/BMDisplay/BMDisplay.mpc
@@ -0,0 +1,65 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -l .. -p BasicSP -i BMDisplay"
+
+project(BasicSP_EC2_BMDisplay_stub): ciao_client {
+ after += BasicSP_EC2_stub
+ requires += dummy_label
+ sharedname = BMDisplay_stub
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+ idlflags += -Wb,stub_export_macro=BMDISPLAY_STUB_Export -Wb,stub_export_include=BMDisplay_stub_export.h -Wb,skel_export_macro=BMDISPLAY_SVNT_Export -Wb,skel_export_include=BMDisplay_svnt_export.h
+ dynamicflags = BMDISPLAY_STUB_BUILD_DLL
+ libs += TAO_RTEvent
+
+ IDL_Files {
+ BMDisplay.idl
+ }
+
+ Source_Files {
+ BMDisplayC.cpp
+ }
+}
+
+project(BasicSP_EC2_BMDisplay_svnt) : ciao_servant {
+ after += BasicSP_EC2_svnt BasicSP_EC2_BMDisplay_stub
+ requires += dummy_label
+ sharedname = BMDisplay_svnt
+ libs += BMDisplay_stub BasicSP_stub BasicSP_svnt TAO_RTEvent
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+ idlflags += -Wb,export_macro=BMDISPLAY_SVNT_Export -Wb,export_include=BMDisplay_svnt_export.h
+ dynamicflags = BMDISPLAY_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ BMDisplay.cidl
+ }
+
+ IDL_Files {
+ BMDisplayE.idl
+ }
+
+ Source_Files {
+ BMDisplayEC.cpp
+ BMDisplayS.cpp
+ BMDisplay_svnt.cpp
+ }
+}
+
+
+project(BasicSP_EC2_BMDisplay_exec) : ciao_component {
+ after += BMDisplay_EC2_svnt
+ requires += dummy_label
+ sharedname = BMDisplay_exec
+ libs += BMDisplay_stub BMDisplay_svnt BasicSP_stub BasicSP_svnt TAO_RTEvent
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+ idlflags += -Wb,export_macro=BMDISPLAY_EXEC_Export -Wb,export_include=BMDisplay_exec_export.h
+ dynamicflags = BMDISPLAY_EXEC_BUILD_DLL
+
+ IDL_Files {
+ BMDisplayEI.idl
+ }
+
+ Source_Files {
+ BMDisplayEIC.cpp
+ BMDisplay_exec.cpp
+ }
+}
+
diff --git a/TAO/CIAO/examples/handcrafted/BasicSP_EC2/BasicSP.mpc b/TAO/CIAO/examples/handcrafted/BasicSP_EC2/BasicSP.mpc
new file mode 100644
index 00000000000..41070e5f37e
--- /dev/null
+++ b/TAO/CIAO/examples/handcrafted/BasicSP_EC2/BasicSP.mpc
@@ -0,0 +1,35 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -n HUDisplay"
+
+project(BasicSP_EC2_stub): ciao_client {
+
+ sharedname = BasicSP_stub
+ requires += dummy_label
+ idlflags += -Wb,stub_export_macro=BASICSP_STUB_Export -Wb,stub_export_include=BasicSP_stub_export.h -Wb,skel_export_macro=BASICSP_SVNT_Export -Wb,skel_export_include=BasicSP_svnt_export.h
+ dynamicflags = BASICSP_STUB_BUILD_DLL
+ libpaths += ..\..\..\..\..\lib,..\..\..\..\tao\IFR_Client,..\..\..\..\tao\Valuetype,..\..\..\..\tao,..\..\..\..\..\ace,..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\tao\PortableServer,..\..\..\..\tao\IORInterceptor,..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\ACEXML\common,..\..\..\..\tao\IORTable
+ libs += TAO_RTEvent
+
+ IDL_Files {
+ BasicSP.idl
+ }
+
+ Source_Files {
+ BasicSPC.cpp
+ }
+}
+
+project(BasicSP_EC2_svnt) : ciao_server {
+ after += BasicSP_stub
+ requires += dummy_label
+ sharedname = BasicSP_svnt
+ libs += BasicSP_stub TAO_RTEvent
+ libpaths += ..\..\..\..\..\lib,..\..\..\..\tao\IFR_Client,..\..\..\..\tao\Valuetype,..\..\..\..\tao,..\..\..\..\..\ace,..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\tao\PortableServer,..\..\..\..\tao\IORInterceptor,..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\ACEXML\common,..\..\..\..\tao\IORTable
+
+ idlflags += -Wb,export_macro=BASICSP_SVNT_Export -Wb,export_include=BasicSP_svnt_export.h
+ dynamicflags = BASICSP_SVNT_BUILD_DLL
+
+ Source_Files {
+ BasicSPS.cpp
+ }
+}
diff --git a/TAO/CIAO/examples/handcrafted/BasicSP_EC2/EC/EC.mpc b/TAO/CIAO/examples/handcrafted/BasicSP_EC2/EC/EC.mpc
new file mode 100644
index 00000000000..3adf2a52f33
--- /dev/null
+++ b/TAO/CIAO/examples/handcrafted/BasicSP_EC2/EC/EC.mpc
@@ -0,0 +1,98 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -l .. -p BasicSP -i -c EC"
+
+project(BasicSP_EC2_EC_stub): ciao_client {
+ after += BasicSP_EC2_stub
+ requires += dummy_label
+ sharedname = EC_stub
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+ idlflags += -Wb,stub_export_macro=EC_STUB_Export -Wb,stub_export_include=EC_stub_export.h -Wb,skel_export_macro=EC_SVNT_Export -Wb,skel_export_include=EC_svnt_export.h
+ dynamicflags = EC_STUB_BUILD_DLL
+ libs += TAO_RTEvent
+
+ IDL_Files {
+ EC.idl
+ }
+
+ Source_Files {
+ ECC.cpp
+ }
+}
+
+project(BasicSP_EC2_EC_svnt) : ciao_servant {
+ after += BasicSP_EC2_svnt BasicSP_EC2_EC_stub
+ requires += dummy_label
+ sharedname = EC_svnt
+ libs += EC_stub BasicSP_stub BasicSP_svnt TAO_RTEvent
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+ idlflags += -Wb,export_macro=EC_SVNT_Export -Wb,export_include=EC_svnt_export.h
+ dynamicflags = EC_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ EC.cidl
+ }
+
+ IDL_Files {
+ ECE.idl
+ }
+
+ Source_Files {
+ ECEC.cpp
+ ECS.cpp
+ EC_svnt.cpp
+ }
+}
+
+
+project(BasicSP_EC2_EC_exec) : ciao_component {
+ after += BasicSP_EC2_EC_svnt
+ sharedname = EC_exec
+ requires += dummy_label
+ libs += EC_stub BasicSP_stub EC_svnt TAO_RTEvent
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+ idlflags += -Wb,export_macro=EC_EXEC_Export -Wb,export_include=EC_exec_export.h
+ dynamicflags = EC_EXEC_BUILD_DLL
+
+ IDL_Files {
+ ECEI.idl
+ }
+
+ Source_Files {
+ ECEIC.cpp
+ EC_exec.cpp
+ }
+}
+
+
+
+project (BasicSP_EC2_EC_client) : ciao_client, valuetype {
+ exename = client
+ requires += dummy_label
+ after += BasicSP_EC2_EC_stub
+ libs += EC_stub BasicSP_stub TAO_RTEvent
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ client.cpp
+ }
+}
+
+
+project (BasicSP_EC2_EC_controller) : ciao_client, valuetype {
+ exename = controller
+ requires += dummy_label
+ after += BasicSP_EC2_EC_stub
+ libs += EC_stub BasicSP_stub TAO_RTEvent
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ controller.cpp
+ }
+}
+
diff --git a/TAO/CIAO/examples/handcrafted/BasicSP_EC2/RTEventService/RTEventService.mpc b/TAO/CIAO/examples/handcrafted/BasicSP_EC2/RTEventService/RTEventService.mpc
new file mode 100644
index 00000000000..074ba4f847b
--- /dev/null
+++ b/TAO/CIAO/examples/handcrafted/BasicSP_EC2/RTEventService/RTEventService.mpc
@@ -0,0 +1,67 @@
+// $Id$
+
+project(RTEventService_stub): ciao_client {
+ after += BasicSP_stub
+ requires += dummy_label
+ sharedname = RTEventService_stub
+
+ idlflags += -Wb,stub_export_macro=RTEVENTSERVICE_STUB_Export -Wb,stub_export_include=RTEventService_stub_export.h -Wb,skel_export_macro=RTEVENTSERVICE_SVNT_Export -Wb,skel_export_include=RTEventService_svnt_export.h
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+ libs += BasicSP_stub TAO_RTEvent
+ dynamicflags = RTEVENTSERVICE_STUB_BUILD_DLL
+
+ IDL_Files {
+ RTEventService.idl
+ }
+
+ Source_Files {
+ RTEventServiceC.cpp
+ }
+}
+
+project(RTEventService_svnt) : ciao_servant {
+ after += RTEventService_stub BasicSP_stub
+ requires += dummy_label
+ sharedname = RTEventService_svnt
+ libs += RTEventService_stub BasicSP_stub BasicSP_svnt TAO_RTEvent
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+ idlflags += -Wb,export_macro=RTEVENTSERVICE_SVNT_Export -Wb,export_include=RTEventService_svnt_export.h
+ dynamicflags = RTEVENTSERVICE_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ RTEventService.cidl
+ }
+
+ IDL_Files {
+ RTEventServiceE.idl
+ }
+
+ Source_Files {
+ RTEventServiceEC.cpp
+ RTEventServiceS.cpp
+ RTEventService_svnt.cpp
+ }
+}
+
+
+project(RTEventService_exec) : ciao_component {
+ after += RTEventService_svnt
+ requires += dummy_label
+ sharedname = RTEventService_exec
+ libs += RTEventService_stub RTEventService_svnt BasicSP_stub BasicSP_svnt TAO_RTEvent
+ libpaths += ..,..\..\..\..\..\..\lib,..\..\..\..\..\tao\IFR_Client,..\..\..\..\..\tao\Valuetype,..\..\..\..\..\tao,..\..\..\..\..\..\ace,..\..\..\..\..\orbsvcs\orbsvcs,..\..\..\..\..\tao\PortableServer,..\..\..\..\..\tao\IORInterceptor,..\..\..\..\..\tao\ObjRefTemplate,..\..\..\..\..\..\ACEXML\parser\parser,..\..\..\..\..\..\ACEXML\common,..\..\..\..\..\tao\IORTable
+ idlflags += -Wb,export_macro=RTEVENTSERVICE_EXEC_Export -Wb,export_include=RTEventService_exec_export.h
+ dynamicflags = RTEVENTSERVICE_EXEC_BUILD_DLL
+
+ IDL_Files {
+ RTEventServiceEI.idl
+ }
+
+ Source_Files {
+ RTEventServiceES.cpp
+ RTEventServiceEIC.cpp
+ RTEventServiceEIS.cpp
+ RTEventService_exec.cpp
+ }
+}
+
diff --git a/TAO/CIAO/performance-tests/Benchmark/Multi_Threaded/Multi_Threaded.mpc b/TAO/CIAO/performance-tests/Benchmark/Multi_Threaded/Multi_Threaded.mpc
new file mode 100644
index 00000000000..d8c8b1c966e
--- /dev/null
+++ b/TAO/CIAO/performance-tests/Benchmark/Multi_Threaded/Multi_Threaded.mpc
@@ -0,0 +1,17 @@
+// $Id$
+
+project (Multi_Threaded_client) : ciao_client, valuetype , strategies{
+ exename = client
+ after += RoundTripClient_stub
+ libs += RoundTripClient_stub Benchmark_stub
+ libpaths += ..
+ includes += ../RoundTripClient
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ client.cpp
+ Client_Task.cpp
+ }
+}
diff --git a/TAO/CIAO/performance-tests/Benchmark/RoundTrip/RoundTrip.mpc b/TAO/CIAO/performance-tests/Benchmark/RoundTrip/RoundTrip.mpc
new file mode 100644
index 00000000000..88abbd6494a
--- /dev/null
+++ b/TAO/CIAO/performance-tests/Benchmark/RoundTrip/RoundTrip.mpc
@@ -0,0 +1,91 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -l .. -p Benchmark -i -c RoundTrip"
+
+project(RoundTrip_stub): ciao_client {
+ after += Benchmark_stub
+ sharedname = RoundTrip_stub
+
+ libs += Benchmark_stub
+
+ idlflags += -Wb,stub_export_macro=ROUNDTRIP_STUB_Export
+ idlflags += -Wb,stub_export_include=RoundTrip_stub_export.h
+ idlflags += -Wb,skel_export_macro=ROUNDTRIP_SVNT_Export
+ idlflags += -Wb,skel_export_include=RoundTrip_svnt_export.h
+
+ dynamicflags = ROUNDTRIP_STUB_BUILD_DLL
+
+ IDL_Files {
+ RoundTrip.idl
+ }
+
+ Source_Files {
+ RoundTripC.cpp
+ }
+}
+
+project(RoundTrip_svnt) : ciao_servant {
+ after += Benchmark_svnt RoundTrip_stub
+ sharedname = RoundTrip_svnt
+
+ libs += RoundTrip_stub Benchmark_stub Benchmark_svnt
+
+ libpaths += ..
+
+ idlflags += -Wb,export_macro=ROUNDTRIP_SVNT_Export
+ idlflags += -Wb,export_include=RoundTrip_svnt_export.h
+
+ dynamicflags = ROUNDTRIP_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ RoundTrip.cidl
+ }
+
+ IDL_Files {
+ RoundTripE.idl
+ }
+
+ Source_Files {
+ RoundTripEC.cpp
+ RoundTripS.cpp
+ RoundTrip_svnt.cpp
+ }
+}
+
+
+project(RoundTrip_exec) : ciao_component {
+ after += RoundTrip_svnt
+ sharedname = RoundTrip_exec
+
+ libs += RoundTrip_stub Benchmark_stub RoundTrip_svnt
+ libpaths += ..
+
+ idlflags += -Wb,export_macro=ROUNDTRIP_EXEC_Export
+ idlflags += -Wb,export_include=RoundTrip_exec_export.h
+
+ dynamicflags = ROUNDTRIP_EXEC_BUILD_DLL
+
+ IDL_Files {
+ RoundTripEI.idl
+ }
+
+ Source_Files {
+ RoundTripEIC.cpp
+ RoundTrip_exec.cpp
+ }
+}
+
+
+
+project (RoundTrip_client) : ciao_client, valuetype, strategies{
+ exename = client
+ after += RoundTrip_stub
+ libs += RoundTrip_stub Benchmark_stub
+ libpaths += ..
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ client.cpp
+ }
+}
diff --git a/TAO/CIAO/performance-tests/Benchmark/RoundTrip/client.cpp b/TAO/CIAO/performance-tests/Benchmark/RoundTrip/client.cpp
new file mode 100644
index 00000000000..08bd7c111d9
--- /dev/null
+++ b/TAO/CIAO/performance-tests/Benchmark/RoundTrip/client.cpp
@@ -0,0 +1,183 @@
+// $Id$
+
+//==============================================================
+/**
+ * @file client.cpp
+ *
+ * This is a simple client test program that interact with the RoundTrip
+ * component implementation. The single threaded client issues
+ * two-way operations, the total latency (response time) is measured
+ * NOTE: this client implementation has been adapted from the
+ * $TAO_ROOT/performance-results/Latency/Single_Threaded/
+ *
+ * @author Arvind S. Krishna <arvindk@dre.vanderbilt.edu>
+ */
+//==============================================================
+#include "RoundTripC.h"
+#include "tao/Strategies/advanced_resource.h"
+#include "ace/Get_Opt.h"
+#include "ace/High_Res_Timer.h"
+#include "ace/Sched_Params.h"
+#include "ace/Stats.h"
+#include "ace/Sample_History.h"
+#include "ace/OS_NS_errno.h"
+
+const char *ior = "file://test.ior";
+int niterations = 100;
+int do_dump_history = 0;
+
+int
+parse_args (int argc, char *argv[])
+{
+ //parse arguments
+ ACE_Get_Opt get_opts (argc, argv, "hxk:i:");
+ char c;
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+ case 'h':
+ do_dump_history = 1;
+ break;
+
+ case 'k':
+ ior = get_opts.opt_arg ();
+ break;
+
+ case 'i':
+ niterations = ACE_OS::atoi (get_opts.opt_arg ());
+ break;
+
+ case '?':
+ default:
+ /* Could be any other parameter like -ORBSvcConf file so ignore */
+ break;
+ }
+ // Indicates sucessful parsing of the command line
+ return 0;
+}
+
+void
+set_priority ()
+{
+ int priority =
+ (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO)
+ + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2;
+ // Enable FIFO scheduling, e.g., RT scheduling class on Solaris.
+
+ if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO,
+ priority,
+ ACE_SCOPE_PROCESS)) != 0)
+ {
+ if (ACE_OS::last_error () == EPERM)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "client (%P|%t): user is not superuser, "
+ "test runs in time-shared class\n"));
+ }
+ else
+ ACE_ERROR ((LM_ERROR,
+ "client (%P|%t): sched_params failed\n"));
+ }
+
+}
+
+
+int
+main (int argc, char *argv[])
+{
+ ACE_TRY_NEW_ENV
+ {
+ //set priority on the platform
+ set_priority();
+
+ // Initialize orb
+ CORBA::ORB_var orb = CORBA::ORB_init (argc,
+ argv,
+ ""
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (parse_args(argc, argv) == -1)
+ {
+ ACE_DEBUG ((LM_DEBUG, "Error parsing Arguments\n"));
+ return -1;
+ }
+
+ // Resolve HomeFinder interface
+ CORBA::Object_var obj
+ = orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ Benchmark::RoundTripHome_var home
+ = Benchmark::RoundTripHome::_narrow (obj.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (CORBA::is_nil (home.in ()))
+ ACE_ERROR_RETURN ((LM_ERROR, "Unable to acquire TestHome objref\n"), -1);
+
+ Benchmark::RoundTrip_var test
+ = home->create (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ //Get the RoundTrip reference
+ Benchmark::LatencyTest_var round_trip = test->provide_latency ();
+
+ //Warmup the System by making some empty calls
+ long start = 0L;
+ for (int j = 0; j < 100; ++j)
+ {
+ round_trip->makeCall (start ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+
+ ///// Start Test ////////////////////////////////////////////
+ ACE_Sample_History history (niterations);
+
+ ACE_hrtime_t test_start = ACE_OS::gethrtime ();
+ for (int i = 0; i < niterations; ++i)
+ {
+ ACE_hrtime_t start = ACE_OS::gethrtime ();
+
+ //Test value to be sent to the server
+ long test = 0;
+
+ (void) round_trip->makeCall (test ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ ACE_hrtime_t now = ACE_OS::gethrtime ();
+ history.sample (now - start);
+ }
+
+ ACE_hrtime_t test_end = ACE_OS::gethrtime ();
+
+ ACE_DEBUG ((LM_DEBUG, "test finished\n"));
+
+ ACE_DEBUG ((LM_DEBUG, "High resolution timer calibration...."));
+ ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
+ ACE_DEBUG ((LM_DEBUG, "done\n"));
+
+ if (do_dump_history)
+ {
+ history.dump_samples ("HISTORY", gsf);
+ }
+
+ ACE_Basic_Stats stats;
+ history.collect_basic_stats (stats);
+ stats.dump_results ("Total", gsf);
+
+ ACE_Throughput_Stats::dump_throughput ("Total", gsf,
+ test_end - test_start,
+ stats.samples_count ());
+
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception Handled:");
+ return 1;
+ }
+
+ ACE_ENDTRY;
+
+ return 0;
+}
diff --git a/TAO/CIAO/performance-tests/Benchmark/RoundTripClient/RoundTripClient.mpc b/TAO/CIAO/performance-tests/Benchmark/RoundTripClient/RoundTripClient.mpc
new file mode 100644
index 00000000000..99b0968e61b
--- /dev/null
+++ b/TAO/CIAO/performance-tests/Benchmark/RoundTripClient/RoundTripClient.mpc
@@ -0,0 +1,105 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -l .. -p Benchmark -i -c RoundTripClient"
+
+project(RoundTripClient_stub): ciao_client {
+ after += Benchmark_stub
+ sharedname = RoundTripClient_stub
+
+ libs += Benchmark_stub
+
+ idlflags += -Wb,stub_export_macro=ROUNDTRIPCLIENT_STUB_Export
+ idlflags += -Wb,stub_export_include=RoundTripClient_stub_export.h
+ idlflags += -Wb,skel_export_macro=ROUNDTRIPCLIENT_SVNT_Export
+ idlflags += -Wb,skel_export_include=RoundTripClient_svnt_export.h
+
+ dynamicflags = ROUNDTRIPCLIENT_STUB_BUILD_DLL
+
+ IDL_Files {
+ RoundTripClient.idl
+ }
+
+ Source_Files {
+ RoundTripClientC.cpp
+ }
+}
+
+project(RoundTripClient_svnt) : ciao_servant {
+ after += Benchmark_svnt RoundTripClient_stub
+ sharedname = RoundTripClient_svnt
+ libs += RoundTripClient_stub Benchmark_stub Benchmark_svnt
+ libpaths += ..
+
+ idlflags += -Wb,export_macro=ROUNDTRIPCLIENT_SVNT_Export
+ idlflags +=-Wb,export_include=RoundTripClient_svnt_export.h
+
+ dynamicflags = ROUNDTRIPCLIENT_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ RoundTripClient.cidl
+ }
+
+ IDL_Files {
+ RoundTripClientE.idl
+ }
+
+ Source_Files {
+ RoundTripClientEC.cpp
+ RoundTripClientS.cpp
+ RoundTripClient_svnt.cpp
+ }
+}
+
+
+project(RoundTripClient_exec) : ciao_component {
+ after += RoundTripClient_svnt
+
+ sharedname = RoundTripClient_exec
+
+ libs += RoundTripClient_stub Benchmark_stub RoundTripClient_svnt
+
+ libpaths += ..
+
+ idlflags += -Wb,export_macro=ROUNDTRIPCLIENT_EXEC_Export
+ idlflags += -Wb,export_include=RoundTripClient_exec_export.h
+
+ dynamicflags = ROUNDTRIPCLIENT_EXEC_BUILD_DLL
+
+ IDL_Files {
+ RoundTripClientEI.idl
+ }
+
+ Source_Files {
+ RoundTripClientEIC.cpp
+ RoundTripClient_exec.cpp
+ }
+}
+
+
+project (*client) : ciao_client {
+ exename = client
+ after += RoundTripClient_stub
+ libs += RoundTripClient_stub Benchmark_stub
+ libpaths += ..
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ client.cpp
+ }
+}
+
+
+//project (RoundTripClient_controller) : ciao_client {
+// exename = controller
+// after += RoundTripClient_stub
+// libs += RoundTripClient_stub Benchmark_stub
+// libpaths += ..
+//
+// IDL_Files {
+// }
+//
+// Source_Files {
+// controller.cpp
+// }
+//}
diff --git a/TAO/CIAO/performance-tests/Protocols/Controller/Controller.cpp b/TAO/CIAO/performance-tests/Protocols/Controller/Controller.cpp
new file mode 100644
index 00000000000..2ea3c57a1c3
--- /dev/null
+++ b/TAO/CIAO/performance-tests/Protocols/Controller/Controller.cpp
@@ -0,0 +1,229 @@
+// $Id$
+
+#include "SenderC.h"
+#include "ReceiverC.h"
+#include "tao/ORB_Constants.h"
+#include "ace/Get_Opt.h"
+#include "ace/OS_NS_string.h"
+
+
+static const char *sender_ior = "file://sender.ior";
+static const char *distributor_ior = "file://distributor.ior";
+static const char *receiver_ior = "file://receiver.ior";
+static int shutdown_sender = 0;
+static int shutdown_distributor = 0;
+static int shutdown_receiver = 0;
+static CORBA::ULong iterations = 5;
+static CORBA::ULong invocation_rate = 5;
+static int count_missed_end_deadlines = 0;
+static int do_dump_history = 0;
+static int print_missed_invocations = 0;
+static CORBA::ULong message_size = 100;
+static const char *test_protocol = "IIOP";
+static int print_statistics = 1;
+static int number_of_connection_attempts = 20;
+static int enable_diffserv_code_points = 0;
+static int corba_priority = 0;
+static const char *test_type = "PACED";
+
+static int
+parse_args (int argc, char **argv)
+{
+ ACE_Get_Opt get_opts (argc, argv, "a:b:c:d:e:i:m:p:r:s:t:u:v:w:x:y:z:");
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+ case 'a':
+ test_type = get_opts.opt_arg ();
+ break;
+
+ case 'b':
+ enable_diffserv_code_points = ACE_OS::atoi (get_opts.opt_arg ());
+ break;
+
+ case 'c':
+ corba_priority = ACE_OS::atoi (get_opts.opt_arg ());
+ break;
+
+ case 'd':
+ do_dump_history = ACE_OS::atoi (get_opts.opt_arg ());
+ break;
+
+ case 'e':
+ count_missed_end_deadlines = ACE_OS::atoi (get_opts.opt_arg ());
+ break;
+
+ case 'i':
+ iterations = ACE_OS::atoi (get_opts.opt_arg ());
+ break;
+
+ case 'm':
+ print_missed_invocations = ACE_OS::atoi (get_opts.opt_arg ());
+ break;
+
+ case 'p':
+ test_protocol = get_opts.opt_arg ();
+ break;
+
+ case 'r':
+ invocation_rate = ACE_OS::atoi (get_opts.opt_arg ());
+ break;
+
+ case 's':
+ message_size = ACE_OS::atoi (get_opts.opt_arg ());
+ break;
+
+ case 't':
+ print_statistics = ACE_OS::atoi (get_opts.opt_arg ());
+ break;
+
+ case 'u':
+ sender_ior = get_opts.opt_arg ();
+ break;
+
+ case 'v':
+ distributor_ior = get_opts.opt_arg ();
+ break;
+
+ case 'w':
+ receiver_ior = get_opts.opt_arg ();
+ break;
+
+ case 'x':
+ shutdown_sender = ACE_OS::atoi (get_opts.opt_arg ());
+ break;
+
+ case 'y':
+ shutdown_distributor = ACE_OS::atoi (get_opts.opt_arg ());
+ break;
+
+ case 'z':
+ shutdown_receiver = ACE_OS::atoi (get_opts.opt_arg ());
+ break;
+
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s\n"
+ "\t-a <test type> (defaults to %s [valid values are PACED, THROUGHPUT, and LATENCY)\n"
+ "\t-b <enable diffserv code points> (defaults to %d)\n"
+ "\t-c <corba priority> (defaults to %d)\n"
+ "\t-d <show history> (defaults to %d)\n"
+ "\t-e <count missed end deadlines> (defaults to %d)\n"
+ "\t-h <help: shows options menu>\n"
+ "\t-i <iterations> (defaults to %d)\n"
+ "\t-m <print missed invocations for paced workers> (defaults to %d)\n"
+ "\t-p <test protocol> (defaults to %s [valid values are IIOP, DIOP, and SCIOP])\n"
+ "\t-r <invocation rate> (defaults to %d)\n"
+ "\t-s <message size> (defaults to %d)\n"
+ "\t-t <print stats> (defaults to %d)\n"
+ "\t-u <sender ior> (defaults to %s)\n"
+ "\t-v <distributor ior> (defaults to %s)\n"
+ "\t-w <receiver ior> (defaults to %s)\n"
+ "\t-x <shutdown sender> (defaults to %d)\n"
+ "\t-y <shutdown distributor> (defaults to %d)\n"
+ "\t-z <shutdown receiver> (defaults to %d)\n"
+ "\n",
+ argv[0],
+ test_type,
+ enable_diffserv_code_points,
+ corba_priority,
+ do_dump_history,
+ count_missed_end_deadlines,
+ iterations,
+ print_missed_invocations,
+ test_protocol,
+ invocation_rate,
+ message_size,
+ print_statistics,
+ sender_ior,
+ distributor_ior,
+ receiver_ior,
+ shutdown_sender,
+ shutdown_distributor,
+ shutdown_receiver),
+ -1);
+ }
+
+ return 0;
+}
+
+int
+main (int argc, char *argv[])
+{
+ try
+ {
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc, argv, "");
+
+ int result =
+ parse_args (argc, argv);
+ if (result != 0)
+ return result;
+
+ CORBA::Object_var object =
+ orb->string_to_object (sender_ior);
+
+ Protocols::Sender_var sender =
+ Protocols::Sender::_narrow (object.in ());
+
+ object =
+ orb->string_to_object (receiver_ior);
+
+ CORBA::ULong test_protocol_tag = IOP::TAG_INTERNET_IOP;
+ if (ACE_OS::strcmp (test_protocol, "DIOP") == 0)
+ test_protocol_tag = TAO_TAG_DIOP_PROFILE;
+ else if (ACE_OS::strcmp (test_protocol, "SCIOP") == 0)
+ test_protocol_tag = TAO_TAG_SCIOP_PROFILE;
+
+ Protocols::Sender_Controller::Test_Type test_type_tag = Protocols::Sender_Controller::PACED;
+ if (ACE_OS::strcmp (test_type, "THROUGHPUT") == 0)
+ test_type_tag = Protocols::Sender_Controller::THROUGHPUT;
+ else if (ACE_OS::strcmp (test_type, "LATENCY") == 0)
+ test_type_tag = Protocols::Sender_Controller::LATENCY;
+
+ sender->start (iterations,
+ invocation_rate,
+ count_missed_end_deadlines,
+ do_dump_history,
+ print_missed_invocations,
+ message_size,
+ test_protocol_tag,
+ print_statistics,
+ number_of_connection_attempts,
+ enable_diffserv_code_points,
+ corba_priority,
+ test_type_tag);
+
+ if (shutdown_sender)
+ sender->shutdown ();
+
+ if (shutdown_distributor)
+ {
+ Protocols::Receiver_var distributor =
+ Protocols::Receiver::_narrow (object.in ());
+
+ distributor->shutdown ();
+ }
+
+ if (shutdown_receiver)
+ {
+ Protocols::Receiver_var receiver =
+ Protocols::Receiver::_narrow (object.in ());
+
+ receiver->shutdown ();
+ }
+
+ return 0;
+ }
+ catch (CORBA::Exception &exception)
+ {
+ ACE_ERROR ((LM_ERROR,
+ "Unexpected exception caught by client: %s (%s)\n",
+ exception._name (),
+ exception._rep_id ()));
+
+ return -1;
+ }
+}
diff --git a/TAO/CIAO/performance-tests/Protocols/Controller/Controller.mpc b/TAO/CIAO/performance-tests/Protocols/Controller/Controller.mpc
new file mode 100644
index 00000000000..bc3e87ccb3d
--- /dev/null
+++ b/TAO/CIAO/performance-tests/Protocols/Controller/Controller.mpc
@@ -0,0 +1,8 @@
+// $Id$
+
+project (perf*) : ciao_client, rtcorba, exceptions {
+ after += Protocols_Sender_stub Protocols_Receiver_stub
+ includes += ../Sender
+ includes += ../Receiver
+ libs += Protocols_Receiver_stub Protocols_Sender_stub Protocols_stub
+}
diff --git a/TAO/CIAO/performance-tests/Protocols/Receiver/Receiver.mpc b/TAO/CIAO/performance-tests/Protocols/Receiver/Receiver.mpc
new file mode 100644
index 00000000000..28022a8c680
--- /dev/null
+++ b/TAO/CIAO/performance-tests/Protocols/Receiver/Receiver.mpc
@@ -0,0 +1,59 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -p Protocols Receiver"
+
+project(Protocols_Receiver_stub): ciao_client, exceptions {
+ libs += Protocols_stub
+ after += Protocols_stub
+ sharedname = Protocols_Receiver_stub
+ idlflags += -Wb,stub_export_macro=RECEIVER_STUB_Export -Wb,stub_export_include=Receiver_stub_export.h -Wb,skel_export_macro=RECEIVER_SVNT_Export -Wb,skel_export_include=Receiver_svnt_export.h
+ dynamicflags = RECEIVER_STUB_BUILD_DLL
+
+ IDL_Files {
+ Receiver.idl
+ }
+
+ Source_Files {
+ ReceiverC.cpp
+ }
+}
+
+project(Protocols_Receiver_svnt) : ciao_servant, exceptions {
+ after += Protocols_svnt Protocols_Receiver_stub
+ sharedname = Protocols_Receiver_svnt
+ libs += Protocols_Receiver_stub Protocols_stub Protocols_svnt
+ idlflags += -Wb,export_macro=RECEIVER_SVNT_Export -Wb,export_include=Receiver_svnt_export.h
+ dynamicflags = RECEIVER_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ Receiver.cidl
+ }
+
+ IDL_Files {
+ ReceiverE.idl
+ }
+
+ Source_Files {
+ ReceiverEC.cpp
+ ReceiverS.cpp
+ Receiver_svnt.cpp
+ }
+}
+
+
+project(Protocols_Receiver_exec) : ciao_component, exceptions {
+ after += Protocols_Receiver_svnt
+ sharedname = Protocols_Receiver_exec
+ libs += Protocols_Receiver_stub Protocols_Receiver_svnt Protocols_stub Protocols_svnt
+ idlflags += -Wb,export_macro=RECEIVER_EXEC_Export -Wb,export_include=Receiver_exec_export.h
+ dynamicflags = RECEIVER_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Receiver_exec.cpp
+ }
+}
+
+
+
diff --git a/TAO/CIAO/performance-tests/Protocols/Sender/Sender.mpc b/TAO/CIAO/performance-tests/Protocols/Sender/Sender.mpc
new file mode 100644
index 00000000000..81ea3b78c56
--- /dev/null
+++ b/TAO/CIAO/performance-tests/Protocols/Sender/Sender.mpc
@@ -0,0 +1,60 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -p Protocols Sender"
+
+project(Protocols_Sender_stub): ciao_client, exceptions {
+ libs += Protocols_stub
+ after += Protocols_stub
+ sharedname = Protocols_Sender_stub
+ idlflags += -Wb,stub_export_macro=SENDER_STUB_Export -Wb,stub_export_include=Sender_stub_export.h -Wb,skel_export_macro=SENDER_SVNT_Export -Wb,skel_export_include=Sender_svnt_export.h
+ dynamicflags = SENDER_STUB_BUILD_DLL
+
+ IDL_Files {
+ Sender.idl
+ }
+
+ Source_Files {
+ SenderC.cpp
+ }
+}
+
+project(Protocols_Sender_svnt) : ciao_servant, exceptions {
+ after += Protocols_svnt Protocols_Sender_stub
+ sharedname = Protocols_Sender_svnt
+ libs += Protocols_Sender_stub Protocols_stub Protocols_svnt
+ idlflags += -Wb,export_macro=SENDER_SVNT_Export -Wb,export_include=Sender_svnt_export.h
+ dynamicflags = SENDER_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ Sender.cidl
+ }
+
+ IDL_Files {
+ SenderE.idl
+ }
+
+ Source_Files {
+ SenderEC.cpp
+ SenderS.cpp
+ Sender_svnt.cpp
+ }
+}
+
+
+project(Protocols_Sender_exec) : ciao_component, rtcorba, exceptions {
+ after += Protocols_Sender_svnt
+ sharedname = Protocols_Sender_exec
+ libs += Protocols_Sender_stub Protocols_Sender_svnt Protocols_stub Protocols_svnt
+ includes += ../../../../tests/RTCORBA/Diffserv
+ idlflags += -Wb,export_macro=SENDER_EXEC_Export -Wb,export_include=Sender_exec_export.h
+ dynamicflags = SENDER_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Sender_exec.cpp
+ }
+}
+
+
+
diff --git a/TAO/CIAO/performance-tests/Protocols/Sender/Sender_exec.cpp b/TAO/CIAO/performance-tests/Protocols/Sender/Sender_exec.cpp
new file mode 100644
index 00000000000..95e8800fa83
--- /dev/null
+++ b/TAO/CIAO/performance-tests/Protocols/Sender/Sender_exec.cpp
@@ -0,0 +1,716 @@
+// $Id$
+
+#include "tao/ORB_Constants.h"
+#include "tao/debug.h"
+#include "tao/RTCORBA/RTCORBA.h"
+#include "tao/RTCORBA/Network_Priority_Mapping_Manager.h"
+#include "tao/RTCORBA/Network_Priority_Mapping.h"
+#include "tao/RTCORBA/RT_Policy_i.h"
+#include "ace/OS_NS_unistd.h"
+#include "ace/OS_NS_string.h"
+#include "ace/OS_NS_stdlib.h"
+#include "ace/OS_NS_time.h"
+#include "ace/High_Res_Timer.h"
+#include "ace/Stats.h"
+#include "ace/Array.h"
+#include "ace/Sample_History.h"
+#include "Custom_Network_Priority_Mapping.h"
+#include "Custom_Network_Priority_Mapping.cpp"
+#include "Sender_exec.h"
+
+static ACE_UINT32 gsf = 0;
+
+double
+to_seconds (ACE_UINT64 hrtime,
+ ACE_UINT32 sf)
+{
+ double seconds =
+#if defined ACE_LACKS_LONGLONG_T
+ hrtime / sf;
+#else /* ! ACE_LACKS_LONGLONG_T */
+ static_cast<double> (ACE_UINT64_DBLCAST_ADAPTER (hrtime / sf));
+#endif /* ! ACE_LACKS_LONGLONG_T */
+ seconds /= ACE_HR_SCALE_CONVERSION;
+
+ return seconds;
+}
+
+ACE_UINT64
+to_hrtime (double seconds,
+ ACE_UINT32 sf)
+{
+ return ACE_UINT64 (seconds * sf * ACE_HR_SCALE_CONVERSION);
+}
+
+class Worker
+{
+public:
+ Worker (CORBA::ORB_ptr orb,
+ RTCORBA::RTORB_ptr rtorb,
+ CORBA::PolicyManager_ptr policy_manager,
+ Protocols::test_ptr test,
+ ::CORBA::ULong iterations,
+ ::CORBA::ULong invocation_rate,
+ ::CORBA::Boolean count_missed_end_deadlines,
+ ::CORBA::Boolean do_dump_history,
+ ::CORBA::Boolean print_missed_invocations,
+ ::CORBA::ULong message_size,
+ ::CORBA::ULong test_protocol_tag,
+ ::CORBA::ULong number_of_connection_attempts,
+ ::CORBA::Boolean enable_diffserv_code_points,
+ ::Protocols::Sender_Controller::Test_Type test_type);
+
+ void run (void);
+
+ void print_stats (void);
+
+ void setup (void);
+
+private:
+
+ ACE_hrtime_t deadline_for_current_call (CORBA::ULong i);
+ void missed_start_deadline (CORBA::ULong invocation);
+ void missed_end_deadline (CORBA::ULong invocation);
+
+ RTCORBA::RTORB_var rtorb_;
+ CORBA::PolicyManager_var policy_manager_;
+ Protocols::test_var test_;
+ ACE_Sample_History history_;
+ ACE_hrtime_t interval_between_calls_;
+ ACE_hrtime_t test_start_;
+ ACE_hrtime_t test_end_;
+ CORBA::ULong missed_start_deadlines_;
+ CORBA::ULong missed_end_deadlines_;
+
+ typedef ACE_Array_Base<CORBA::ULong> Missed_Invocations;
+ Missed_Invocations missed_start_invocations_;
+ Missed_Invocations missed_end_invocations_;
+
+ CORBA::PolicyList base_protocol_policy_;
+ CORBA::PolicyList test_protocol_policy_;
+
+ CORBA::Long session_id_;
+
+ ::CORBA::ULong iterations_;
+ ::CORBA::ULong invocation_rate_;
+ ::CORBA::Boolean count_missed_end_deadlines_;
+ ::CORBA::Boolean do_dump_history_;
+ ::CORBA::Boolean print_missed_invocations_;
+ ::CORBA::ULong message_size_;
+ ::CORBA::ULong test_protocol_tag_;
+ ::CORBA::ULong number_of_connection_attempts_;
+ ::CORBA::Boolean enable_diffserv_code_points_;
+ ::Protocols::Sender_Controller::Test_Type test_type_;
+};
+
+Worker::Worker (CORBA::ORB_ptr orb,
+ RTCORBA::RTORB_ptr rtorb,
+ CORBA::PolicyManager_ptr policy_manager,
+ Protocols::test_ptr test,
+ ::CORBA::ULong iterations,
+ ::CORBA::ULong invocation_rate,
+ ::CORBA::Boolean count_missed_end_deadlines,
+ ::CORBA::Boolean do_dump_history,
+ ::CORBA::Boolean print_missed_invocations,
+ ::CORBA::ULong message_size,
+ ::CORBA::ULong test_protocol_tag,
+ ::CORBA::ULong number_of_connection_attempts,
+ ::CORBA::Boolean enable_diffserv_code_points,
+ ::Protocols::Sender_Controller::Test_Type test_type)
+ : rtorb_ (RTCORBA::RTORB::_duplicate (rtorb)),
+ policy_manager_ (CORBA::PolicyManager::_duplicate (policy_manager)),
+ test_ (Protocols::test::_duplicate (test)),
+ history_ (iterations),
+ interval_between_calls_ (),
+ missed_start_deadlines_ (0),
+ missed_end_deadlines_ (0),
+ missed_start_invocations_ (iterations),
+ missed_end_invocations_ (iterations),
+ iterations_ (iterations),
+ invocation_rate_ (invocation_rate),
+ count_missed_end_deadlines_ (count_missed_end_deadlines),
+ do_dump_history_ (do_dump_history),
+ print_missed_invocations_ (print_missed_invocations),
+ message_size_ (message_size),
+ test_protocol_tag_ (test_protocol_tag),
+ number_of_connection_attempts_ (number_of_connection_attempts),
+ enable_diffserv_code_points_ (enable_diffserv_code_points),
+ test_type_ (test_type)
+{
+ // Each sender will have a random session id. This helps in
+ // identifying late packets arriving at the server.
+ ACE_OS::srand ((unsigned) ACE_OS::time (NULL));
+ this->session_id_ = ACE_OS::rand ();
+
+ // Interval is inverse of rate.
+ this->interval_between_calls_ =
+ to_hrtime (1 / double (this->invocation_rate_), gsf);
+
+ // Base protocol is used for setting up and tearing down the test.
+ this->base_protocol_policy_.length (1);
+
+ // Test protocol is the one being tested.
+ this->test_protocol_policy_.length (1);
+
+ RTCORBA::ProtocolProperties_var base_transport_protocol_properties =
+ TAO_Protocol_Properties_Factory::create_transport_protocol_property (IOP::TAG_INTERNET_IOP,
+ orb->orb_core ());
+
+ RTCORBA::TCPProtocolProperties_var tcp_base_transport_protocol_properties =
+ RTCORBA::TCPProtocolProperties::_narrow (base_transport_protocol_properties.in ());
+
+ tcp_base_transport_protocol_properties->enable_network_priority (this->enable_diffserv_code_points_);
+
+ RTCORBA::ProtocolList protocols;
+ protocols.length (1);
+ protocols[0].transport_protocol_properties =
+ base_transport_protocol_properties;
+ protocols[0].orb_protocol_properties =
+ RTCORBA::ProtocolProperties::_nil ();
+
+ // IIOP is always used for the base protocol.
+ protocols[0].protocol_type = IOP::TAG_INTERNET_IOP;
+
+ this->base_protocol_policy_[0] =
+ this->rtorb_->create_client_protocol_policy (protocols);
+
+ // User decides the test protocol.
+ protocols[0].protocol_type = test_protocol_tag;
+
+ RTCORBA::ProtocolProperties_var test_transport_protocol_properties =
+ TAO_Protocol_Properties_Factory::create_transport_protocol_property (protocols[0].protocol_type,
+ orb->orb_core ());
+
+ if (protocols[0].protocol_type == TAO_TAG_DIOP_PROFILE)
+ {
+ RTCORBA::UserDatagramProtocolProperties_var udp_test_transport_protocol_properties =
+ RTCORBA::UserDatagramProtocolProperties::_narrow (test_transport_protocol_properties.in ());
+
+ udp_test_transport_protocol_properties->enable_network_priority (enable_diffserv_code_points);
+ }
+ else if (protocols[0].protocol_type == TAO_TAG_SCIOP_PROFILE)
+ {
+ RTCORBA::StreamControlProtocolProperties_var sctp_test_transport_protocol_properties =
+ RTCORBA::StreamControlProtocolProperties::_narrow (test_transport_protocol_properties.in ());
+
+ sctp_test_transport_protocol_properties->enable_network_priority (enable_diffserv_code_points);
+ }
+ else if (protocols[0].protocol_type == IOP::TAG_INTERNET_IOP)
+ {
+ RTCORBA::TCPProtocolProperties_var tcp_test_transport_protocol_properties =
+ RTCORBA::TCPProtocolProperties::_narrow (test_transport_protocol_properties.in ());
+
+ tcp_test_transport_protocol_properties->enable_network_priority (enable_diffserv_code_points);
+ }
+
+ protocols[0].transport_protocol_properties =
+ test_transport_protocol_properties;
+
+ this->test_protocol_policy_[0] =
+ this->rtorb_->create_client_protocol_policy (protocols);
+}
+
+void
+Worker::print_stats (void)
+{
+ CORBA::ULong missed_total_deadlines =
+ this->missed_start_deadlines_ + this->missed_end_deadlines_;
+
+ CORBA::ULong made_total_deadlines =
+ this->iterations_ - missed_total_deadlines;
+
+ ACE_DEBUG ((LM_DEBUG,
+ "\n************ Statistics ************\n\n"));
+
+ //
+ // Senders-side stats for PACED invocations are not too relevant
+ // since we are doing one way calls.
+ //
+ if (this->test_type_ == ::Protocols::Sender_Controller::PACED)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Rate = %d/sec; Iterations = %d; ",
+ this->invocation_rate_,
+ this->iterations_));
+
+ if (this->count_missed_end_deadlines_)
+ ACE_DEBUG ((LM_DEBUG,
+ "Deadlines made/missed[start,end]/%% = %d/%d[%d,%d]/%.2f%%; Effective Rate = %.2f\n",
+ made_total_deadlines,
+ missed_total_deadlines,
+ this->missed_start_deadlines_,
+ this->missed_end_deadlines_,
+ made_total_deadlines * 100 / (double) this->iterations_,
+ made_total_deadlines / to_seconds (this->test_end_ - this->test_start_, gsf)));
+ else
+ ACE_DEBUG ((LM_DEBUG,
+ "Deadlines made/missed/%% = %d/%d/%.2f%%; Effective Rate = %.2f\n",
+ made_total_deadlines,
+ missed_total_deadlines,
+ made_total_deadlines * 100 / (double) this->iterations_,
+ made_total_deadlines / to_seconds (this->test_end_ - this->test_start_, gsf)));
+
+ if (this->print_missed_invocations_)
+ {
+ ACE_DEBUG ((LM_DEBUG, "\nMissed start invocations are:\n"));
+
+ for (CORBA::ULong j = 0;
+ j < this->missed_start_deadlines_;
+ ++j)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "%d ",
+ this->missed_start_invocations_[j]));
+ }
+
+ ACE_DEBUG ((LM_DEBUG, "\n"));
+
+ if (this->count_missed_end_deadlines_)
+ {
+ ACE_DEBUG ((LM_DEBUG, "\nMissed end invocations are:\n"));
+
+ for (CORBA::ULong j = 0;
+ j < this->missed_end_deadlines_;
+ ++j)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "%d ",
+ this->missed_end_invocations_[j]));
+ }
+
+ ACE_DEBUG ((LM_DEBUG, "\n"));
+ }
+ }
+ }
+
+ // Individual calls are relevant for the PACED and LATENCY tests.
+ if (this->test_type_ == ::Protocols::Sender_Controller::PACED ||
+ this->test_type_ == ::Protocols::Sender_Controller::LATENCY)
+ {
+ if (this->do_dump_history_)
+ {
+ this->history_.dump_samples ("HISTORY", gsf);
+ }
+
+ ACE_Basic_Stats stats;
+ this->history_.collect_basic_stats (stats);
+ stats.dump_results ("Total", gsf);
+
+ ACE_Throughput_Stats::dump_throughput ("Total", gsf,
+ this->test_end_ - this->test_start_,
+ this->iterations_);
+ }
+ else
+ {
+ ACE_hrtime_t elapsed_time =
+ this->test_end_ - this->test_start_;
+
+ double seconds =
+ to_seconds (elapsed_time, gsf);
+
+ ACE_hrtime_t bits = this->iterations_;
+ bits *= this->message_size_ * 8;
+
+ ACE_DEBUG ((LM_DEBUG,
+ "%Q bits sent in %5.1f seconds at a rate of %5.2f Mbps\n",
+ bits,
+ seconds,
+ bits / seconds / 1000 / 1000));
+ }
+}
+
+ACE_hrtime_t
+Worker::deadline_for_current_call (CORBA::ULong i)
+{
+ ACE_hrtime_t deadline_for_current_call =
+ this->interval_between_calls_;
+
+ deadline_for_current_call *= (i + 1);
+
+ deadline_for_current_call += this->test_start_;
+
+ return deadline_for_current_call;
+}
+
+void
+Worker::missed_start_deadline (CORBA::ULong invocation)
+{
+ this->missed_start_invocations_[this->missed_start_deadlines_++] =
+ invocation;
+}
+
+void
+Worker::missed_end_deadline (CORBA::ULong invocation)
+{
+ if (this->count_missed_end_deadlines_)
+ this->missed_end_invocations_[this->missed_end_deadlines_++] =
+ invocation;
+}
+
+void
+Worker::setup (void)
+{
+ // Make sure we have a connection to the server using the test
+ // protocol.
+ this->policy_manager_->set_policy_overrides (this->test_protocol_policy_,
+ CORBA::SET_OVERRIDE);
+
+ // Since the network maybe unavailable temporarily, make sure to try
+ // for a few times before giving up.
+ for (CORBA::ULong j = 0;;)
+ {
+ try
+ {
+ // Send a message to ensure that the connection is setup.
+ this->test_->oneway_sync ();
+
+ break;
+ }
+ catch (CORBA::TRANSIENT &)
+ {
+ ++j;
+
+ if (j < this->number_of_connection_attempts_)
+ {
+ ACE_OS::sleep (1);
+
+ continue;
+ }
+ }
+
+ ACE_ERROR ((LM_ERROR,
+ "Cannot setup test protocol\n"));
+
+ ACE_OS::exit (-1);
+ }
+
+ const char *test_protocol = 0;
+ if (this->test_protocol_tag_ == IOP::TAG_INTERNET_IOP)
+ test_protocol = "IIOP";
+ else if (this->test_protocol_tag_ == TAO_TAG_DIOP_PROFILE)
+ test_protocol = "DIOP";
+ else if (this->test_protocol_tag_ == TAO_TAG_SCIOP_PROFILE)
+ test_protocol = "SCIOP";
+
+ // Use IIOP for setting up the test since the test protocol maybe
+ // unreliable.
+ this->policy_manager_->set_policy_overrides (this->base_protocol_policy_,
+ CORBA::SET_OVERRIDE);
+
+ // Since the network maybe unavailable temporarily, make sure to try
+ // for a few times before giving up.
+ for (CORBA::ULong k = 0;;)
+ {
+ try
+ {
+ // Let the server know what to expect..
+ this->test_->start_test (this->session_id_,
+ test_protocol,
+ this->invocation_rate_,
+ this->message_size_,
+ this->iterations_);
+
+ break;
+ }
+ catch (CORBA::TRANSIENT &)
+ {
+ ACE_OS::sleep (1);
+
+ if (k < this->number_of_connection_attempts_)
+ {
+ ACE_OS::sleep (1);
+
+ continue;
+ }
+ }
+
+ ACE_ERROR ((LM_ERROR,
+ "Cannot setup base protocol\n"));
+
+ ACE_OS::exit (-1);
+ }
+
+ return;
+}
+
+void
+Worker::run (void)
+{
+ // Select the test protocol for these invocation.
+ this->policy_manager_->set_policy_overrides (this->test_protocol_policy_,
+ CORBA::SET_OVERRIDE);
+
+ // Payload.
+ ::Protocols::test::octets_var payload (new ::Protocols::test::octets);
+ payload->length (this->message_size_);
+
+ CORBA::Octet *buffer =
+ payload->get_buffer ();
+
+ // Not necessary but good for debugging.
+ ACE_OS::memset (buffer,
+ 1,
+ this->message_size_ * sizeof (CORBA::Octet));
+
+ // Record the start time of the test.
+ this->test_start_ =
+ ACE_OS::gethrtime ();
+
+ // Test with several iterations.
+ for (CORBA::ULong i = 0;
+ i < this->iterations_;
+ ++i)
+ {
+ ACE_hrtime_t time_before_call = 0;
+ ACE_hrtime_t deadline_for_current_call = 0;
+
+ // For PACED and LATENCY, each sender call is individually
+ // noted.
+ if (this->test_type_ == ::Protocols::Sender_Controller::PACED ||
+ this->test_type_ == ::Protocols::Sender_Controller::LATENCY)
+ {
+ time_before_call =
+ ACE_OS::gethrtime ();
+
+ // Pacing code.
+ if (this->test_type_ == ::Protocols::Sender_Controller::PACED)
+ {
+ deadline_for_current_call =
+ this->deadline_for_current_call (i);
+
+ if (time_before_call > deadline_for_current_call)
+ {
+ this->missed_start_deadline (i);
+ continue;
+ }
+ }
+ }
+
+ // Use oneways for PACING and THROUGHPUT.
+ if (this->test_type_ == ::Protocols::Sender_Controller::PACED ||
+ this->test_type_ == ::Protocols::Sender_Controller::THROUGHPUT)
+ {
+ this->test_->oneway_method (this->session_id_,
+ i,
+ payload.in ());
+ }
+ else
+ {
+ // Use twoway calls for LATENCY.
+ this->test_->twoway_method (this->session_id_,
+ i,
+ payload.inout ());
+ }
+
+ // For PACED and LATENCY, each sender call is individually
+ // noted.
+ if (this->test_type_ == ::Protocols::Sender_Controller::PACED ||
+ this->test_type_ == ::Protocols::Sender_Controller::LATENCY)
+ {
+ ACE_hrtime_t time_after_call =
+ ACE_OS::gethrtime ();
+
+ if (this->test_type_ == ::Protocols::Sender_Controller::LATENCY)
+ this->history_.sample ((time_after_call - time_before_call) / 2);
+ else
+ this->history_.sample (time_after_call - time_before_call);
+
+ if (this->test_type_ == ::Protocols::Sender_Controller::PACED)
+ {
+ if (time_after_call > deadline_for_current_call)
+ {
+ this->missed_end_deadline (i);
+ continue;
+ }
+
+ ACE_hrtime_t sleep_time =
+ deadline_for_current_call - time_after_call;
+
+ ACE_OS::sleep (ACE_Time_Value (0,
+ long (to_seconds (sleep_time, gsf) *
+ ACE_ONE_SECOND_IN_USECS)));
+ }
+ }
+ }
+
+ // This call is used to ensure that all the THROUGHPUT related data
+ // has reached the server.
+ if (this->test_type_ == ::Protocols::Sender_Controller::THROUGHPUT &&
+ this->test_protocol_tag_ != TAO_TAG_DIOP_PROFILE)
+ {
+ this->test_->twoway_sync ();
+ }
+
+ // Record end time for the test.
+ this->test_end_ = ACE_OS::gethrtime ();
+
+ // Use IIOP to indicate end of test to server.
+ this->policy_manager_->set_policy_overrides (this->base_protocol_policy_,
+ CORBA::SET_OVERRIDE);
+
+ // Tell server that the test is over.
+ this->test_->end_test ();
+}
+
+SenderImpl::SenderExec_i::SenderExec_i (void)
+{
+ ACE_DEBUG ((LM_DEBUG, "SenderImpl::SenderExec_i::SenderExec_i\n"));
+}
+
+void
+SenderImpl::SenderExec_i::start (::CORBA::ULong iterations,
+ ::CORBA::ULong invocation_rate,
+ ::CORBA::Boolean count_missed_end_deadlines,
+ ::CORBA::Boolean do_dump_history,
+ ::CORBA::Boolean print_missed_invocations,
+ ::CORBA::ULong message_size,
+ ::CORBA::ULong test_protocol_tag,
+ ::CORBA::Boolean print_statistics,
+ ::CORBA::ULong number_of_connection_attempts,
+ ::CORBA::Boolean enable_diffserv_code_points,
+ ::CORBA::Short priority,
+ ::Protocols::Sender_Controller::Test_Type test_type)
+ throw (CORBA::SystemException)
+{
+ ACE_DEBUG ((LM_DEBUG, "SenderImpl::SenderExec_i::start\n"));
+
+ gsf = ACE_High_Res_Timer::global_scale_factor ();
+
+ int argc = 0;
+ char **argv = 0;
+
+ this->orb_ =
+ CORBA::ORB_init (argc,
+ argv,
+ "");
+
+ CORBA::Object_var object =
+ this->orb_->resolve_initial_references ("RTORB");
+
+ RTCORBA::RTORB_var rtorb =
+ RTCORBA::RTORB::_narrow (object.in ());
+
+ object =
+ this->orb_->resolve_initial_references ("ORBPolicyManager");
+
+ CORBA::PolicyManager_var policy_manager =
+ CORBA::PolicyManager::_narrow (object.in ());
+
+ object =
+ this->orb_->resolve_initial_references ("NetworkPriorityMappingManager");
+
+ RTCORBA::NetworkPriorityMappingManager_var mapping_manager =
+ RTCORBA::NetworkPriorityMappingManager::_narrow (object.in ());
+
+ Custom_Network_Priority_Mapping *custom_network_priority_mapping =
+ new Custom_Network_Priority_Mapping;
+
+ // Set the desired corba priority on the network mapping manager
+ custom_network_priority_mapping->corba_priority (priority);
+
+ mapping_manager->mapping (custom_network_priority_mapping);
+
+ Protocols::test_var test =
+ this->context_->get_connection_reader ();
+
+ Worker worker (this->orb_.in (),
+ rtorb.in (),
+ policy_manager.in (),
+ test.in (),
+ iterations,
+ invocation_rate,
+ count_missed_end_deadlines,
+ do_dump_history,
+ print_missed_invocations,
+ message_size,
+ test_protocol_tag,
+ number_of_connection_attempts,
+ enable_diffserv_code_points,
+ test_type);
+
+ worker.setup ();
+
+ worker.run ();
+
+ if (print_statistics)
+ worker.print_stats ();
+}
+
+void
+SenderImpl::SenderExec_i::shutdown (void)
+ throw (CORBA::SystemException)
+{
+ ACE_DEBUG ((LM_DEBUG, "SenderImpl::SenderExec_i::shutdown\n"));
+ this->orb_->shutdown ();
+}
+
+void
+SenderImpl::SenderExec_i::set_session_context (Components::SessionContext_ptr ctx)
+ throw (CORBA::SystemException,
+ Components::CCMException)
+{
+ ACE_DEBUG ((LM_DEBUG, "SenderImpl::SenderExec_i::set_session_context\n"));
+
+ this->context_ =
+ SenderImpl::SenderExec_Context::_narrow (ctx);
+
+ if (CORBA::is_nil (this->context_.in ()))
+ throw CORBA::INTERNAL ();
+}
+
+void
+SenderImpl::SenderExec_i::ccm_activate (void)
+ throw (CORBA::SystemException,
+ Components::CCMException)
+{
+ ACE_DEBUG ((LM_DEBUG, "SenderImpl::SenderExec_i::ccm_activate\n"));
+}
+
+void
+SenderImpl::SenderExec_i::ccm_passivate (void)
+ throw (CORBA::SystemException,
+ Components::CCMException)
+{
+ ACE_DEBUG ((LM_DEBUG, "SenderImpl::SenderExec_i::ccm_passivate\n"));
+}
+
+void
+SenderImpl::SenderExec_i::ccm_remove (void)
+ throw (CORBA::SystemException,
+ Components::CCMException)
+{
+ ACE_DEBUG ((LM_DEBUG, "SenderImpl::SenderExec_i::ccm_remove\n"));
+}
+
+
+void
+SenderImpl::SenderExec_i::ciao_preactivate (void)
+ throw (CORBA::SystemException,
+ Components::CCMException)
+{
+ ACE_DEBUG ((LM_DEBUG, "SenderImpl::SenderExec_i::ccm_preactivate\n"));
+}
+
+void
+SenderImpl::SenderExec_i::ciao_postactivate (void)
+ throw (CORBA::SystemException,
+ Components::CCMException)
+{
+ ACE_DEBUG ((LM_DEBUG, "SenderImpl::SenderExec_i::ccm_postactivate\n"));
+}
+
+::Components::EnterpriseComponent_ptr
+SenderImpl::SenderHomeExec_i::create (void)
+ throw (CORBA::SystemException,
+ Components::CCMException)
+{
+ ACE_DEBUG ((LM_DEBUG, "SenderImpl::SenderHome_exec::create\n"));
+ return new SenderImpl::SenderExec_i;
+}
+
+extern "C" SENDER_EXEC_Export ::Components::HomeExecutorBase_ptr
+createSenderHome_Impl (void)
+{
+ ACE_DEBUG ((LM_DEBUG, "createSenderHome_Impl\n"));
+ return new SenderImpl::SenderHomeExec_i;
+}
diff --git a/TAO/CIAO/rules.ciao.GNU b/TAO/CIAO/rules.ciao.GNU
new file mode 100644
index 00000000000..8c13c54fa2c
--- /dev/null
+++ b/TAO/CIAO/rules.ciao.GNU
@@ -0,0 +1,42 @@
+# -*- Makefile -*-
+
+#----------------------------------------------------------------------------
+#
+# $Id$
+#
+# Common Makefile rules for all of CIAO
+#
+#----------------------------------------------------------------------------
+
+ifndef TAO_ROOT
+ TAO_ROOT = $(ACE_ROOT)/TAO
+endif
+
+ifndef CIAO_ROOT
+ CIAO_ROOT = $(TAO_ROOT)/CIAO
+endif
+
+# Turn on symbol versioning. The scheme that we follow is to allow
+# applications dependent on libraries, with same version numbers (major,
+# minor and beta) to run, but applications with dependencies on libraries
+# with different minor or major or beta versions to fail.
+#
+CIAO_MAJOR_VERSION := $(shell awk '/CIAO_MAJOR_VERSION/ { print $$3}' ${CIAO_ROOT}/ciao/Version.h)
+CIAO_MINOR_VERSION := $(shell awk '/CIAO_MINOR_VERSION/ { print $$3}' ${CIAO_ROOT}/ciao/Version.h)
+CIAO_BETA_VERSION := $(shell awk '/CIAO_BETA_VERSION/ { print $$3}' ${CIAO_ROOT}/ciao/Version.h)
+
+# Version number of the libraries
+#
+ifeq ($(versioned_so),1)
+ # Only set SOVERSION for CIAO if versioning is turned on and SOVERION is
+ # blank, which gives users to ability to override it.
+ ifeq ($(SOVERSION),)
+ SOVERSION = .$(CIAO_MAJOR_VERSION).$(CIAO_MINOR_VERSION).$(CIAO_BETA_VERSION)
+ endif # SOVERSION
+
+ # Name that will be written into the dynamic library
+ #
+ ifneq ($(SONAME),)
+ SONAME = $(SHLIB).$(CIAO_MAJOR_VERSION).$(CIAO_MINOR_VERSION).$(CIAO_BETA_VERSION)
+ endif # SONAME
+endif # versioned_so
diff --git a/TAO/CIAO/tests/CIDL/CodeGen/CodeGen.mpc b/TAO/CIAO/tests/CIDL/CodeGen/CodeGen.mpc
new file mode 100644
index 00000000000..06e458f0b69
--- /dev/null
+++ b/TAO/CIAO/tests/CIDL/CodeGen/CodeGen.mpc
@@ -0,0 +1,117 @@
+// $Id$
+
+project(CIDL_Basic_stub): ciao_client {
+
+ sharedname = CIDL_Basic_stub
+ idlflags += -Wb,stub_export_macro=BASIC_STUB_Export -Wb,stub_export_include=Basic_stub_export.h -Wb,skel_export_macro=BASIC_SVNT_Export -Wb,skel_export_include=Basic_svnt_export.h
+ dynamicflags = BASIC_STUB_BUILD_DLL
+
+ IDL_Files {
+ Basic.idl
+ }
+
+ Source_Files {
+ BasicC.cpp
+ }
+
+ Header_Files {
+ BasicC.h
+ Basic_stub_export.h
+ }
+}
+
+project(CIDL_Basic_svnt) : ciao_servant {
+ after += CIDL_Basic_stub
+ sharedname = CIDL_Basic_svnt
+ libs += CIDL_Basic_stub
+
+ idlflags += -Wb,stub_export_macro=BASIC_STUB_Export -Wb,stub_export_include=Basic_stub_export.h -Wb,skel_export_macro=BASIC_SVNT_Export -Wb,skel_export_include=Basic_svnt_export.h
+ dynamicflags = BASIC_SVNT_BUILD_DLL
+
+ IDL_Files {
+ Basic.idl
+ }
+
+ Source_Files {
+ BasicS.cpp
+ }
+
+ Header_Files {
+ BasicS.h
+ Basic_svnt_export.h
+ }
+}
+
+project(CodeGen_stub): ciao_client {
+ after += CIDL_Basic_stub
+ libs += CIDL_Basic_stub
+ sharedname = CodeGen_stub
+ idlflags += -Wb,stub_export_macro=CODEGEN_STUB_Export -Wb,stub_export_include=CodeGen_stub_export.h -Wb,skel_export_macro=CODEGEN_SVNT_Export -Wb,skel_export_include=CodeGen_svnt_export.h
+ dynamicflags = CODEGEN_STUB_BUILD_DLL
+
+ IDL_Files {
+ CodeGen.idl
+ }
+
+ Source_Files {
+ CodeGenC.cpp
+ }
+
+ Header_Files {
+ CodeGenC.h
+ CodeGen_stub_export.h
+ }
+}
+
+project(CodeGen_svnt) : ciao_servant {
+ after += CIDL_Basic_svnt CodeGen_stub
+ requires += cidl
+ sharedname = CodeGen_svnt
+ libs += CodeGen_stub CIDL_Basic_stub CIDL_Basic_svnt
+ idlflags += -Wb,export_macro=CODEGEN_SVNT_Export -Wb,export_include=CodeGen_svnt_export.h
+ dynamicflags = CODEGEN_SVNT_BUILD_DLL
+ cidlflags -= --
+ cidlflags += --gen-exec-impl --exec-export-include CodeGen_exec_export.h --
+
+ CIDL_Files {
+ CodeGen.cidl
+ }
+
+ IDL_Files {
+ CodeGenE.idl
+ }
+
+ Source_Files {
+ CodeGenEC.cpp
+ CodeGenS.cpp
+ CodeGen_svnt.cpp
+ }
+
+ Header_Files {
+ CodeGenEC.h
+ CodeGenS.h
+ CodeGen_svnt.h
+ CodeGen_svnt_export.h
+ }
+}
+
+
+project(CodeGen_exec) : ciao_component {
+ after += CodeGen_svnt CodeGen_stub
+ sharedname = CodeGen_exec
+ libs += CodeGen_stub CodeGen_svnt CIDL_Basic_stub CIDL_Basic_svnt
+ dynamicflags = CODEGEN_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ CodeGen_exec.cpp
+ }
+
+ Header_Files {
+ CodeGen_exec.h
+ CodeGen_exec_export.h
+ }
+}
+
diff --git a/TAO/CIAO/tests/RTCCM/DiffServ/Controller/Controller.mpc b/TAO/CIAO/tests/RTCCM/DiffServ/Controller/Controller.mpc
new file mode 100644
index 00000000000..b252d965c8c
--- /dev/null
+++ b/TAO/CIAO/tests/RTCCM/DiffServ/Controller/Controller.mpc
@@ -0,0 +1,8 @@
+// $Id$
+
+project (*) : ciao_client, rtcorba, exceptions {
+ after += DiffServ_Sender_stub DiffServ_Receiver_stub
+ includes += ../Sender
+ includes += ../Receiver
+ libs += DiffServ_Sender_stub DiffServ_Receiver_stub DiffServ_stub
+}
diff --git a/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Controller.mpc b/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Controller.mpc
new file mode 100644
index 00000000000..d097c0dce34
--- /dev/null
+++ b/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Controller.mpc
@@ -0,0 +1,94 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -l .. -p Priority_Test -i Controller"
+
+project(Priority_Test_Controller_stub): ciao_client {
+ after += Priority_Test_stub
+ sharedname = Controller_stub
+ libs += Priority_Test_stub
+ libpaths += ..
+ idlflags += -Wb,stub_export_macro=CONTROLLER_STUB_Export -Wb,stub_export_include=Controller_stub_export.h -Wb,skel_export_macro=CONTROLLER_SVNT_Export -Wb,skel_export_include=Controller_svnt_export.h
+ dynamicflags = CONTROLLER_STUB_BUILD_DLL
+
+ IDL_Files {
+ Controller.idl
+ }
+
+ Source_Files {
+ ControllerC.cpp
+ }
+}
+
+project(Priority_Test_Controller_svnt) : ciao_servant {
+ after += Priority_Test_svnt Priority_Test_Controller_stub
+ sharedname = Controller_svnt
+ libs += Controller_stub Priority_Test_stub Priority_Test_svnt
+ libpaths += ..
+ idlflags += -Wb,export_macro=CONTROLLER_SVNT_Export -Wb,export_include=Controller_svnt_export.h
+ dynamicflags = CONTROLLER_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ Controller.cidl
+ }
+
+ IDL_Files {
+ ControllerE.idl
+ }
+
+ Source_Files {
+ ControllerEC.cpp
+ ControllerS.cpp
+ Controller_svnt.cpp
+ }
+}
+
+
+project(Priority_Test_Controller_exec) : ciao_component {
+ after += Priority_Test_Controller_svnt
+ sharedname = Controller_exec
+ libs += Controller_stub Controller_svnt Priority_Test_stub Priority_Test_svnt
+ libpaths += ..
+ idlflags += -Wb,export_macro=CONTROLLER_EXEC_Export -Wb,export_include=Controller_exec_export.h
+ dynamicflags = CONTROLLER_EXEC_BUILD_DLL
+
+ IDL_Files {
+ ControllerEI.idl
+ }
+
+ Source_Files {
+ ControllerEIC.cpp
+ Controller_exec.cpp
+ }
+}
+
+project(Priority_Test_Rate_Controller_exec) : ciao_component {
+ after += Priority_Test_Controller_svnt
+ sharedname = Rate_Controller_exec
+ libs += Controller_stub Controller_svnt Priority_Test_stub Priority_Test_svnt
+ libpaths += ..
+ idlflags += -Wb,export_macro=CONTROLLER_EXEC_Export -Wb,export_include=Controller_exec_export.h
+ dynamicflags = CONTROLLER_EXEC_BUILD_DLL
+
+ IDL_Files {
+ ControllerEI.idl
+ }
+
+ Source_Files {
+ ControllerEIC.cpp
+ Rate_Controller.cpp
+ Pulser.cpp
+ }
+}
+
+project (*client) : ciao_client {
+ exename = client
+ after += Priority_Test_Controller_stub
+ libs += Controller_stub Priority_Test_stub
+ libpaths += ..
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ client.cpp
+ }
+}
diff --git a/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Pulser.cpp b/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Pulser.cpp
new file mode 100644
index 00000000000..51f563cd3c7
--- /dev/null
+++ b/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Pulser.cpp
@@ -0,0 +1,113 @@
+// $Id$
+
+#include "Pulser.h"
+#include "CIAO_common.h"
+#include "ace/Timer_Queue.h"
+#include "ace/Reactor.h"
+
+//=================================================================
+
+PTImpl::Pulser::Pulser (PTImpl::Pulse_Handler *cb)
+ : active_ (0),
+ done_ (0),
+ tid_ (0),
+ pulser_callback_ (cb)
+{
+ // Nothing
+ this->reactor (new ACE_Reactor);
+}
+
+PTImpl::Pulser::~Pulser ()
+{
+ delete this->reactor ();
+ this->reactor (0);
+}
+
+int
+PTImpl::Pulser::open (void*)
+{
+ return this->activate ();
+}
+
+int
+PTImpl::Pulser::close (u_long)
+{
+ this->done_ = 1;
+ this->reactor ()->notify ();
+
+ if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG, "Waiting\n"));
+ return this->wait ();
+}
+
+int
+PTImpl::Pulser::start (CORBA::Long hertz)
+{
+ if (hertz == 0 || this->active_ != 0) // Not valid
+ return -1;
+
+ this->active_ = 1;
+ long usec = 1000000 / hertz;
+
+ this->tid_ = this->reactor ()->schedule_timer (this,
+ 0,
+ ACE_Time_Value (0, usec),
+ ACE_Time_Value (0, usec));
+
+ return 0;
+}
+
+int
+PTImpl::Pulser::stop (void)
+{
+ if (this->active_ == 0) // Not valid.
+ return -1;
+ else
+ this->active_ = 0;
+ return 0;
+}
+
+int
+PTImpl::Pulser::active (void)
+{
+ return this->active_;
+}
+
+int
+PTImpl::Pulser::handle_close (ACE_HANDLE handle,
+ ACE_Reactor_Mask close_mask)
+{
+ if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("[%x] handle = %d, close_mask = %d\n"),
+ this,
+ handle,
+ close_mask));
+
+ return 0;
+}
+
+int
+PTImpl::Pulser::handle_timeout (const ACE_Time_Value &,
+ const void *)
+{
+ if (this->active_ == 0)
+ this->reactor ()->cancel_timer (this);
+ else
+ this->pulser_callback_->pulse ();
+
+ return 0;
+}
+
+int
+PTImpl::Pulser::svc (void)
+{
+ this->reactor ()->owner (ACE_OS::thr_self ());
+
+ while (!this->done_)
+ this->reactor ()->handle_events ();
+
+ return 0;
+}
+
+//=================================================================
diff --git a/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Pulser.h b/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Pulser.h
new file mode 100644
index 00000000000..3986dc982da
--- /dev/null
+++ b/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Pulser.h
@@ -0,0 +1,75 @@
+// $Id$
+
+/**
+ * @file Pulser.h
+ *
+ * Header file for the Pulser class.
+ *
+ * @author Nanbor Wang <nanbor@cse.wustl.edu>
+ */
+
+#ifndef PULSER_H
+#define PULSER_H
+
+#include "tao/corba.h"
+#include "ace/Thread_Manager.h"
+#include "ace/Task.h"
+
+namespace PTImpl
+{
+ // Forward decl.
+ class Pulse_Handler
+ {
+ public:
+ /// Helper function to be called back by Pulse_Handler
+ virtual void pulse (void) = 0;
+ };
+
+ /**
+ * @brief Active pulse generater
+ */
+ class Pulser : public ACE_Task_Base
+ {
+ public:
+ // Default constructor
+ Pulser (Pulse_Handler *cb);
+ ~Pulser ();
+
+ int open (void *args = 0);
+
+ int close (u_long flags = 0);
+
+ int start (CORBA::Long hertz);
+
+ int stop (void);
+
+ int active (void);
+
+ // Handle the timeout.
+ virtual int handle_timeout (const ACE_Time_Value &tv,
+ const void *arg);
+
+ // Called when <Time_Handler> is removed.
+ virtual int handle_close (ACE_HANDLE handle,
+ ACE_Reactor_Mask close_mask);
+
+ virtual int svc (void);
+
+ private:
+ /// Tracking whether we are actively generating pulse or not.
+ long active_;
+
+ /// Flag to indicate completion of this active object.
+ int done_;
+
+ /// The timer id we are waiting.
+ int tid_;
+
+ Pulse_Handler *pulser_callback_;
+
+ ACE_Thread_Manager thr_mgr_;
+ };
+
+}
+
+#endif /* PULSER_H */
diff --git a/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/client.cpp b/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/client.cpp
new file mode 100644
index 00000000000..7ee91f86db9
--- /dev/null
+++ b/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/client.cpp
@@ -0,0 +1,133 @@
+// $Id$
+/**
+ * @file client.cpp
+ *
+ * This program interact with a Controller component
+ */
+
+#include "ControllerC.h"
+#include "ace/Get_Opt.h"
+#include "ace/streams.h"
+#include "ace/SString.h"
+
+
+int ctrl_off = 0;
+long work = 80;
+typedef ACE_Unbounded_Stack<ACE_CString> STRING_STACK;
+typedef ACE_Unbounded_Stack<Priority_Test::Controller_var> CTRL_STACK;
+
+int
+parse_args (int argc, char *argv[], STRING_STACK &iors)
+{
+ ACE_Get_Opt get_opts (argc, argv, "k:fw:");
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+
+ case 'k':
+ iors.push (get_opts.opt_arg ());
+ break;
+
+ case 'f': // Turn off controller
+ ctrl_off = 1;
+ break;
+
+ case 'w':
+ work = ACE_OS::atoi (get_opts.opt_arg ());
+ break;
+
+ case '?': // display help for use of the server.
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s\n"
+ "-k <Controller IOR>\n"
+ "-w <work amount>\n"
+ "-f: Turn off Controller\n"
+ "\n",
+ argv [0]),
+ -1);
+ }
+
+ if (iors.is_empty () && ctrl_off == 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Please provide controller IOR\n"),
+ -1);
+
+ return 0;
+}
+
+int
+main (int argc, char *argv[])
+{
+ ACE_TRY_NEW_ENV
+ {
+ // Initialize orb
+ CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+
+ STRING_STACK IORs;
+
+ if (parse_args (argc, argv, IORs) != 0)
+ return -1;
+
+
+ CTRL_STACK controllers;
+
+ while (!IORs.is_empty ())
+ {
+ ACE_CString ior;
+ IORs.top (ior);
+ CORBA::Object_var obj
+ = orb->string_to_object (ior.c_str ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ Priority_Test::Controller_var ctrlr
+ = Priority_Test::Controller::_narrow (obj.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (CORBA::is_nil (ctrlr.in ()))
+ {
+ ACE_DEBUG ((LM_ERROR,
+ "Unable to acquire 'Controller' objref\n",
+ ior.c_str ()));
+ }
+ else
+ {
+ controllers.push (ctrlr);
+ }
+ IORs.pop (ior);
+
+ }
+
+ while (! controllers.is_empty ())
+ {
+ Priority_Test::Controller_var ctrlr;
+ controllers.top (ctrlr);
+
+ if (ctrl_off != 0)
+ ctrlr->stop (ACE_ENV_SINGLE_ARG_PARAMETER);
+ else
+ ctrlr->start (work
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ controllers.pop (ctrlr);
+ }
+
+ orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "Who is the culprit \n");
+ cerr << "Uncaught CORBA exception" << endl;
+ return 1;
+ }
+ ACE_ENDTRY;
+
+ return 0;
+}
diff --git a/TAO/CIAO/tests/RTCCM/Priority_Test/Workers/CB_Worker_exec.cpp b/TAO/CIAO/tests/RTCCM/Priority_Test/Workers/CB_Worker_exec.cpp
new file mode 100644
index 00000000000..c6f64623405
--- /dev/null
+++ b/TAO/CIAO/tests/RTCCM/Priority_Test/Workers/CB_Worker_exec.cpp
@@ -0,0 +1,144 @@
+// $Id$
+
+#include "CB_Worker_exec.h"
+#include "CIAO_common.h"
+
+#include "ace/ACE.h"
+
+
+// This should really be a configurable value. CIAO doesn't suppor
+// this yet but the new D&C shall support this RSN.
+static long local_primer_ = 9619;
+
+/// Default constructor.
+MyImpl::CB_Worker_exec::CB_Worker_exec ()
+{
+}
+
+/// Default destructor.
+MyImpl::CB_Worker_exec::~CB_Worker_exec ()
+{
+}
+
+// Operations from Priority_Test::Worker
+
+Priority_Test::CCM_Common_Ops_ptr
+MyImpl::CB_Worker_exec::get_some_device (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return Priority_Test::CCM_Common_Ops::_duplicate (this);
+}
+
+// Operations from Priority_Test::Common_Ops
+
+CORBA::Long
+MyImpl::CB_Worker_exec::do_work (CORBA::Long work,
+ CORBA::Long aux
+ ACE_ENV_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // aux is not use for now, so do something with it.
+ CORBA::ULong retv = work + aux;
+
+ if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG,
+ "CB_Worker::do_work: %hd units of work\n",
+ work));
+
+ for (; work != 0; --work)
+ ACE::is_prime (local_primer_,
+ 2,
+ local_primer_ / 2);
+
+ return retv;
+}
+
+// Operations from Components::SessionComponent
+void
+MyImpl::CB_Worker_exec::set_session_context (Components::SessionContext_ptr ctx
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG, "MyImpl::CB_Worker_exec::set_session_context\n"));
+
+ this->context_ =
+ Priority_Test::CCM_Worker_Context::_narrow (ctx
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ if (CORBA::is_nil (this->context_.in ()))
+ ACE_THROW (CORBA::INTERNAL ());
+ // Urm, we actually discard exceptions thown from this operation.
+}
+
+void
+MyImpl::CB_Worker_exec::ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+}
+
+void
+MyImpl::CB_Worker_exec::ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+}
+
+void
+MyImpl::CB_Worker_exec::ccm_activate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG, "MyImpl::CB_Worker_exec::ccm_activate\n"));
+}
+
+void
+MyImpl::CB_Worker_exec::ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG, "MyImpl::CB_Worker_exec::ccm_passivate\n"));
+}
+
+void
+MyImpl::CB_Worker_exec::ccm_remove (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ if (CIAO::debug_level () > 0)
+ ACE_DEBUG ((LM_DEBUG, "MyImpl::CB_Worker_exec::ccm_remove\n"));
+}
+
+/// Default ctor.
+MyImpl::CB_Worker_Home_exec::CB_Worker_Home_exec ()
+{
+}
+
+/// Default dtor.
+MyImpl::CB_Worker_Home_exec::~CB_Worker_Home_exec ()
+{
+}
+
+// Explicit home operations.
+
+// Implicit home operations.
+
+::Components::EnterpriseComponent_ptr
+MyImpl::CB_Worker_Home_exec::create (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CCMException))
+{
+ return new MyImpl::CB_Worker_exec;
+}
+
+
+extern "C" WORKER_EXEC_Export ::Components::HomeExecutorBase_ptr
+createWorkerHome_Impl (void)
+{
+ return new MyImpl::CB_Worker_Home_exec;
+}
diff --git a/TAO/CIAO/tests/RTCCM/Priority_Test/Workers/Worker.mpc b/TAO/CIAO/tests/RTCCM/Priority_Test/Workers/Worker.mpc
new file mode 100644
index 00000000000..e50e699862f
--- /dev/null
+++ b/TAO/CIAO/tests/RTCCM/Priority_Test/Workers/Worker.mpc
@@ -0,0 +1,80 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -l .. -p Priority_Test -i Worker"
+
+project(Priority_Test_Worker_stub): ciao_client {
+ after += Priority_Test_stub
+ libs += Priority_Test_stub
+ libpaths += ..
+ sharedname = Worker_stub
+ idlflags += -Wb,stub_export_macro=WORKER_STUB_Export -Wb,stub_export_include=Worker_stub_export.h -Wb,skel_export_macro=WORKER_SVNT_Export -Wb,skel_export_include=Worker_svnt_export.h
+ dynamicflags = WORKER_STUB_BUILD_DLL
+
+ IDL_Files {
+ Worker.idl
+ }
+
+ Source_Files {
+ WorkerC.cpp
+ }
+}
+
+project(Priority_Test_Worker_svnt) : ciao_servant {
+ after += Priority_Test_svnt Priority_Test_Worker_stub
+ sharedname = Worker_svnt
+ libs += Worker_stub Priority_Test_stub Priority_Test_svnt
+ libpaths += ..
+ idlflags += -Wb,export_macro=WORKER_SVNT_Export -Wb,export_include=Worker_svnt_export.h
+ dynamicflags = WORKER_SVNT_BUILD_DLL
+
+ CIDL_Files {
+ Worker.cidl
+ }
+
+ IDL_Files {
+ WorkerE.idl
+ }
+
+ Source_Files {
+ WorkerEC.cpp
+ WorkerS.cpp
+ Worker_svnt.cpp
+ }
+}
+
+// Compute-bound worker component
+project(Priority_Test_CB_Worker_exec) : ciao_component {
+ after += Priority_Test_Worker_svnt
+ sharedname = CB_Worker_exec
+ libs += Worker_stub Worker_svnt Priority_Test_stub Priority_Test_svnt
+ libpaths += ..
+ idlflags += -Wb,export_macro=WORKER_EXEC_Export -Wb,export_include=Worker_exec_export.h
+ dynamicflags = WORKER_EXEC_BUILD_DLL
+
+ IDL_Files {
+ WorkerEI.idl
+ }
+
+ Source_Files {
+ WorkerEIC.cpp
+ CB_Worker_exec.cpp
+ }
+}
+
+// IO-bound worker component
+project(Priority_Test_IOB_Worker_exec) : ciao_component {
+ after += Priority_Test_Worker_svnt
+ sharedname = IOB_Worker_exec
+ libs += Worker_stub Worker_svnt Priority_Test_stub Priority_Test_svnt
+ libpaths += ..
+ idlflags += -Wb,export_macro=WORKER_EXEC_Export -Wb,export_include=Worker_exec_export.h
+ dynamicflags = WORKER_EXEC_BUILD_DLL
+
+ IDL_Files {
+ WorkerEI.idl
+ }
+
+ Source_Files {
+ WorkerEIC.cpp
+ IOB_Worker_exec.cpp
+ }
+}
diff --git a/TAO/CIAO/tools/Assembly_Deployer/Deployment_Configuration.cpp b/TAO/CIAO/tools/Assembly_Deployer/Deployment_Configuration.cpp
new file mode 100644
index 00000000000..249240c690d
--- /dev/null
+++ b/TAO/CIAO/tools/Assembly_Deployer/Deployment_Configuration.cpp
@@ -0,0 +1,125 @@
+// $Id$
+
+#include "Deployment_Configuration.h"
+
+#include "ace/OS_NS_stdio.h"
+
+#define NAME_BUFSIZE 1024
+
+CIAO::Deployment_Configuration::Deployment_Configuration (CORBA::ORB_ptr o)
+ : orb_ (CORBA::ORB::_duplicate (o))
+{
+}
+
+CIAO::Deployment_Configuration::~Deployment_Configuration (void)
+{
+}
+
+int
+CIAO::Deployment_Configuration::init (const char *filename)
+{
+ // @@ We should change to use ACE_Configuration here.
+
+ if (filename == 0)
+ return -1;
+
+ FILE *inf = ACE_OS::fopen (filename, "r");
+
+ if (inf == NULL)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Fail to open activator map data file: %s.\n",
+ filename),
+ -1);
+
+ char destination[NAME_BUFSIZE], ior[NAME_BUFSIZE];
+
+ int first = 1;
+
+ while (fscanf (inf, "%s %s", destination, ior ) != EOF)
+ {
+ this->deployment_info_.bind (destination, ior);
+
+ if (first)
+ {
+ this->default_activator_.IOR_ = ior;
+ first = 0;
+ }
+ }
+
+ return 0;
+}
+
+const char *
+CIAO::Deployment_Configuration::get_activator_ior (const char *name)
+{
+ if (name == 0)
+ return get_default_activator_ior ();
+
+ ACE_Hash_Map_Entry
+ <ACE_CString,
+ CIAO::Deployment_Configuration::Activator_Info> *entry;
+
+ if (this->deployment_info_.find (ACE_CString (name),
+ entry) != 0)
+ return 0; // no valid name found.
+
+ return entry->int_id_.IOR_.c_str ();
+}
+
+const char *
+CIAO::Deployment_Configuration::get_default_activator_ior (void)
+{
+ if (this->default_activator_.IOR_.length () == 0)
+ return 0;
+ return this->default_activator_.IOR_.c_str ();
+}
+
+Components::Deployment::ServerActivator_ptr
+CIAO::Deployment_Configuration::get_activator (const char *name
+ ACE_ENV_ARG_DECL)
+{
+ if (name == 0)
+ return get_default_activator (ACE_ENV_SINGLE_ARG_PARAMETER);
+
+ ACE_Hash_Map_Entry
+ <ACE_CString,
+ CIAO::Deployment_Configuration::Activator_Info> *entry;
+
+ if (this->deployment_info_.find (ACE_CString (name),
+ entry) != 0)
+ return 0; // no valid name found.
+
+ if (CORBA::is_nil (entry->int_id_.activator_.in ()))
+ {
+ CORBA::Object_var temp = this->orb_->string_to_object
+ (entry->int_id_.IOR_.c_str ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ entry->int_id_.activator_ =
+ Components::Deployment::ServerActivator::_narrow (temp.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+ }
+ return Components::Deployment::ServerActivator::_duplicate
+ (entry->int_id_.activator_.in ());
+}
+
+Components::Deployment::ServerActivator_ptr
+CIAO::Deployment_Configuration::get_default_activator (ACE_ENV_SINGLE_ARG_DECL)
+{
+ if (CORBA::is_nil (this->default_activator_.activator_.in ()))
+ {
+ CORBA::Object_var temp = this->orb_->string_to_object
+ (this->default_activator_.IOR_.c_str ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ this->default_activator_.activator_ =
+ Components::Deployment::ServerActivator::_narrow (temp.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+ }
+ return Components::Deployment::ServerActivator::_duplicate
+ (this->default_activator_.activator_.in ());
+}
diff --git a/TAO/CIAO/tools/Assembly_Deployer/Deployment_Configuration.h b/TAO/CIAO/tools/Assembly_Deployer/Deployment_Configuration.h
new file mode 100644
index 00000000000..783926df8be
--- /dev/null
+++ b/TAO/CIAO/tools/Assembly_Deployer/Deployment_Configuration.h
@@ -0,0 +1,126 @@
+// -*- C++ -*-
+
+//=============================================================================
+/**
+ * @file Deployment_Configuration.h
+ *
+ * $Id$
+ *
+ * The Deployment_Configuration provides abstraction for the
+ * deployment mechanisms.
+ *
+ * @author Nanbor Wang <nanbor@cs.wustl.edu>
+ */
+//=============================================================================
+
+
+#ifndef CIAO_DEPLOYMENT_CONFIGURATION_H
+#define CIAO_DEPLOYMENT_CONFIGURATION_H
+#include /**/ "ace/pre.h"
+
+#include "ciao/CCM_DeploymentC.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "ace/SString.h"
+#include "ace/Hash_Map_Manager_T.h"
+
+
+namespace CIAO
+{
+ /**
+ * @class Deployment_Configuration
+ *
+ * @brief A class that provides strategies on deployment topology
+ *
+ * This class provides strategies on how the Assembly framework
+ * should deploy an assembly. This is achieved by providing
+ * mappings from deployment destination names to actually CIAO daemon
+ * IORs, and the strategy for which default CIAO daemon a deployment
+ * mechanism should use.
+ *
+ * This is a trivial implementation of the deployment configuration
+ * strategy. We can enhance this class later on to provide
+ * different deployment location strategies.
+ */
+ class Deployment_Configuration
+ {
+ public:
+ typedef struct _activator_info
+ {
+ _activator_info (const char *ior = 0)
+ {
+ IOR_ = ior;
+ }
+
+ ACE_CString IOR_;
+ Components::Deployment::ServerActivator_var activator_;
+ } Activator_Info;
+
+ Deployment_Configuration (CORBA::ORB_ptr o);
+
+ /// Destructor
+ virtual ~Deployment_Configuration (void);
+
+ /**
+ * Init method takes the filename to a configuration file which
+ * has a simple line format of name, ior string delimited by a
+ * space in each line.
+ *
+ * name IOR-string
+ *
+ * @retval 0 on success.
+ * @retval -1 otherwise.
+ */
+ int init (const char *filename);
+
+ /**
+ * @retval 0 if no valid name were found. When @c name = 0, then
+ * this function behave exactly as get_default_activator_ior.
+ */
+ virtual const char *get_activator_ior (const char *name);
+
+ /**
+ * Return the default ServerActivator the Assembly mechanism
+ * should use to deploy a component. In this implementation, the
+ * first entry in the deployment configuration data file is always
+ * the entry for default activator.
+ *
+ * @retval 0 if no valid daemon is configured.
+ */
+ virtual const char *get_default_activator_ior ();
+
+ /**
+ * @retval nil if no valid name were found.
+ */
+ virtual Components::Deployment::ServerActivator_ptr
+ get_activator (const char *name
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS);
+
+ /**
+ * Return the reference to the default ServerActivator the
+ * Assembly mechanism should use to deploy a component.
+ *
+ * @retval nil if no valid daemon is configured.
+ */
+ virtual Components::Deployment::ServerActivator_ptr
+ get_default_activator (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
+
+ protected:
+ CORBA::ORB_var orb_;
+
+ ACE_Hash_Map_Manager_Ex<ACE_CString,
+ Activator_Info,
+ ACE_Hash<ACE_CString>,
+ ACE_Equal_To<ACE_CString>,
+ ACE_Null_Mutex> deployment_info_;
+
+ Activator_Info default_activator_;
+ };
+
+}
+
+#include /**/ "ace/post.h"
+#endif /* CIAO_DEPLOYMENT_CONFIGURATION_H */
diff --git a/TAO/CIAO/tools/Daemon/Daemon_Impl.cpp b/TAO/CIAO/tools/Daemon/Daemon_Impl.cpp
new file mode 100644
index 00000000000..68b27d5eb34
--- /dev/null
+++ b/TAO/CIAO/tools/Daemon/Daemon_Impl.cpp
@@ -0,0 +1,114 @@
+// $Id$
+
+#include "Daemon_Impl.h"
+
+#if !defined (__ACE_INLINE__)
+# include "Daemon_Impl.inl"
+#endif /* __ACE_INLINE__ */
+
+CIAO::Daemon_Impl::~Daemon_Impl ()
+{
+ for (Iterator i = this->table_.begin ();
+ i != this->table_.end ();
+ ++i)
+ {
+ // Deallocate the id.
+ CORBA::string_free (const_cast<char *> ((*i).ext_id_));
+
+ // Release the Object.
+ CORBA::release ((*i).int_id_);
+ }
+
+ this->table_.unbind_all ();
+}
+
+PortableServer::POA_ptr
+CIAO::Daemon_Impl::_default_POA (void)
+{
+ return PortableServer::POA::_duplicate (this->poa_.in ());
+}
+
+char *
+CIAO::Daemon_Impl::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return CORBA::string_dup (this->name_.in ());
+}
+
+CORBA::Object_ptr
+CIAO::Daemon_Impl::get_service (const char * svc_name
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ CIAO::NotFound))
+{
+ CORBA::Object_ptr found = CORBA::Object::_nil ();
+
+ this->table_.find (svc_name, found);
+
+ if (CORBA::is_nil (found))
+ ACE_THROW_RETURN (CIAO::NotFound (), 0);
+
+ return CORBA::Object::_duplicate (found);
+}
+
+void
+CIAO::Daemon_Impl::shutdown (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+int
+CIAO::Daemon_Impl::bind (const char *id,
+ CORBA::Object_ptr obj)
+{
+ // Make sure that the supplied Object reference is valid,
+ // i.e. not nil.
+ if (id == 0 || CORBA::is_nil (obj))
+ {
+ errno = EINVAL;
+ return -1;
+ };
+
+ CORBA::String_var name = CORBA::string_dup (id);
+ CORBA::Object_var object = CORBA::Object::_duplicate (obj);
+
+ int result = this->table_.bind (name.in (),
+ object.in ());
+
+ if (result == 0)
+ {
+ // Transfer ownership to the Object Table.
+ (void) name._retn ();
+ (void) object._retn ();
+ }
+
+ return result;
+}
+
+int
+CIAO::Daemon_Impl::unbind (const char *id)
+{
+ Table::ENTRY *entry = 0;
+
+ int result = this->table_.find (id, entry);
+
+ if (result == 0)
+ {
+ // Deallocate the external ID and obtain the ORB core pointer
+ // before unbinding the entry since the entry is deallocated
+ // during the call to unbind().
+ CORBA::string_free (const_cast<char *> (entry->ext_id_));
+ CORBA::Object_ptr obj = entry->int_id_;
+
+ result = this->table_.unbind (entry);
+
+ if (result != 0)
+ return result;
+
+ CORBA::release (obj);
+ }
+
+ return result;
+}
diff --git a/TAO/CIAO/tools/IDL3_to_IDL2/IDL3_to_IDL2.mpc b/TAO/CIAO/tools/IDL3_to_IDL2/IDL3_to_IDL2.mpc
new file mode 100644
index 00000000000..66630b71645
--- /dev/null
+++ b/TAO/CIAO/tools/IDL3_to_IDL2/IDL3_to_IDL2.mpc
@@ -0,0 +1,65 @@
+// -*- MPC -*-
+// $Id$
+
+project(TAO_IDL3_TO_IDL2_BE) : acelib, core, tao_output, crosscompile {
+ after += TAO_IDL_FE
+ sharedname = TAO_IDL3_TO_IDL2_BE
+ libs += TAO_IDL_FE
+ dynamicflags = TAO_IDL3_TO_IDL2_BE_BUILD_DLL
+ includes += $(TAO_ROOT)/TAO_IDL/include $(TAO_ROOT)/TAO_IDL/fe
+
+ // This is necessary for MPC to pull in rules.ciao.GNU
+ includes += $(CIAO_ROOT)
+
+ Source_Files {
+ be_global.cpp
+ be_helper.cpp
+ be_init.cpp
+ be_produce.cpp
+ be_sunsoft.cpp
+ idl3_to_idl2_visitor.cpp
+ }
+
+ Header_Files {
+ be_extern.h
+ be_global.h
+ be_helper.h
+ be_sunsoft.h
+ idl3_to_idl2_visitor.h
+ TAO_IDL3_TO_IDL2_BE_Export.h
+ }
+}
+
+
+project(TAO_IDL3_TO_IDL2_EXE) : aceexe, core, tao_output, crosscompile {
+ after += TAO_IDL3_TO_IDL2_BE TAO_IDL_FE
+ exename = tao_idl3_to_idl2
+ libs += TAO_IDL3_TO_IDL2_BE TAO_IDL_FE
+ includes += . $(TAO_ROOT)/TAO_IDL/include $(TAO_ROOT)/TAO_IDL/fe
+ libpaths += $(TAO_ROOT)/TAO_IDL
+ install = $(ACE_ROOT)/bin
+
+ // This is necessary for MPC to pull in rules.ciao.GNU
+ includes += $(CIAO_ROOT)
+
+ verbatim(gnuace, local) {
+ ifeq ($(TAO_IDL_PREPROCESSOR),)
+ CPPFLAGS += -DTAO_IDL_PREPROCESSOR=\\\"$(strip $(CXX))\\\"
+ else
+ CPPFLAGS += -DTAO_IDL_PREPROCESSOR=\\\"$(subst \\,\\,$(TAO_IDL_PREPROCESSOR))\\\"
+ endif
+
+ VPATH = $(TAO_ROOT)/TAO_IDL $(TAO_ROOT)/TAO_IDL/driver
+ }
+
+ Source_Files {
+ $(TAO_ROOT)/TAO_IDL/driver/drv_args.cpp
+ $(TAO_ROOT)/TAO_IDL/driver/drv_preproc.cpp
+ $(TAO_ROOT)/TAO_IDL/tao_idl.cpp
+ }
+
+ Header_Files {
+ $(TAO_ROOT)/TAO_IDL/include/drv_extern.h
+ }
+}
+
diff --git a/TAO/CIAO/tools/IDL3_to_IDL2/TAO_IDL3_TO_IDL2_BE_Export.h b/TAO/CIAO/tools/IDL3_to_IDL2/TAO_IDL3_TO_IDL2_BE_Export.h
new file mode 100644
index 00000000000..ca8bb4e2394
--- /dev/null
+++ b/TAO/CIAO/tools/IDL3_to_IDL2/TAO_IDL3_TO_IDL2_BE_Export.h
@@ -0,0 +1,40 @@
+
+// -*- C++ -*-
+// $Id$
+// Definition for Win32 Export directives.
+// This file is generated automatically by generate_export_file.pl
+// ------------------------------
+#ifndef TAO_IDL3_TO_IDL2_BE_EXPORT_H
+#define TAO_IDL3_TO_IDL2_BE_EXPORT_H
+
+#include "ace/config-all.h"
+
+#if defined (ACE_AS_STATIC_LIBS)
+# if !defined (TAO_IDL3_TO_IDL2_BE_HAS_DLL)
+# define TAO_IDL3_TO_IDL2_BE_HAS_DLL 0
+# endif /* ! TAO_IDL3_TO_IDL2_BE_HAS_DLL */
+#else
+# if !defined (TAO_IDL3_TO_IDL2_BE_HAS_DLL)
+# define TAO_IDL3_TO_IDL2_BE_HAS_DLL 1
+# endif /* ! TAO_IDL3_TO_IDL2_BE_HAS_DLL */
+#endif
+
+#if defined (TAO_IDL3_TO_IDL2_BE_HAS_DLL) && (TAO_IDL3_TO_IDL2_BE_HAS_DLL == 1)
+# if defined (TAO_IDL3_TO_IDL2_BE_BUILD_DLL)
+# define TAO_IDL3_TO_IDL2_BE_Export ACE_Proper_Export_Flag
+# define TAO_IDL3_TO_IDL2_BE_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
+# define TAO_IDL3_TO_IDL2_BE_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# else /* TAO_IDL3_TO_IDL2_BE_BUILD_DLL */
+# define TAO_IDL3_TO_IDL2_BE_Export ACE_Proper_Import_Flag
+# define TAO_IDL3_TO_IDL2_BE_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
+# define TAO_IDL3_TO_IDL2_BE_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+# endif /* TAO_IDL3_TO_IDL2_BE_BUILD_DLL */
+#else /* TAO_IDL3_TO_IDL2_BE_HAS_DLL == 1 */
+# define TAO_IDL3_TO_IDL2_BE_Export
+# define TAO_IDL3_TO_IDL2_BE_SINGLETON_DECLARATION(T)
+# define TAO_IDL3_TO_IDL2_BE_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
+#endif /* TAO_IDL3_TO_IDL2_BE_HAS_DLL == 1 */
+
+#endif /* TAO_IDL3_TO_IDL2_BE_EXPORT_H */
+
+// End of auto generated file.
diff --git a/TAO/CIAO/tools/RTComponentServer/RTConfig_Manager.cpp b/TAO/CIAO/tools/RTComponentServer/RTConfig_Manager.cpp
new file mode 100644
index 00000000000..abfa8917508
--- /dev/null
+++ b/TAO/CIAO/tools/RTComponentServer/RTConfig_Manager.cpp
@@ -0,0 +1,296 @@
+// $Id$
+
+#include "RTConfig_Manager.h"
+#include "ciao/CIAO_common.h"
+#include "ace/SString.h"
+
+#if !defined (__ACE_INLINE__)
+# include "RTConfig_Manager.inl"
+#endif /* __ACE_INLINE__ */
+
+void
+CIAO::RTResource_Config_Manager::init
+(const CIAO::RTConfiguration::RTORB_Resource_Info &info
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ CORBA::ULong i;
+
+ // Creating and binding name with RT Threadpool
+ for (i = 0; i < info.tp_configs.length (); ++i)
+ {
+ RTCORBA::ThreadpoolId thr_id =
+ this->rtorb_->create_threadpool
+ (info.tp_configs[i].stacksize,
+ info.tp_configs[i].static_threads,
+ info.tp_configs[i].dynamic_threads,
+ info.tp_configs[i].default_priority,
+ info.tp_configs[i].allow_request_buffering,
+ info.tp_configs[i].max_buffered_requests,
+ info.tp_configs[i].max_request_buffer_size
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK; // Simply pass back the exception here
+ // for now. We need to have a better way
+ // to handle execption here.
+ if (this->threadpool_map_.bind (info.tp_configs[i].name.in (),
+ thr_id) != 0)
+ {
+ ACE_DEBUG ((LM_DEBUG, "Error binding thread pool name: %s to map when initializing RTComponentServer resources.\n", info.tp_configs[i].name.in ()));
+ ACE_THROW (CORBA::INTERNAL ());
+ }
+ }
+
+ for (i = 0; i < info.tpl_configs.length (); ++i)
+ {
+ RTCORBA::ThreadpoolId thr_id =
+ this->rtorb_->create_threadpool_with_lanes
+ (info.tpl_configs[i].stacksize,
+ info.tpl_configs[i].lanes,
+ info.tpl_configs[i].allow_borrowing,
+ info.tpl_configs[i].allow_request_buffering,
+ info.tpl_configs[i].max_buffered_requests,
+ info.tpl_configs[i].max_request_buffer_size
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK; // Simply pass back the exception here
+ // for now. We need to have a better way
+ // to handle execption here.
+
+ if (this->threadpool_map_.bind (info.tpl_configs[i].name.in (),
+ thr_id) != 0)
+ {
+ ACE_DEBUG ((LM_DEBUG, "Error binding thread pool name: %s to map when initializing RTComponentServer resources.\n", info.tpl_configs[i].name.in ()));
+ ACE_THROW (CORBA::INTERNAL ());
+ }
+ }
+
+ for (i = 0; i < info.pb_configs.length (); ++i)
+ {
+ RTCORBA::PriorityBands_var safebands = new RTCORBA::PriorityBands;
+
+ safebands = info.pb_configs[i].bands;
+
+ if (this->priority_bands_map_.bind (info.pb_configs[i].name.in (),
+ safebands) != 0)
+ {
+ ACE_DEBUG ((LM_DEBUG, "Error binding priority bands name: %s to map when initializing RTComponentServer resources.\n", info.pb_configs[i].name.in ()));
+ ACE_THROW (CORBA::INTERNAL ());
+ }
+ }
+}
+
+void
+CIAO::RTResource_Config_Manager::fini (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ TP_MAP::ITERATOR iter = this->threadpool_map_.begin ();
+ TP_MAP::ITERATOR end = this->threadpool_map_.end ();
+
+ for (; iter != end; ++iter)
+ {
+ this->rtorb_->destroy_threadpool ((*iter).int_id_
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ }
+
+}
+
+RTCORBA::ThreadpoolId
+CIAO::RTResource_Config_Manager::find_threadpool_by_name (const char *name
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ if (name == 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Invalid name string found in \"find_threadpool_by_name\"\n"));
+ ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
+ }
+
+
+ RTCORBA::ThreadpoolId ret_id; // return id
+
+ if (this->threadpool_map_.find (name, ret_id) != 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Unable to find a threadpool named %s\n",
+ name));
+ ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
+ }
+
+ return ret_id;
+}
+
+RTCORBA::PriorityBands *
+CIAO::RTResource_Config_Manager::find_priority_bands_by_name (const char *name
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ if (name == 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Invalid name string found in \"find_priority_bands_by_name\"\n"));
+ ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
+ }
+
+ PB_MAP::ENTRY *entry;
+
+ if (this->priority_bands_map_.find (name, entry) != 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Unable to find a connection bands named %s\n",
+ name));
+ ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
+ }
+
+ RTCORBA::PriorityBands_var retv = new RTCORBA::PriorityBands;
+ (*retv.ptr ()) = (*entry->int_id_.ptr ());
+ return retv._retn ();
+}
+
+void
+CIAO::RTPolicy_Set_Manager::init (const CIAO::RTConfiguration::Policy_Sets &sets
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ if (CIAO::debug_level () > 10)
+ ACE_DEBUG ((LM_DEBUG, "RTPolicy_Set_Manager::init\n"));
+
+ for (CORBA::ULong i = 0; i < sets.length (); ++i)
+ {
+ CORBA::ULong np = sets[i].configs.length ();
+ if (np == 0)
+ continue;
+
+ CORBA::PolicyList_var policy_list = new CORBA::PolicyList (np);
+ policy_list->length (np);
+
+ // Create a list of policies
+ for (CORBA::ULong pc = 0; pc < np; ++pc)
+ {
+ policy_list[pc] = this->create_single_policy (sets[i].configs[pc]
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ }
+
+ // Bind the policy list to the name. The bind operation should
+ // surrender the ownership of the newly created PolicyList
+ // sequence to the map.
+ if (this->policy_map_.bind (sets[i].name.in (),
+ policy_list) != 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Error binding Policy_Set with name: %s\n",
+ sets[i].name.in ()));
+ ACE_THROW (CORBA::INTERNAL ());
+ }
+ }
+}
+
+void
+CIAO::RTPolicy_Set_Manager::fini (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // We are keeping the PolicyList in var variables in the map.
+ // There's no need to release them explicitly.
+}
+
+CORBA::PolicyList *
+CIAO::RTPolicy_Set_Manager::find_policies_by_name (const char *name
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ if (name == 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Invalid name string found in \"find_policies_by_name\"\n"));
+ ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
+ }
+
+
+ POLICY_MAP::ENTRY *entry;
+
+ if (this->policy_map_.find (name, entry) != 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Unable to find a PolicyList named %s\n",
+ name));
+ ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
+ }
+
+ // duplicate the sequence PolicyList.
+ CORBA::PolicyList_var retv =
+ new CORBA::PolicyList (entry->int_id_.in ());
+
+ return retv._retn ();
+}
+
+CORBA::Policy_ptr
+CIAO::RTPolicy_Set_Manager::create_single_policy
+(const CIAO::RTConfiguration::Policy_Config &policy_config
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ if (CIAO::debug_level () > 10)
+ ACE_DEBUG ((LM_DEBUG, "RTPolicy_Set_Manager::create_single_policy\n"));
+
+ CORBA::Policy_var retv;
+
+ switch (policy_config.type)
+ {
+ case RTCORBA::PRIORITY_MODEL_POLICY_TYPE:
+ CIAO::RTConfiguration::Priority_Model_Config *tmp;
+
+ if (policy_config.configuration >>= tmp)
+ {
+ retv = this->rtorb_->create_priority_model_policy (tmp->model,
+ tmp->default_priority
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+ }
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Error extracting PriorityModelPolicy configuration\n"));
+ ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
+ }
+ break;
+
+ case RTCORBA::THREADPOOL_POLICY_TYPE:
+ {
+ const char *idref;
+ policy_config.configuration >>= idref;
+ RTCORBA::ThreadpoolId tpid =
+ this->resource_manager_.find_threadpool_by_name (idref
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ retv = this->rtorb_->create_threadpool_policy (tpid
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+ }
+ break;
+
+ case RTCORBA::PRIORITY_BANDED_CONNECTION_POLICY_TYPE:
+ {
+ const char *idref;
+ policy_config.configuration >>= idref;
+ RTCORBA::PriorityBands_var bands =
+ this->resource_manager_.find_priority_bands_by_name (idref
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ retv =
+ this->rtorb_->create_priority_banded_connection_policy (bands.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+ }
+ break;
+
+ default:
+ ACE_DEBUG ((LM_DEBUG,
+ "Invalid policy type - RTPolicy_Set_Manager::create_single_policy\n"));
+ ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
+ }
+
+ return retv._retn ();
+}
diff --git a/TAO/CIAO/tools/RTComponentServer/RTConfig_Manager.h b/TAO/CIAO/tools/RTComponentServer/RTConfig_Manager.h
new file mode 100644
index 00000000000..60ea4645f7a
--- /dev/null
+++ b/TAO/CIAO/tools/RTComponentServer/RTConfig_Manager.h
@@ -0,0 +1,163 @@
+// -*- C++ -*-
+
+//=============================================================================
+/**
+ * @file RTConfig_Manager.h
+ *
+ * $Id$
+ *
+ * This file contains classes that manage name to configuration
+ * mapping info in a RTComponentServer.
+ *
+ * @author Nanbor Wang <nanbor@cs.wustl.edu>
+ */
+//=============================================================================
+
+
+#ifndef CIAO_RTCONFIG_MANAGER_H
+#define CIAO_RTCONFIG_MANAGER_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/RTCORBA/RTCORBA.h"
+#include "tools/XML_Helpers/RTConfigurationC.h"
+#include "ace/Null_Mutex.h"
+#include "ace/SString.h"
+#include "ace/Hash_Map_Manager_T.h"
+
+namespace CIAO
+{
+ /**
+ * @brief RTResource_Config_Manager maintains a collection of
+ * RTCORBA related resources.
+ *
+ * This class is responsible to create and manage a list of RTCORBA
+ * related resources that are global to an RT ComponentServer. The
+ * information required to create and configure these resources are
+ * passed in via the @a info argument in the @c init method. These
+ * resources are identified by names. This class is used by the
+ * RTPolicy_Set_Manager for associating these resources with related
+ * RTPolicies. These resources are destoryed along with this class.
+ *
+ * Currently, the only resources supported (and managed) by this
+ * class are Threadpool and Threadpool_with_Lanes.
+ */
+ class RTResource_Config_Manager
+ {
+ public:
+ RTResource_Config_Manager (RTCORBA::RTORB_ptr orb);
+ ~RTResource_Config_Manager ();
+
+ /// Initializing the RTResource_Config_Manager
+ void init (const CIAO::RTConfiguration::RTORB_Resource_Info &info
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// Finalizing the RTResource_Config_Manager and the resources it
+ /// manages.
+ void fini (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// Query a thread pool by name.
+ RTCORBA::ThreadpoolId find_threadpool_by_name (const char *name
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+
+ /// Query a priority bands info by name.
+ RTCORBA::PriorityBands *find_priority_bands_by_name (const char *name
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ private:
+ // Cached an RTORB reference.
+ RTCORBA::RTORB_var rtorb_;
+
+ /// Hash_Map stuff.
+ typedef ACE_Hash_Map_Manager_Ex<ACE_CString,
+ RTCORBA::ThreadpoolId,
+ ACE_Hash<ACE_CString>,
+ ACE_Equal_To<ACE_CString>,
+ ACE_Null_Mutex> TP_MAP;
+
+ typedef ACE_Hash_Map_Manager_Ex<ACE_CString,
+ RTCORBA::PriorityBands_var,
+ ACE_Hash<ACE_CString>,
+ ACE_Equal_To<ACE_CString>,
+ ACE_Null_Mutex> PB_MAP;
+
+ /// Internal TP name to id map.
+ TP_MAP threadpool_map_;
+
+ /// Internal PB name to priority bands map.
+ PB_MAP priority_bands_map_;
+ };
+
+ /**
+ * @brief This class creates and maintains named policy sets which
+ * can be indexed via names.
+ *
+ * This class requires to use the RTResource_Config_Manager.
+ */
+ class RTPolicy_Set_Manager
+ {
+ public:
+ RTPolicy_Set_Manager (RTResource_Config_Manager &resource_config,
+ CORBA::ORB_ptr orb,
+ RTCORBA::RTORB_ptr rtorb);
+ ~RTPolicy_Set_Manager ();
+
+ /// Initialize the RTPolicy_Set_Manager and the policies it manages.
+ void init (const CIAO::RTConfiguration::Policy_Sets &sets
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// Finalizing the RTPolicy_Set_Manager and the policies it
+ /// creates.
+ void fini (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// Query a policy set by name
+ CORBA::PolicyList *find_policies_by_name (const char *name
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ private:
+ /// Reference to Resource Manager
+ RTResource_Config_Manager &resource_manager_;
+
+ /// Cached an ORB reference.
+ CORBA::ORB_var orb_;
+
+ /// Cached an RTORB reference.
+ RTCORBA::RTORB_var rtorb_;
+
+ /// create a single policy
+ CORBA::Policy_ptr create_single_policy
+ (const CIAO::RTConfiguration::Policy_Config &policy_config
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// Hash_Map stuff.
+ typedef ACE_Hash_Map_Manager_Ex<ACE_CString,
+ CORBA::PolicyList_var,
+ ACE_Hash<ACE_CString>,
+ ACE_Equal_To<ACE_CString>,
+ ACE_Null_Mutex> POLICY_MAP;
+
+ /// Internal TP names to id map.
+ POLICY_MAP policy_map_;
+ };
+}
+
+#if defined (__ACE_INLINE__)
+# include "RTConfig_Manager.inl"
+#endif /* __ACE_INLINE__ */
+
+#include /**/ "ace/post.h"
+#endif /* CIAO_RTCONFIG_MANAGER_H */
diff --git a/TAO/CIAO/tools/RTComponentServer/RTServer_Impl.cpp b/TAO/CIAO/tools/RTComponentServer/RTServer_Impl.cpp
new file mode 100644
index 00000000000..319e526388d
--- /dev/null
+++ b/TAO/CIAO/tools/RTComponentServer/RTServer_Impl.cpp
@@ -0,0 +1,264 @@
+// $Id$
+
+#include "RTServer_Impl.h"
+#include "ciao/CIAO_common.h"
+#include "ace/Auto_Ptr.h"
+#include "ace/OS_NS_string.h"
+
+#if !defined (__ACE_INLINE__)
+# include "RTServer_Impl.inl"
+#endif /* __ACE_INLINE__ */
+
+
+CIAO::RTServer::RTComponentServer_Impl::~RTComponentServer_Impl ()
+{
+}
+
+int
+CIAO::RTServer::RTComponentServer_Impl::init (Components::ConfigValues &options
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::InvalidConfiguration))
+{
+ // @@ Initialize ComponentServer and create the internal container
+ // implementation that actually interacts with installed
+ // homes/components.
+
+ ACE_NEW_THROW_EX (this->config_,
+ ::Components::ConfigValues (),
+ CORBA::INTERNAL ());
+ ACE_CHECK_RETURN (-1);
+
+ *this->config_ = options;
+
+ this->parse_server_config_values (options
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
+
+ // We will probably need two ORBs in this process. One for the
+ // deployment framework, and one for the actual components.
+ return 0;
+}
+
+Components::Deployment::Container_ptr
+CIAO::RTServer::RTComponentServer_Impl::create_container
+(const Components::ConfigValues & config
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::CreateFailure,
+ Components::InvalidConfiguration))
+{
+ if (CIAO::debug_level () > 10)
+ ACE_DEBUG ((LM_DEBUG, "RTComponentServer_Impl::create_container\n"));
+
+ CIAO::RTServer::RTContainer_Impl *container_servant = 0;
+
+ ACE_NEW_THROW_EX (container_servant,
+ CIAO::RTServer::RTContainer_Impl (this->orb_.in (),
+ this->poa_.in (),
+ this->get_objref (),
+ this->policy_set_manager_,
+ this->static_config_flag_,
+ this->static_entrypts_maps_),
+ CORBA::INTERNAL ());
+ ACE_CHECK_RETURN (0);
+
+ PortableServer::ServantBase_var safe_servant (container_servant);
+ container_servant->init (config,
+ this->get_component_installation ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ PortableServer::ObjectId_var oid
+ = this->poa_->activate_object (container_servant
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ CORBA::Object_var obj
+ = this->poa_->id_to_reference (oid.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ Components::Deployment::Container_var ci
+ = Components::Deployment::Container::_narrow (obj.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ // Cached the objref in its servant.
+ container_servant->set_objref (ci.in () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ {
+ ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 0);
+
+ this->container_set_.add (ci.in ());
+ }
+
+ return ci._retn ();
+}
+
+void
+CIAO::RTServer::RTComponentServer_Impl::
+parse_server_config_values (const Components::ConfigValues &options
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::InvalidConfiguration))
+{
+ if (CIAO::debug_level () > 10)
+ ACE_DEBUG ((LM_DEBUG, "RTComponentServer_Impl::parse_server_config_values\n"));
+
+ for (CORBA::ULong i = 0; i < options.length (); ++i)
+ {
+ if (CIAO::debug_level () > 10)
+ ACE_DEBUG ((LM_DEBUG, "parse_server_options: %s\n",
+ options[i]->name ()));
+
+ if (ACE_OS::strcmp (options[i]->name (), "CIAO-RTResources") == 0)
+ {
+ CIAO::RTConfiguration::RTORB_Resource_Info *resource_info;
+ if (options[i]->value () >>= resource_info)
+ {
+ // initialize the resource manager with resource defintions.
+ this->resource_manager_.init (*resource_info
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ }
+ }
+ else if (ACE_OS::strcmp (options[i]->name (), "CIAO-RTPolicySets") == 0)
+ {
+ CIAO::RTConfiguration::Policy_Sets * policy_sets;
+ if (options[i]->value () >>= policy_sets)
+ {
+ // initialize the policyset manager with policy set defintions.
+ this->policy_set_manager_.init (*policy_sets
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ }
+ }
+ else
+ {
+ Components::InvalidConfiguration *exc = 0;
+
+ ACE_NEW_THROW_EX (exc,
+ Components::InvalidConfiguration,
+ CORBA::NO_MEMORY ());
+
+ exc->name = CORBA::string_dup (options[i]->name ());
+ exc->reason = Components::InvalidConfigValueType;
+#if defined (ACE_HAS_EXCEPTIONS)
+ auto_ptr<Components::InvalidConfiguration> safety (exc);
+
+ // Direct throw because we don't have the ACE_TRY_ENV.
+ exc->_raise ();
+#else
+ // We can not use ACE_THROW here.
+ ACE_TRY_ENV.exception (exc);
+#endif
+ }
+ }
+}
+
+// ============================================================
+
+CIAO::RTServer::RTContainer_Impl::~RTContainer_Impl ()
+{
+}
+
+int
+CIAO::RTServer::RTContainer_Impl::init (const Components::ConfigValues &options,
+ Components::Deployment::ComponentInstallation_ptr inst
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::InvalidConfiguration))
+{
+ if (CIAO::debug_level () > 10)
+ ACE_DEBUG ((LM_DEBUG, "RTContainer_Impl::init\n"));
+
+ this->config_ = options;
+ this->parse_container_config_values (options
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
+
+ this->installation_ =
+ Components::Deployment::ComponentInstallation::_duplicate (inst);
+
+ // @@ Initialize container and create the internal container
+ // implementation that actually interacts with installed
+ // homes/components.
+
+ // @@ We will need a container factory here later on when we support
+ // more kinds of container implementations.
+
+ // @@ Fish out the ComponentServer object reference from <options>.
+
+ ACE_NEW_THROW_EX (this->container_,
+ CIAO::Session_Container (this->orb_.in (),
+ this->static_config_flag_,
+ this->static_entrypts_maps_),
+ CORBA::INTERNAL ());
+ ACE_CHECK_RETURN (-1);
+
+ return this->container_->init (0,
+ this->Policies_.ptr ()
+ ACE_ENV_ARG_PARAMETER);
+}
+
+void
+CIAO::RTServer::RTContainer_Impl::
+parse_container_config_values (const Components::ConfigValues &options
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ Components::InvalidConfiguration))
+{
+ if (CIAO::debug_level () > 10)
+ ACE_DEBUG ((LM_DEBUG, "parse_container_config_values"));
+
+ for (CORBA::ULong i = 0; i < options.length (); ++i)
+ {
+ if (CIAO::debug_level () > 10)
+ ACE_DEBUG ((LM_DEBUG, "options.name= %s\n", options[i]->name ()));
+
+ if (ACE_OS::strcmp (options[i]->name (), "CIAO-RTPolicySet") == 0)
+ {
+ const char *ps_name;
+ if (options[i]->value () >>= ps_name)
+ {
+ if (CIAO::debug_level () > 10)
+ ACE_DEBUG ((LM_DEBUG,
+ "-Using RTPolicySet named: %s\n",
+ ps_name));
+ CORBA::PolicyList_var policies =
+ // initialize the policyset manager with policy set defintions.
+ this->policyset_manager_.find_policies_by_name (ps_name
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ this->Policies_ = policies;
+ if (CIAO::debug_level () > 10)
+ ACE_DEBUG ((LM_DEBUG,
+ "Found RTPolicySet named: %s\n",
+ ps_name));
+ }
+ }
+ else
+ {
+ Components::InvalidConfiguration *exc = 0;
+
+ ACE_NEW_THROW_EX (exc,
+ Components::InvalidConfiguration,
+ CORBA::NO_MEMORY ());
+
+ exc->name = CORBA::string_dup (options[i]->name ());
+ exc->reason = Components::InvalidConfigValueType;
+#if defined (ACE_HAS_EXCEPTIONS)
+ auto_ptr<Components::InvalidConfiguration> safety (exc);
+
+ // Direct throw because we don't have the ACE_TRY_ENV.
+ exc->_raise ();
+#else
+ // We can not use ACE_THROW here.
+ ACE_TRY_ENV.exception (exc);
+#endif
+ }
+ }
+}
diff --git a/TAO/CIAO/tools/Segment_Timer/Segment_Timer.h b/TAO/CIAO/tools/Segment_Timer/Segment_Timer.h
new file mode 100644
index 00000000000..c33a0d042f6
--- /dev/null
+++ b/TAO/CIAO/tools/Segment_Timer/Segment_Timer.h
@@ -0,0 +1,42 @@
+// $Id$
+
+#ifndef SEGMENT_TIMERS_H
+#define SEGMENT_TIMERS_H
+
+#include "ace/High_Res_Timer.h"
+#include "ace/Log_Msg.h"
+#include "Segment_Timer_Export.h"
+
+#define MAX_READINGS 500
+class Segment_Timer_Export Segment_Timer : public ACE_High_Res_Timer
+{
+ ACE_hrtime_t recorded_times_[MAX_READINGS];
+ int total_recorded_;
+ static bool dump_flag_;
+
+public:
+ ACE_INLINE Segment_Timer ()
+ :total_recorded_(0)
+ {}
+
+ ACE_INLINE void start_timer (void)
+ {
+ this->start ();
+ }
+ ACE_INLINE void stop_timer (void)
+ {
+ this->stop ();
+ this->elapsed_time (recorded_times_[total_recorded_]);
+ ++total_recorded_;
+ }
+ void dump (int index);
+ static void set_dump_flag(bool flag) { dump_flag_ = flag;}
+ static bool get_dump_flag(void) { return dump_flag_;}
+};
+
+enum {CREATE_HOME_TIMER, CREATE_CONTAINER_TIMER, CREATE_COMPONENT_TIMER,
+ REGISTER_COMPONENT_TIMER, CREATE_CONNECTION_TIMER, TOTAL_ASSEMBLY_TIMER, CREATE_COMPSERVER_TIMER, MAX_TIMERS};
+
+extern Segment_Timer_Export Segment_Timer segment_timers[MAX_TIMERS];
+
+#endif
diff --git a/TAO/CIAO/tools/Segment_Timer/Segment_Timer.mpc b/TAO/CIAO/tools/Segment_Timer/Segment_Timer.mpc
new file mode 100644
index 00000000000..a89cfbf6956
--- /dev/null
+++ b/TAO/CIAO/tools/Segment_Timer/Segment_Timer.mpc
@@ -0,0 +1,18 @@
+// -*- MPC -*-
+// $Id$
+
+project(Segment_Timer): acelib {
+ sharedname = Segment_Timer
+ dynamicflags += SEGMENT_TIMER_BUILD_DLL
+
+ // This is necessary for MPC to pull in rules.ciao.GNU
+ includes += $(CIAO_ROOT)
+
+ Source_Files {
+ Segment_Timer.cpp
+ }
+
+ Header_Files {
+ Segment_Timer_Export.h
+ }
+}
diff --git a/TAO/CIAO/tools/XML_Helpers/XML_Utils.cpp b/TAO/CIAO/tools/XML_Helpers/XML_Utils.cpp
new file mode 100644
index 00000000000..dd555318da1
--- /dev/null
+++ b/TAO/CIAO/tools/XML_Helpers/XML_Utils.cpp
@@ -0,0 +1,235 @@
+// -*- C++ -*- $Id$
+
+#include "XML_Utils.h"
+#include "ACEXML/common/FileCharStream.h"
+#include "ACEXML/common/StrCharStream.h"
+#include "ACEXML/parser/parser/Parser.h"
+#include "Assembly_Handlers.h"
+#include "RTConfig_Handlers.h"
+#include "ace/OS_String.h"
+
+int
+CIAO::XML_Utils::parse_softpkg (CIAO::Softpkg_Handler::Softpkg_Info *info)
+{
+ if (info == 0) // no way this is going to work. :)
+ return -1;
+
+ ACEXML_DefaultHandler *handler = 0;
+ auto_ptr<ACEXML_DefaultHandler> cleanup_handler (handler);
+
+ ACEXML_FileCharStream *fstm = 0;
+ ACE_NEW_RETURN (fstm,
+ ACEXML_FileCharStream (),
+ 1);
+
+ if (fstm->open (info->csd_path_.c_str ()) != 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("Fail to open XML file: %s\n"),
+ info->csd_path_.c_str ()),
+ -1);
+ ACEXML_TRY_NEW_ENV
+ {
+ ACEXML_Parser parser;
+
+ ACE_NEW_RETURN (handler,
+ CIAO::Softpkg_Handler (&parser,
+ info
+ ACEXML_ENV_ARG_PARAMETER),
+ -1);
+
+ ACEXML_InputSource input(fstm);
+
+ parser.setContentHandler (handler);
+ parser.setDTDHandler (handler);
+ parser.setErrorHandler (handler);
+ parser.setEntityResolver (handler);
+
+ parser.parse (&input ACEXML_ENV_ARG_PARAMETER);
+ ACEXML_TRY_CHECK;
+
+ // delete fstm;
+ ACE_NEW_RETURN (fstm,
+ ACEXML_FileCharStream (),
+ 1);
+
+ if (fstm->open (info->ssd_path_.c_str ()) != 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("Fail to open XML file: %s\n"),
+ info->ssd_path_.c_str ()),
+ -1);
+
+ input.setCharStream (fstm);
+
+ parser.parse (&input ACEXML_ENV_ARG_PARAMETER);
+ ACEXML_TRY_CHECK;
+ }
+ ACEXML_CATCH (ACEXML_SAXException, ex)
+ {
+ ex.print ();
+ return -1;
+ }
+ ACEXML_CATCHANY
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Caught unknown exception.\n"),
+ -1);
+ }
+ ACEXML_ENDTRY;
+ return 0;
+}
+
+int
+CIAO::XML_Utils::parse_componentassembly (const char *filename,
+ CIAO::Assembly_Spec *spec)
+{
+ if (spec == 0) // no way this is going to work. :)
+ return -1;
+
+ ACEXML_DefaultHandler *handler = 0;
+ auto_ptr<ACEXML_DefaultHandler> cleanup_handler (handler);
+
+ ACEXML_FileCharStream *fstm = 0;
+ ACE_NEW_RETURN (fstm,
+ ACEXML_FileCharStream (),
+ 1);
+
+ if (fstm->open (filename) != 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("Fail to open XML file: %s\n"),
+ filename),
+ -1);
+ ACEXML_TRY_NEW_ENV
+ {
+ ACEXML_Parser parser;
+
+ ACE_NEW_RETURN (handler,
+ CIAO::Assembly_Handler (&parser,
+ spec
+ ACEXML_ENV_ARG_PARAMETER),
+ -1);
+
+ ACEXML_InputSource input(fstm);
+
+ parser.setContentHandler (handler);
+ parser.setDTDHandler (handler);
+ parser.setErrorHandler (handler);
+ parser.setEntityResolver (handler);
+
+ parser.parse (&input ACEXML_ENV_ARG_PARAMETER);
+ ACEXML_TRY_CHECK;
+ }
+ ACEXML_CATCH (ACEXML_SAXException, ex)
+ {
+ ex.print ();
+ return -1;
+ }
+ ACEXML_CATCHANY
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Caught unknown exception.\n"),
+ -1);
+ }
+ ACEXML_ENDTRY;
+ return 0;
+}
+
+int
+CIAO::XML_Utils::parse_rtcad_extension (const char *filename,
+ RTConfiguration::RTORB_Resource_Info &rtr,
+ RTConfiguration::Policy_Sets &pset)
+{
+ ACEXML_DefaultHandler *handler = 0;
+ auto_ptr<ACEXML_DefaultHandler> cleanup_handler (handler);
+
+ ACEXML_FileCharStream *fstm = 0;
+ ACE_NEW_RETURN (fstm,
+ ACEXML_FileCharStream (),
+ 1);
+
+ if (fstm->open (filename) != 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("Fail to open XML file: %s\n"),
+ filename),
+ -1);
+ ACEXML_TRY_NEW_ENV
+ {
+ ACEXML_Parser parser;
+
+ ACE_NEW_RETURN (handler,
+ CIAO::RTConfig_Handler (&parser,
+ rtr,
+ pset
+ ACEXML_ENV_ARG_PARAMETER),
+ -1);
+
+ ACEXML_InputSource input(fstm);
+
+ parser.setContentHandler (handler);
+ parser.setDTDHandler (handler);
+ parser.setErrorHandler (handler);
+ parser.setEntityResolver (handler);
+
+ parser.parse (&input ACEXML_ENV_ARG_PARAMETER);
+ ACEXML_TRY_CHECK;
+ }
+ ACEXML_CATCH (ACEXML_SAXException, ex)
+ {
+ ex.print ();
+ return -1;
+ }
+ ACEXML_CATCHANY
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Caught unknown exception.\n"),
+ -1);
+ }
+ ACEXML_ENDTRY;
+ return 0;
+}
+
+
+
+long
+CIAO::XML_Utils::get_id_and_cardinality (const char *&id,
+ ACEXML_Attributes *atts
+ ACEXML_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((ACEXML_SAXException))
+{
+ long retv = 1;
+
+ for (size_t i = 0; i < atts->getLength (); ++i)
+ {
+ if (ACE_OS_String::strcmp (atts->getQName (i), ACE_TEXT ("id")) == 0)
+ {
+ id = atts->getValue (i);
+ }
+ else if (ACE_OS_String::strcmp (atts->getQName (i),
+ ACE_TEXT ("cardinality")) == 0)
+ {
+ retv = ACE_OS::atoi (atts->getValue (i));
+ }
+ else
+ ACEXML_THROW_RETURN
+ (ACEXML_SAXException
+ ("Invalid attribute found"),
+ -1);
+ }
+ return retv;
+}
+
+long
+CIAO::XML_Utils::get_single_attribute (const char *attname,
+ const char *&id,
+ ACEXML_Attributes *atts
+ ACEXML_ENV_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((ACEXML_SAXException))
+{
+ for (size_t i = 0; i < atts->getLength (); ++i)
+ {
+ if (ACE_OS_String::strcmp (atts->getQName (i), attname) == 0)
+ {
+ id = atts->getValue (i);
+ }
+ }
+ return 0;
+}
diff --git a/TAO/CIAO/tools/XML_Helpers/XML_Utils.h b/TAO/CIAO/tools/XML_Helpers/XML_Utils.h
new file mode 100644
index 00000000000..873c9322888
--- /dev/null
+++ b/TAO/CIAO/tools/XML_Helpers/XML_Utils.h
@@ -0,0 +1,90 @@
+// $Id$
+
+//=============================================================================
+/**
+ * @file XML_Utils.h
+ *
+ * $Id$
+ *
+ * @author Nanbor Wang <nanbor@cs.wustl.edu>
+ */
+//=============================================================================
+
+#ifndef CIAO_XML_UTILS_H
+#define CIAO_XML_UTILS_H
+
+#include "XML_Helpers_Export.h"
+#include "Softpkg_Handlers.h"
+#include "Assembly_Spec.h"
+#include "tao/RTCORBA/RTCORBA.h"
+#include "RTConfigurationC.h"
+
+namespace CIAO
+{
+ /**
+ * @class Utils
+ *
+ * @brief Utils contains a collection of utility functions
+ */
+ class CIAO_XML_HELPERS_Export XML_Utils
+ {
+ public:
+ /**
+ * @brief Parse a set of component softpkg and return the important info
+ *
+ * This function parses a set of component softpkg files and
+ * returns the important information required to intall the
+ * component in a component server. In CIAO, two different
+ * DLL are needed for a component installation. One for the
+ * actual executor implementation and one for the container
+ * servant implementation.
+ *
+ * When calling this function, info->csd_path_ must holds the
+ * pathname to the component software descriptor the function is
+ * going to parse.
+ *
+ * @retval 0 if all infor are parsed successfully.
+ * @retval -1 if error occured
+ */
+ static int parse_softpkg (Softpkg_Handler::Softpkg_Info *info);
+
+ /**
+ * @brief Parse a component assembly descriptor and extract the
+ * assembly specification.
+ */
+ static int parse_componentassembly (const char *filename,
+ Assembly_Spec *spec);
+
+ /**
+ * @brief Parse a CIAO RT cad file extension descriptor and
+ * extract and prepare the information for RTComponentServer.
+ *
+ * A CIAO RT cad file extension, as defined in
+ * $CIAO_ROOT/doc/XML/ciao_rt_cad_ext.dtd, defines the RT
+ * resources and named policy sets that a RTComponentServer shall
+ * provides for the running components.
+ *
+ * This method assume that all the sequences, either those in
+ * RTORB_Resource_Info or the Policy_Sets, are empty initially and
+ * will add to them when parsing the RTCAD extension file.
+ */
+ static int parse_rtcad_extension (const char *filename,
+ RTConfiguration::RTORB_Resource_Info &rtr,
+ RTConfiguration::Policy_Sets &pset);
+
+ static long get_id_and_cardinality (const char *&id,
+ ACEXML_Attributes *atts
+ ACEXML_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((ACEXML_SAXException)) ;
+
+ static long get_single_attribute (const char *attname,
+ const char *&id,
+ ACEXML_Attributes *atts
+ ACEXML_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((ACEXML_SAXException)) ;
+
+ };
+
+}
+
+#endif /* CIAO_XML_UTILS_H */