summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormhengstmengel <mhengstmengel@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-11-18 15:54:29 +0000
committermhengstmengel <mhengstmengel@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-11-18 15:54:29 +0000
commitf02f619c68740249c5b7e4c38a48b5528769ceec (patch)
treeb7c11db8d6838507c48cfc9d1f869cac1697c9e9
parentc7cd813cff837ee3a7d56de77f1063496fbc9309 (diff)
downloadATCD-f02f619c68740249c5b7e4c38a48b5528769ceec.tar.gz
Thu Nov 18 15:53:42 UTC 2010 Marijke Hengstmengel <mhengstmengel@remedy.nl>
* connectors/ami4ccm/tests/InterMulti/Sender/InterMulti_Sender_exec.cpp: * connectors/ami4ccm/tests/InterMulti/Sender/InterMulti_Sender_exec.h: * connectors/ami4ccm/tests/InterMulti/Sender/InterMulti_Sender.mpc: * connectors/ami4ccm/tests/InterMulti/descriptors/Plan.cdp: * connectors/ami4ccm/tests/InterMulti/Receiver/InterMulti_Receiver_exec.cpp: * connectors/ami4ccm/tests/InterMulti/Receiver/InterMulti_Receiver_exec.h: * connectors/ami4ccm/tests/InterMulti/Sender/InterMultiA_conn_i.cpp: * connectors/ami4ccm/tests/InterMulti/Sender/InterMultiA_conn_i.h: Updated test by using -Gex option and _conn_i.h/cpp file for ReplyHandler.
-rw-r--r--CIAO/ChangeLog14
-rw-r--r--CIAO/connectors/ami4ccm/tests/InterMulti/Receiver/InterMulti_Receiver_exec.cpp239
-rw-r--r--CIAO/connectors/ami4ccm/tests/InterMulti/Receiver/InterMulti_Receiver_exec.h180
-rw-r--r--CIAO/connectors/ami4ccm/tests/InterMulti/Sender/InterMultiA_conn_i.cpp153
-rw-r--r--CIAO/connectors/ami4ccm/tests/InterMulti/Sender/InterMultiA_conn_i.h123
-rw-r--r--CIAO/connectors/ami4ccm/tests/InterMulti/Sender/InterMulti_Sender.mpc2
-rw-r--r--CIAO/connectors/ami4ccm/tests/InterMulti/Sender/InterMulti_Sender_exec.cpp522
-rw-r--r--CIAO/connectors/ami4ccm/tests/InterMulti/Sender/InterMulti_Sender_exec.h225
-rw-r--r--CIAO/connectors/ami4ccm/tests/InterMulti/descriptors/Plan.cdp4
9 files changed, 976 insertions, 486 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog
index cc396bc3585..40634ff795c 100644
--- a/CIAO/ChangeLog
+++ b/CIAO/ChangeLog
@@ -1,3 +1,17 @@
+Thu Nov 18 15:53:42 UTC 2010 Marijke Hengstmengel <mhengstmengel@remedy.nl>
+
+ * connectors/ami4ccm/tests/InterMulti/Sender/InterMulti_Sender_exec.cpp:
+ * connectors/ami4ccm/tests/InterMulti/Sender/InterMulti_Sender_exec.h:
+ * connectors/ami4ccm/tests/InterMulti/Sender/InterMulti_Sender.mpc:
+ * connectors/ami4ccm/tests/InterMulti/descriptors/Plan.cdp:
+ * connectors/ami4ccm/tests/InterMulti/Receiver/InterMulti_Receiver_exec.cpp:
+ * connectors/ami4ccm/tests/InterMulti/Receiver/InterMulti_Receiver_exec.h:
+ * connectors/ami4ccm/tests/InterMulti/Sender/InterMultiA_conn_i.cpp:
+ * connectors/ami4ccm/tests/InterMulti/Sender/InterMultiA_conn_i.h:
+ Updated test by using -Gex option and _conn_i.h/cpp file for ReplyHandler.
+
+
+
Thu Nov 18 14:32:51 UTC 2010 Marcel Smit <msmit@remedy.nl>
* connectors/dds4ccm/tests/OneFile/Multiple/OFM_Connector.mpc:
diff --git a/CIAO/connectors/ami4ccm/tests/InterMulti/Receiver/InterMulti_Receiver_exec.cpp b/CIAO/connectors/ami4ccm/tests/InterMulti/Receiver/InterMulti_Receiver_exec.cpp
index 9955a481dc8..6ee3ad26acf 100644
--- a/CIAO/connectors/ami4ccm/tests/InterMulti/Receiver/InterMulti_Receiver_exec.cpp
+++ b/CIAO/connectors/ami4ccm/tests/InterMulti/Receiver/InterMulti_Receiver_exec.cpp
@@ -1,23 +1,57 @@
// -*- C++ -*-
// $Id$
+/**
+ * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.3
+ * TAO and the TAO IDL Compiler have been developed by:
+ * Center for Distributed Object Computing
+ * Washington University
+ * St. Louis, MO
+ * USA
+ * http://www.cs.wustl.edu/~schmidt/doc-center.html
+ * and
+ * Distributed Object Computing Laboratory
+ * University of California at Irvine
+ * Irvine, CA
+ * USA
+ * and
+ * Institute for Software Integrated Systems
+ * Vanderbilt University
+ * Nashville, TN
+ * USA
+ * http://www.isis.vanderbilt.edu/
+ *
+ * Information about TAO is available at:
+ * http://www.cs.wustl.edu/~schmidt/TAO.html
+ **/
+
#include "InterMulti_Receiver_exec.h"
-#include "ace/OS_NS_unistd.h"
namespace CIAO_InterMulti_Receiver_Impl
{
- Atomic_UShort nr_of_received = 0;
- One_exec_i::One_exec_i (void)
+ CORBA::UShort nr_of_received = 0;
+
+ /**
+ * Facet Executor Implementation Class: do_my_one_exec_i
+ */
+
+ do_my_one_exec_i::do_my_one_exec_i (
+ ::InterMulti::CCM_Receiver_Context_ptr ctx)
+ : ciao_context_ (
+ ::InterMulti::CCM_Receiver_Context::_duplicate (ctx))
{
}
- One_exec_i::~One_exec_i (void)
+ do_my_one_exec_i::~do_my_one_exec_i (void)
{
}
+ // Operations from ::InterMulti::One
+
::CORBA::Long
- One_exec_i::foo (const char * in_str, ::CORBA::Long cmd,
- ::CORBA::String_out answer)
+ do_my_one_exec_i::foo (const char * in_str,
+ ::CORBA::Long cmd,
+ ::CORBA::String_out answer)
{
ACE_DEBUG ((LM_DEBUG, "Receiver: one_foo, in_str = %C"
" cmd = <%u>\n",
@@ -36,17 +70,26 @@ namespace CIAO_InterMulti_Receiver_Impl
return cmd;
}
- Two_exec_i::Two_exec_i (void)
+ /**
+ * Facet Executor Implementation Class: do_my_two_exec_i
+ */
+
+ do_my_two_exec_i::do_my_two_exec_i (
+ ::InterMulti::CCM_Receiver_Context_ptr ctx)
+ : ciao_context_ (
+ ::InterMulti::CCM_Receiver_Context::_duplicate (ctx))
{
}
- Two_exec_i::~Two_exec_i (void)
+ do_my_two_exec_i::~do_my_two_exec_i (void)
{
}
+ // Operations from ::InterMulti::Two
+
void
- Two_exec_i::bar (::CORBA::Long cmd,
- ::CORBA::String_out answer)
+ do_my_two_exec_i::bar (::CORBA::Long cmd,
+ ::CORBA::String_out answer)
{
ACE_DEBUG ((LM_DEBUG, "Receiver: two_bar,"
" cmd = <%u>\n",
@@ -64,32 +107,50 @@ namespace CIAO_InterMulti_Receiver_Impl
answer = CORBA::string_dup ("answer bar two");
}
- Three_exec_i::Three_exec_i (void)
+ /**
+ * Facet Executor Implementation Class: do_my_three_exec_i
+ */
+
+ do_my_three_exec_i::do_my_three_exec_i (
+ ::InterMulti::CCM_Receiver_Context_ptr ctx)
+ : ciao_context_ (
+ ::InterMulti::CCM_Receiver_Context::_duplicate (ctx))
{
}
- Three_exec_i::~Three_exec_i (void)
+ do_my_three_exec_i::~do_my_three_exec_i (void)
{
}
+ // Operations from ::InterMulti::Three
+
void
- Three_exec_i::plus (::CORBA::Long cmd,
- ::CORBA::String_out answer)
+ do_my_three_exec_i::bar (::CORBA::Long cmd,
+ ::CORBA::String_out answer)
{
- ACE_DEBUG ((LM_DEBUG, "Receiver: three_plus,"
- " cmd = <%u>\n",
- cmd));
- ++nr_of_received;
- answer = CORBA::string_dup ("answer plus three");
+ ACE_DEBUG ((LM_DEBUG, "Receiver: three_bar,"
+ " cmd = <%u>\n",
+ cmd));
+ if (cmd != 3)
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Receiver Three::bar,"
+ " origin not 3, but <%u>\n",
+ cmd));
+ }
+ else
+ {
+ ++nr_of_received;
+ }
+ answer = CORBA::string_dup ("answer bar three");
}
::CORBA::Long
- Three_exec_i::foo (const char * in_str,::CORBA::Long cmd,
- ::CORBA::String_out answer)
+ do_my_three_exec_i::foo (const char * in_str,::CORBA::Long cmd,
+ ::CORBA::String_out answer)
{
ACE_DEBUG ((LM_DEBUG, "Receiver: three_foo, in_str = %C"
- " cmd = <%u>\n",
- in_str, cmd));
+ " cmd = <%u>\n",
+ in_str, cmd));
if (cmd != 3)
{
ACE_ERROR ((LM_ERROR, "ERROR: Receiver THREE::foo,"
@@ -105,58 +166,101 @@ namespace CIAO_InterMulti_Receiver_Impl
}
void
- Three_exec_i::bar (::CORBA::Long cmd,
- ::CORBA::String_out answer)
+ do_my_three_exec_i::plus (::CORBA::Long cmd,
+ ::CORBA::String_out answer)
{
- ACE_DEBUG ((LM_DEBUG, "Receiver: three_bar,"
- " cmd = <%u>\n",
- cmd));
- if (cmd != 3)
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Receiver Three::bar,"
- " origin not 3, but <%u>\n",
- cmd));
- }
- else
- {
- ++nr_of_received;
- }
- answer = CORBA::string_dup ("answer bar three");
- }
+ ACE_DEBUG ((LM_DEBUG, "Receiver: three_plus,"
+ " cmd = <%u>\n",
+ cmd));
+ ++nr_of_received;
+ answer = CORBA::string_dup ("answer plus three");
+ }
- Receiver_exec_i::Receiver_exec_i (void)
- {
+ /**
+ * Component Executor Implementation Class: Receiver_exec_i
+ */
+
+ Receiver_exec_i::Receiver_exec_i (void){
}
Receiver_exec_i::~Receiver_exec_i (void)
{
}
+ // Supported operations and attributes.
+
+ // Component attributes and port operations.
+
::InterMulti::CCM_One_ptr
Receiver_exec_i::get_do_my_one (void)
{
- return new One_exec_i ();
+ if ( ::CORBA::is_nil (this->ciao_do_my_one_.in ()))
+ {
+ do_my_one_exec_i *tmp = 0;
+ ACE_NEW_RETURN (
+ tmp,
+ do_my_one_exec_i (
+ this->ciao_context_.in ()),
+ ::InterMulti::CCM_One::_nil ());
+
+ this->ciao_do_my_one_ = tmp;
+ }
+
+ return
+ ::InterMulti::CCM_One::_duplicate (
+ this->ciao_do_my_one_.in ());
}
::InterMulti::CCM_Two_ptr
Receiver_exec_i::get_do_my_two (void)
{
- return new Two_exec_i ();
+ if ( ::CORBA::is_nil (this->ciao_do_my_two_.in ()))
+ {
+ do_my_two_exec_i *tmp = 0;
+ ACE_NEW_RETURN (
+ tmp,
+ do_my_two_exec_i (
+ this->ciao_context_.in ()),
+ ::InterMulti::CCM_Two::_nil ());
+
+ this->ciao_do_my_two_ = tmp;
+ }
+
+ return
+ ::InterMulti::CCM_Two::_duplicate (
+ this->ciao_do_my_two_.in ());
}
::InterMulti::CCM_Three_ptr
Receiver_exec_i::get_do_my_three (void)
{
- return new Three_exec_i ();
+ if ( ::CORBA::is_nil (this->ciao_do_my_three_.in ()))
+ {
+ do_my_three_exec_i *tmp = 0;
+ ACE_NEW_RETURN (
+ tmp,
+ do_my_three_exec_i (
+ this->ciao_context_.in ()),
+ ::InterMulti::CCM_Three::_nil ());
+
+ this->ciao_do_my_three_ = tmp;
+ }
+
+ return
+ ::InterMulti::CCM_Three::_duplicate (
+ this->ciao_do_my_three_.in ());
}
+ // Operations from Components::SessionComponent.
+
void
Receiver_exec_i::set_session_context (
::Components::SessionContext_ptr ctx)
{
- this->context_ = ::InterMulti::CCM_Receiver_Context::_narrow (ctx);
+ this->ciao_context_ =
+ ::InterMulti::CCM_Receiver_Context::_narrow (ctx);
- if ( ::CORBA::is_nil (this->context_.in ()))
+ if ( ::CORBA::is_nil (this->ciao_context_.in ()))
{
throw ::CORBA::INTERNAL ();
}
@@ -165,47 +269,48 @@ namespace CIAO_InterMulti_Receiver_Impl
void
Receiver_exec_i::configuration_complete (void)
{
+ /* Your code here. */
}
void
Receiver_exec_i::ccm_activate (void)
{
+ /* Your code here. */
}
void
Receiver_exec_i::ccm_passivate (void)
{
+ /* Your code here. */
}
void
Receiver_exec_i::ccm_remove (void)
{
- if (nr_of_received.value() != 7)
- {
- ACE_ERROR ((LM_ERROR, "ERROR: not received the expected number of"
- "correct calls"
- "Expected: 7, Received: %u.\n",
- nr_of_received.value()));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "OK: Receiver received the expected "
- "number of correct calls. "
- "Expected: 7, Received: %u.\n",
- nr_of_received.value()));
- }
- }
+ if (nr_of_received != 7)
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: not received the expected number of"
+ "correct calls"
+ "Expected: 7, Received: %u.\n",
+ nr_of_received));
+ }
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG, "OK: Receiver received the expected "
+ "number of correct calls. "
+ "Expected: 7, Received: %u.\n",
+ nr_of_received));
+ } }
- extern "C" ::Components::EnterpriseComponent_ptr
- create_InterMulti_AMI_Receiver_Impl (void)
+ extern "C" INTERMULTI_RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_InterMulti_Receiver_Impl (void)
{
::Components::EnterpriseComponent_ptr retval =
::Components::EnterpriseComponent::_nil ();
- ACE_NEW_RETURN (
+ ACE_NEW_NORETURN (
retval,
- Receiver_exec_i,
- ::Components::EnterpriseComponent::_nil ());
+ Receiver_exec_i);
return retval;
}
diff --git a/CIAO/connectors/ami4ccm/tests/InterMulti/Receiver/InterMulti_Receiver_exec.h b/CIAO/connectors/ami4ccm/tests/InterMulti/Receiver/InterMulti_Receiver_exec.h
index 6bab5d3fe9f..786f02ee452 100644
--- a/CIAO/connectors/ami4ccm/tests/InterMulti/Receiver/InterMulti_Receiver_exec.h
+++ b/CIAO/connectors/ami4ccm/tests/InterMulti/Receiver/InterMulti_Receiver_exec.h
@@ -1,8 +1,33 @@
// -*- C++ -*-
// $Id$
-#ifndef CIAO_INTERMULTI_RECEIVER_EXEC_H_
-#define CIAO_INTERMULTI_RECEIVER_EXEC_H_
+/**
+ * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.3
+ * TAO and the TAO IDL Compiler have been developed by:
+ * Center for Distributed Object Computing
+ * Washington University
+ * St. Louis, MO
+ * USA
+ * http://www.cs.wustl.edu/~schmidt/doc-center.html
+ * and
+ * Distributed Object Computing Laboratory
+ * University of California at Irvine
+ * Irvine, CA
+ * USA
+ * and
+ * Institute for Software Integrated Systems
+ * Vanderbilt University
+ * Nashville, TN
+ * USA
+ * http://www.isis.vanderbilt.edu/
+ *
+ * Information about TAO is available at:
+ * http://www.cs.wustl.edu/~schmidt/TAO.html
+ **/
+#ifndef CIAO_INTERMULTI_RECEIVER_EXEC_GUFSW6_H_
+#define CIAO_INTERMULTI_RECEIVER_EXEC_GUFSW6_H_
+
+#include /**/ "ace/pre.h"
#include "InterMulti_ReceiverEC.h"
@@ -10,53 +35,101 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
+#include /**/ "InterMulti_Receiver_exec_export.h"
#include "tao/LocalObject.h"
-#include "InterMulti_Receiver_exec_export.h"
namespace CIAO_InterMulti_Receiver_Impl
{
- typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, CORBA::UShort > Atomic_UShort;
+ /**
+ * Provider Executor Implementation Class: do_my_one_exec_i
+ */
- class One_exec_i
+ class do_my_one_exec_i
: public virtual ::InterMulti::CCM_One,
public virtual ::CORBA::LocalObject
{
public:
- One_exec_i (void);
- virtual ~One_exec_i (void);
+ do_my_one_exec_i (
+ ::InterMulti::CCM_Receiver_Context_ptr ctx);
+ virtual ~do_my_one_exec_i (void);
- virtual ::CORBA::Long foo (const char * in_str, ::CORBA::Long cmd,
- ::CORBA::String_out answer);
- };
- class Two_exec_i
+ //@{
+ /** Operations and attributes from ::InterMulti::One. */
+
+ virtual
+ ::CORBA::Long foo (const char * in_str,
+ ::CORBA::Long cmd,
+ ::CORBA::String_out answer);
+ //@}
+
+ private:
+ ::InterMulti::CCM_Receiver_Context_var ciao_context_;
+ };
+
+ /**
+ * Provider Executor Implementation Class: do_my_two_exec_i
+ */
+
+ class do_my_two_exec_i
: public virtual ::InterMulti::CCM_Two,
public virtual ::CORBA::LocalObject
{
public:
- Two_exec_i (void);
- virtual ~Two_exec_i (void);
+ do_my_two_exec_i (
+ ::InterMulti::CCM_Receiver_Context_ptr ctx);
+ virtual ~do_my_two_exec_i (void);
+
+ //@{
+ /** Operations and attributes from ::InterMulti::Two. */
- virtual void bar (::CORBA::Long cmd,
- ::CORBA::String_out answer);
+ virtual
+ void bar (::CORBA::Long cmd,
+ ::CORBA::String_out answer);
+ //@}
+
+ private:
+ ::InterMulti::CCM_Receiver_Context_var ciao_context_;
};
- class Three_exec_i
+
+ /**
+ * Provider Executor Implementation Class: do_my_three_exec_i
+ */
+
+ class do_my_three_exec_i
: public virtual ::InterMulti::CCM_Three,
public virtual ::CORBA::LocalObject
{
public:
- Three_exec_i (void);
- virtual ~Three_exec_i (void);
-
- virtual void plus (::CORBA::Long cmd,
- ::CORBA::String_out answer);
- virtual ::CORBA::Long foo (const char * in_str,
- ::CORBA::Long cmd,
- ::CORBA::String_out answer);
- virtual void bar (::CORBA::Long cmd,
- ::CORBA::String_out answer);
+ do_my_three_exec_i (
+ ::InterMulti::CCM_Receiver_Context_ptr ctx);
+ virtual ~do_my_three_exec_i (void);
+
+ //@{
+ /** Operations and attributes from ::InterMulti::Three. */
+
+ virtual
+ ::CORBA::Long foo (const char * in_str,
+ ::CORBA::Long cmd,
+ ::CORBA::String_out answer);
+
+ virtual
+ void bar (::CORBA::Long cmd,
+ ::CORBA::String_out answer);
+
+ virtual
+ void plus (::CORBA::Long cmd,
+ ::CORBA::String_out answer);
+ //@}
+
+ private:
+ ::InterMulti::CCM_Receiver_Context_var ciao_context_;
};
- class Receiver_exec_i
+ /**
+ * Component Executor Implementation Class: Receiver_exec_i
+ */
+
+ class Receiver_exec_i
: public virtual Receiver_Exec,
public virtual ::CORBA::LocalObject
{
@@ -64,24 +137,63 @@ namespace CIAO_InterMulti_Receiver_Impl
Receiver_exec_i (void);
virtual ~Receiver_exec_i (void);
- virtual ::InterMulti::CCM_One_ptr get_do_my_one (void);
- virtual ::InterMulti::CCM_Two_ptr get_do_my_two (void);
- virtual ::InterMulti::CCM_Three_ptr get_do_my_three (void);
+ //@{
+ /** Supported operations and attributes. */
- virtual void set_session_context (::Components::SessionContext_ptr ctx);
+ //@}
- virtual void configuration_complete (void);
+ //@{
+ /** Component attributes and port operations. */
+
+ virtual ::InterMulti::CCM_One_ptr
+ get_do_my_one (void);
+ virtual ::InterMulti::CCM_Two_ptr
+ get_do_my_two (void);
+
+ virtual ::InterMulti::CCM_Three_ptr
+ get_do_my_three (void);
+ //@}
+
+ //@{
+ /** Operations from Components::SessionComponent. */
+ virtual void set_session_context (::Components::SessionContext_ptr ctx);
+ virtual void configuration_complete (void);
virtual void ccm_activate (void);
virtual void ccm_passivate (void);
virtual void ccm_remove (void);
+ //@}
+
+ //@{
+ /** User defined public operations. */
+
+ //@}
private:
- ::InterMulti::CCM_Receiver_Context_var context_;
+ ::InterMulti::CCM_Receiver_Context_var ciao_context_;
+
+ //@{
+ /** Component attributes. */
+ ::InterMulti::CCM_One_var ciao_do_my_one_;
+ ::InterMulti::CCM_Two_var ciao_do_my_two_;
+ ::InterMulti::CCM_Three_var ciao_do_my_three_;
+ //@}
+
+ //@{
+ /** User defined members. */
+
+ //@}
+
+ //@{
+ /** User defined private operations. */
+
+ //@}
};
extern "C" INTERMULTI_RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr
- create_InterMulti_AMI_Receiver_Impl (void);
+ create_InterMulti_Receiver_Impl (void);
}
+#include /**/ "ace/post.h"
+
#endif /* ifndef */
diff --git a/CIAO/connectors/ami4ccm/tests/InterMulti/Sender/InterMultiA_conn_i.cpp b/CIAO/connectors/ami4ccm/tests/InterMulti/Sender/InterMultiA_conn_i.cpp
new file mode 100644
index 00000000000..17287e781fc
--- /dev/null
+++ b/CIAO/connectors/ami4ccm/tests/InterMulti/Sender/InterMultiA_conn_i.cpp
@@ -0,0 +1,153 @@
+// -*- C++ -*-
+// $Id$
+
+/**
+ * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.3
+ * TAO and the TAO IDL Compiler have been developed by:
+ * Center for Distributed Object Computing
+ * Washington University
+ * St. Louis, MO
+ * USA
+ * http://www.cs.wustl.edu/~schmidt/doc-center.html
+ * and
+ * Distributed Object Computing Laboratory
+ * University of California at Irvine
+ * Irvine, CA
+ * USA
+ * and
+ * Institute for Software Integrated Systems
+ * Vanderbilt University
+ * Nashville, TN
+ * USA
+ * http://www.isis.vanderbilt.edu/
+ *
+ * Information about TAO is available at:
+ * http://www.cs.wustl.edu/~schmidt/TAO.html
+ **/
+
+// TAO_IDL - Generated from
+// be/be_codegen.cpp:1661
+
+#include "InterMultiA_conn_i.h"
+
+namespace CIAO_InterMulti_AMI4CCM_One_Connector_AMI4CCM_Connector_Impl
+{
+ AMI4CCM_OneReplyHandler_i::AMI4CCM_OneReplyHandler_i (
+ Atomic_UShort &nr_of_received)
+ : nr_of_received_(nr_of_received)
+ {
+ }
+
+ AMI4CCM_OneReplyHandler_i::~AMI4CCM_OneReplyHandler_i (void)
+ {
+ }
+
+ void
+ AMI4CCM_OneReplyHandler_i::foo (::CORBA::Long /* ami_return_val */,
+ const char * answer)
+ {
+ ACE_DEBUG ((LM_DEBUG, "OK: Get asynchronous callback from ONE::foo,"
+ " answer = <%C>\n",
+ answer));
+ ++this->nr_of_received_; }
+
+ void
+ AMI4CCM_OneReplyHandler_i::foo_excep (
+ ::CCM_AMI::ExceptionHolder_ptr excep_holder)
+ {
+ excep_holder->raise_exception ();
+ }
+}
+
+namespace CIAO_InterMulti_AMI4CCM_Two_Connector_AMI4CCM_Connector_Impl
+{
+ AMI4CCM_TwoReplyHandler_i::AMI4CCM_TwoReplyHandler_i (
+ Atomic_UShort &nr_of_received)
+ : nr_of_received_(nr_of_received)
+
+ {
+ }
+
+ AMI4CCM_TwoReplyHandler_i::~AMI4CCM_TwoReplyHandler_i (void)
+ {
+ }
+
+ void
+ AMI4CCM_TwoReplyHandler_i::bar (const char * answer)
+ {
+ ACE_DEBUG ((LM_DEBUG, "OK: Get asynchronous callback from TWO::bar,"
+ " answer = <%C>\n",
+ answer));
+ ++this->nr_of_received_;
+ }
+
+ void
+ AMI4CCM_TwoReplyHandler_i::bar_excep (
+ ::CCM_AMI::ExceptionHolder_ptr excep_holder)
+ {
+ excep_holder->raise_exception ();
+ }
+}
+
+namespace CIAO_InterMulti_AMI4CCM_Three_Connector_AMI4CCM_Connector_Impl
+{
+ AMI4CCM_ThreeReplyHandler_i::AMI4CCM_ThreeReplyHandler_i (
+ Atomic_UShort &nr_of_received)
+ : nr_of_received_(nr_of_received)
+
+ {
+ }
+
+ AMI4CCM_ThreeReplyHandler_i::~AMI4CCM_ThreeReplyHandler_i (void)
+ {
+ }
+
+ void
+ AMI4CCM_ThreeReplyHandler_i::foo (::CORBA::Long /* ami_return_val */,
+ const char * answer)
+ {
+ ACE_DEBUG ((LM_DEBUG, "OK: Get asynchronous callback from THREE::foo,"
+ " answer = <%C>\n",
+ answer));
+ ++this->nr_of_received_;
+ }
+
+ void
+ AMI4CCM_ThreeReplyHandler_i::foo_excep (
+ ::CCM_AMI::ExceptionHolder_ptr excep_holder)
+ {
+ excep_holder->raise_exception ();
+ }
+
+ void
+ AMI4CCM_ThreeReplyHandler_i::bar (const char * answer)
+ {
+ ACE_DEBUG ((LM_DEBUG, "OK: Get asynchronous callback from THREE::bar,"
+ " answer = <%C>\n",
+ answer));
+ ++this->nr_of_received_;
+ }
+
+ void
+ AMI4CCM_ThreeReplyHandler_i::bar_excep (:
+ :CCM_AMI::ExceptionHolder_ptr excep_holder)
+ {
+ excep_holder->raise_exception ();
+ }
+
+ void
+ AMI4CCM_ThreeReplyHandler_i::plus (const char * answer )
+ {
+ ACE_DEBUG ((LM_DEBUG, "OK: Get asynchronous callback from THREE::plus,"
+ " answer = <%C>\n",
+ answer));
+ ++this->nr_of_received_;
+ }
+
+ void
+ AMI4CCM_ThreeReplyHandler_i::plus_excep (
+ ::CCM_AMI::ExceptionHolder_ptr excep_holder)
+ {
+ excep_holder->raise_exception ();
+ }
+}
diff --git a/CIAO/connectors/ami4ccm/tests/InterMulti/Sender/InterMultiA_conn_i.h b/CIAO/connectors/ami4ccm/tests/InterMulti/Sender/InterMultiA_conn_i.h
new file mode 100644
index 00000000000..c9dc18f80e6
--- /dev/null
+++ b/CIAO/connectors/ami4ccm/tests/InterMulti/Sender/InterMultiA_conn_i.h
@@ -0,0 +1,123 @@
+// -*- C++ -*-
+// $Id$
+
+/**
+ * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.3
+ * TAO and the TAO IDL Compiler have been developed by:
+ * Center for Distributed Object Computing
+ * Washington University
+ * St. Louis, MO
+ * USA
+ * http://www.cs.wustl.edu/~schmidt/doc-center.html
+ * and
+ * Distributed Object Computing Laboratory
+ * University of California at Irvine
+ * Irvine, CA
+ * USA
+ * and
+ * Institute for Software Integrated Systems
+ * Vanderbilt University
+ * Nashville, TN
+ * USA
+ * http://www.isis.vanderbilt.edu/
+ *
+ * Information about TAO is available at:
+ * http://www.cs.wustl.edu/~schmidt/TAO.html
+ **/
+
+// TAO_IDL - Generated from
+// be/be_codegen.cpp:1584
+
+#ifndef CIAO_INTERMULTIA_CONN_I_KGGZSV_H_
+#define CIAO_INTERMULTIA_CONN_I_KGGZSV_H_
+
+#include /**/ "ace/pre.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "../Base/InterMultiAC.h"
+
+
+typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, CORBA::UShort > Atomic_UShort;
+
+namespace CIAO_InterMulti_AMI4CCM_One_Connector_AMI4CCM_Connector_Impl
+{
+
+ class AMI4CCM_OneReplyHandler_i
+ : public ::InterMulti::AMI4CCM_OneReplyHandler
+ {
+ public:
+ AMI4CCM_OneReplyHandler_i (Atomic_UShort &nr_of_received_);
+ virtual ~AMI4CCM_OneReplyHandler_i (void);
+
+ virtual
+ void foo (::CORBA::Long ami_return_val,
+ const char * answer);
+
+ virtual
+ void foo_excep (::CCM_AMI::ExceptionHolder_ptr excep_holder);
+ private:
+ Atomic_UShort &nr_of_received_;
+ };
+}
+
+namespace CIAO_InterMulti_AMI4CCM_Two_Connector_AMI4CCM_Connector_Impl
+{
+ class AMI4CCM_TwoReplyHandler_i
+ : public ::InterMulti::AMI4CCM_TwoReplyHandler
+ {
+ public:
+ AMI4CCM_TwoReplyHandler_i (Atomic_UShort &nr_of_received_);
+ virtual ~AMI4CCM_TwoReplyHandler_i (void);
+
+ virtual
+ void bar (const char * answer);
+
+ virtual
+ void bar_excep (::CCM_AMI::ExceptionHolder_ptr excep_holder);
+ private:
+ Atomic_UShort &nr_of_received_;
+ };
+}
+
+namespace CIAO_InterMulti_AMI4CCM_Three_Connector_AMI4CCM_Connector_Impl
+{
+ class AMI4CCM_ThreeReplyHandler_i
+ : public ::InterMulti::AMI4CCM_ThreeReplyHandler
+ {
+ public:
+ AMI4CCM_ThreeReplyHandler_i (Atomic_UShort &nr_of_received_);
+ virtual ~AMI4CCM_ThreeReplyHandler_i (void);
+
+ virtual
+ void foo (::CORBA::Long ami_return_val,
+ const char * answer);
+
+ virtual
+ void foo_excep (::CCM_AMI::ExceptionHolder_ptr excep_holder);
+
+ virtual
+ void bar (const char * answer);
+
+ virtual
+ void bar_excep (::CCM_AMI::ExceptionHolder_ptr excep_holder);
+
+ virtual
+ void plus (const char * answer);
+
+ virtual
+ void plus_excep (::CCM_AMI::ExceptionHolder_ptr excep_holder);
+ private:
+ Atomic_UShort &nr_of_received_;
+ };
+}
+
+// TAO_IDL - Generated from
+// be/be_codegen.cpp:2151
+
+
+#include /**/ "ace/post.h"
+
+#endif /* ifndef */
diff --git a/CIAO/connectors/ami4ccm/tests/InterMulti/Sender/InterMulti_Sender.mpc b/CIAO/connectors/ami4ccm/tests/InterMulti/Sender/InterMulti_Sender.mpc
index 93a6a9a3923..7d462a03d35 100644
--- a/CIAO/connectors/ami4ccm/tests/InterMulti/Sender/InterMulti_Sender.mpc
+++ b/CIAO/connectors/ami4ccm/tests/InterMulti/Sender/InterMulti_Sender.mpc
@@ -92,11 +92,13 @@ project(AMI_InterMulti_Base_Sender_exec) : ciao_executor, ami, ami4ccm_stub {
Source_Files {
InterMulti_Sender_exec.cpp
+ InterMultiA_conn_i.cpp
}
Header_Files {
InterMulti_Sender_exec.h
InterMulti_Sender_exec_export.h
+ InterMultiA_conn_i.h
}
Inline_Files {
diff --git a/CIAO/connectors/ami4ccm/tests/InterMulti/Sender/InterMulti_Sender_exec.cpp b/CIAO/connectors/ami4ccm/tests/InterMulti/Sender/InterMulti_Sender_exec.cpp
index e8c3463ea55..5a2d1230493 100644
--- a/CIAO/connectors/ami4ccm/tests/InterMulti/Sender/InterMulti_Sender_exec.cpp
+++ b/CIAO/connectors/ami4ccm/tests/InterMulti/Sender/InterMulti_Sender_exec.cpp
@@ -1,274 +1,192 @@
// -*- C++ -*-
// $Id$
-// test sendc methods with derived classes, multiple inheritance.
+/**
+ * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.3
+ * TAO and the TAO IDL Compiler have been developed by:
+ * Center for Distributed Object Computing
+ * Washington University
+ * St. Louis, MO
+ * USA
+ * http://www.cs.wustl.edu/~schmidt/doc-center.html
+ * and
+ * Distributed Object Computing Laboratory
+ * University of California at Irvine
+ * Irvine, CA
+ * USA
+ * and
+ * Institute for Software Integrated Systems
+ * Vanderbilt University
+ * Nashville, TN
+ * USA
+ * http://www.isis.vanderbilt.edu/
+ *
+ * Information about TAO is available at:
+ * http://www.cs.wustl.edu/~schmidt/TAO.html
+ **/
+
#include "InterMulti_Sender_exec.h"
-#include "ace/OS_NS_unistd.h"
+#include "InterMultiA_conn_i.h"
namespace CIAO_InterMulti_Sender_Impl
{
- Atomic_UShort nr_of_received = 0;
- //============================================================
- // Facet Executor Implementation Class: One_callback_exec_i
- //============================================================
- One_callback_exec_i::One_callback_exec_i (void)
- {
- }
- One_callback_exec_i::~One_callback_exec_i (void)
- {
- }
- //============================================================
- // Operations from ::CCM_AMI::One_callback
- //============================================================
- // FOO methods
- void
- One_callback_exec_i::foo (
- ::CORBA::Long /*ami_return_val*/,
- const char * answer)
- {
- ACE_DEBUG ((LM_DEBUG, "OK: Get asynchronous callback from ONE::foo,"
- " answer = <%C>\n",
- answer));
- ++nr_of_received;
- }
-
- void
- One_callback_exec_i::foo_excep (
- ::CCM_AMI::ExceptionHolder * excep_holder)
- {
- excep_holder->raise_exception ();
- }
- //============================================================
- // Facet Executor Implementation Class: Two_callback_exec_i
//============================================================
- Two_callback_exec_i::Two_callback_exec_i (void)
- {
- }
-
- Two_callback_exec_i::~Two_callback_exec_i (void)
- {
- }
- //============================================================
- // Operations from ::CCM_AMI::Two_callback
- //============================================================
- // FOO methods
- void
- Two_callback_exec_i::bar (const char * answer)
- {
- ACE_DEBUG ((LM_DEBUG, "OK: Get asynchronous callback from TWO::bar,"
- " answer = <%C>\n",
- answer));
- ++nr_of_received;
- }
-
- void
- Two_callback_exec_i::bar_excep (
- ::CCM_AMI::ExceptionHolder * excep_holder)
- {
- excep_holder->raise_exception ();
- }
+ // Worker thread for asynchronous invocations for One
//============================================================
- // Facet Executor Implementation Class: Three_callback_exec_i
- //============================================================
- Three_callback_exec_i::Three_callback_exec_i (void)
- {
- }
+ asynch_one_generator::asynch_one_generator (
+ ::InterMulti::CCM_Sender_Context_ptr context,
+ Atomic_UShort &nr_of_received)
+ : context_(::InterMulti::CCM_Sender_Context::_duplicate (context)),
+ nr_of_received_ (nr_of_received)
+ {
+ }
+
+ int asynch_one_generator::svc ()
+ {
+ ::InterMulti::AMI4CCM_One_var my_one_ami_ =
+ context_->get_connection_sendc_run_my_one();
+
+ ::InterMulti::AMI4CCM_OneReplyHandler_var cb =
+ new CIAO_InterMulti_AMI4CCM_One_Connector_AMI4CCM_Connector_Impl::AMI4CCM_OneReplyHandler_i (
+ this->nr_of_received_);
+
+ //Invoke Asynchronous calls to test
+ my_one_ami_->sendc_foo ( cb.in(),
+ "Hi from asynch call ONE::foo", 1);
+ return 0;
+ }
- Three_callback_exec_i::~Three_callback_exec_i (void)
- {
- }
-
- //============================================================
- // Operations from ::CCM_AMI::Three_callback
- //============================================================
- // FOO methods
- void
- Three_callback_exec_i::plus (const char * answer)
- {
- ACE_DEBUG ((LM_DEBUG, "OK: Get asynchronous callback from THREE::plus,"
- " answer = <%C>\n",
- answer));
- ++nr_of_received;
- }
-
- void
- Three_callback_exec_i::plus_excep (
- ::CCM_AMI::ExceptionHolder * excep_holder)
- {
- excep_holder->raise_exception ();
- }
-
- void
- Three_callback_exec_i::foo (
- ::CORBA::Long /*ami_return_val*/,
- const char * answer)
- {
- ACE_DEBUG ((LM_DEBUG, "OK: Get asynchronous callback from THREE::foo,"
- " answer = <%C>\n",
- answer));
- ++nr_of_received;
- }
-
- void
- Three_callback_exec_i::foo_excep (
- ::CCM_AMI::ExceptionHolder * excep_holder)
- {
- excep_holder->raise_exception ();
- }
-
- void
- Three_callback_exec_i::bar (const char * answer)
- {
- ACE_DEBUG ((LM_DEBUG, "OK: Get asynchronous callback from THREE::bar,"
- " answer = <%C>\n",
- answer));
- ++nr_of_received;
- }
+ //============================================================
+ // Worker thread for asynchronous invocations for Two
+ //============================================================
+ asynch_two_generator::asynch_two_generator (
+ ::InterMulti::CCM_Sender_Context_ptr context,
+ Atomic_UShort &nr_of_received)
+ : context_(::InterMulti::CCM_Sender_Context::_duplicate (context)),
+ nr_of_received_ (nr_of_received)
+ {
+ }
+
+ int asynch_two_generator::svc ()
+ {
+ ::InterMulti::AMI4CCM_Two_var my_two_ami_ =
+ context_->get_connection_sendc_run_my_two();
+
+ if (CORBA::is_nil (my_two_ami_.in ()))
+ {
+ ACE_ERROR ((LM_ERROR,
+ "ERROR Sender (ASYNCH) :my_two_ami_ is NIL !\n"));
+ return 1;
+ }
+ else
+ {
+ ::InterMulti::AMI4CCM_TwoReplyHandler_var cb =
+ new CIAO_InterMulti_AMI4CCM_Two_Connector_AMI4CCM_Connector_Impl::AMI4CCM_TwoReplyHandler_i (
+ this->nr_of_received_);
+
+ //Invoke Asynchronous calls to test
+ my_two_ami_->sendc_bar ( cb.in(), 2);
+ }
+ return 0;
+ }
- void
- Three_callback_exec_i::bar_excep (
- ::CCM_AMI::ExceptionHolder * excep_holder)
- {
- excep_holder->raise_exception ();
- }
- //============================================================
- // Worker thread for asynchronous invocations for One
- //============================================================
- asynch_one_generator::asynch_one_generator (
+ //============================================================
+ // Worker thread for asynchronous invocations for Three
+ //============================================================
+ asynch_three_generator::asynch_three_generator (
+ ::InterMulti::CCM_Sender_Context_ptr context,
+ Atomic_UShort &nr_of_received)
+ : context_(::InterMulti::CCM_Sender_Context::_duplicate (context)),
+ nr_of_received_ (nr_of_received)
+ {
+ }
+
+ int asynch_three_generator::svc ()
+ {
+ ::InterMulti::AMI4CCM_Three_var my_three_ami_ =
+ context_->get_connection_sendc_run_my_three();
+
+ if (CORBA::is_nil (my_three_ami_))
+ {
+ ACE_ERROR ((LM_ERROR,
+ "ERROR Sender (ASYNCH) :my_three_ami_ is NIL !\n"));
+ return 1;
+ }
+ else
+ {
+ ::InterMulti::AMI4CCM_ThreeReplyHandler_var cb =
+ new CIAO_InterMulti_AMI4CCM_Three_Connector_AMI4CCM_Connector_Impl::AMI4CCM_ThreeReplyHandler_i (
+ this->nr_of_received_);
+
+ //Invoke Asynchronous calls to test
+ my_three_ami_->sendc_plus(cb.in (), 3);
+ // derived from CLASS ONE
+ my_three_ami_->sendc_foo ( cb.in (),"hoi", 3);
+ // derived fron CLASS TWO
+ my_three_ami_->sendc_bar ( cb.in (), 3);
+ }
+ return 0;
+ }
+ //============================================================
+ // Worker thread for synchronous invocations for One
+ //============================================================
+ synch_one_generator::synch_one_generator (
::InterMulti::CCM_Sender_Context_ptr context)
- : context_(::InterMulti::CCM_Sender_Context::_duplicate (context))
- {
- }
-
- int asynch_one_generator::svc ()
- {
- ::InterMulti::AMI4CCM_One_var my_one_ami_ =
- context_->get_connection_sendc_run_my_one();
-
- //Invoke Asynchronous calls to test
- my_one_ami_->sendc_foo ( new One_callback_exec_i (),
- "Hi from asynch call ONE::foo", 1);
- return 0;
- }
-
-//============================================================
- // Worker thread for asynchronous invocations for Two
+ : context_(::InterMulti::CCM_Sender_Context::_duplicate (context))
+ {
+ }
+
+ int synch_one_generator::svc ()
+ {
+ ::InterMulti::One_var my_one_ami_ =
+ context_->get_connection_run_my_one ();
+
+ CORBA::String_var answer;
+ CORBA::Long result = my_one_ami_->foo (
+ "Synchronous call foo from class One",
+ 1,
+ answer.out ());
+ if (result != 1)
+ {
+ ACE_ERROR ((LM_ERROR,
+ "ERROR Sender (SYNCH) : CLASS One foo !\n"));
+ }
+ return 0;
+ }
//============================================================
- asynch_two_generator::asynch_two_generator (
+ // Worker thread for synchronous invocations for One
+ //============================================================
+ synch_three_generator::synch_three_generator (
::InterMulti::CCM_Sender_Context_ptr context)
- : context_(::InterMulti::CCM_Sender_Context::_duplicate (context))
- {
- }
+ : context_(::InterMulti::CCM_Sender_Context::_duplicate (context))
+ {
+ }
+
+ int synch_three_generator::svc ()
+ {
+ ::InterMulti::Three_var my_three_ami_ =
+ context_->get_connection_run_my_three ();
+
+ ::CORBA::String_var answer;
+ CORBA::Long result = my_three_ami_->foo (
+ "Synchronous call foo from class Three, "
+ " derived from class ONE",
+ 3 ,
+ answer.out ());
+ if (result != 3)
+ {
+ ACE_ERROR ((LM_ERROR,
+ "ERROR Sender (SYNCH) : CLASS Three foo !\n"));
+ }
+ return 0;
+ }
+ /**
+ * Component Executor Implementation Class: Sender_exec_i
+ */
- int asynch_two_generator::svc ()
- {
- ::InterMulti::AMI4CCM_Two_var my_two_ami_ =
- context_->get_connection_sendc_run_my_two();
-
- if (CORBA::is_nil (my_two_ami_.in ()))
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR Sender (ASYNCH) :my_two_ami_ is NIL !\n"));
- return 1;
- }
- else
- {
- //Invoke Asynchronous calls to test
- my_two_ami_->sendc_bar ( new Two_callback_exec_i (), 2);
- }
- return 0;
- }
-
- //============================================================
- // Worker thread for asynchronous invocations for Three
- //============================================================
- asynch_three_generator::asynch_three_generator (
- ::InterMulti::CCM_Sender_Context_ptr context)
- : context_(::InterMulti::CCM_Sender_Context::_duplicate (context))
- {
- }
-
- int asynch_three_generator::svc ()
- {
- ::InterMulti::AMI4CCM_Three_var my_three_ami_ =
- context_->get_connection_sendc_run_my_three();
-
- if (CORBA::is_nil (my_three_ami_))
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR Sender (ASYNCH) :my_three_ami_ is NIL !\n"));
- return 1;
- }
- else
- {
- //Invoke Asynchronous calls to test
- my_three_ami_->sendc_plus( new Three_callback_exec_i (), 3);
- // derived from CLASS ONE
- my_three_ami_->sendc_foo ( new Three_callback_exec_i (),"hoi", 3);
- // derived fron CLASS TWO
- my_three_ami_->sendc_bar ( new Three_callback_exec_i (), 3);
- }
- return 0;
- }
- //============================================================
- // Worker thread for synchronous invocations for One
- //============================================================
- synch_one_generator::synch_one_generator (
- ::InterMulti::CCM_Sender_Context_ptr context)
- : context_(::InterMulti::CCM_Sender_Context::_duplicate (context))
- {
- }
-
- int synch_one_generator::svc ()
- {
- ::InterMulti::One_var my_one_ami_ =
- context_->get_connection_run_my_one ();
-
- CORBA::String_var answer;
- CORBA::Long result = my_one_ami_->foo (
- "Synchronous call foo from class One",
- 1,
- answer.out ());
- if (result != 1)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR Sender (SYNCH) : CLASS One foo !\n"));
- }
- return 0;
- }
- //============================================================
- // Worker thread for synchronous invocations for One
- //============================================================
- synch_three_generator::synch_three_generator (
- ::InterMulti::CCM_Sender_Context_ptr context)
- : context_(::InterMulti::CCM_Sender_Context::_duplicate (context))
- {
- }
-
- int synch_three_generator::svc ()
- {
- ::InterMulti::Three_var my_three_ami_ =
- context_->get_connection_run_my_three ();
-
- ::CORBA::String_var answer;
- CORBA::Long result = my_three_ami_->foo (
- "Synchronous call foo from class Three, "
- " derived from class ONE",
- 3 ,
- answer.out ());
- if (result != 3)
- {
- ACE_ERROR ((LM_ERROR,
- "ERROR Sender (SYNCH) : CLASS Three foo !\n"));
- }
- return 0;
- }
- //============================================================
- // Component Executor Implementation Class: Sender_exec_i
- //============================================================
Sender_exec_i::Sender_exec_i (void)
- {
+ : nr_of_received_ (0){
}
Sender_exec_i::~Sender_exec_i (void)
@@ -276,15 +194,19 @@ namespace CIAO_InterMulti_Sender_Impl
}
// Supported operations and attributes.
- // Component attributes.
+
+ // Component attributes and port operations.
+
// Operations from Components::SessionComponent.
+
void
Sender_exec_i::set_session_context (
::Components::SessionContext_ptr ctx)
{
- this->context_ =
+ this->ciao_context_ =
::InterMulti::CCM_Sender_Context::_narrow (ctx);
- if ( ::CORBA::is_nil (this->context_.in ()))
+
+ if ( ::CORBA::is_nil (this->ciao_context_.in ()))
{
throw ::CORBA::INTERNAL ();
}
@@ -293,65 +215,93 @@ namespace CIAO_InterMulti_Sender_Impl
void
Sender_exec_i::configuration_complete (void)
{
+ /* Your code here. */
}
void
Sender_exec_i::ccm_activate (void)
{
- asynch_one_generator* asynch_one_gen =
- new asynch_one_generator (this->context_.in ());
- asynch_one_gen->activate (THR_NEW_LWP | THR_JOINABLE, 1);
+ this->asynch_one_gen =
+ new asynch_one_generator (this->ciao_context_.in (),
+ this->nr_of_received_);
+ this->asynch_one_gen->activate (THR_NEW_LWP | THR_JOINABLE, 1);
- asynch_two_generator* asynch_two_gen =
- new asynch_two_generator (this->context_.in ());
- asynch_two_gen->activate (THR_NEW_LWP | THR_JOINABLE, 1);
+ this->asynch_two_gen =
+ new asynch_two_generator (this->ciao_context_.in (),
+ this->nr_of_received_);
+ this->asynch_two_gen->activate (THR_NEW_LWP | THR_JOINABLE, 1);
- asynch_three_generator* asynch_three_gen =
- new asynch_three_generator (this->context_.in ());
- asynch_three_gen->activate (THR_NEW_LWP | THR_JOINABLE, 1);
+ this->asynch_three_gen =
+ new asynch_three_generator (this->ciao_context_.in (),
+ this->nr_of_received_);
+ this->asynch_three_gen->activate (THR_NEW_LWP | THR_JOINABLE, 1);
- synch_one_generator* synch_one_gen =
- new synch_one_generator (this->context_.in());
- synch_one_gen->activate (THR_NEW_LWP | THR_JOINABLE, 1);
+ this->synch_one_gen =
+ new synch_one_generator (this->ciao_context_.in());
+ this->synch_one_gen->activate (THR_NEW_LWP | THR_JOINABLE, 1);
- synch_three_generator* synch_three_gen =
- new synch_three_generator (this->context_.in());
- synch_three_gen->activate (THR_NEW_LWP | THR_JOINABLE, 1);
+ this->synch_three_gen =
+ new synch_three_generator (this->ciao_context_.in());
+ this->synch_three_gen->activate (THR_NEW_LWP | THR_JOINABLE, 1); }
- }
void
Sender_exec_i::ccm_passivate (void)
{
+ /* Your code here. */
}
void
Sender_exec_i::ccm_remove (void)
{
- if (nr_of_received.value() != 5)
+ if (this->nr_of_received_.value() != 5)
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Did not get all callbacks for"
+ "derived classes."
+ " Received = %u of 5\n",
+ this->nr_of_received_.value()));
+ }
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "OK: All messages received back by Sender\n"));
+ }
+ if (this->asynch_one_gen)
+ {
+ delete this->asynch_one_gen;
+ this->asynch_one_gen = 0;
+ }
+ if (this->synch_one_gen)
+ {
+ delete this->synch_one_gen;
+ this->synch_one_gen = 0;
+ }
+ if (this->asynch_two_gen)
+ {
+ delete this->asynch_two_gen;
+ this->asynch_two_gen = 0;
+ }
+ if (this->asynch_three_gen)
{
- ACE_ERROR ((LM_ERROR, "ERROR: Did not get all callbacks for"
- "derived classes."
- " Received = %u of 5\n",
- nr_of_received.value()));
+ delete this->asynch_three_gen;
+ this->asynch_three_gen = 0;
}
- else
+ if (this->synch_three_gen)
{
- ACE_DEBUG ((LM_DEBUG,
- "OK: All messages received back by Sender\n"));
+ delete this->synch_three_gen;
+ this->synch_three_gen = 0;
}
}
- extern "C" ::Components::EnterpriseComponent_ptr
- create_InterMulti_AMI_Sender_Impl (void)
+ extern "C" INTERMULTI_SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_InterMulti_Sender_Impl (void)
{
::Components::EnterpriseComponent_ptr retval =
::Components::EnterpriseComponent::_nil ();
- ACE_NEW_RETURN (
+ ACE_NEW_NORETURN (
retval,
- Sender_exec_i,
- ::Components::EnterpriseComponent::_nil ());
+ Sender_exec_i);
return retval;
}
diff --git a/CIAO/connectors/ami4ccm/tests/InterMulti/Sender/InterMulti_Sender_exec.h b/CIAO/connectors/ami4ccm/tests/InterMulti/Sender/InterMulti_Sender_exec.h
index de72284ecbc..b9bef5738b1 100644
--- a/CIAO/connectors/ami4ccm/tests/InterMulti/Sender/InterMulti_Sender_exec.h
+++ b/CIAO/connectors/ami4ccm/tests/InterMulti/Sender/InterMulti_Sender_exec.h
@@ -1,126 +1,123 @@
// -*- C++ -*-
-//
// $Id$
-#ifndef CIAO_INTERMULTI_SENDER_EXEC_H_
-#define CIAO_INTERMULTI_SENDER_EXEC_H_
-
+/**
+ * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.3
+ * TAO and the TAO IDL Compiler have been developed by:
+ * Center for Distributed Object Computing
+ * Washington University
+ * St. Louis, MO
+ * USA
+ * http://www.cs.wustl.edu/~schmidt/doc-center.html
+ * and
+ * Distributed Object Computing Laboratory
+ * University of California at Irvine
+ * Irvine, CA
+ * USA
+ * and
+ * Institute for Software Integrated Systems
+ * Vanderbilt University
+ * Nashville, TN
+ * USA
+ * http://www.isis.vanderbilt.edu/
+ *
+ * Information about TAO is available at:
+ * http://www.cs.wustl.edu/~schmidt/TAO.html
+ **/
+#ifndef CIAO_INTERMULTI_SENDER_EXEC_CTET9E_H_
+#define CIAO_INTERMULTI_SENDER_EXEC_CTET9E_H_
+
+#include /**/ "ace/pre.h"
+#include "ace/Task.h"
#include "InterMulti_SenderEC.h"
-#include "InterMulti_Sender_exec_export.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
+#include /**/ "InterMulti_Sender_exec_export.h"
#include "tao/LocalObject.h"
-#include "ace/Task.h"
namespace CIAO_InterMulti_Sender_Impl
{
typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, CORBA::UShort > Atomic_UShort;
- /// Worker threads for asynchronous invocations
- class asynch_one_generator : public virtual ACE_Task_Base
- {
- public:
- asynch_one_generator (::InterMulti::CCM_Sender_Context_ptr context);
+ /// Worker threads for asynchronous invocations
+ class asynch_one_generator : public virtual ACE_Task_Base
+ {
+ public:
+ asynch_one_generator (::InterMulti::CCM_Sender_Context_ptr context,
+ Atomic_UShort &nr_of_received);
- virtual int svc (void);
+ virtual int svc (void);
- private:
- ::InterMulti::CCM_Sender_Context_var context_;
- };
+ private:
+ ::InterMulti::CCM_Sender_Context_var context_;
+ Atomic_UShort &nr_of_received_;
+ };
- class asynch_two_generator : public virtual ACE_Task_Base
- {
- public:
- asynch_two_generator (::InterMulti::CCM_Sender_Context_ptr context);
+ class asynch_two_generator : public virtual ACE_Task_Base
+ {
+ public:
+ asynch_two_generator (::InterMulti::CCM_Sender_Context_ptr context,
+ Atomic_UShort &nr_of_received);
- virtual int svc (void);
+ virtual int svc (void);
- private:
- ::InterMulti::CCM_Sender_Context_var context_;
- };
+ private:
+ ::InterMulti::CCM_Sender_Context_var context_;
+ Atomic_UShort &nr_of_received_;
- class asynch_three_generator : public virtual ACE_Task_Base
- {
- public:
- asynch_three_generator (::InterMulti::CCM_Sender_Context_ptr context);
+ };
- virtual int svc (void);
+ class asynch_three_generator : public virtual ACE_Task_Base
+ {
+ public:
+ asynch_three_generator (::InterMulti::CCM_Sender_Context_ptr context,
+ Atomic_UShort &nr_of_received);
- private:
- ::InterMulti::CCM_Sender_Context_var context_;
- };
+ virtual int svc (void);
- /// Worker threads for synchronous invocations
- class synch_one_generator : public virtual ACE_Task_Base
- {
- public:
- synch_one_generator (::InterMulti::CCM_Sender_Context_ptr context);
- virtual int svc (void);
+ private:
+ ::InterMulti::CCM_Sender_Context_var context_;
+ Atomic_UShort &nr_of_received_;
+ };
- private:
- ::InterMulti::CCM_Sender_Context_var context_;
- };
- class synch_two_generator : public virtual ACE_Task_Base
- {
- public:
- synch_two_generator (::InterMulti::CCM_Sender_Context_ptr context);
- virtual int svc (void);
+ /// Worker threads for synchronous invocations
+ class synch_one_generator : public virtual ACE_Task_Base
+ {
+ public:
+ synch_one_generator (::InterMulti::CCM_Sender_Context_ptr context);
+ virtual int svc (void);
- private:
- ::InterMulti::CCM_Sender_Context_var context_;
- };
- class synch_three_generator : public virtual ACE_Task_Base
- {
- public:
- synch_three_generator (::InterMulti::CCM_Sender_Context_ptr context);
- virtual int svc (void);
+ private:
+ ::InterMulti::CCM_Sender_Context_var context_;
+ };
- private:
- ::InterMulti::CCM_Sender_Context_var context_;
- };
+ class synch_two_generator : public virtual ACE_Task_Base
+ {
+ public:
+ synch_two_generator (::InterMulti::CCM_Sender_Context_ptr context);
+ virtual int svc (void);
- class One_callback_exec_i
- : public virtual ::InterMulti::CCM_AMI4CCM_OneReplyHandler,
- public virtual ::CORBA::LocalObject
- {
- public:
- One_callback_exec_i (void);
- virtual ~One_callback_exec_i (void);
+ private:
+ ::InterMulti::CCM_Sender_Context_var context_;
- virtual void foo (::CORBA::Long ami_return_val, const char * answer);
- virtual void foo_excep (::CCM_AMI::ExceptionHolder_ptr excep_holder);
- };
+ };
+ class synch_three_generator : public virtual ACE_Task_Base
+ {
+ public:
+ synch_three_generator (::InterMulti::CCM_Sender_Context_ptr context);
+ virtual int svc (void);
- class Two_callback_exec_i
- : public virtual ::InterMulti::CCM_AMI4CCM_TwoReplyHandler,
- public virtual ::CORBA::LocalObject
- {
- public:
- Two_callback_exec_i (void);
- virtual ~Two_callback_exec_i (void);
+ private:
+ ::InterMulti::CCM_Sender_Context_var context_;
- virtual void bar (const char * answer);
- virtual void bar_excep (::CCM_AMI::ExceptionHolder_ptr excep_holder);
- };
+ };
- class Three_callback_exec_i
- : public virtual ::InterMulti::CCM_AMI4CCM_ThreeReplyHandler,
- public virtual ::CORBA::LocalObject
- {
- public:
- Three_callback_exec_i (void);
- virtual ~Three_callback_exec_i (void);
-
- virtual void plus (const char * answer);
- virtual void plus_excep (::CCM_AMI::ExceptionHolder_ptr excep_holder);
- virtual void foo (::CORBA::Long ami_return_val, const char * answer);
- virtual void foo_excep (::CCM_AMI::ExceptionHolder_ptr excep_holder);
- virtual void bar (const char * answer);
- virtual void bar_excep (::CCM_AMI::ExceptionHolder_ptr excep_holder);
- };
+ /**
+ * Component Executor Implementation Class: Sender_exec_i
+ */
class Sender_exec_i
: public virtual Sender_Exec,
@@ -130,22 +127,56 @@ namespace CIAO_InterMulti_Sender_Impl
Sender_exec_i (void);
virtual ~Sender_exec_i (void);
- virtual void
- set_session_context (
- ::Components::SessionContext_ptr ctx);
+ //@{
+ /** Supported operations and attributes. */
- virtual void configuration_complete (void);
+ //@}
+ //@{
+ /** Component attributes and port operations. */
+ //@}
+
+ //@{
+ /** Operations from Components::SessionComponent. */
+ virtual void set_session_context (::Components::SessionContext_ptr ctx);
+ virtual void configuration_complete (void);
virtual void ccm_activate (void);
virtual void ccm_passivate (void);
virtual void ccm_remove (void);
+ //@}
+
+ //@{
+ /** User defined public operations. */
+
+ //@}
private:
- ::InterMulti::CCM_Sender_Context_var context_;
+ ::InterMulti::CCM_Sender_Context_var ciao_context_;
+
+ //@{
+ /** Component attributes. */
+ //@}
+
+ //@{
+ /** User defined members. */
+ asynch_one_generator* asynch_one_gen;
+ synch_one_generator* synch_one_gen;
+ asynch_two_generator* asynch_two_gen;
+ asynch_three_generator* asynch_three_gen;
+ synch_three_generator* synch_three_gen;
+ Atomic_UShort nr_of_received_;
+ //@}
+
+ //@{
+ /** User defined private operations. */
+
+ //@}
};
extern "C" INTERMULTI_SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr
- create_InterMulti_AMI_Sender_Impl (void);
+ create_InterMulti_Sender_Impl (void);
}
+#include /**/ "ace/post.h"
+
#endif /* ifndef */
diff --git a/CIAO/connectors/ami4ccm/tests/InterMulti/descriptors/Plan.cdp b/CIAO/connectors/ami4ccm/tests/InterMulti/descriptors/Plan.cdp
index efff7354436..cfab2b91a67 100644
--- a/CIAO/connectors/ami4ccm/tests/InterMulti/descriptors/Plan.cdp
+++ b/CIAO/connectors/ami4ccm/tests/InterMulti/descriptors/Plan.cdp
@@ -16,7 +16,7 @@
<kind>tk_string</kind>
</type>
<value>
- <string>create_InterMulti_AMI_Receiver_Impl</string>
+ <string>create_InterMulti_Receiver_Impl</string>
</value>
</value>
</execParameter>
@@ -67,7 +67,7 @@
<kind>tk_string</kind>
</type>
<value>
- <string>create_InterMulti_AMI_Sender_Impl</string>
+ <string>create_InterMulti_Sender_Impl</string>
</value>
</value>
</execParameter>