diff options
author | wolff1 <wolff1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-11-13 14:01:49 +0000 |
---|---|---|
committer | wolff1 <wolff1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-11-13 14:01:49 +0000 |
commit | 49e9969947b4d74882059567fc681fcbbd9c3047 (patch) | |
tree | aba25df20e4f1a1e9a562341d9bad00a50a80326 | |
parent | 6b7475b1d9e1b61333d4dc6674faac93e4533c97 (diff) | |
download | ATCD-49e9969947b4d74882059567fc681fcbbd9c3047.tar.gz |
merged in r83444 - 83722 from /DOC/Middleware/branches/prism_import/flat/CIAO
119 files changed, 7242 insertions, 401 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog index 65554d893e7..3056609e3ba 100644 --- a/CIAO/ChangeLog +++ b/CIAO/ChangeLog @@ -1,3 +1,249 @@ +Wed Nov 12 21:26:14 UTC 2008 William R. Otte <wotte@dre.vanderbilt.edu> + + * DAnCE/DomainApplication/Domain_Application_Impl.cpp: + * DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp: + + Log message fixes. + +Wed Nov 12 21:22:43 UTC 2008 William R. Otte <wotte@dre.vanderbilt.edu> + + * DAnCE/Deployment/Module_Main.h: + + Fix to prevent a segmentation fault. + + * DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp: + * DAnCE/ExecutionManager/ExecutionManager.mpc: + * DAnCE/ExecutionManager/ExecutionManager_Impl.h: + * DAnCE/ExecutionManager/ExecutionManager_Impl.cpp: + * DAnCE/ExecutionManager/ExecutionManager_Module.h: + * DAnCE/ExecutionManager/ExecutionManager_Module.cpp: + * DAnCE/ExecutionManager/Execution_Manager_Exec.cpp: + + Fixes to enable running EM as a standalone executable and enable + EM driven deployments. + + * DAnCE/NodeManager/Node_Manager_Module.cpp: + + Minor log message fix. + + * DAnCE/tests/CIAO/ExecutionManager-Deployments/SimpleComponentExplicitHome.cdp: + * DAnCE/tests/CIAO/ExecutionManager-Deployments/em_launcher.mpc: + * DAnCE/tests/CIAO/ExecutionManager-Deployments/simple_em_launcher.cpp: + + Text excercising EM controlled deployment of a single component to single node. + +Wed Nov 12 19:53:23 UTC 2008 William R. Otte <wotte@dre.vanderbilt.edu> + + * DAnCE/tests/CIAO/ExecutionManager-Deployments: + + Destination for EM included tests. + + * DAnCE/tests/CIAO/NodeManager-Deployments/MultiplexConnectionExplicitHome.cdp: + + Test verifying multiplex facet connections. + + * DAnCE/tests/CIAO/NodeManager-Deployments/Components: + * DAnCE/tests/CIAO/Components: + + Moved components directory up one level. + +Wed Nov 12 19:35:47 UTC 2008 William R. Otte <wotte@dre.vanderbilt.edu> + + * DAnCE/NodeApplication/ComponentAttributesSetter.cpp: + + Improved exception handling. + +Wed Nov 12 19:30:30 UTC 2008 William R. Otte <wotte@dre.vanderbilt.edu> + + * DAnCE/NodeApplication/ComponentAttributesSetter.h: + * DAnCE/NodeApplication/ComponentAttributesSetter.cpp: + * DAnCE/NodeApplication/NodeApplication_Impl.cpp: + + Changes necessary to support attribiute initialization. + + * DAnCE/tests/CIAO/NodeManager-Deployments/Components/SimpleAttribute.cidl: + * DAnCE/tests/CIAO/NodeManager-Deployments/Components/SimpleAttribute.idl: + * DAnCE/tests/CIAO/NodeManager-Deployments/Components/SimpleAttribute.mpc: + * DAnCE/tests/CIAO/NodeManager-Deployments/Components/SimpleAttribute_exec.h: + * DAnCE/tests/CIAO/NodeManager-Deployments/Components/SimpleAttribute_exec.cpp: + * DAnCE/tests/CIAO/NodeManager-Deployments/Components/SimpleAttribute_exec_export.h: + * DAnCE/tests/CIAO/NodeManager-Deployments/Components/SimpleAttribute_stub_export.h: + * DAnCE/tests/CIAO/NodeManager-Deployments/Components/SimpleAttribute_svnt_export.h: + * DAnCE/tests/CIAO/NodeManager-Deployments/SimpleAttributeExplicitHome.cdp: + + Test that excercises the setting of attributes on homes and components + during deployment. + +Wed Nov 12 18:06:10 UTC 2008 William R. Otte <wotte@dre.vanderbilt.edu> + + * DAnCE/Deployment/DAnCE_Properties.idl: + + Added naming service integration properties. + + * DAnCE/NodeApplication/NodeApplication_Impl.h: + * DAnCE/NodeApplication/NodeApplication_Impl.cpp: + * DAnCE/tests/CIAO/NodeManager-Deployments/Components/SimpleUser_exec.cpp: + * DAnCE/tests/CIAO/NodeManager-Deployments/SimplexConnectionExplicitHome.cdp: + + Changes necessary to get simplex facet/receptacle connections working. + + * DAnCE/tests/CIAO/NodeManager-Deployments/simple_nm_launcher.cpp: + + Removed some extra output. + +Wed Nov 12 17:14:28 UTC 2008 William R. Otte <wotte@dre.vanderbilt.edu> + + * DAnCE/NodeApplication/NodeApplication_Impl.cpp: + * DAnCE/tests/CIAO/NodeManager-Deployments/Components/SimpleProvider_exec.cpp: + * DAnCE/tests/CIAO/NodeManager-Deployments/Components/SimpleUser_exec.cpp: + * DAnCE/tests/CIAO/NodeManager-Deployments/SimplexConnectionExplicitHome.cdp: + Changes for facet/receptacle connections, not finished yet - + moving to different machine. + +Fri Nov 7 18:46:09 UTC 2008 William R. Otte <wotte@dre.vanderbilt.edu> + + * DAnCE/tests/CIAO/NodeManager-Deployments/Components/SimpleConsumer_exec.cpp: + * DAnCE/tests/CIAO/NodeManager-Deployments/Components/SimpleEmitter_exec.cpp: + * DAnCE/tests/CIAO/NodeManager-Deployments/EmitsConnectionExplicitHome.cdp: + + Fiexes for enabling connection of a standard emits/sub connection. + +Fri Nov 7 18:28:14 UTC 2008 William R. Otte <wotte@dre.vanderbilt.edu> + + * DAnCE/NodeApplication/NodeApplication_Impl.cpp: + * DAnCE/tests/CIAO/NodeManager-Deployments/Components/SimplePublisher_exec.cpp: + + Fixes for enabling connection of a standard pub/sub connection. + +Fri Nov 7 15:10:58 UTC 2008 William R. Otte <wotte@dre.vanderbilt.edu> + + * CCF/CCF/CIDL/CIDL.mpc: + * CCF/CCF/CIDL/SemanticAction/Impl/Composition.cpp: + * CCF/CCF/CIDL/SemanticAction/Impl/HomeExecutor.cpp: + * CCF/CCF/IDL2/IDL2.mpc: + * CCF/CCF/IDL2/LexicalAnalyzer.hpp: + * CCF/CCF/IDL2/LexicalAnalyzer.cpp: + * CCF/CCF/IDL2/Parser.hpp: + * CCF/CCF/IDL2/SemanticGraph/Elements.cpp: + * CCF/CCF/IDL2/Traversal/Array.cpp: + * CCF/CCF/IDL3/IDL3.mpc: + * CIDLC/CIDLC.mwc: + + Reverted to revision 80830, as changes proposed in bug #3849 + caused a segmentation fault in Linux. + +Fri Nov 7 14:57:53 UTC 2008 William R. Otte <wotte@william-r-ottes-macbook-pro.local> + + * DAnCE/tests/CIAO/NodeManager-Deployments/PublishConnectionExplicitHome.cdp: + Test plan that will excercise a publish/subscribe connection. + +Thu Nov 6 20:55:19 UTC 2008 William R. Otte <wotte@dre.vanderbilt.edu> + + * CCF/CCF/CIDL/CIDL.mpc: + + Added reference to '.' in Source_Files accidentally (?) removed + by Tue Nov 4 10:10:28 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>. + +Thu Nov 6 20:25:28 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl> + + * CCF/CCF/IDL2/IDL2.mpc + * CCF/CCF/IDL3/IDL3.mpc + Set /P flag for the archiver with bmake + +Thu Nov 6 19:25:22 UTC 2008 William R. Otte <wotte@dre.vanderbilt.edu> + + * tools/Config_Handlers/XSCRT/XML.hpp: + * tools/XML/XML_Schema_Resolver.cpp: + + Added support for xerces versions < 3.0. + +Thu Nov 6 18:47:56 UTC 2008 William R. Otte <wotte@dre.vanderbilt.edu> + + * DAnCE/Logger/Log_Macros.h: + * DAnCE/NodeApplication/NodeApplication_Impl.cpp: + * DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp: + * DAnCE/NodeManager/Node_Manager_Module.cpp: + * ciao/ComponentServer/CIAO_ServerActivator_Impl.cpp: + * ciao/Containers/Session/Session_Container.cpp: + * ciao/Servants/Servant_Impl_Base.cpp: + + Warning fixes for Linux. + +Thu Nov 6 16:35:22 UTC 2008 William R. Otte <wotte@dre.vanderbilt.edu> + + * ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.mpc: + + Disabled this build. + + * tests/CIAO_ComponentServer/SimpleComponent/run_test.pl: + + Minor fixes. + + * tools/Config_Handlers/IRDD_Handler.h: + * tools/Config_Handlers/IRDD_Handler.cpp: + * tools/Config_Handlers/XML_Typedefs.h: + * tools/Config_Handlers/XML_Typedefs.cpp: + * tools/XML/XML_Helper.tpp: + + Compilation fixes. + +Thu Nov 6 15:28:10 UTC 2008 William R. Otte <wotte@dre.vanderbilt.edu> + + * DAnCE/tests/CIAO/NodeManager-Deployments/Components/SimpleConsumer.idl: + * DAnCE/tests/NameServiceTest/NameServiceTest.mpc: + * DAnCE/tests/RedirectionServiceTest/RedirectionServiceTest.mpc: + * ciao/Containers/Swapping/Dynamic_Component_Activator.h: + + Compilation fixes. + + * tests/CIAO_ComponentServer/SimpleComponent/run_test.pl: + + Added a run_test script. + +Wed Nov 5 20:08:28 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl> + + * CCF/CCF/IDL2/LexicalAnalyzer.cpp: + * CCF/CCF/IDL2/LexicalAnalyzer.hpp: + * CCF/CCF/IDL2/Parser.hpp: + * CCF/CCF/IDL2/SemanticGraph/Elements.cpp: + Various changes for CB2009 support + +Tue Nov 4 10:10:28 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl> + + * CCF/CCF/CIDL/SemanticAction/Impl/Composition.cpp: + * CCF/CCF/CIDL/SemanticAction/Impl/HomeExecutor.cpp: + Fixed ambiguity problems with CodeGear C++ Builder 2009 + + * CCF/CCF/CIDL/CIDL.mpc + Set /P flag for the archiver with bmake + +Mon Nov 3 19:56:29 UTC 2008 William R. Otte <wotte@dre.vanderbilt.edu> + + * DAnCE/NodeManager/NodeManager.mpc: + * DAnCE/tests/CIAO/NodeManager-Deployments/Components/SimpleConsumer.idl: + * ciao/Containers/Session/Session_Container.mpc: + * tests/CIAO_ComponentServer/SimpleComponent/client.cpp: + * tools/XML/XML_Error_Handler.cpp: + * tools/XML/XML_Helper.tpp: + + Compile/link fixes on linux. + +Mon Nov 3 18:32:28 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl> + + * DAnCE/NodeApplicationManager/NodeApplicationManager.mpc + * DAnCE/NodeManager/Node_Manager_Module.cpp + * DAnCE/NodeManager/NodeManager.mpc + * DAnCE/Starter/Starter.h + * MPC/config/cidlc.mpb + * MPC/config/dance_node_manager.mpb + * tools/XML/XML.mpc + Fixed various compile/link problems + +Mon Nov 3 17:13:28 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl> + + * DAnCE/NodeApplication/NodeApplication.mpc: + Added missing base project + Thu Oct 23 09:25:28 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl> * ciao/Containers/Container_Base.h diff --git a/CIAO/DAnCE/Deployment/DAnCE_Properties.idl b/CIAO/DAnCE/Deployment/DAnCE_Properties.idl index 8da4e3eb74f..9da675d2af3 100644 --- a/CIAO/DAnCE/Deployment/DAnCE_Properties.idl +++ b/CIAO/DAnCE/Deployment/DAnCE_Properties.idl @@ -13,5 +13,7 @@ module DAnCE const string COMPONENT_FACTORY = "component factory"; const string EXPLICIT_HOME = "edu.vanderbilt.dre.DAnCE.ExplicitHome"; const string STANDALONE_NM = "edu.vanderbilt.dre.DAnCE.StandaloneNM"; + const string REGISTER_NAMING = "edu.vanderbilt.dre.DAnCE.RegisterNaming"; + const string REGISTER_PORT_NAMING = "edu.vanderbilt.dre.DAnCE.RegisterPortNaming"; }; diff --git a/CIAO/DAnCE/Deployment/Module_Main.h b/CIAO/DAnCE/Deployment/Module_Main.h index 802df81633c..1f2d0668a8b 100644 --- a/CIAO/DAnCE/Deployment/Module_Main.h +++ b/CIAO/DAnCE/Deployment/Module_Main.h @@ -10,6 +10,8 @@ #define DANCE_MODULE_MAIN_H_ #include "ace/Auto_Ptr.h" +#include "ace/Dynamic_Service.h" +#include "tao/Object.h" #include "DAnCE/Logger/Log_Macros.h" #include "DAnCE/Logger/Logger_Service.h" @@ -38,10 +40,12 @@ ACE_TMAIN (int argc, ACE_TCHAR **argv) * dlf = ACE_Dynamic_Service<Logger_Service>::instance ("DAnCE_Logger_Backend_Factory"); if (!dlf) - dlf = new Logger_Service; + { + dlf = new Logger_Service; + logger.reset (dlf); + } - logger.reset (dlf); - logger->init (argc, argv); + dlf->init (argc, argv); DANCE_DEBUG ((LM_TRACE, DLINFO "Module_main.h - initializing ORB\n")); @@ -69,6 +73,9 @@ ACE_TMAIN (int argc, ACE_TCHAR **argv) if (!CORBA::is_nil (obj.in ())) orb->run (); + else + DANCE_ERROR ((LM_ERROR, DLINFO "Module_Main.h - " + "Got nil object reference from Module\n")); DANCE_DEBUG ((LM_TRACE, DLINFO "Module_Main.h - ORB event loop finished, exiting.\n")); diff --git a/CIAO/DAnCE/DomainApplication/Domain_Application_Impl.cpp b/CIAO/DAnCE/DomainApplication/Domain_Application_Impl.cpp index 7d74ac41781..f2c442861b5 100644 --- a/CIAO/DAnCE/DomainApplication/Domain_Application_Impl.cpp +++ b/CIAO/DAnCE/DomainApplication/Domain_Application_Impl.cpp @@ -13,14 +13,14 @@ namespace DAnCE Deployment::Connections& conn) : nams_ (nams) { - DANCE_TRACE(DLINFO "DomainApplication_Impl::DomainApplication_Impl"); + DANCE_TRACE("DomainApplication_Impl::DomainApplication_Impl"); this->startLaunch (configProperty); conn = this->connections_; } DomainApplication_Impl::~DomainApplication_Impl() { - DANCE_TRACE (DLINFO "DomainApplication_Impl::~DomainApplication_Impl()"); + DANCE_TRACE ("DomainApplication_Impl::~DomainApplication_Impl()"); try { @@ -49,7 +49,7 @@ namespace DAnCE DomainApplication_Impl::finishLaunch (const Deployment::Connections & connections, CORBA::Boolean start) { - DANCE_TRACE (DLINFO "DomainApplication_Impl::finishLaunch"); + DANCE_TRACE ("DomainApplication_Impl::finishLaunch"); DANCE_DEBUG ((LM_DEBUG, DLINFO "DomainApplication_impl::finishLaunch - " "connections length is %d\n", connections.length())); for (TApp2Mgr::iterator iter = this->node_applications_.begin(); @@ -63,7 +63,7 @@ namespace DAnCE void DomainApplication_Impl::start () { - DANCE_TRACE (DLINFO "DomainApplication_Impl::start"); + DANCE_TRACE ("DomainApplication_Impl::start"); for (TApp2Mgr::iterator iter = this->node_applications_.begin(); iter != this->node_applications_.end(); ++iter) @@ -75,7 +75,7 @@ namespace DAnCE void DomainApplication_Impl::startLaunch (const Deployment::Properties & configProperty) { - DANCE_TRACE (DLINFO "DomainApplication_Impl::startLaunch"); + DANCE_TRACE ("DomainApplication_Impl::startLaunch"); for (TNam2Nm::iterator iter = this->nams_.begin(); iter != this->nams_.end(); diff --git a/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp b/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp index 98169e10cb6..22b5d74170d 100644 --- a/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp +++ b/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp @@ -23,7 +23,7 @@ DomainApplicationManager_Impl::DomainApplicationManager_Impl (CORBA::ORB_ptr orb DomainApplicationManager_Impl::~DomainApplicationManager_Impl() { - DANCE_TRACE(DLINFO "DomainApplicationManager_Impl::~DomainApplicationManager_Impl()"); + DANCE_TRACE( "DomainApplicationManager_Impl::~DomainApplicationManager_Impl()"); DANCE_DEBUG ((LM_DEBUG, DLINFO "DomainApplicationManager_Impl::~DomainApplicationManager_Impl - " "Destroying %u applications\n", this->running_app_.size())); @@ -57,7 +57,7 @@ Deployment::Application_ptr DomainApplicationManager_Impl::startLaunch (const Deployment::Properties & configProperty, Deployment::Connections_out providedReference) { - DANCE_TRACE(DLINFO "DomainApplicationManager_impl::startLaunch"); + DANCE_TRACE( "DomainApplicationManager_impl::startLaunch"); ::Deployment::Connections_var connections; ACE_NEW_THROW_EX (connections, @@ -88,7 +88,7 @@ DomainApplicationManager_Impl::startLaunch (const Deployment::Properties & confi void DomainApplicationManager_Impl::destroyApplication (Deployment::Application_ptr application) { - DANCE_TRACE (DLINFO "DomainApplicationManager_Impl::destroyApplication"); + DANCE_TRACE ( "DomainApplicationManager_Impl::destroyApplication"); try { @@ -136,7 +136,7 @@ DomainApplicationManager_Impl::destroyApplication (Deployment::Application_ptr a ::Deployment::Applications * DomainApplicationManager_Impl::getApplications () { - DANCE_TRACE (DLINFO "DomainApplicationManager_Impl::getApplications ()"); + DANCE_TRACE ( "DomainApplicationManager_Impl::getApplications ()"); Deployment::Applications* running_app; ACE_NEW_THROW_EX (running_app, @@ -240,7 +240,7 @@ void DomainApplicationManager_Impl::split_plan (const Deployment::DeploymentPlan & plan, TNodePlans & sub_plans) { - DANCE_TRACE (DLINFO "DomainApplicationManager_Impl::split_plan"); + DANCE_TRACE ( "DomainApplicationManager_Impl::split_plan"); DANCE_DEBUG ((LM_TRACE, "DomainApplicationManager_Impl::split_plan - " "Creating sub-plans\n")); @@ -424,7 +424,7 @@ DomainApplicationManager_Impl::split_plan (const Deployment::DeploymentPlan & pl void DomainApplicationManager_Impl::preparePlan() { - DANCE_TRACE (DLINFO "DomainApplicationManager_Impl::preparePlan()"); + DANCE_TRACE ("DomainApplicationManager_Impl::preparePlan()"); try { diff --git a/CIAO/DAnCE/ExecutionManager/ExecutionManager.mpc b/CIAO/DAnCE/ExecutionManager/ExecutionManager.mpc index 6a7f122f448..8836e58c595 100644 --- a/CIAO/DAnCE/ExecutionManager/ExecutionManager.mpc +++ b/CIAO/DAnCE/ExecutionManager/ExecutionManager.mpc @@ -1,7 +1,7 @@ // -*- MPC -*- // $Id$ -project(ExecutionManager): dance_lib, taolib, tao_output, utils, strategies, naming, dance_executionmanager_stub, dance_node_manager, dance_domain_application_manager, dance_deployment_svnt { +project(ExecutionManager_Module): dance_lib, taolib, tao_output, utils, strategies, naming, dance_executionmanager_stub, dance_node_manager, dance_domain_application_manager, dance_deployment_svnt { sharedname = DAnCE_ExecutionManager dynamicflags = EXECUTIONMANAGER_BUILD_DLL DANCE_EXECUTIONMANAGER_MODULE_BUILD_DLL @@ -11,3 +11,13 @@ project(ExecutionManager): dance_lib, taolib, tao_output, utils, strategies, nam ExecutionManager_Module.cpp } } + +project(Execution_Manager_Exec) : dance_exe, dance_domain_application_manager, naming_serv { + exename = dance_execution_manager + after += ExecutionManager_Module + libs += DAnCE_ExecutionManager + + Source_Files { + Execution_Manager_Exec.cpp + } +}
\ No newline at end of file diff --git a/CIAO/DAnCE/ExecutionManager/ExecutionManager_Impl.cpp b/CIAO/DAnCE/ExecutionManager/ExecutionManager_Impl.cpp index 60b1a546370..01e770e3076 100644 --- a/CIAO/DAnCE/ExecutionManager/ExecutionManager_Impl.cpp +++ b/CIAO/DAnCE/ExecutionManager/ExecutionManager_Impl.cpp @@ -14,12 +14,12 @@ ExecutionManager_Impl::ExecutionManager_Impl (CORBA::ORB_ptr orb, : orb_ (CORBA::ORB::_duplicate (orb)) , poa_ (PortableServer::POA::_duplicate (poa)) { - DANCE_TRACE (DLINFO "ExecutionManager_Impl::ExecutionManager_Impl"); + DANCE_TRACE ( "ExecutionManager_Impl::ExecutionManager_Impl"); } ExecutionManager_Impl::~ExecutionManager_Impl() { - DANCE_TRACE (DLINFO "ExecutionManager_Impl::~ExecutionManager_Impl"); + DANCE_TRACE ( "ExecutionManager_Impl::~ExecutionManager_Impl"); for (TDomainManagers::iterator iter = this->managers_.begin(); iter != this->managers_.end(); ++iter) @@ -42,7 +42,7 @@ ExecutionManager_Impl::~ExecutionManager_Impl() ExecutionManager_Impl::preparePlan (const ::Deployment::DeploymentPlan & plan, ::Deployment::ResourceCommitmentManager_ptr /*resourceCommitment*/) { - DANCE_TRACE (DLINFO "ExecutionManager_Impl::preparePlan"); + DANCE_TRACE ( "ExecutionManager_Impl::preparePlan"); // Check if plan is already deployed. DomainApplicationManager_Impl * dam = 0; @@ -79,7 +79,7 @@ ExecutionManager_Impl::preparePlan (const ::Deployment::DeploymentPlan & plan, ::Deployment::DomainApplicationManagers * ExecutionManager_Impl::getManagers () { - DANCE_TRACE (DLINFO "ExecutionManager_Impl::getManagers ()"); + DANCE_TRACE ( "ExecutionManager_Impl::getManagers ()"); ::Deployment::DomainApplicationManagers * managers; ACE_NEW_THROW_EX (managers, diff --git a/CIAO/DAnCE/ExecutionManager/ExecutionManager_Impl.h b/CIAO/DAnCE/ExecutionManager/ExecutionManager_Impl.h index 9ede3784564..4ac716c3ec4 100644 --- a/CIAO/DAnCE/ExecutionManager/ExecutionManager_Impl.h +++ b/CIAO/DAnCE/ExecutionManager/ExecutionManager_Impl.h @@ -51,8 +51,7 @@ namespace DAnCE // This one derived from ExecutionManagerDaemon interface // for shutdowning DAnCE agent - virtual void shutdown ( - ) + virtual void shutdown () { this->orb_->shutdown(); }; diff --git a/CIAO/DAnCE/ExecutionManager/ExecutionManager_Module.cpp b/CIAO/DAnCE/ExecutionManager/ExecutionManager_Module.cpp index 6b8472be50d..a3eb50452cf 100644 --- a/CIAO/DAnCE/ExecutionManager/ExecutionManager_Module.cpp +++ b/CIAO/DAnCE/ExecutionManager/ExecutionManager_Module.cpp @@ -7,6 +7,7 @@ #include "tao/TAO_Singleton_Manager.h" #include "tao/StringSeqC.h" #include "tao/IORTable/IORTable.h" +#include "tao/Utils/PolicyList_Destroyer.h" #include "orbsvcs/CosNamingC.h" #include "ciao/CIAO_common.h" #include "ciao/Valuetype_Factories/Cookies.h" @@ -20,121 +21,9 @@ ACE_RCSID (DAnCE, "$Id$") namespace DAnCE - { +{ namespace ExecutionManager - { - struct SOptions - { - const char* exec_mgr_file_; - bool process_ns_; - const char* process_ns_file_; - bool create_plan_ns_; - const char* create_plan_ns_ior_; - bool rebind_plan_ns_; - const char* rebind_plan_ns_ior_; - bool port_indirection_; - ACE_Vector<ACE_CString> node_managers_; - bool ignore_failure_; - - SOptions() - : exec_mgr_file_ (0) - , process_ns_ (false) - , process_ns_file_ (0) - , create_plan_ns_ (false) - , create_plan_ns_ior_ (0) - , rebind_plan_ns_ (false) - , rebind_plan_ns_ior_ (0) - , ignore_failure_ (false) - { - } - }; - - bool - parse_args (int argc, char *argv[], SOptions &options) - { - DANCE_DEBUG ( (LM_TRACE, "[%M] EM options : \"")); - for (int i = 0; i < argc; ++i) - { - DANCE_DEBUG ( (LM_TRACE, " %s", argv[i])); - } - DANCE_DEBUG ( (LM_TRACE, "\"\n")); - - ACE_Get_Opt get_opts (argc, - argv, - "n:e::p::c::r::ifh", - 0, - 0, - ACE_Get_Opt::RETURN_IN_ORDER); - - get_opts.long_option ("exec-mgr", 'e', ACE_Get_Opt::ARG_OPTIONAL); - get_opts.long_option ("node-mgr", 'n', ACE_Get_Opt::ARG_REQUIRED); - get_opts.long_option ("process-ns", 'p', ACE_Get_Opt::ARG_OPTIONAL); - get_opts.long_option ("create-plan-ns", 'c', ACE_Get_Opt::ARG_OPTIONAL); - get_opts.long_option ("rebind-plan-ns", 'r', ACE_Get_Opt::ARG_OPTIONAL); - get_opts.long_option ("port-indirection", 'i', ACE_Get_Opt::NO_ARG); - get_opts.long_option ("ignore-failure", 'f', ACE_Get_Opt::NO_ARG); - get_opts.long_option ("help", 'h', ACE_Get_Opt::NO_ARG); - //get_opts.long_option ("help", '?'); - - char c; - while ( (c = get_opts ()) != -1) - { - switch (c) - { - case 'e': - options.exec_mgr_file_ = get_opts.opt_arg (); - break; - case 'n': - DANCE_DEBUG ( (LM_TRACE, "[%M] --node-mgr option was parsed out for EM\n")); - options.node_managers_.push_back (get_opts.opt_arg ()); - break; - - case 'p': - DANCE_DEBUG ( (LM_TRACE, "[%M] --process-ns enabled for EM\n")); - options.process_ns_ = true; - options.process_ns_file_ = get_opts.opt_arg (); - break; - - case 'c': - DANCE_DEBUG ( (LM_TRACE, "[%M] --create-plan-ns enabled for EM\n")); - options.create_plan_ns_ = true; - options.create_plan_ns_ior_ = get_opts.opt_arg (); - break; - - case 'r': - DANCE_DEBUG ( (LM_TRACE, "[%M] --rebind-plan-ns enabled for EM\n")); - options.rebind_plan_ns_ = true; - options.rebind_plan_ns_ior_ = get_opts.opt_arg (); - break; - - case 'i': - options.port_indirection_ = true; - break; - - case 'f': - options.ignore_failure_ = true; - break; - - case 'h': - //case '?': // Display help for use of the server. - //default: - DANCE_ERROR_RETURN ( (LM_ERROR, - "usage: %s\n" - "-e [execution manager ior file name]\n" - "-n <node name> [=node manager ior file name]\n" - "-p [file name] create process name service and store its ior to file name\n" - "-c [NC] create plan objects (components and ports) representation in name context with ior NC\n" - "-r [NC] bind plan representation name context to NC\n" - "-i enable plan objects indirection via servant locator\n" - "invalid option: \" %c \"\n", - argv [0], c), - false); - break; - } - } - return true; - } - + { bool write_IOR (const char * ior_file_name, const char* ior) { @@ -153,9 +42,9 @@ namespace DAnCE else { DANCE_ERROR ( (LM_ERROR, - "[%M] DAnCE_ExecutionManager::write_ior-file - " - "Unable to open ExecutionManager IOR output file %s : %m\n", - ior_file_name)); + "[%M] DAnCE_ExecutionManager::write_ior-file - " + "Unable to open ExecutionManager IOR output file %s : %m\n", + ior_file_name)); return false; } return true; @@ -164,7 +53,7 @@ namespace DAnCE } DAnCE_ExecutionManager_Module::DAnCE_ExecutionManager_Module (void) - : em_impl_ (0) + : em_impl_ (0) { } @@ -173,73 +62,161 @@ DAnCE_ExecutionManager_Module::~DAnCE_ExecutionManager_Module (void) delete this->em_impl_; } +bool +DAnCE_ExecutionManager_Module::parse_args (int argc, char *argv[]) +{ + DANCE_TRACE ("DAnCE_ExecutionManager_Module::parse_args"); + + ACE_Get_Opt get_opts (argc, + argv, + "n:e::p::c::r::ifh", + 0, + 0, + ACE_Get_Opt::RETURN_IN_ORDER); + + get_opts.long_option ("exec-mgr", 'e', ACE_Get_Opt::ARG_OPTIONAL); + get_opts.long_option ("node-mgr", 'n', ACE_Get_Opt::ARG_REQUIRED); + get_opts.long_option ("process-ns", 'p', ACE_Get_Opt::ARG_OPTIONAL); + get_opts.long_option ("create-plan-ns", 'c', ACE_Get_Opt::ARG_OPTIONAL); + get_opts.long_option ("rebind-plan-ns", 'r', ACE_Get_Opt::ARG_OPTIONAL); + get_opts.long_option ("port-indirection", 'i', ACE_Get_Opt::NO_ARG); + get_opts.long_option ("ignore-failure", 'f', ACE_Get_Opt::NO_ARG); + get_opts.long_option ("help", 'h', ACE_Get_Opt::NO_ARG); + //get_opts.long_option ("help", '?'); + + char c; + while ( (c = get_opts ()) != -1) + { + switch (c) + { + case 'e': + DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_ExecutionManager_Module::parse_args - " + "Output filename is %s\n", + get_opts.opt_arg ())); + this->options_.exec_mgr_file_ = get_opts.opt_arg (); + break; + case 'n': + DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_ExecutionManager_Module::parse_args - " + "--node-mgr option was parsed out for EM\n")); + this->options_.node_managers_.push_back (get_opts.opt_arg ()); + break; + + case 'p': + DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_ExecutionManager_Module::parse_args - " + "--process-ns enabled for EM\n")); + this->options_.process_ns_ = true; + this->options_.process_ns_file_ = get_opts.opt_arg (); + break; + + case 'c': + DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_ExecutionManager_Module::parse_args - " + "--create-plan-ns enabled for EM\n")); + this->options_.create_plan_ns_ = true; + this->options_.create_plan_ns_ior_ = get_opts.opt_arg (); + break; + + case 'r': + DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_ExecutionManager_Module::parse_args - " + "--rebind-plan-ns enabled for EM\n")); + this->options_.rebind_plan_ns_ = true; + this->options_.rebind_plan_ns_ior_ = get_opts.opt_arg (); + break; + + case 'i': + DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_ExecutionManager_Module::parse_args - " + "--port-indirection enabled for EM\n")); + this->options_.port_indirection_ = true; + break; + + case 'f': + DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_ExecutionManager_Module::parse_args - " + "--ignore-failure enabled for EM\n")); + this->options_.ignore_failure_ = true; + break; + + case 'h': + //case '?': // Display help for use of the server. + //default: + DANCE_ERROR_RETURN ((LM_ERROR, + "usage: %s\n" + "-e [execution manager ior file name]\n" + "-n <node name> [=node manager ior file name]\n" + "-p [file name] create process name service and store its ior to file name\n" + "-c [NC] create plan objects (components and ports) representation in name context with ior NC\n" + "-r [NC] bind plan representation name context to NC\n" + "-i enable plan objects indirection via servant locator\n", + argv [0]), + false); + break; + } + } + return true; +} + CORBA::Object_ptr DAnCE_ExecutionManager_Module::create_object (CORBA::ORB_ptr orb, int argc, ACE_TCHAR *argv[]) { - DANCE_DEBUG ( (LM_TRACE, "[%M] DAnCE_ExecutionManager_Module::create_object starting...\n")); - + DANCE_TRACE ("DAnCE_ExecutionManager_Module::create_object"); + try { if (this->em_impl_ != 0) { DANCE_ERROR ( (LM_ERROR, - "[%M] ExecutionManager already exists!!!\n")); + DLINFO "DAnCE_ExecutionManager_Module::create_object - " + "Error: ExecutionManager already exists.\n")); return CORBA::Object::_nil (); } - DANCE_DEBUG ( (LM_TRACE, "[%M] DAnCE_ExecutionManager_Module::create_object - before parsing arguments.\n")); - DAnCE::ExecutionManager::SOptions options; - if (!DAnCE::ExecutionManager::parse_args (argc, argv, options)) + DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_ExecutionManager_Module::create_object - " + "before parsing arguments.\n")); + + if (!this->parse_args (argc, argv)) return CORBA::Object::_nil (); - DANCE_DEBUG ( (LM_TRACE, "[%M] DAnCE_ExecutionManager_Module::create_object - before creating value factory.\n")); + DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_ExecutionManager_Module::create_object - " + "before creating value factory.\n")); CORBA::ValueFactory_var vf = new Components::Cookie_init(); - DANCE_DEBUG ( (LM_TRACE, "[%M] DAnCE_ExecutionManager_Module::create_object - before registering value factory.\n")); + DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_ExecutionManager_Module::create_object - " + "before registering value factory.\n")); vf = orb->register_value_factory ("IDL:omg.org/Components/Cookie:1.0", vf.in()); - DANCE_DEBUG ( (LM_TRACE, "[%M] DAnCE_ExecutionManager_Module::create_object - after creating value factory.\n")); + DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_ExecutionManager_Module::create_object - " + "after creating value factory.\n")); // Get reference to Root POA. CORBA::Object_var poa_obj - = orb->resolve_initial_references ("RootPOA"); + = orb->resolve_initial_references ("RootPOA"); PortableServer::POA_var poa - = PortableServer::POA::_narrow (poa_obj.in ()); + = PortableServer::POA::_narrow (poa_obj.in ()); PortableServer::POAManager_var mgr = poa->the_POAManager (); PortableServer::POA_var persistent_poa; - CORBA::PolicyList policies (2); + TAO::Utils::PolicyList_Destroyer policies (2); policies.length (2); try { - DANCE_DEBUG ( (LM_TRACE, - "[%M] DAnCE_ExecutionManager_Module::create_object - " - "before creating the \"Managers\" POA.\n")); + DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_ExecutionManager_Module::create_object - " + "before creating the \"Managers\" POA.\n")); policies[0] = poa->create_id_assignment_policy (PortableServer::USER_ID); policies[1] = poa->create_lifespan_policy (PortableServer::PERSISTENT); - persistent_poa = poa->create_POA ("Managers" - , mgr.in() - , policies); + persistent_poa = poa->create_POA ("Managers", + mgr.in(), + policies); } catch (const PortableServer::POA::AdapterAlreadyExists &) { persistent_poa = poa->find_POA ("Managers", 0); } - - for (CORBA::ULong i = 0; - i < policies.length (); - ++i) - { - CORBA::Policy_ptr policy = policies[i]; - policy->destroy (); - } - - // Resolve DomainNC - DANCE_DEBUG ( (LM_TRACE, "[%M] DAnCE_ExecutionManager_Module::create_object - before resolving \"DomainNC\".\n")); + CosNaming::NamingContext_var domain_nc; + /* + // Resolve DomainNC + DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_ExecutionManager_Module::create_object - before resolving \"DomainNC\".\n")); try { CORBA::Object_var domain_obj = orb->resolve_initial_references ("DomainNC"); @@ -249,33 +226,33 @@ DAnCE_ExecutionManager_Module::create_object (CORBA::ORB_ptr orb, if (CORBA::is_nil (domain_nc.in ())) { DANCE_ERROR ( (LM_ERROR, - "[%M] Narrow to NamingContext return nil for DomainNC.\n")); + DLINFO "Narrow to NamingContext return nil for DomainNC.\n")); return CORBA::Object::_nil (); } } } catch (CORBA::Exception&) { - DANCE_DEBUG ( (LM_DEBUG, - "[%M] DomainNC context not found!\n")); + DANCE_DEBUG ((LM_DEBUG, + DLINFO "DomainNC context not found!\n")); } - + */ // Initialize IOR table CORBA::Object_var table_object - = orb->resolve_initial_references ("IORTable"); + = orb->resolve_initial_references ("IORTable"); IORTable::Table_var adapter - = IORTable::Table::_narrow (table_object.in ()); + = IORTable::Table::_narrow (table_object.in ()); if (CORBA::is_nil (adapter.in ())) { DANCE_ERROR ( (LM_ERROR, - "[%M] Nil IORTable\n")); + DLINFO "Nil IORTable\n")); return CORBA::Object::_nil (); } // Create and install the DAnCE Daemon servant on child POA - DANCE_DEBUG ( (LM_TRACE, "[%M] DAnCE_ExecutionManager_Module::create_object - before creating EM servant.\n")); + DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_ExecutionManager_Module::create_object - before creating EM servant.\n")); ACE_NEW_RETURN (this->em_impl_, DAnCE::ExecutionManager_Impl (orb, poa.in ()), @@ -290,21 +267,21 @@ DAnCE_ExecutionManager_Module::create_object (CORBA::ORB_ptr orb, CORBA::String_var em_ior = orb->object_to_string (em_obj.in ()); DAnCE::ExecutionManagerDaemon_var em_daemon - = DAnCE::ExecutionManagerDaemon::_narrow (em_obj.in ()); + = DAnCE::ExecutionManagerDaemon::_narrow (em_obj.in ()); // Binding ior to IOR Table adapter->bind ("ExecutionManager", em_ior.in ()); // Saving execution manager ior - if (0 != options.exec_mgr_file_) + if (0 != this->options_.exec_mgr_file_) { - DAnCE::ExecutionManager::write_IOR (options.exec_mgr_file_, em_ior.in ()); + DAnCE::ExecutionManager::write_IOR (this->options_.exec_mgr_file_, em_ior.in ()); } // Binding execution manager to name service if (!CORBA::is_nil (domain_nc.in ())) { - DANCE_DEBUG((LM_TRACE, "[%M] Registering EM in NC.\n")); + DANCE_DEBUG((LM_TRACE, DLINFO "Registering EM in NC.\n")); CosNaming::Name name (1); name.length (1); name[0].id = CORBA::string_dup ("ExecutionManager"); @@ -314,23 +291,23 @@ DAnCE_ExecutionManager_Module::create_object (CORBA::ORB_ptr orb, // End ExecutionManager initialization part // Initializing NodeManagers - DANCE_DEBUG ( (LM_TRACE, "[%M] DAnCE_ExecutionManager_Module::create_object - before processing --node-mgr options(%u).\n", options.node_managers_.size())); - for (size_t i = 0; i < options.node_managers_.size(); ++i) + DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_ExecutionManager_Module::create_object - " + "before processing --node-mgr options(%u).\n", this->options_.node_managers_.size())); + for (size_t i = 0; i < this->options_.node_managers_.size(); ++i) { - size_t pos = options.node_managers_[i].find ('='); - ACE_CString node_name = options.node_managers_[i]; + size_t pos = this->options_.node_managers_[i].find ('='); + ACE_CString node_name = this->options_.node_managers_[i]; ACE_CString nm_ior; if (ACE_CString::npos == pos) { - DANCE_ERROR ( (LM_ERROR, - "[%M] Executions manager received --node-mgr " - "without IOR\n")); + DANCE_ERROR ((LM_ERROR, DLINFO "DAnCE_ExecutionManager_Module::create_object - " + "Execution manager received --node-mgr without IOR\n")); continue; } - node_name = options.node_managers_[i].substring (0, pos); - nm_ior = options.node_managers_[i].substring (pos + 1); + node_name = this->options_.node_managers_[i].substring (0, pos); + nm_ior = this->options_.node_managers_[i].substring (pos + 1); CORBA::Object_var obj = orb->string_to_object (nm_ior.c_str ()); Deployment::NodeManager_var nm_obj = @@ -338,14 +315,13 @@ DAnCE_ExecutionManager_Module::create_object (CORBA::ORB_ptr orb, if (CORBA::is_nil (nm_obj)) { - DANCE_ERROR ( (LM_ERROR, - "[%M] DAnCE_ExecutionManager::run_main - " - "Failed to narrow the object to node manager : %s\n" - , options.node_managers_[i].c_str())); + DANCE_ERROR ((LM_ERROR, DLINFO "DAnCE_ExecutionManager::create_object - " + "Failed to narrow the object to node manager : %s\n", + this->options_.node_managers_[i].c_str())); continue; } - DANCE_ERROR ( (LM_TRACE, "[%M] Placing node \"%s\" to EM's map.\n", node_name.c_str())); + DANCE_ERROR ((LM_TRACE, DLINFO "Placing node \"%s\" to EM's map.\n", node_name.c_str())); this->em_impl_->add_node_manager (node_name.c_str(), nm_obj.in()); } diff --git a/CIAO/DAnCE/ExecutionManager/ExecutionManager_Module.h b/CIAO/DAnCE/ExecutionManager/ExecutionManager_Module.h index 345e3c3828b..9aac0b10173 100644 --- a/CIAO/DAnCE/ExecutionManager/ExecutionManager_Module.h +++ b/CIAO/DAnCE/ExecutionManager/ExecutionManager_Module.h @@ -24,6 +24,7 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ #include "ace/Service_Config.h" +#include "ace/Vector_T.h" #include "tao/Object_Loader.h" namespace DAnCE @@ -43,6 +44,32 @@ class DAnCE_ExecutionManager_Module_Export DAnCE_ExecutionManager_Module : public TAO_Object_Loader { public: + struct SOptions + { + const char* exec_mgr_file_; + bool process_ns_; + const char* process_ns_file_; + bool create_plan_ns_; + const char* create_plan_ns_ior_; + bool rebind_plan_ns_; + const char* rebind_plan_ns_ior_; + bool port_indirection_; + ACE_Vector<ACE_CString> node_managers_; + bool ignore_failure_; + + SOptions() + : exec_mgr_file_ (0) + , process_ns_ (false) + , process_ns_file_ (0) + , create_plan_ns_ (false) + , create_plan_ns_ior_ (0) + , rebind_plan_ns_ (false) + , rebind_plan_ns_ior_ (0) + , ignore_failure_ (false) + { + } + }; + /// Constructor. DAnCE_ExecutionManager_Module (void); @@ -54,7 +81,11 @@ class DAnCE_ExecutionManager_Module_Export DAnCE_ExecutionManager_Module virtual CORBA::Object_ptr create_object (CORBA::ORB_ptr orb, int argc, ACE_TCHAR *argv []); - + + virtual bool parse_args (int argc, + ACE_TCHAR *argv []); + + SOptions options_; private: /// Storage for ExecutionManager servant. DAnCE::ExecutionManager_Impl * em_impl_; diff --git a/CIAO/DAnCE/ExecutionManager/Execution_Manager_Exec.cpp b/CIAO/DAnCE/ExecutionManager/Execution_Manager_Exec.cpp new file mode 100644 index 00000000000..2331ec167df --- /dev/null +++ b/CIAO/DAnCE/ExecutionManager/Execution_Manager_Exec.cpp @@ -0,0 +1,7 @@ +// $Id$ +#include "ExecutionManager_Module.h" + +#define DANCE_MODULE_MAIN_CLASS_NAME DAnCE_ExecutionManager_Module +#include "Deployment/Module_Main.h" + + diff --git a/CIAO/DAnCE/Logger/Log_Macros.h b/CIAO/DAnCE/Logger/Log_Macros.h index af89e6bbddd..a096c4bb3e8 100644 --- a/CIAO/DAnCE/Logger/Log_Macros.h +++ b/CIAO/DAnCE/Logger/Log_Macros.h @@ -17,7 +17,7 @@ # else # define DANCE_NTRACE ACE_NTRACE # endif -#endif /* DANCE_NTRACE +#endif DANCE_NTRACE */ #define DLINFO "(%P|%t) [%M] - %T - " diff --git a/CIAO/DAnCE/NodeApplication/ComponentAttributesSetter.cpp b/CIAO/DAnCE/NodeApplication/ComponentAttributesSetter.cpp index 6df733e23c5..7cc0990fee1 100644 --- a/CIAO/DAnCE/NodeApplication/ComponentAttributesSetter.cpp +++ b/CIAO/DAnCE/NodeApplication/ComponentAttributesSetter.cpp @@ -3,6 +3,7 @@ #include "ComponentAttributesSetter.h" #include "Deployment/Deployment_ApplicationC.h" //#include "Cdmw_ccm_dance1_cif.stub.hpp" +#include "tao/DynamicInterface/DII_CORBA_methods.h" #include "tao/AnyTypeCode/NVList.h" #include "tao/AnyTypeCode/TypeCode_Constants.h" #include "tao/DynamicInterface/Context.h" @@ -40,51 +41,49 @@ ComponentAttributesSetter::~ComponentAttributesSetter() void ComponentAttributesSetter::SetComponentAttributes (ACE_CString /*componentName*/, - Components::CCMObject_ptr obj, + ::CORBA::Object_ptr obj, const Deployment::Properties& prop, - CORBA::ORB_ptr orb) + CORBA::ORB_ptr ) { - DANCE_DEBUG ( (LM_DEBUG, "[%M] ComponentAttributesSetter::SetComponentAttributes - started\n")); + DANCE_TRACE ("ComponentAttributesSetter::SetComponentAttributes"); + for (unsigned int i = 0; i < prop.length(); i++) { ACE_CString name = prop[i].name.in(); - if (name.find ("cdmw") != ACE_CString::npos) + // Ignore configuration properties, since attributes can't have . in them, this seems like a good method. + if (name.find (".") != ACE_CString::npos) { continue; } - DANCE_DEBUG ( (LM_DEBUG, "[%M] ComponentAttributesSetter::SetComponentAttributes - check attribute name %C\n", name.c_str())); + DANCE_DEBUG ((LM_DEBUG, DLINFO + "ComponentAttributesSetter::SetComponentAttributes - " + "Populating attribute name %C\n", name.c_str())); ACE_CString method = "_set_"; method += prop[i].name.in(); - CORBA::NVList_var argList; - CORBA::NamedValue_ptr argValue; - CORBA::NamedValue_var result = 0; - CORBA::Request_ptr request; - orb->create_list (1, argList); - argValue = argList->add_value (prop[i].name.in(), prop[i].value, CORBA::ARG_IN); - CORBA::Any* value = argValue->value(); - const char* szvalue; - *value >>= szvalue; - DANCE_DEBUG ( (LM_DEBUG, "[%M] ComponentAttributesSetter::SetComponentAttributes - set attribute value to %C\n", szvalue)); + CORBA::Request_ptr req (0); + try { - obj->_create_request (CORBA::Context::_nil(), - method.c_str(), - argList.in (), - result.out (), - request, - 0); - - request->invoke(); - CORBA::release (request); + req = obj->_request (method.c_str ()); + req->add_in_arg ("x") = prop[i].value; + + req->invoke(); + CORBA::release (req); + } + catch (const CORBA::BAD_OPERATION &e) + { + DANCE_ERROR ((LM_WARNING, DLINFO + "ComponentAttributesSetter::SetComponentAttributes - " + "Caught BAD_OPERATION while trying to set attribute %s\n", + name.c_str ())); } catch (const CORBA::Exception &e) { - CORBA::release (request); + CORBA::release (req); e._tao_print_exception ("ComponentAttributesSetter.cpp::SetComponentAttributes "); throw ::Deployment::StartError(); } //Question - How exceptions will be processed, rised by invoked method } - DANCE_DEBUG ( (LM_DEBUG, "[%M] ComponentAttributesSetter::SetComponentAttributes - finished\n")); } diff --git a/CIAO/DAnCE/NodeApplication/ComponentAttributesSetter.h b/CIAO/DAnCE/NodeApplication/ComponentAttributesSetter.h index 3f815cf7001..2a36da17cfd 100644 --- a/CIAO/DAnCE/NodeApplication/ComponentAttributesSetter.h +++ b/CIAO/DAnCE/NodeApplication/ComponentAttributesSetter.h @@ -27,7 +27,7 @@ class NodeApplication_Export ComponentAttributesSetter ~ComponentAttributesSetter(); static void SetComponentAttributes (ACE_CString componentName, - Components::CCMObject_ptr, + CORBA::Object_ptr, const Deployment::Properties& prop, CORBA::ORB_ptr orb); }; diff --git a/CIAO/DAnCE/NodeApplication/NodeApplication.mpc b/CIAO/DAnCE/NodeApplication/NodeApplication.mpc index ca4672df259..9c1ed2b2375 100644 --- a/CIAO/DAnCE/NodeApplication/NodeApplication.mpc +++ b/CIAO/DAnCE/NodeApplication/NodeApplication.mpc @@ -3,7 +3,7 @@ project(NodeApplication): dance_lib, dynamicinterface, dance_component_server_svnt, \ dance_deployment_stub, dance_deployment_svnt, dance_redirection_service, \ - dance_logger, iortable, naming, ccm_configvalue, ciao_cs_client \ + dance_logger, iortable, naming, ccm_configvalue, ciao_cs_client, ccm_componentserver_svnt \ { sharedname = DAnCE_NodeApplication dynamicflags = NODEAPPLICATION_BUILD_DLL diff --git a/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.cpp b/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.cpp index 3c49bf936ce..208beb21581 100644 --- a/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.cpp +++ b/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.cpp @@ -145,9 +145,6 @@ namespace for (CORBA::ULong i = 0; i < properties.length (); ++i) { - ACE_DEBUG ((LM_DEBUG, "******** %s vs %s\n", - name, properties[i].name.in ())); - if (ACE_OS::strcmp (properties[i].name.in (), name) == 0) { DANCE_DEBUG ((LM_TRACE, DLINFO "NodeApplicion::<anonymous>::get_property_value<T> - " @@ -397,7 +394,7 @@ NodeApplication_Impl::configuration_complete_components () catch (CORBA::Exception &ex) { DANCE_ERROR ((LM_ERROR, DLINFO "NodeApplication_Impl::configuration_complete_components - " - "Caught CORBA exception from ccm_actovate on component %s: %s\n", + "Caught CORBA exception from ccm_activate on component %s: %s\n", this->plan_.instance[this->instances_[k]->idd_idx].name.in (), ex._info ().c_str ())); if (!error) @@ -486,7 +483,7 @@ NodeApplication_Impl::start () catch (CORBA::Exception &ex) { DANCE_ERROR ((LM_ERROR, DLINFO "NodeApplication_Impl::start - " - "Caught CORBA exception from ccm_actovate on component %s: %s\n", + "Caught CORBA exception from ccm_activate on component %s: %s\n", this->plan_.instance[this->instances_[k]->idd_idx].name.in (), ex._info ().c_str ())); if (!error) @@ -525,6 +522,8 @@ NodeApplication_Impl::install_home (Container &cont, Instance &inst) DANCE_DEBUG ((LM_DEBUG, DLINFO "NodeApplication_Impl::install_home - " "Starting installation of home %s on node %s\n", idd.name.in (), idd.node.in ())); + + this->instances_[inst.idd_idx] = &inst; // need to get significant property values const char *entrypt = 0; @@ -584,8 +583,19 @@ NodeApplication_Impl::install_home (Container &cont, Instance &inst) DANCE_DEBUG ((LM_INFO, DLINFO "NodeApplication_Impl::install_home - " "Home '%s' on node '%s' successfully installed\n", idd.name.in (), idd.node.in ())); - + inst.ref = CORBA::Object::_narrow (home); + + DANCE_DEBUG ((LM_TRACE, DLINFO "NodeApplication_Impl::install_home - " + "Populating attributes for home %s\n", + idd.name.in ())); + + + ComponentAttributesSetter::SetComponentAttributes (idd.name.in (), + inst.ref.in (), + idd.configProperty, + this->orb_.in ()); + inst.state = eInstalled; } catch (Components::InvalidConfiguration &) @@ -616,10 +626,10 @@ NodeApplication_Impl::install_home (Container &cont, Instance &inst) } void -NodeApplication_Impl::install_component (Container &cont, Instance &inst) +NodeApplication_Impl::install_component (Container &/*cont*/, Instance &/*inst*/) { DANCE_TRACE( "NodeApplication_Impl::install_component (unsigned int index)"); - + throw CORBA::NO_IMPLEMENT (); } void @@ -627,8 +637,9 @@ NodeApplication_Impl::install_homed_component (Container &cont, Instance &inst) { DANCE_TRACE("NodeApplication_Impl::install_homed_component (unsigned int index)"); - const ::Deployment::MonolithicDeploymentDescription &mdd = this->plan_.implementation[inst.mdd_idx]; + //const ::Deployment::MonolithicDeploymentDescription &mdd = this->plan_.implementation[inst.mdd_idx]; const ::Deployment::InstanceDeploymentDescription &idd = this->plan_.instance[inst.idd_idx]; + this->instances_[inst.idd_idx] = &inst; DANCE_DEBUG ((LM_TRACE, DLINFO "NodeApplication_Impl::install_homed_component - " "Starting installation of homed component %s on node %s\n", @@ -698,19 +709,37 @@ NodeApplication_Impl::install_homed_component (Container &cont, Instance &inst) try { inst.home = home_inst; - DANCE_TRACE ((LM_TRACE, DLINFO "NodeApplication_Impl::install_homed_component - " + DANCE_DEBUG ((LM_TRACE, DLINFO "NodeApplication_Impl::install_homed_component - " "Invoking create_component on home %s for component %s\n", home_id, idd.name.in ())); Components::CCMObject_var ccm_obj = home->create_component (); - inst.ref = CORBA::Object::_narrow (ccm_obj.in ()); - inst.state = eInstalled; + + if (CORBA::is_nil (ccm_obj)) + { + DANCE_ERROR ((LM_ERROR, DLINFO "NodeApplication_Impl::install_homed_component - " + "Received nil component reference from create_component on home %s " + " while creating component %s\n", + home_id, idd.name.in ())); + throw Deployment::StartError (idd.name.in (), + "Home for explicitly homed component returned nil"); + } + inst.ref = CORBA::Object::_narrow (ccm_obj.in ()); DANCE_DEBUG ((LM_INFO, DLINFO "NodeApplication_Impl::install_homed_component - " "Component %s successfully installed in home %s\n", idd.name.in (), home_id)); + + DANCE_DEBUG ((LM_TRACE, DLINFO "NodeApplication_Impl::install_home - " + "Populating attributes for component %s\n", + idd.name.in ())); + ComponentAttributesSetter::SetComponentAttributes (idd.name.in (), + inst.ref.in (), + idd.configProperty, + this->orb_.in ()); + inst.state = eInstalled; } catch (Components::CreateFailure &) { @@ -927,7 +956,7 @@ NodeApplication_Impl::init_components() &this->servers_[0].containers[0], i, this->plan_.instance[i].implementationRef); - this->instances_[i] = &this->servers_[0].containers[0].homes[pos]; + //this->instances_[i] = &this->servers_[0].containers[0].homes[pos]; break; } case eComponent: @@ -941,7 +970,7 @@ NodeApplication_Impl::init_components() &this->servers_[0].containers[0], i, this->plan_.instance[i].implementationRef); - this->instances_[i] = &this->servers_[0].containers[0].components[pos]; + //this->instances_[i] = &this->servers_[0].containers[0].components[pos]; break; } case eHomedComponent: @@ -949,13 +978,13 @@ NodeApplication_Impl::init_components() DANCE_DEBUG ((LM_DEBUG, DLINFO "NodeApplication_impl::init_components - " "Allocating instance %s as a home managed component\n", this->plan_.instance[i].name.in ())); - size_t pos = this->servers_[0].containers[0].homes.size (); + size_t pos = this->servers_[0].containers[0].components.size (); this->servers_[0].containers[0].components.size (pos + 1); this->servers_[0].containers[0].components[pos] = Instance (eHomedComponent, &this->servers_[0].containers[0], i, this->plan_.instance[i].implementationRef); - this->instances_[i] = &this->servers_[0].containers[0].components[pos]; + //this->instances_[i] = &this->servers_[0].containers[0].components[pos]; break; } default: @@ -1239,7 +1268,7 @@ if (error) NodeApplication_Impl::EInstanceType NodeApplication_Impl::get_instance_type (const Deployment::Properties& prop) const { - DANCE_TRACE (DLINFO "NodeApplication_Impl::get_instance_type"); + DANCE_TRACE ("NodeApplication_Impl::get_instance_type"); for (CORBA::ULong i = 0; i < prop.length (); ++i) { @@ -1276,13 +1305,13 @@ NodeApplication_Impl::get_instance_type (const Deployment::Properties& prop) con } void -NodeApplication_Impl::create_config_values (const Deployment::Properties& prop, +NodeApplication_Impl::create_config_values (const Deployment::Properties& /*prop*/, const ERequestType request, - Components::ConfigValues& cfg) const + Components::ConfigValues& /*cfg*/) const { DANCE_TRACE ("NodeApplication_Impl::create_config_values"); - unsigned int ind = 0; + //unsigned int ind = 0; CORBA::Any_var feature_any; switch (request) { @@ -1344,6 +1373,11 @@ NodeApplication_Impl::getAllConnections() ACE_CString inst_name = this->plan_.instance[this->plan_.connection[i].internalEndpoint[j].instanceRef].name.in(); + DANCE_DEBUG ((LM_DEBUG, DLINFO "NodeApplication_Impl::getAllConnections() - " + "Found provider '%s' for connection '%s'\n", + this->plan_.connection[i].name.in (), + inst_name.c_str ())); + Components::CCMObject_var obj = Components::CCMObject:: _narrow (this->instances_[this->plan_.connection[i].internalEndpoint[j].instanceRef]->ref.in ()); @@ -1446,23 +1480,45 @@ void NodeApplication_Impl::finishLaunch (const Deployment::Connections & providedReference, ::CORBA::Boolean start) { - DANCE_DEBUG((LM_DEBUG, DLINFO "NodeApplication_impl::finishLaunch - started for connection \n")); + DANCE_TRACE ("NodeApplication_Impl::finishLaunch"); + DANCE_DEBUG((LM_DEBUG, DLINFO "NodeApplication_impl::finishLaunch - " - "started for connections sequence with length: %d\n", providedReference.length())); + "started for connections sequence with length: %d\n", + providedReference.length())); for (unsigned int j = 0; j < this->plan_.connection.length(); ++j) { - Components::CCMObject_var obj = + CORBA::ULong inst (this->plan_.connection[j].internalEndpoint[0].instanceRef); + + DANCE_DEBUG ((LM_TRACE, DLINFO "NodeApplication_impl::finishLaunch - " + "Connection %s, instance %u\n", + this->plan_.connection[j].name.in (), + inst)); + + Components::CCMObject_var obj = Components::CCMObject:: - _narrow (this->instances_[this->plan_.connection[j].internalEndpoint[0].instanceRef]->ref.in ()); + _narrow (this->instances_[inst]->ref.in ()); + + if (CORBA::is_nil (obj.in ())) + { + DANCE_ERROR ((LM_ERROR, DLINFO "NodeApplication_impl::finishLaunch - " + "Unable to narrow apparent component instance reference to CCMObject for instance '%s'\n", + this->plan_.instance[inst].name.in ())); + throw Deployment::InvalidConnection (this->plan_.instance[inst].name.in (), + "Unable to narrow apparent component instance reference to CCMObject\n"); + } + const ::Deployment::PlanConnectionDescription &conn = this->plan_.connection[j]; + + ACE_CString name = conn.name.in(); + for (unsigned int i = 0; i < providedReference.length(); ++i) { //DANCE_DEBUG((LM_DEBUG, "[%M] NodeApplication_impl::finishLaunch - loop on all connections iteration %d for connection %s\n", i, providedReference[i].name.in())); - ACE_CString name = this->plan_.connection[j].name.in(); + if (name.compare (providedReference[i].name.in()) == 0) { - switch (this->plan_.connection[j].internalEndpoint[0].kind) + switch (conn.internalEndpoint[0].kind) { case Deployment::Facet: { @@ -1471,21 +1527,39 @@ NodeApplication_Impl::finishLaunch (const Deployment::Connections & providedRefe Components::CCMObject_var ext_inst; try { - if (0 == this->plan_.connection[j].externalReference.length()) + if (0 == conn.externalReference.length()) { - break; + if (conn.internalEndpoint.length () == 2 && + (conn.internalEndpoint[1].kind == Deployment::MultiplexReceptacle || + conn.internalEndpoint[1].kind == Deployment::SimplexReceptacle)) + { + obj = Components::CCMObject:: + _narrow (this->instances_[conn.internalEndpoint[1].instanceRef]->ref.in ()); + + this->connect_receptacle (obj.in (), + conn.internalEndpoint[1].portName.in(), + providedReference[i].endpoint[0].in()); + break; + } + + DANCE_ERROR ((LM_ERROR, DLINFO "NodeApplication_impl::finishLaunch - " + "Unsupported facet connection; lacks either external reference or " + "multiple internalEndpoints.\n")); + throw ::Deployment::StartError (name.c_str (), + "Unsupported facet connection; lacks either external reference " + "or multiple internalEndpoints.\n"); } CORBA::Object_var tmp = - this->orb_->string_to_object (this->plan_.connection[j].externalReference[0].location.in()); + this->orb_->string_to_object (conn.externalReference[0].location.in()); ext_inst = Components::CCMObject::_narrow (tmp); if (CORBA::is_nil (ext_inst.in())) { - DANCE_ERROR((LM_ERROR, DLINFO " NodeApplication_impl::finishLaunch - " + DANCE_ERROR((LM_ERROR, DLINFO "NodeApplication_impl::finishLaunch - " "facet for %s can't be narrowed \n", name.c_str ())); break; } this->connect_receptacle_ext (ext_inst, - this->plan_.connection[j].externalReference[0].portName.in(), + conn.externalReference[0].portName.in(), providedReference[i].endpoint[0].in()); } catch (CORBA::OBJECT_NOT_EXIST&) @@ -1507,12 +1581,12 @@ NodeApplication_Impl::finishLaunch (const Deployment::Connections & providedRefe Components::CCMObject_var ext_inst; try { - if (0 == this->plan_.connection[j].externalReference.length()) + if (0 == conn.externalReference.length()) { break; } CORBA::Object_var tmp = - this->orb_->string_to_object (this->plan_.connection[j].externalReference[0].location.in()); + this->orb_->string_to_object (conn.externalReference[0].location.in()); ext_inst = Components::CCMObject::_narrow (tmp); if (CORBA::is_nil (ext_inst.in())) { @@ -1524,14 +1598,14 @@ NodeApplication_Impl::finishLaunch (const Deployment::Connections & providedRefe { // Check is connection kind is consumer to emitter? this->connect_emitter_ext (ext_inst, - this->plan_.connection[j].externalReference[0].portName.in(), + conn.externalReference[0].portName.in(), providedReference[i].endpoint[0].in()); } catch (::Components::InvalidName&) { // No this is consumer to publisher this->connect_publisher (ext_inst, - this->plan_.connection[j].externalReference[0].portName.in(), + conn.externalReference[0].portName.in(), providedReference[i].endpoint[0].in()); } } @@ -1551,7 +1625,7 @@ NodeApplication_Impl::finishLaunch (const Deployment::Connections & providedRefe // What we should do with Cookie, returned from connect call??? DANCE_DEBUG((LM_DEBUG, DLINFO "NodeApplication_impl::finishLaunch - set for receptacle \n")); this->connect_receptacle (obj.in(), - this->plan_.connection[j].internalEndpoint[0].portName.in(), + conn.internalEndpoint[0].portName.in(), providedReference[i].endpoint[0].in()); break; } @@ -1559,7 +1633,7 @@ NodeApplication_Impl::finishLaunch (const Deployment::Connections & providedRefe { DANCE_DEBUG((LM_DEBUG, DLINFO "NodeApplication_impl::finishLaunch - set for emitter \n")); this->connect_emitter (obj.in(), - this->plan_.connection[j].internalEndpoint[0].portName.in(), + conn.internalEndpoint[0].portName.in(), providedReference[i].endpoint[0].in()); break; } @@ -1567,7 +1641,7 @@ NodeApplication_Impl::finishLaunch (const Deployment::Connections & providedRefe { DANCE_DEBUG((LM_DEBUG, DLINFO "NodeApplication_impl::finishLaunch - set for publisher \n")); this->connect_publisher (obj.in(), - this->plan_.connection[j].internalEndpoint[0].portName.in(), + conn.internalEndpoint[0].portName.in(), providedReference[i].endpoint[0].in()); break; } @@ -1576,9 +1650,9 @@ NodeApplication_Impl::finishLaunch (const Deployment::Connections & providedRefe DANCE_ERROR((LM_ERROR, DLINFO " NodeApplication_impl::finishLaunch - currect Connection.InternalEndPoint.Kind " "is not a Deployment::SimplexReceptacle, Deployment::EventEmitter, Deployment::EventPublisher " "(Connection:%s Kind:%i PortName:%s)\n", - this->plan_.connection[j].name.in(), - this->plan_.connection[j].internalEndpoint[0].kind, - this->plan_.connection[j].internalEndpoint[0].portName.in() + conn.name.in(), + conn.internalEndpoint[0].kind, + conn.internalEndpoint[0].portName.in() )); throw ::Deployment::InvalidConnection(); }//default @@ -1743,13 +1817,22 @@ NodeApplication_Impl::connect_publisher (Components::CCMObject_ptr inst, const ACE_CString& port_name, CORBA::Object_ptr consumer) { + DANCE_TRACE ("NodeApplication_Impl::connect_publisher"); + + if (CORBA::is_nil (inst)) + { + DANCE_ERROR ((LM_ERROR, DLINFO "NodeApplication_Impl::connect_publisher - " + "Provided a nil CCMObject reference while connecting port %s\n", + port_name.c_str ())); + throw ::Deployment::InvalidConnection (); + } Components::Cookie* res = 0; Components::EventConsumerBase_var event = Components::EventConsumerBase::_unchecked_narrow (consumer); try { - DANCE_DEBUG((LM_DEBUG, DLINFO "NodeApplication_impl::finishLaunch - subscribe for %s started\n", port_name.c_str())); res = inst->subscribe (port_name.c_str(), event); - DANCE_DEBUG((LM_DEBUG, DLINFO "NodeApplication_impl::finishLaunch - subscribe finished\n")); + DANCE_DEBUG((LM_DEBUG, DLINFO "NodeApplication_impl::finishLaunch - successfully subscribed %s\n", + port_name.c_str ())); } catch (::Components::InvalidName& ) { diff --git a/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.h b/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.h index 274add486b0..2b89b501928 100644 --- a/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.h +++ b/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.h @@ -95,7 +95,8 @@ namespace DAnCE eRemoved, eInvalidState }; - + + protected: //TODO Add throw specification void init(); diff --git a/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager.mpc b/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager.mpc index 117977b8ed8..c07575ef68a 100644 --- a/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager.mpc +++ b/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager.mpc @@ -1,10 +1,10 @@ // -*- MPC -*- // $Id$ -project: dance_lib, naming, dance_node_application, dance_deployment_svnt, dance_deployment_stub, dynamicinterface { +project: dance_lib, naming, dance_node_application, dance_deployment_svnt, dance_deployment_stub, dynamicinterface, ccm_componentserver_svnt, ciao_cs_client { sharedname = DAnCE_NodeApplicationManager dynamicflags = NODEAPPLICATIONMANAGER_BUILD_DLL - + Source_Files { NodeApplicationManager_Impl.cpp } diff --git a/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp b/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp index d7d7241f7dc..deb395ceccc 100644 --- a/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp +++ b/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp @@ -124,7 +124,7 @@ NodeApplicationManager_Impl::destroyApplication (Deployment::Application_ptr app if (this->properties_.find (DAnCE::STANDALONE_NM, val) == 0) { - DANCE_TRACE ((LM_TRACE, DLINFO "NodeApplicationManager_Impl::destroyApplication - " + DANCE_DEBUG ((LM_TRACE, DLINFO "NodeApplicationManager_Impl::destroyApplication - " "Found STANDALONE_NM property\n")); CORBA::Boolean standalone (false); diff --git a/CIAO/DAnCE/NodeManager/NodeManager.mpc b/CIAO/DAnCE/NodeManager/NodeManager.mpc index 86ad9a38772..006a8d7b7c4 100644 --- a/CIAO/DAnCE/NodeManager/NodeManager.mpc +++ b/CIAO/DAnCE/NodeManager/NodeManager.mpc @@ -1,10 +1,10 @@ // -*- MPC -*- // $Id$ -project(Node_Manager_Module) : dance_lib, naming, dance_node_application_manager, dance_node_application, dance_deployment_svnt, dance_deployment_stub, dynamicinterface, utils { +project(Node_Manager_Module) : dance_lib, naming_serv, dance_node_application_manager, dance_node_application, dance_deployment_svnt, dance_deployment_stub, dynamicinterface, utils { sharedname = DAnCE_NodeManager dynamicflags = NODEMANAGER_BUILD_DLL DANCE_NODEMANAGER_MODULE_BUILD_DLL - + Source_Files { NodeManager_Impl.cpp Node_Manager_Module.cpp @@ -12,11 +12,11 @@ project(Node_Manager_Module) : dance_lib, naming, dance_node_application_manager } project(Node_Manager_Exec) : dance_exe, dance_node_manager, naming_serv { - exename = dance_node_manager + exename = dance_node_manager after += Node_Manager_Module libs += DAnCE_NodeManager Source_Files { Node_Manager_Exec.cpp } -}
\ No newline at end of file +} diff --git a/CIAO/DAnCE/NodeManager/Node_Manager_Module.cpp b/CIAO/DAnCE/NodeManager/Node_Manager_Module.cpp index 8c04fa546bc..f3be8606a76 100644 --- a/CIAO/DAnCE/NodeManager/Node_Manager_Module.cpp +++ b/CIAO/DAnCE/NodeManager/Node_Manager_Module.cpp @@ -28,7 +28,7 @@ namespace DAnCE namespace Node_Manager { bool - write_IOR (const char * ior_file_name, const char* ior) + write_IOR (const ACE_TCHAR * ior_file_name, const char* ior) { FILE* ior_output_file_ = ACE_OS::fopen (ior_file_name, "w"); @@ -55,7 +55,7 @@ DAnCE_NodeManager_Module::DAnCE_NodeManager_Module (void) DAnCE_NodeManager_Module::~DAnCE_NodeManager_Module (void) { DANCE_TRACE ("DAnCE_NodeManager_Module::~DAnCE_NodeManager_Module"); - + for (Servant_Map::iterator it = this->nm_map_.begin (); it != this->nm_map_.end (); ++it) @@ -94,7 +94,7 @@ DAnCE_NodeManager_Module::parse_args (int argc, ACE_TCHAR * argv[]) 0, 0, ACE_Get_Opt::RETURN_IN_ORDER); - + get_opts.long_option ("exec-mgr", 'e', ACE_Get_Opt::ARG_REQUIRED); get_opts.long_option ("node-mgr", 'n', ACE_Get_Opt::ARG_REQUIRED); get_opts.long_option ("process-ns", 'p', ACE_Get_Opt::ARG_OPTIONAL); @@ -152,14 +152,14 @@ DAnCE_NodeManager_Module::parse_args (int argc, ACE_TCHAR * argv[]) "Instructed to ignore deployment errors\n")); this->options_.ignore_failure_ = true; break; - + case 's': DANCE_DEBUG ((LM_DEBUG, DLINFO "Node_Manager_Module::parse_args - " "Using provided component server executable:%s\n", get_opts.opt_arg ())); this->options_.cs_path_ = get_opts.opt_arg (); break; - + case 't': DANCE_DEBUG ((LM_DEBUG, DLINFO "Node_Manager_Module::parse_args - " "Using provided component server spawn timeout:%s\n", @@ -175,7 +175,7 @@ DAnCE_NodeManager_Module::parse_args (int argc, ACE_TCHAR * argv[]) argv [0], c), false); break; - + case 0: if (ACE_OS::strcmp (get_opts.long_option (), "standalone-nm") == 0) @@ -193,13 +193,13 @@ DAnCE_NodeManager_Module::parse_args (int argc, ACE_TCHAR * argv[]) this->options_.server_args_ = get_opts.opt_arg (); } break; - + default: DANCE_DEBUG ((LM_TRACE, DLINFO "Node_Manager_Module::parse_args - ignoring unknown option %c\n", c)); } } - return true; + return true; } CORBA::Object_ptr @@ -215,16 +215,16 @@ DAnCE_NodeManager_Module::create_object (CORBA::ORB_ptr orb, "Attempted to create Node Manager with a nil orb.\n")); return CORBA::Object::_nil(); } - - if (CORBA::is_nil(this->orb_.in())) + + if (CORBA::is_nil(this->orb_.in())) { - DANCE_DEBUG((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_object - " + DANCE_DEBUG((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_object - " "NM's orb is nil.\n")); this->orb_ = CORBA::ORB::_duplicate (orb); } else if (ACE_OS::strcmp(orb->id(), this->orb_->id()) != 0) { - DANCE_DEBUG((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_object - " + DANCE_DEBUG((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_object - " "Resetting NM's orb.\n")); this->orb_ = CORBA::ORB::_duplicate (orb); this->domain_nc_ = CosNaming::NamingContext::_nil(); @@ -232,11 +232,11 @@ DAnCE_NodeManager_Module::create_object (CORBA::ORB_ptr orb, if (!this->parse_args (argc, argv)) { - DANCE_ERROR ((LM_ERROR, DLINFO "DAnCE_NodeManager_Module::create_object - " + DANCE_ERROR ((LM_ERROR, DLINFO "DAnCE_NodeManager_Module::create_object - " "Failed to parse command line arguments, exiting\n")); return CORBA::Object::_nil (); } - + /* @@CDMW stuff, figure out what to do with this later.... try @@ -244,7 +244,7 @@ DAnCE_NodeManager_Module::create_object (CORBA::ORB_ptr orb, CORBA::Object_var obj = orb->resolve_initial_references ("ProcessDestinationNC"); if (CORBA::is_nil(obj)) { - DANCE_ERROR((LM_ERROR, DLINFO "DAnCE_NodeManager_Module::create_object - " + DANCE_ERROR((LM_ERROR, DLINFO "DAnCE_NodeManager_Module::create_object - " "ProcessDestinationNC can not be resolved. RIR returned nil.\n")); return CORBA::Object::_nil(); } @@ -252,25 +252,25 @@ DAnCE_NodeManager_Module::create_object (CORBA::ORB_ptr orb, CosNaming::NamingContext_var pdnc = CosNaming::NamingContext::_narrow(obj.in()); if (CORBA::is_nil(pdnc.in())) { - DANCE_ERROR((LM_ERROR, DLINFO "DAnCE_NodeManager_Module::create_object - " + DANCE_ERROR((LM_ERROR, DLINFO "DAnCE_NodeManager_Module::create_object - " "ProcessDestinationNC can not be narrowed to NC.\n")); return CORBA::Object::_nil(); } } catch (CORBA::ORB::InvalidName &) { - DANCE_ERROR((LM_ERROR, DLINFO "DAnCE_NodeManager_Module::create_object - " + DANCE_ERROR((LM_ERROR, DLINFO "DAnCE_NodeManager_Module::create_object - " "ProcessDestinationNC can not be resolved. InvalidName.\n")); return CORBA::Object::_nil(); } catch(...) { - DANCE_ERROR((LM_ERROR, DLINFO "DAnCE_NodeManager_Module::create_object - " + DANCE_ERROR((LM_ERROR, DLINFO "DAnCE_NodeManager_Module::create_object - " "ProcessDestinationNC can not be retrieved. Unknown exception.\n")); return CORBA::Object::_nil(); } */ - + this->register_value_factories (); this->create_poas (); @@ -280,7 +280,7 @@ DAnCE_NodeManager_Module::create_object (CORBA::ORB_ptr orb, { try { - DANCE_DEBUG((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_object - " + DANCE_DEBUG((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_object - " "Setting NM's orb and resolving DomainNC.\n")); this->orb_ = CORBA::ORB::_duplicate(orb); CORBA::Object_var domain_obj = orb->resolve_initial_references ("DomainNC"); @@ -289,7 +289,7 @@ DAnCE_NodeManager_Module::create_object (CORBA::ORB_ptr orb, this->domain_nc_ = CosNaming::NamingContext::_narrow (domain_obj.in()); if (CORBA::is_nil (this->domain_nc_.in ())) { - DANCE_ERROR ((LM_ERROR,DLINFO "DAnCE_NodeManager_Module::create_object - " + DANCE_ERROR ((LM_ERROR,DLINFO "DAnCE_NodeManager_Module::create_object - " "Narrow to NamingContext return nil for DomainNC.\n")); return CORBA::Object::_nil (); } @@ -297,19 +297,19 @@ DAnCE_NodeManager_Module::create_object (CORBA::ORB_ptr orb, } catch (CORBA::Exception&) { - DANCE_DEBUG ((LM_WARNING, DLINFO "DAnCE_NodeManager_Module::create_object - " + DANCE_DEBUG ((LM_WARNING, DLINFO "DAnCE_NodeManager_Module::create_object - " "DomainNC context not found!\n")); } } - - DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_object - " + + DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_object - " "Resolving plan NS naming context.\n")); CosNaming::NamingContext_var rebind_nc; if (this->options_.rebind_plan_ns_) { if (!this->options_.create_plan_ns_) { - DANCE_ERROR((LM_ERROR, DLINFO "DAnCE_NodeManager_Module::create_object - " + DANCE_ERROR((LM_ERROR, DLINFO "DAnCE_NodeManager_Module::create_object - " "Rebind_plan_ns option is enabled but Create_plan_ns is not.\n")); return CORBA::Object::_nil(); } @@ -341,7 +341,7 @@ DAnCE_NodeManager_Module::create_object (CORBA::ORB_ptr orb, if (CORBA::is_nil (adapter.in ())) { - DANCE_ERROR ((LM_ERROR, DLINFO "DAnCE_NodeManager_Module::create_object - " + DANCE_ERROR ((LM_ERROR, DLINFO "DAnCE_NodeManager_Module::create_object - " "Unable to RIR the IORTable.\n")); return CORBA::Object::_nil (); } @@ -351,8 +351,8 @@ DAnCE_NodeManager_Module::create_object (CORBA::ORB_ptr orb, TAO_Naming_Loader loader; if (this->options_.create_plan_ns_) { - DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_object - " - "Resolving plan-specifc naming context.\n")); + DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_object - " + "Resolving plan-specific naming context.\n")); CORBA::Object_var naming_obj; if (0 != this->options_.create_plan_ns_ior_) { @@ -360,7 +360,7 @@ DAnCE_NodeManager_Module::create_object (CORBA::ORB_ptr orb, plan_nc = CosNaming::NamingContext::_narrow (naming_obj.in()); if (CORBA::is_nil (plan_nc.in())) { - DANCE_ERROR ((LM_ERROR, DLINFO "DAnCE_NodeManager_Module::create_object - " + DANCE_ERROR ((LM_ERROR, DLINFO "DAnCE_NodeManager_Module::create_object - " "Failed trying to narrow naming context " "for dance creating plan NC.\n" "Use the \"--create-plan-ns NC ior\" " @@ -408,7 +408,7 @@ DAnCE_NodeManager_Module::create_object (CORBA::ORB_ptr orb, //Creating redirection object if (this->redirection_ == 0) { - DANCE_TRACE ((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_object - " + DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_object - " "Creating redirection service object\n")); this->redirection_ = new DAnCE::RedirectionService (orb, this->root_poa_.in (), @@ -426,7 +426,7 @@ DAnCE_NodeManager_Module::create_object (CORBA::ORB_ptr orb, return CORBA::Object::_nil (); } - DANCE_DEBUG ((LM_DEBUG, DLINFO "DAnCE_NodeManager_Module::create_object - " + DANCE_DEBUG ((LM_DEBUG, DLINFO "DAnCE_NodeManager_Module::create_object - " "DAnCE_NodeManager::run_main - creating NodeManager for node %C\n", this->options_.node_managers_[0].c_str())); @@ -439,8 +439,8 @@ DAnCE_NodeManager_Module::create_object (CORBA::ORB_ptr orb, node_file = node_name.substring (npos + 1, node_name.length() - npos + 1); node_name = node_name.substring (0, npos); } - - DANCE_DEBUG ((LM_INFO, DLINFO "DAnCE_NodeManager_Module::create_object - " + + DANCE_DEBUG ((LM_INFO, DLINFO "DAnCE_NodeManager_Module::create_object - " "Creating node named '%s' and outputting ior to file '%s'\n", node_name.c_str (), node_file.c_str ())); @@ -449,12 +449,12 @@ DAnCE_NodeManager_Module::create_object (CORBA::ORB_ptr orb, DAnCE::NodeManager_Impl * nm = 0; if (this->nm_map_.find (node_name, nm) == -1) { - DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_object - " + DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_object - " "Allocating new NodeManger servant instance for NodeManager\n")); int size = 64; DAnCE::PROPERTY_MAP properties (size); this->create_nm_properties (properties); - + ACE_NEW_RETURN (nm, DAnCE::NodeManager_Impl (orb, this->root_poa_.in (), @@ -462,7 +462,7 @@ DAnCE_NodeManager_Module::create_object (CORBA::ORB_ptr orb, *this->redirection_, properties), CORBA::Object::_nil ()); - DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_object - " + DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_object - " "New NodeManger servant instance for NodeManager allocated.\n")); this->nm_map_.bind (node_name, nm); } @@ -484,7 +484,7 @@ DAnCE_NodeManager_Module::create_object (CORBA::ORB_ptr orb, // Binding node menager to DomainNC if (!CORBA::is_nil (this->domain_nc_.in ())) { - DANCE_DEBUG((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_object - " + DANCE_DEBUG((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_object - " "Registering NM in NC as \"%s.NodeManager\".\n", node_name.c_str ())); CosNaming::Name name (1); name.length (1); @@ -496,7 +496,7 @@ DAnCE_NodeManager_Module::create_object (CORBA::ORB_ptr orb, // Writing ior to file if (0 != node_file.length ()) { - DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_object - " + DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_object - " "Writing node IOR to file.\n")); DAnCE::Node_Manager::write_IOR (node_file.c_str (), ior.in ()); } @@ -506,7 +506,7 @@ DAnCE_NodeManager_Module::create_object (CORBA::ORB_ptr orb, mgr->activate (); // Finishing Deployment part - DANCE_DEBUG ((LM_DEBUG, DLINFO "DAnCE_NodeManager_Module::create_object - " + DANCE_DEBUG ((LM_DEBUG, DLINFO "DAnCE_NodeManager_Module::create_object - " "DAnCE_NodeManager is running...\n")); return nm_obj._retn (); @@ -518,55 +518,55 @@ DAnCE_NodeManager_Module::create_object (CORBA::ORB_ptr orb, } } -void +void DAnCE_NodeManager_Module::register_value_factories (void) { DANCE_TRACE("DAnCE_Node_Manager_Module::register_value_factories (void)"); - DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_object - " + DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_object - " "Registering Cookie value factory.\n")); CORBA::ValueFactory_var vf = new Components::Cookie_init(); vf = this->orb_->register_value_factory ("IDL:omg.org/Components/Cookie:1.0", vf.in()); } -void +void DAnCE_NodeManager_Module::create_poas (void) { DANCE_TRACE("DAnCE_Node_Manager_Module::create_poas"); // Get reference to Root POA. - DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_poas - " + DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_poas - " "Resolving root POA\n")); CORBA::Object_var obj = this->orb_->resolve_initial_references ("RootPOA"); - + this->root_poa_ = PortableServer::POA::_narrow (obj.in ()); - - DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_poas - " + + DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_poas - " "Obtaining the POAManager\n")); PortableServer::POAManager_var mgr = this->root_poa_->the_POAManager (); - + TAO::Utils::PolicyList_Destroyer policies (2); policies.length (2); - + try { - DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_poas - " - "DAnCE_NodeManager_Module::create_object - " + DANCE_DEBUG ((LM_TRACE, DLINFO "DAnCE_NodeManager_Module::create_poas - " + "DAnCE_NodeManager_Module::create_poas - " "Creating the \"Managers\" POA.\n")); - + policies[0] = this->root_poa_->create_id_assignment_policy (PortableServer::USER_ID); policies[1] = this->root_poa_->create_lifespan_policy (PortableServer::PERSISTENT); - this->nm_poa_ = this->root_poa_->create_POA ("Managers", - mgr.in(), + this->nm_poa_ = this->root_poa_->create_POA ("Managers", + mgr.in(), policies); } catch (const PortableServer::POA::AdapterAlreadyExists &) { - DANCE_DEBUG ((LM_INFO, DLINFO "DAnCE_NodeManager_Module::create_poas - " + DANCE_DEBUG ((LM_INFO, DLINFO "DAnCE_NodeManager_Module::create_poas - " "Using exiswting \"Managers\" POA\n")); this->nm_poa_ = this->root_poa_->find_POA ("Managers", 0); } } -void +void DAnCE_NodeManager_Module::create_nm_properties (DAnCE::PROPERTY_MAP &props) { { diff --git a/CIAO/DAnCE/Starter/Starter.h b/CIAO/DAnCE/Starter/Starter.h index 9ec3fc6b346..2bf08442651 100644 --- a/CIAO/DAnCE/Starter/Starter.h +++ b/CIAO/DAnCE/Starter/Starter.h @@ -29,11 +29,11 @@ namespace DAnCE }; auto_ptr<DAnCE::Logger_Service> logger_; - + CORBA::ORB_var orb_; int optLogLevel_; - int & argc_; - ACE_TCHAR** & argv_; + int argc_; + ACE_TCHAR** argv_; bool optNS_; ACE_CString optNSFile_; ACE_CString optNSOptions_; @@ -63,7 +63,7 @@ namespace DAnCE void argCopyForPL (int & c, char **& v); void releaseArgs (int c, char ** v); static bool isPossibleOption(const char* opt); - + void configure_logging_backend (void); }; diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute.cidl b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute.cidl new file mode 100644 index 00000000000..fe2ff8f2859 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute.cidl @@ -0,0 +1,11 @@ +// $Id$ +#include "SimpleAttribute.idl" + +composition session SimpleAttribute_Impl +{ + home executor SimpleAttributeHome_Exec + { + implements Simple::SimpleAttributeHome; + manages SimpleAttribute_Exec; + }; +}; diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute.idl b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute.idl new file mode 100644 index 00000000000..7d41978b4de --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute.idl @@ -0,0 +1,25 @@ +// $Id$ + +#ifndef SIMPLE_ATTRIBUTE_IDL +#define SIMPLE_ATTRIBUTE_IDL + +#include "Components.idl" + +module Simple +{ + component SimpleAttribute + { + attribute string str_attr; + attribute long long_attr; + attribute short short_attr; + }; + + home SimpleAttributeHome manages SimpleAttribute + { + attribute string str_attr; + attribute long long_attr; + attribute short short_attr; + }; +}; + +#endif /*SIMPLE_ATTRIBUTE_IDL*/ diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute.mpc b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute.mpc new file mode 100644 index 00000000000..6f552eaee25 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute.mpc @@ -0,0 +1,119 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl SimpleAttribute" + +project(SimpleAttribute_idl_gen) : taoidldefaults, anytypecode { + avoids += ace_for_tao + custom_only = 1 + idlflags += -Wb,stub_export_macro=SIMPLEATTRIBUTE_STUB_Export \ + -Wb,stub_export_include=SimpleAttribute_stub_export.h \ + -Wb,skel_export_macro=SIMPLEATTRIBUTE_SVNT_Export \ + -Wb,skel_export_include=SimpleAttribute_svnt_export.h + + IDL_Files { + SimpleAttribute.idl + } +} + +project(SimpleAttribute_cidl_gen) : ciaocidldefaults, taoidldefaults { + avoids += ace_for_tao + custom_only = 1 + cidlflags += --svnt-export-macro SIMPLEATTRIBUTE_SVNT_Export \ + --svnt-export-include SimpleAttribute_svnt_export.h + idlflags += -Wb,export_macro=SIMPLEATTRIBUTE_EXEC_Export \ + -Wb,export_include=SimpleAttribute_exec_export.h \ + -SS + + CIDL_Files { + SimpleAttribute.cidl + } + + IDL_Files { + SimpleAttributeE.idl + } +} + +project(SimpleAttribute_stub) : ccm_stub { + avoids += ace_for_tao + after += SimpleAttribute_idl_gen + libs += + + sharedname = SimpleAttribute_stub + dynamicflags = SIMPLEATTRIBUTE_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleAttributeC.cpp + } + + Header_Files { + SimpleAttributeC.h + SimpleAttribute_stub_export.h + } + + Inline_Files { + SimpleAttributeC.inl + } +} + +project(SimpleAttribute_exec) : ciao_executor { + avoids += ace_for_tao + after += SimpleAttribute_cidl_gen SimpleAttribute_stub + sharedname = SimpleAttribute_exec + libs += SimpleAttribute_stub + + dynamicflags = SIMPLEATTRIBUTE_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleAttributeEC.cpp + SimpleAttribute_exec.cpp + } + + Header_Files { + SimpleAttributeEC.h + SimpleAttribute_exec.h + SimpleAttribute_exec_export.h + } + + Inline_Files { + SimpleAttributeEC.inl + } +} + + +project(SimpleAttribute_svnt) : ciao_servant { + avoids += ace_for_tao + after += SimpleAttribute_exec + sharedname = SimpleAttribute_svnt + libs += SimpleAttribute_exec \ + SimpleAttribute_stub + + dynamicflags = SIMPLEATTRIBUTE_SVNT_BUILD_DLL + + CIDL_Files { + } + + IDL_Files { + } + + Source_Files { + SimpleAttributeS.cpp + SimpleAttribute_svnt.cpp + } + + Header_Files { + SimpleAttributeS.h + SimpleAttribute_svnt.h + SimpleAttribute_svnt_export.h + } + + Inline_Files { + SimpleAttributeS.inl + } +} + + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_exec.cpp b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_exec.cpp new file mode 100644 index 00000000000..675e7dcc386 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_exec.cpp @@ -0,0 +1,259 @@ +// $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 "SimpleAttribute_exec.h" +#include "ciao/CIAO_common.h" + +namespace CIDL_SimpleAttribute_Impl +{ + //================================================================== + // Component Executor Implementation Class: SimpleAttribute_exec_i + //================================================================== + + SimpleAttribute_exec_i::SimpleAttribute_exec_i (void) + : str_ (""), + long_(-1), + short_(-1) + { + } + + SimpleAttribute_exec_i::~SimpleAttribute_exec_i (void) + { + } + + // Supported or inherited operations. + + // Attribute operations. + + char * + SimpleAttribute_exec_i::str_attr () + { + // Your code here. + return CORBA::string_dup (str_.c_str ()); + } + + void + SimpleAttribute_exec_i::str_attr (const char * str) + { + CIAO_TRACE ("SimpleAttribute_exec_i::str_attr"); + // Your code here. + this->str_ = str; + } + + ::CORBA::Long + SimpleAttribute_exec_i::long_attr () + { + CIAO_TRACE ("SimpleAttribute_exec_i::long_attr"); + // Your code here. + return long_; + } + + void + SimpleAttribute_exec_i::long_attr (::CORBA::Long long_attr ) + { + CIAO_TRACE ("SimpleAttribute_exec_i::long_attr"); + // Your code here. + this->long_ = long_attr; + } + + ::CORBA::Short + SimpleAttribute_exec_i::short_attr () + { + // Your code here. + return short_; + } + + void + SimpleAttribute_exec_i::short_attr (::CORBA::Short short_attr ) + { + CIAO_TRACE ("SimpleAttribute_exec_i::short_attr"); + // Your code here. + this->short_ = short_attr; + } + + // Port operations. + + // Operations from Components::SessionComponent + + void + SimpleAttribute_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + this->context_ = + ::Simple::CCM_SimpleAttribute_Context::_narrow (ctx); + + if (CORBA::is_nil (this->context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + SimpleAttribute_exec_i::configuration_complete () + { + // Your code here. + } + + void + SimpleAttribute_exec_i::ccm_activate () + { + // Your code here. + if (this->str_ == "" || + this->long_ == -1 || + this->short_ == -1) + { + CIAO_ERROR ((LM_ERROR, "SimpleAttribute_exec_i::ccm_activate - " + "Error: Attribute values didin't initialize correctly!\n")); + } + else + { + CIAO_DEBUG ((LM_EMERGENCY, "SimpleAttribute_exec_i::ccm_activate - " + "Test passed! String attribute is %s\n", + this->str_.c_str ())); + } + + } + + void + SimpleAttribute_exec_i::ccm_passivate () + { + // Your code here. + } + + void + SimpleAttribute_exec_i::ccm_remove () + { + // Your code here. + } + + //================================================================== + // Home Executor Implementation Class: SimpleAttributeHome_exec_i + //================================================================== + + SimpleAttributeHome_exec_i::SimpleAttributeHome_exec_i (void) + : str_ (""), + long_(-1), + short_(-1) + { + } + + SimpleAttributeHome_exec_i::~SimpleAttributeHome_exec_i (void) + { + } + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + + char * + SimpleAttributeHome_exec_i::str_attr () + { + // Your code here. + return CORBA::string_dup (str_.c_str ()); + } + + void + SimpleAttributeHome_exec_i::str_attr (const char * str) + { + CIAO_TRACE ("SimpleAttributeHome_exec_i::str_attr"); + // Your code here. + this->str_ = str; + } + + ::CORBA::Long + SimpleAttributeHome_exec_i::long_attr () + { + CIAO_TRACE ("SimpleAttributeHome_exec_i::long_attr"); + // Your code here. + return long_; + } + + void + SimpleAttributeHome_exec_i::long_attr (::CORBA::Long long_attr ) + { + CIAO_TRACE ("SimpleAttributeHome_exec_i::long_attr"); + // Your code here. + this->long_ = long_attr; + } + + ::CORBA::Short + SimpleAttributeHome_exec_i::short_attr () + { + // Your code here. + return short_; + } + + void + SimpleAttributeHome_exec_i::short_attr (::CORBA::Short short_attr ) + { + CIAO_TRACE ("SimpleAttributeHome_exec_i::short_attr"); + // Your code here. + this->short_ = short_attr; + } + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + SimpleAttributeHome_exec_i::create () + { + if (this->str_ == "" || + this->long_ == -1 || + this->short_ == -1) + { + CIAO_ERROR ((LM_ERROR, "SimpleAttribute_exec_i::ccm_activate - " + "Error: Attribute values didin't initialize correctly!\n")); + } + else + { + CIAO_DEBUG ((LM_EMERGENCY, "SimpleAttributeHome_exec_i::create - " + "Test passed! String attribute is %s\n", + this->str_.c_str ())); + } + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX ( + retval, + SimpleAttribute_exec_i, + ::CORBA::NO_MEMORY ()); + + return retval; + } + + extern "C" SIMPLEATTRIBUTE_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleAttributeHome_Impl (void) + { + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN ( + retval, + SimpleAttributeHome_exec_i, + ::Components::HomeExecutorBase::_nil ()); + + return retval; + } +} + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_exec.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_exec.h new file mode 100644 index 00000000000..2913eeb8d07 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_exec.h @@ -0,0 +1,141 @@ +// $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_SIMPLEATTRIBUTE_EXEC_H +#define CIAO_SIMPLEATTRIBUTE_EXEC_H + +#include /**/ "ace/pre.h" + +#include "SimpleAttributeEC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "SimpleAttribute_exec_export.h" +#include "tao/LocalObject.h" + +namespace CIDL_SimpleAttribute_Impl +{ + class SIMPLEATTRIBUTE_EXEC_Export SimpleAttribute_exec_i + : public virtual SimpleAttribute_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleAttribute_exec_i (void); + virtual ~SimpleAttribute_exec_i (void); + + // Supported or inherited operations. + + // Attribute operations. + + virtual char * + str_attr (); + + virtual void + str_attr (const char * str_attr); + + virtual ::CORBA::Long + long_attr (); + + virtual void + long_attr (::CORBA::Long long_attr); + + virtual ::CORBA::Short + short_attr (); + + virtual void + short_attr (::CORBA::Short short_attr); + + // Port operations. + + // Operations from Components::SessionComponent + + virtual void + set_session_context ( + ::Components::SessionContext_ptr ctx); + + virtual void configuration_complete (); + + virtual void ccm_activate (); + + virtual void ccm_passivate (); + + virtual void ccm_remove (); + + private: + ::Simple::CCM_SimpleAttribute_Context_var context_; + ACE_CString str_; + ::CORBA::Long long_; + ::CORBA::Short short_; + }; + + class SIMPLEATTRIBUTE_EXEC_Export SimpleAttributeHome_exec_i + : public virtual SimpleAttributeHome_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleAttributeHome_exec_i (void); + virtual ~SimpleAttributeHome_exec_i (void); + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + virtual char * + str_attr (); + + virtual void + str_attr (const char * str_attr); + + virtual ::CORBA::Long + long_attr (); + + virtual void + long_attr (::CORBA::Long long_attr); + + virtual ::CORBA::Short + short_attr (); + + virtual void + short_attr (::CORBA::Short short_attr); + + // Implicit operations. + + virtual ::Components::EnterpriseComponent_ptr + create (); + private: + ACE_CString str_; + ::CORBA::Long long_; + ::CORBA::Short short_; + }; + + extern "C" SIMPLEATTRIBUTE_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleAttributeHome_Impl (void); +} + +#include /**/ "ace/post.h" + +#endif /* CIAO_SIMPLEATTRIBUTE_EXEC_H */ + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_exec_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_exec_export.h new file mode 100644 index 00000000000..1b9481804a3 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_exec_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEATTRIBUTE_EXEC +// ------------------------------ +#ifndef SIMPLEATTRIBUTE_EXEC_EXPORT_H +#define SIMPLEATTRIBUTE_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEATTRIBUTE_EXEC_HAS_DLL) +# define SIMPLEATTRIBUTE_EXEC_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEATTRIBUTE_EXEC_HAS_DLL */ + +#if !defined (SIMPLEATTRIBUTE_EXEC_HAS_DLL) +# define SIMPLEATTRIBUTE_EXEC_HAS_DLL 1 +#endif /* ! SIMPLEATTRIBUTE_EXEC_HAS_DLL */ + +#if defined (SIMPLEATTRIBUTE_EXEC_HAS_DLL) && (SIMPLEATTRIBUTE_EXEC_HAS_DLL == 1) +# if defined (SIMPLEATTRIBUTE_EXEC_BUILD_DLL) +# define SIMPLEATTRIBUTE_EXEC_Export ACE_Proper_Export_Flag +# define SIMPLEATTRIBUTE_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEATTRIBUTE_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEATTRIBUTE_EXEC_BUILD_DLL */ +# define SIMPLEATTRIBUTE_EXEC_Export ACE_Proper_Import_Flag +# define SIMPLEATTRIBUTE_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEATTRIBUTE_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEATTRIBUTE_EXEC_BUILD_DLL */ +#else /* SIMPLEATTRIBUTE_EXEC_HAS_DLL == 1 */ +# define SIMPLEATTRIBUTE_EXEC_Export +# define SIMPLEATTRIBUTE_EXEC_SINGLETON_DECLARATION(T) +# define SIMPLEATTRIBUTE_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEATTRIBUTE_EXEC_HAS_DLL == 1 */ + +// Set SIMPLEATTRIBUTE_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEATTRIBUTE_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEATTRIBUTE_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEATTRIBUTE_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEATTRIBUTE_EXEC_NTRACE */ + +#if (SIMPLEATTRIBUTE_EXEC_NTRACE == 1) +# define SIMPLEATTRIBUTE_EXEC_TRACE(X) +#else /* (SIMPLEATTRIBUTE_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEATTRIBUTE_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEATTRIBUTE_EXEC_NTRACE == 1) */ + +#endif /* SIMPLEATTRIBUTE_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_stub_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_stub_export.h new file mode 100644 index 00000000000..00e32efd226 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_stub_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEATTRIBUTE_STUB +// ------------------------------ +#ifndef SIMPLEATTRIBUTE_STUB_EXPORT_H +#define SIMPLEATTRIBUTE_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEATTRIBUTE_STUB_HAS_DLL) +# define SIMPLEATTRIBUTE_STUB_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEATTRIBUTE_STUB_HAS_DLL */ + +#if !defined (SIMPLEATTRIBUTE_STUB_HAS_DLL) +# define SIMPLEATTRIBUTE_STUB_HAS_DLL 1 +#endif /* ! SIMPLEATTRIBUTE_STUB_HAS_DLL */ + +#if defined (SIMPLEATTRIBUTE_STUB_HAS_DLL) && (SIMPLEATTRIBUTE_STUB_HAS_DLL == 1) +# if defined (SIMPLEATTRIBUTE_STUB_BUILD_DLL) +# define SIMPLEATTRIBUTE_STUB_Export ACE_Proper_Export_Flag +# define SIMPLEATTRIBUTE_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEATTRIBUTE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEATTRIBUTE_STUB_BUILD_DLL */ +# define SIMPLEATTRIBUTE_STUB_Export ACE_Proper_Import_Flag +# define SIMPLEATTRIBUTE_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEATTRIBUTE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEATTRIBUTE_STUB_BUILD_DLL */ +#else /* SIMPLEATTRIBUTE_STUB_HAS_DLL == 1 */ +# define SIMPLEATTRIBUTE_STUB_Export +# define SIMPLEATTRIBUTE_STUB_SINGLETON_DECLARATION(T) +# define SIMPLEATTRIBUTE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEATTRIBUTE_STUB_HAS_DLL == 1 */ + +// Set SIMPLEATTRIBUTE_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEATTRIBUTE_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEATTRIBUTE_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEATTRIBUTE_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEATTRIBUTE_STUB_NTRACE */ + +#if (SIMPLEATTRIBUTE_STUB_NTRACE == 1) +# define SIMPLEATTRIBUTE_STUB_TRACE(X) +#else /* (SIMPLEATTRIBUTE_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEATTRIBUTE_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEATTRIBUTE_STUB_NTRACE == 1) */ + +#endif /* SIMPLEATTRIBUTE_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_svnt_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_svnt_export.h new file mode 100644 index 00000000000..6c1f3cf5a6f --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleAttribute_svnt_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEATTRIBUTE_SVNT +// ------------------------------ +#ifndef SIMPLEATTRIBUTE_SVNT_EXPORT_H +#define SIMPLEATTRIBUTE_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEATTRIBUTE_SVNT_HAS_DLL) +# define SIMPLEATTRIBUTE_SVNT_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEATTRIBUTE_SVNT_HAS_DLL */ + +#if !defined (SIMPLEATTRIBUTE_SVNT_HAS_DLL) +# define SIMPLEATTRIBUTE_SVNT_HAS_DLL 1 +#endif /* ! SIMPLEATTRIBUTE_SVNT_HAS_DLL */ + +#if defined (SIMPLEATTRIBUTE_SVNT_HAS_DLL) && (SIMPLEATTRIBUTE_SVNT_HAS_DLL == 1) +# if defined (SIMPLEATTRIBUTE_SVNT_BUILD_DLL) +# define SIMPLEATTRIBUTE_SVNT_Export ACE_Proper_Export_Flag +# define SIMPLEATTRIBUTE_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEATTRIBUTE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEATTRIBUTE_SVNT_BUILD_DLL */ +# define SIMPLEATTRIBUTE_SVNT_Export ACE_Proper_Import_Flag +# define SIMPLEATTRIBUTE_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEATTRIBUTE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEATTRIBUTE_SVNT_BUILD_DLL */ +#else /* SIMPLEATTRIBUTE_SVNT_HAS_DLL == 1 */ +# define SIMPLEATTRIBUTE_SVNT_Export +# define SIMPLEATTRIBUTE_SVNT_SINGLETON_DECLARATION(T) +# define SIMPLEATTRIBUTE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEATTRIBUTE_SVNT_HAS_DLL == 1 */ + +// Set SIMPLEATTRIBUTE_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEATTRIBUTE_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEATTRIBUTE_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEATTRIBUTE_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEATTRIBUTE_SVNT_NTRACE */ + +#if (SIMPLEATTRIBUTE_SVNT_NTRACE == 1) +# define SIMPLEATTRIBUTE_SVNT_TRACE(X) +#else /* (SIMPLEATTRIBUTE_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEATTRIBUTE_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEATTRIBUTE_SVNT_NTRACE == 1) */ + +#endif /* SIMPLEATTRIBUTE_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleCommon.idl b/CIAO/DAnCE/tests/CIAO/Components/SimpleCommon.idl new file mode 100644 index 00000000000..6f943e9d1d5 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleCommon.idl @@ -0,0 +1,21 @@ +// $Id$ + +#ifndef SIMPLE_COMMON_IDL +#define SIMPLE_COMMON_IDL + +#include "Components.idl" + +module Simple +{ + interface Trigger + { + void hello (in string hello); + }; + + eventtype Hello + { + public string hello_; + }; +}; + +#endif /*SIMPLE_COMMON_IDL*/ diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleCommon.mpc b/CIAO/DAnCE/tests/CIAO/Components/SimpleCommon.mpc new file mode 100644 index 00000000000..b1f86554639 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleCommon.mpc @@ -0,0 +1,67 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl SimpleCommon" + +project(SimpleCommon_idl_gen) : taoidldefaults, anytypecode { + avoids += ace_for_tao + custom_only = 1 + idlflags += -Wb,stub_export_macro=SIMPLECOMMON_STUB_Export \ + -Wb,stub_export_include=SimpleCommon_stub_export.h \ + -Wb,skel_export_macro=SIMPLECOMMON_SVNT_Export \ + -Wb,skel_export_include=SimpleCommon_svnt_export.h + + IDL_Files { + SimpleCommon.idl + } +} + +project(SimpleCommon_stub) : ccm_stub { + avoids += ace_for_tao + after += SimpleCommon_idl_gen + libs += + + sharedname = SimpleCommon_stub + dynamicflags = SIMPLECOMMON_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleCommonC.cpp + } + + Header_Files { + SimpleCommonC.h + SimpleCommon_stub_export.h + } + + Inline_Files { + SimpleCommonC.inl + } +} + +project(SimpleCommon_skel) : ccm_svnt { + avoids += ace_for_tao + after += SimpleCommon_stub + sharedname = SimpleCommon_skel + libs += SimpleCommon_stub + + dynamicflags = SIMPLECOMMON_SVNT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleCommonS.cpp + } + + Header_Files { + SimpleCommonS.h + SimpleCommon_svnt_export.h + } + + Inline_Files { + SimpleCommonS.inl + } +} + + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleCommon_stub_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleCommon_stub_export.h new file mode 100644 index 00000000000..79aac6677b7 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleCommon_stub_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLECOMMON_STUB +// ------------------------------ +#ifndef SIMPLECOMMON_STUB_EXPORT_H +#define SIMPLECOMMON_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLECOMMON_STUB_HAS_DLL) +# define SIMPLECOMMON_STUB_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLECOMMON_STUB_HAS_DLL */ + +#if !defined (SIMPLECOMMON_STUB_HAS_DLL) +# define SIMPLECOMMON_STUB_HAS_DLL 1 +#endif /* ! SIMPLECOMMON_STUB_HAS_DLL */ + +#if defined (SIMPLECOMMON_STUB_HAS_DLL) && (SIMPLECOMMON_STUB_HAS_DLL == 1) +# if defined (SIMPLECOMMON_STUB_BUILD_DLL) +# define SIMPLECOMMON_STUB_Export ACE_Proper_Export_Flag +# define SIMPLECOMMON_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLECOMMON_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLECOMMON_STUB_BUILD_DLL */ +# define SIMPLECOMMON_STUB_Export ACE_Proper_Import_Flag +# define SIMPLECOMMON_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLECOMMON_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLECOMMON_STUB_BUILD_DLL */ +#else /* SIMPLECOMMON_STUB_HAS_DLL == 1 */ +# define SIMPLECOMMON_STUB_Export +# define SIMPLECOMMON_STUB_SINGLETON_DECLARATION(T) +# define SIMPLECOMMON_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLECOMMON_STUB_HAS_DLL == 1 */ + +// Set SIMPLECOMMON_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLECOMMON_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLECOMMON_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLECOMMON_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLECOMMON_STUB_NTRACE */ + +#if (SIMPLECOMMON_STUB_NTRACE == 1) +# define SIMPLECOMMON_STUB_TRACE(X) +#else /* (SIMPLECOMMON_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLECOMMON_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLECOMMON_STUB_NTRACE == 1) */ + +#endif /* SIMPLECOMMON_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleCommon_svnt_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleCommon_svnt_export.h new file mode 100644 index 00000000000..0190bfeebab --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleCommon_svnt_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLECOMMON_SVNT +// ------------------------------ +#ifndef SIMPLECOMMON_SVNT_EXPORT_H +#define SIMPLECOMMON_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLECOMMON_SVNT_HAS_DLL) +# define SIMPLECOMMON_SVNT_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLECOMMON_SVNT_HAS_DLL */ + +#if !defined (SIMPLECOMMON_SVNT_HAS_DLL) +# define SIMPLECOMMON_SVNT_HAS_DLL 1 +#endif /* ! SIMPLECOMMON_SVNT_HAS_DLL */ + +#if defined (SIMPLECOMMON_SVNT_HAS_DLL) && (SIMPLECOMMON_SVNT_HAS_DLL == 1) +# if defined (SIMPLECOMMON_SVNT_BUILD_DLL) +# define SIMPLECOMMON_SVNT_Export ACE_Proper_Export_Flag +# define SIMPLECOMMON_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLECOMMON_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLECOMMON_SVNT_BUILD_DLL */ +# define SIMPLECOMMON_SVNT_Export ACE_Proper_Import_Flag +# define SIMPLECOMMON_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLECOMMON_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLECOMMON_SVNT_BUILD_DLL */ +#else /* SIMPLECOMMON_SVNT_HAS_DLL == 1 */ +# define SIMPLECOMMON_SVNT_Export +# define SIMPLECOMMON_SVNT_SINGLETON_DECLARATION(T) +# define SIMPLECOMMON_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLECOMMON_SVNT_HAS_DLL == 1 */ + +// Set SIMPLECOMMON_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLECOMMON_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLECOMMON_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLECOMMON_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLECOMMON_SVNT_NTRACE */ + +#if (SIMPLECOMMON_SVNT_NTRACE == 1) +# define SIMPLECOMMON_SVNT_TRACE(X) +#else /* (SIMPLECOMMON_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLECOMMON_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLECOMMON_SVNT_NTRACE == 1) */ + +#endif /* SIMPLECOMMON_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer.cidl b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer.cidl new file mode 100644 index 00000000000..ff5081f82dd --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer.cidl @@ -0,0 +1,11 @@ +// $Id$ +#include "SimpleConsumer.idl" + +composition session SimpleConsumer_Impl +{ + home executor SimpleConsumerHome_Exec + { + implements Simple::SimpleConsumerHome; + manages SimpleConsumer_Exec; + }; +}; diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer.idl b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer.idl new file mode 100644 index 00000000000..3895eacda3c --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer.idl @@ -0,0 +1,21 @@ +// $Id$ + +#ifndef SIMPLE_CONSUMER_IDL +#define SIMPLE_CONSUMER_IDL + +#include "SimpleCommon.idl" +#include <Components.idl> + +module Simple +{ + component SimpleConsumer + { + consumes Hello hello_; + }; + + home SimpleConsumerHome manages SimpleConsumer + { + }; +}; + +#endif /*SIMPLE_CONSUMER_IDL*/ diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer.mpc b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer.mpc new file mode 100644 index 00000000000..bece676d798 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer.mpc @@ -0,0 +1,121 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p SimpleCommon SimpleConsumer" + +project(SimpleCommon_SimpleConsumer_idl_gen) : taoidldefaults, anytypecode { + avoids += ace_for_tao + custom_only = 1 + idlflags += -Wb,stub_export_macro=SIMPLECONSUMER_STUB_Export \ + -Wb,stub_export_include=SimpleConsumer_stub_export.h \ + -Wb,skel_export_macro=SIMPLECONSUMER_SVNT_Export \ + -Wb,skel_export_include=SimpleConsumer_svnt_export.h + + IDL_Files { + SimpleConsumer.idl + } +} + +project(SimpleCommon_SimpleConsumer_cidl_gen) : ciaocidldefaults, taoidldefaults { + avoids += ace_for_tao + custom_only = 1 + cidlflags += --svnt-export-macro SIMPLECONSUMER_SVNT_Export \ + --svnt-export-include SimpleConsumer_svnt_export.h + idlflags += -Wb,export_macro=SIMPLECONSUMER_EXEC_Export \ + -Wb,export_include=SimpleConsumer_exec_export.h \ + -SS + + CIDL_Files { + SimpleConsumer.cidl + } + + IDL_Files { + SimpleConsumerE.idl + } +} + +project(SimpleCommon_SimpleConsumer_stub) : ccm_stub { + avoids += ace_for_tao + after += SimpleCommon_SimpleConsumer_idl_gen SimpleCommon_stub + libs += SimpleCommon_stub + + sharedname = SimpleConsumer_stub + dynamicflags = SIMPLECONSUMER_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleConsumerC.cpp + } + + Header_Files { + SimpleConsumerC.h + SimpleConsumer_stub_export.h + } + + Inline_Files { + SimpleConsumerC.inl + } +} + +project(SimpleCommon_SimpleConsumer_exec) : ciao_executor { + avoids += ace_for_tao + after += SimpleCommon_SimpleConsumer_cidl_gen SimpleCommon_SimpleConsumer_stub + sharedname = SimpleConsumer_exec + libs += SimpleConsumer_stub SimpleCommon_stub + + dynamicflags = SIMPLECONSUMER_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleConsumerEC.cpp + SimpleConsumer_exec.cpp + } + + Header_Files { + SimpleConsumerEC.h + SimpleConsumer_exec.h + SimpleConsumer_exec_export.h + } + + Inline_Files { + SimpleConsumerEC.inl + } +} + + +project(SimpleCommon_SimpleConsumer_svnt) : ciao_servant { + avoids += ace_for_tao + after += SimpleCommon_skel SimpleCommon_SimpleConsumer_exec + sharedname = SimpleConsumer_svnt + libs += SimpleConsumer_exec \ + SimpleConsumer_stub \ + SimpleCommon_skel \ + SimpleCommon_stub + + dynamicflags = SIMPLECONSUMER_SVNT_BUILD_DLL + + CIDL_Files { + } + + IDL_Files { + } + + Source_Files { + SimpleConsumerS.cpp + SimpleConsumer_svnt.cpp + } + + Header_Files { + SimpleConsumerS.h + SimpleConsumer_svnt.h + SimpleConsumer_svnt_export.h + } + + Inline_Files { + SimpleConsumerS.inl + } +} + + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_exec.cpp b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_exec.cpp new file mode 100644 index 00000000000..a5d6d4e7b24 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_exec.cpp @@ -0,0 +1,158 @@ +// $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 "SimpleConsumer_exec.h" +#include "ciao/CIAO_common.h" + +namespace CIDL_SimpleConsumer_Impl +{ + //================================================================== + // Component Executor Implementation Class: SimpleConsumer_exec_i + //================================================================== + + SimpleConsumer_exec_i::SimpleConsumer_exec_i (void) + { + CIAO_TRACE ("SimpleConsumer_exec_i::SimpleConsumer_exec_i (void)"); + } + + SimpleConsumer_exec_i::~SimpleConsumer_exec_i (void) + { + CIAO_TRACE ("SimpleConsumer_exec_i::~SimpleConsumer_exec_i (void)"); + } + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + void + SimpleConsumer_exec_i::push_hello_ ( + ::Simple::Hello * ev ) + { + CIAO_TRACE ("SimpleConsumer_exec_i::push_hello_ ()"); + // Your code here. + + ::Simple::Hello_var hello (ev); + + CIAO_DEBUG ((LM_EMERGENCY, CLINFO "SimpleConsumer_exec_i::push_hello_ - " + "Received hell event, value is %s\n", ev->hello_ ())); + } + + // Operations from Components::SessionComponent + + void + SimpleConsumer_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + CIAO_TRACE ("SimpleConsumer_exec_i::set_session_context ()"); + + this->context_ = + ::Simple::CCM_SimpleConsumer_Context::_narrow (ctx); + + if (CORBA::is_nil (this->context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + SimpleConsumer_exec_i::configuration_complete () + { + CIAO_TRACE ("SimpleConsumer_exec_i::configuration_complete ()"); + // Your code here. + } + + void + SimpleConsumer_exec_i::ccm_activate () + { + CIAO_TRACE ("SimpleConsumer_exec_i::ccm_activate ()"); + // Your code here. + } + + void + SimpleConsumer_exec_i::ccm_passivate () + { + CIAO_TRACE ("SimpleConsumer_exec_i::ccm_passivate ()"); + // Your code here. + } + + void + SimpleConsumer_exec_i::ccm_remove () + { + CIAO_TRACE ("SimpleConsumer_exec_i::ccm_remove ()"); + // Your code here. + } + + //================================================================== + // Home Executor Implementation Class: SimpleConsumerHome_exec_i + //================================================================== + + SimpleConsumerHome_exec_i::SimpleConsumerHome_exec_i (void) + { + CIAO_TRACE ("SimpleConsumerHome_exec_i::SimpleConsumerHome_exec_i (void)"); + } + + SimpleConsumerHome_exec_i::~SimpleConsumerHome_exec_i (void) + { + CIAO_TRACE ("SimpleConsumerHome_exec_i::~SimpleConsumerHome_exec_i (void)"); + } + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + SimpleConsumerHome_exec_i::create () + { + CIAO_TRACE ("SimpleConsumerHome_exec_i::create ()"); + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX ( + retval, + SimpleConsumer_exec_i, + ::CORBA::NO_MEMORY ()); + + return retval; + } + + extern "C" SIMPLECONSUMER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleConsumerHome_Impl (void) + { + CIAO_TRACE ("create_Simple_SimpleConsumerHome_Impl (void)"); + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN ( + retval, + SimpleConsumerHome_exec_i, + ::Components::HomeExecutorBase::_nil ()); + + return retval; + } +} + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_exec.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_exec.h new file mode 100644 index 00000000000..e4b9607bb45 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_exec.h @@ -0,0 +1,102 @@ +// $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_SIMPLECONSUMER_EXEC_H +#define CIAO_SIMPLECONSUMER_EXEC_H + +#include /**/ "ace/pre.h" + +#include "SimpleConsumerEC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "SimpleConsumer_exec_export.h" +#include "tao/LocalObject.h" + +namespace CIDL_SimpleConsumer_Impl +{ + class SIMPLECONSUMER_EXEC_Export SimpleConsumer_exec_i + : public virtual SimpleConsumer_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleConsumer_exec_i (void); + virtual ~SimpleConsumer_exec_i (void); + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + virtual void + push_hello_ ( + ::Simple::Hello *ev); + + // Operations from Components::SessionComponent + + virtual void + set_session_context ( + ::Components::SessionContext_ptr ctx); + + virtual void configuration_complete (); + + virtual void ccm_activate (); + + virtual void ccm_passivate (); + + virtual void ccm_remove (); + + private: + ::Simple::CCM_SimpleConsumer_Context_var context_; + }; + + class SIMPLECONSUMER_EXEC_Export SimpleConsumerHome_exec_i + : public virtual SimpleConsumerHome_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleConsumerHome_exec_i (void); + virtual ~SimpleConsumerHome_exec_i (void); + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + virtual ::Components::EnterpriseComponent_ptr + create (); + }; + + extern "C" SIMPLECONSUMER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleConsumerHome_Impl (void); +} + +#include /**/ "ace/post.h" + +#endif /* CIAO_SIMPLECONSUMER_EXEC_H */ + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_exec_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_exec_export.h new file mode 100644 index 00000000000..a8074c4c81f --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_exec_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLECONSUMER_EXEC +// ------------------------------ +#ifndef SIMPLECONSUMER_EXEC_EXPORT_H +#define SIMPLECONSUMER_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLECONSUMER_EXEC_HAS_DLL) +# define SIMPLECONSUMER_EXEC_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLECONSUMER_EXEC_HAS_DLL */ + +#if !defined (SIMPLECONSUMER_EXEC_HAS_DLL) +# define SIMPLECONSUMER_EXEC_HAS_DLL 1 +#endif /* ! SIMPLECONSUMER_EXEC_HAS_DLL */ + +#if defined (SIMPLECONSUMER_EXEC_HAS_DLL) && (SIMPLECONSUMER_EXEC_HAS_DLL == 1) +# if defined (SIMPLECONSUMER_EXEC_BUILD_DLL) +# define SIMPLECONSUMER_EXEC_Export ACE_Proper_Export_Flag +# define SIMPLECONSUMER_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLECONSUMER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLECONSUMER_EXEC_BUILD_DLL */ +# define SIMPLECONSUMER_EXEC_Export ACE_Proper_Import_Flag +# define SIMPLECONSUMER_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLECONSUMER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLECONSUMER_EXEC_BUILD_DLL */ +#else /* SIMPLECONSUMER_EXEC_HAS_DLL == 1 */ +# define SIMPLECONSUMER_EXEC_Export +# define SIMPLECONSUMER_EXEC_SINGLETON_DECLARATION(T) +# define SIMPLECONSUMER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLECONSUMER_EXEC_HAS_DLL == 1 */ + +// Set SIMPLECONSUMER_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLECONSUMER_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLECONSUMER_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLECONSUMER_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLECONSUMER_EXEC_NTRACE */ + +#if (SIMPLECONSUMER_EXEC_NTRACE == 1) +# define SIMPLECONSUMER_EXEC_TRACE(X) +#else /* (SIMPLECONSUMER_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLECONSUMER_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLECONSUMER_EXEC_NTRACE == 1) */ + +#endif /* SIMPLECONSUMER_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_stub_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_stub_export.h new file mode 100644 index 00000000000..89e5e37b32e --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_stub_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLECONSUMER_STUB +// ------------------------------ +#ifndef SIMPLECONSUMER_STUB_EXPORT_H +#define SIMPLECONSUMER_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLECONSUMER_STUB_HAS_DLL) +# define SIMPLECONSUMER_STUB_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLECONSUMER_STUB_HAS_DLL */ + +#if !defined (SIMPLECONSUMER_STUB_HAS_DLL) +# define SIMPLECONSUMER_STUB_HAS_DLL 1 +#endif /* ! SIMPLECONSUMER_STUB_HAS_DLL */ + +#if defined (SIMPLECONSUMER_STUB_HAS_DLL) && (SIMPLECONSUMER_STUB_HAS_DLL == 1) +# if defined (SIMPLECONSUMER_STUB_BUILD_DLL) +# define SIMPLECONSUMER_STUB_Export ACE_Proper_Export_Flag +# define SIMPLECONSUMER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLECONSUMER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLECONSUMER_STUB_BUILD_DLL */ +# define SIMPLECONSUMER_STUB_Export ACE_Proper_Import_Flag +# define SIMPLECONSUMER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLECONSUMER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLECONSUMER_STUB_BUILD_DLL */ +#else /* SIMPLECONSUMER_STUB_HAS_DLL == 1 */ +# define SIMPLECONSUMER_STUB_Export +# define SIMPLECONSUMER_STUB_SINGLETON_DECLARATION(T) +# define SIMPLECONSUMER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLECONSUMER_STUB_HAS_DLL == 1 */ + +// Set SIMPLECONSUMER_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLECONSUMER_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLECONSUMER_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLECONSUMER_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLECONSUMER_STUB_NTRACE */ + +#if (SIMPLECONSUMER_STUB_NTRACE == 1) +# define SIMPLECONSUMER_STUB_TRACE(X) +#else /* (SIMPLECONSUMER_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLECONSUMER_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLECONSUMER_STUB_NTRACE == 1) */ + +#endif /* SIMPLECONSUMER_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_svnt_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_svnt_export.h new file mode 100644 index 00000000000..eab50bcfd0a --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleConsumer_svnt_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLECONSUMER_SVNT +// ------------------------------ +#ifndef SIMPLECONSUMER_SVNT_EXPORT_H +#define SIMPLECONSUMER_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLECONSUMER_SVNT_HAS_DLL) +# define SIMPLECONSUMER_SVNT_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLECONSUMER_SVNT_HAS_DLL */ + +#if !defined (SIMPLECONSUMER_SVNT_HAS_DLL) +# define SIMPLECONSUMER_SVNT_HAS_DLL 1 +#endif /* ! SIMPLECONSUMER_SVNT_HAS_DLL */ + +#if defined (SIMPLECONSUMER_SVNT_HAS_DLL) && (SIMPLECONSUMER_SVNT_HAS_DLL == 1) +# if defined (SIMPLECONSUMER_SVNT_BUILD_DLL) +# define SIMPLECONSUMER_SVNT_Export ACE_Proper_Export_Flag +# define SIMPLECONSUMER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLECONSUMER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLECONSUMER_SVNT_BUILD_DLL */ +# define SIMPLECONSUMER_SVNT_Export ACE_Proper_Import_Flag +# define SIMPLECONSUMER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLECONSUMER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLECONSUMER_SVNT_BUILD_DLL */ +#else /* SIMPLECONSUMER_SVNT_HAS_DLL == 1 */ +# define SIMPLECONSUMER_SVNT_Export +# define SIMPLECONSUMER_SVNT_SINGLETON_DECLARATION(T) +# define SIMPLECONSUMER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLECONSUMER_SVNT_HAS_DLL == 1 */ + +// Set SIMPLECONSUMER_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLECONSUMER_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLECONSUMER_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLECONSUMER_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLECONSUMER_SVNT_NTRACE */ + +#if (SIMPLECONSUMER_SVNT_NTRACE == 1) +# define SIMPLECONSUMER_SVNT_TRACE(X) +#else /* (SIMPLECONSUMER_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLECONSUMER_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLECONSUMER_SVNT_NTRACE == 1) */ + +#endif /* SIMPLECONSUMER_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter.cidl b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter.cidl new file mode 100644 index 00000000000..9de9153b267 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter.cidl @@ -0,0 +1,11 @@ +// $Id$ +#include "SimpleEmitter.idl" + +composition session SimpleEmitter_Impl +{ + home executor SimpleEmitterHome_Exec + { + implements Simple::SimpleEmitterHome; + manages SimpleEmitter_Exec; + }; +}; diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter.idl b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter.idl new file mode 100644 index 00000000000..37431ca8134 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter.idl @@ -0,0 +1,21 @@ +// $Id$ + +#ifndef SIMPLE_EMITTER_IDL +#define SIMPLE_EMITTER_IDL + +#include "SimpleCommon.idl" +#include "Components.idl" + +module Simple +{ + component SimpleEmitter + { + emits Hello hello; + }; + + home SimpleEmitterHome manages SimpleEmitter + { + }; +}; + +#endif /*SIMPLE_EMITTER_IDL*/ diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter.mpc b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter.mpc new file mode 100644 index 00000000000..6a68a0a5376 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter.mpc @@ -0,0 +1,121 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p SimpleCommon SimpleEmitter" + +project(SimpleCommon_SimpleEmitter_idl_gen) : taoidldefaults, anytypecode { + avoids += ace_for_tao + custom_only = 1 + idlflags += -Wb,stub_export_macro=SIMPLEEMITTER_STUB_Export \ + -Wb,stub_export_include=SimpleEmitter_stub_export.h \ + -Wb,skel_export_macro=SIMPLEEMITTER_SVNT_Export \ + -Wb,skel_export_include=SimpleEmitter_svnt_export.h + + IDL_Files { + SimpleEmitter.idl + } +} + +project(SimpleCommon_SimpleEmitter_cidl_gen) : ciaocidldefaults, taoidldefaults { + avoids += ace_for_tao + custom_only = 1 + cidlflags += --svnt-export-macro SIMPLEEMITTER_SVNT_Export \ + --svnt-export-include SimpleEmitter_svnt_export.h + idlflags += -Wb,export_macro=SIMPLEEMITTER_EXEC_Export \ + -Wb,export_include=SimpleEmitter_exec_export.h \ + -SS + + CIDL_Files { + SimpleEmitter.cidl + } + + IDL_Files { + SimpleEmitterE.idl + } +} + +project(SimpleCommon_SimpleEmitter_stub) : ccm_stub { + avoids += ace_for_tao + after += SimpleCommon_SimpleEmitter_idl_gen SimpleCommon_stub + libs += SimpleCommon_stub + + sharedname = SimpleEmitter_stub + dynamicflags = SIMPLEEMITTER_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleEmitterC.cpp + } + + Header_Files { + SimpleEmitterC.h + SimpleEmitter_stub_export.h + } + + Inline_Files { + SimpleEmitterC.inl + } +} + +project(SimpleCommon_SimpleEmitter_exec) : ciao_executor { + avoids += ace_for_tao + after += SimpleCommon_SimpleEmitter_cidl_gen SimpleCommon_SimpleEmitter_stub + sharedname = SimpleEmitter_exec + libs += SimpleEmitter_stub SimpleCommon_stub + + dynamicflags = SIMPLEEMITTER_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleEmitterEC.cpp + SimpleEmitter_exec.cpp + } + + Header_Files { + SimpleEmitterEC.h + SimpleEmitter_exec.h + SimpleEmitter_exec_export.h + } + + Inline_Files { + SimpleEmitterEC.inl + } +} + + +project(SimpleCommon_SimpleEmitter_svnt) : ciao_servant { + avoids += ace_for_tao + after += SimpleCommon_skel SimpleCommon_SimpleEmitter_exec + sharedname = SimpleEmitter_svnt + libs += SimpleEmitter_exec \ + SimpleEmitter_stub \ + SimpleCommon_skel \ + SimpleCommon_stub + + dynamicflags = SIMPLEEMITTER_SVNT_BUILD_DLL + + CIDL_Files { + } + + IDL_Files { + } + + Source_Files { + SimpleEmitterS.cpp + SimpleEmitter_svnt.cpp + } + + Header_Files { + SimpleEmitterS.h + SimpleEmitter_svnt.h + SimpleEmitter_svnt_export.h + } + + Inline_Files { + SimpleEmitterS.inl + } +} + + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_exec.cpp b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_exec.cpp new file mode 100644 index 00000000000..99a3d01f161 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_exec.cpp @@ -0,0 +1,149 @@ +// $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 "SimpleEmitter_exec.h" +#include "ciao/CIAO_common.h" + +namespace CIDL_SimpleEmitter_Impl +{ + //================================================================== + // Component Executor Implementation Class: SimpleEmitter_exec_i + //================================================================== + + SimpleEmitter_exec_i::SimpleEmitter_exec_i (void) + { + CIAO_TRACE ("SimpleEmitter_exec_i::SimpleEmitter_exec_i (void)"); + } + + SimpleEmitter_exec_i::~SimpleEmitter_exec_i (void) + { + CIAO_TRACE ("SimpleEmitter_exec_i::~SimpleEmitter_exec_i (void)"); + } + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + // Operations from Components::SessionComponent + + void + SimpleEmitter_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + CIAO_TRACE ("SimpleEmitter_exec_i::set_session_context ()"); + this->context_ = + ::Simple::CCM_SimpleEmitter_Context::_narrow (ctx); + + if (CORBA::is_nil (this->context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + SimpleEmitter_exec_i::configuration_complete () + { + CIAO_TRACE ("SimpleEmitter_exec_i::configuration_complete ()"); + // Your code here. + } + + void + SimpleEmitter_exec_i::ccm_activate () + { + CIAO_TRACE ("SimpleEmitter_exec_i::ccm_activate ()"); + // Your code here. + + ::Simple::Hello_var hello = new OBV_Simple::Hello ("Test successful, hello from SimpleEmitter_exec_i"); + + this->context_->push_hello (hello._retn ()); + } + + void + SimpleEmitter_exec_i::ccm_passivate () + { + CIAO_TRACE ("SimpleEmitter_exec_i::ccm_passivate ()"); + // Your code here. + } + + void + SimpleEmitter_exec_i::ccm_remove () + { + CIAO_TRACE ("SimpleEmitter_exec_i::ccm_remove ()"); + // Your code here. + } + + //================================================================== + // Home Executor Implementation Class: SimpleEmitterHome_exec_i + //================================================================== + + SimpleEmitterHome_exec_i::SimpleEmitterHome_exec_i (void) + { + CIAO_TRACE ("SimpleEmitterHome_exec_i::SimpleEmitterHome_exec_i (void)"); + } + + SimpleEmitterHome_exec_i::~SimpleEmitterHome_exec_i (void) + { + CIAO_TRACE ("SimpleEmitterHome_exec_i::~SimpleEmitterHome_exec_i (void)"); + } + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + SimpleEmitterHome_exec_i::create () + { + CIAO_TRACE ("SimpleEmitterHome_exec_i::create ()"); + + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX ( + retval, + SimpleEmitter_exec_i, + ::CORBA::NO_MEMORY ()); + + return retval; + } + + extern "C" SIMPLEEMITTER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleEmitterHome_Impl (void) + { + CIAO_TRACE ("create_Simple_SimpleEmitterHome_Impl (void)"); + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN ( + retval, + SimpleEmitterHome_exec_i, + ::Components::HomeExecutorBase::_nil ()); + + return retval; + } +} + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_exec.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_exec.h new file mode 100644 index 00000000000..a5008a85ea5 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_exec.h @@ -0,0 +1,98 @@ +// $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_SIMPLEEMITTER_EXEC_H +#define CIAO_SIMPLEEMITTER_EXEC_H + +#include /**/ "ace/pre.h" + +#include "SimpleEmitterEC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "SimpleEmitter_exec_export.h" +#include "tao/LocalObject.h" + +namespace CIDL_SimpleEmitter_Impl +{ + class SIMPLEEMITTER_EXEC_Export SimpleEmitter_exec_i + : public virtual SimpleEmitter_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleEmitter_exec_i (void); + virtual ~SimpleEmitter_exec_i (void); + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + // Operations from Components::SessionComponent + + virtual void + set_session_context ( + ::Components::SessionContext_ptr ctx); + + virtual void configuration_complete (); + + virtual void ccm_activate (); + + virtual void ccm_passivate (); + + virtual void ccm_remove (); + + private: + ::Simple::CCM_SimpleEmitter_Context_var context_; + }; + + class SIMPLEEMITTER_EXEC_Export SimpleEmitterHome_exec_i + : public virtual SimpleEmitterHome_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleEmitterHome_exec_i (void); + virtual ~SimpleEmitterHome_exec_i (void); + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + virtual ::Components::EnterpriseComponent_ptr + create (); + }; + + extern "C" SIMPLEEMITTER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleEmitterHome_Impl (void); +} + +#include /**/ "ace/post.h" + +#endif /* CIAO_SIMPLEEMITTER_EXEC_H */ + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_exec_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_exec_export.h new file mode 100644 index 00000000000..53fef48b799 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_exec_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEEMITTER_EXEC +// ------------------------------ +#ifndef SIMPLEEMITTER_EXEC_EXPORT_H +#define SIMPLEEMITTER_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEEMITTER_EXEC_HAS_DLL) +# define SIMPLEEMITTER_EXEC_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEEMITTER_EXEC_HAS_DLL */ + +#if !defined (SIMPLEEMITTER_EXEC_HAS_DLL) +# define SIMPLEEMITTER_EXEC_HAS_DLL 1 +#endif /* ! SIMPLEEMITTER_EXEC_HAS_DLL */ + +#if defined (SIMPLEEMITTER_EXEC_HAS_DLL) && (SIMPLEEMITTER_EXEC_HAS_DLL == 1) +# if defined (SIMPLEEMITTER_EXEC_BUILD_DLL) +# define SIMPLEEMITTER_EXEC_Export ACE_Proper_Export_Flag +# define SIMPLEEMITTER_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEEMITTER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEEMITTER_EXEC_BUILD_DLL */ +# define SIMPLEEMITTER_EXEC_Export ACE_Proper_Import_Flag +# define SIMPLEEMITTER_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEEMITTER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEEMITTER_EXEC_BUILD_DLL */ +#else /* SIMPLEEMITTER_EXEC_HAS_DLL == 1 */ +# define SIMPLEEMITTER_EXEC_Export +# define SIMPLEEMITTER_EXEC_SINGLETON_DECLARATION(T) +# define SIMPLEEMITTER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEEMITTER_EXEC_HAS_DLL == 1 */ + +// Set SIMPLEEMITTER_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEEMITTER_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEEMITTER_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEEMITTER_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEEMITTER_EXEC_NTRACE */ + +#if (SIMPLEEMITTER_EXEC_NTRACE == 1) +# define SIMPLEEMITTER_EXEC_TRACE(X) +#else /* (SIMPLEEMITTER_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEEMITTER_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEEMITTER_EXEC_NTRACE == 1) */ + +#endif /* SIMPLEEMITTER_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_stub_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_stub_export.h new file mode 100644 index 00000000000..797140271a4 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_stub_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEEMITTER_STUB +// ------------------------------ +#ifndef SIMPLEEMITTER_STUB_EXPORT_H +#define SIMPLEEMITTER_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEEMITTER_STUB_HAS_DLL) +# define SIMPLEEMITTER_STUB_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEEMITTER_STUB_HAS_DLL */ + +#if !defined (SIMPLEEMITTER_STUB_HAS_DLL) +# define SIMPLEEMITTER_STUB_HAS_DLL 1 +#endif /* ! SIMPLEEMITTER_STUB_HAS_DLL */ + +#if defined (SIMPLEEMITTER_STUB_HAS_DLL) && (SIMPLEEMITTER_STUB_HAS_DLL == 1) +# if defined (SIMPLEEMITTER_STUB_BUILD_DLL) +# define SIMPLEEMITTER_STUB_Export ACE_Proper_Export_Flag +# define SIMPLEEMITTER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEEMITTER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEEMITTER_STUB_BUILD_DLL */ +# define SIMPLEEMITTER_STUB_Export ACE_Proper_Import_Flag +# define SIMPLEEMITTER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEEMITTER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEEMITTER_STUB_BUILD_DLL */ +#else /* SIMPLEEMITTER_STUB_HAS_DLL == 1 */ +# define SIMPLEEMITTER_STUB_Export +# define SIMPLEEMITTER_STUB_SINGLETON_DECLARATION(T) +# define SIMPLEEMITTER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEEMITTER_STUB_HAS_DLL == 1 */ + +// Set SIMPLEEMITTER_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEEMITTER_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEEMITTER_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEEMITTER_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEEMITTER_STUB_NTRACE */ + +#if (SIMPLEEMITTER_STUB_NTRACE == 1) +# define SIMPLEEMITTER_STUB_TRACE(X) +#else /* (SIMPLEEMITTER_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEEMITTER_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEEMITTER_STUB_NTRACE == 1) */ + +#endif /* SIMPLEEMITTER_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_svnt_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_svnt_export.h new file mode 100644 index 00000000000..0fdc781a895 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleEmitter_svnt_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEEMITTER_SVNT +// ------------------------------ +#ifndef SIMPLEEMITTER_SVNT_EXPORT_H +#define SIMPLEEMITTER_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEEMITTER_SVNT_HAS_DLL) +# define SIMPLEEMITTER_SVNT_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEEMITTER_SVNT_HAS_DLL */ + +#if !defined (SIMPLEEMITTER_SVNT_HAS_DLL) +# define SIMPLEEMITTER_SVNT_HAS_DLL 1 +#endif /* ! SIMPLEEMITTER_SVNT_HAS_DLL */ + +#if defined (SIMPLEEMITTER_SVNT_HAS_DLL) && (SIMPLEEMITTER_SVNT_HAS_DLL == 1) +# if defined (SIMPLEEMITTER_SVNT_BUILD_DLL) +# define SIMPLEEMITTER_SVNT_Export ACE_Proper_Export_Flag +# define SIMPLEEMITTER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEEMITTER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEEMITTER_SVNT_BUILD_DLL */ +# define SIMPLEEMITTER_SVNT_Export ACE_Proper_Import_Flag +# define SIMPLEEMITTER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEEMITTER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEEMITTER_SVNT_BUILD_DLL */ +#else /* SIMPLEEMITTER_SVNT_HAS_DLL == 1 */ +# define SIMPLEEMITTER_SVNT_Export +# define SIMPLEEMITTER_SVNT_SINGLETON_DECLARATION(T) +# define SIMPLEEMITTER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEEMITTER_SVNT_HAS_DLL == 1 */ + +// Set SIMPLEEMITTER_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEEMITTER_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEEMITTER_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEEMITTER_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEEMITTER_SVNT_NTRACE */ + +#if (SIMPLEEMITTER_SVNT_NTRACE == 1) +# define SIMPLEEMITTER_SVNT_TRACE(X) +#else /* (SIMPLEEMITTER_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEEMITTER_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEEMITTER_SVNT_NTRACE == 1) */ + +#endif /* SIMPLEEMITTER_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser.cidl b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser.cidl new file mode 100644 index 00000000000..638efe0cb30 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser.cidl @@ -0,0 +1,11 @@ +// $Id$ +#include "SimpleMultipleUser.idl" + +composition session SimpleMultipleUser_Impl +{ + home executor SimpleMultipleUserHome_Exec + { + implements Simple::SimpleMultipleUserHome; + manages SimpleMultipleUser_Exec; + }; +}; diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser.idl b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser.idl new file mode 100644 index 00000000000..60aec58f9af --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser.idl @@ -0,0 +1,21 @@ +// $Id$ + +#ifndef SIMPLE_MULTIPLEUSER_IDL +#define SIMPLE_MULTIPLEUSER_IDL + +#include "SimpleCommon.idl" +#include "Components.idl" + +module Simple +{ + component SimpleMultipleUser + { + uses multiple Trigger trig; + }; + + home SimpleMultipleUserHome manages SimpleMultipleUser + { + }; +}; + +#endif /*SIMPLE_MULTIPLEUSER_IDL*/ diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser.mpc b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser.mpc new file mode 100644 index 00000000000..841ba3c2c99 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser.mpc @@ -0,0 +1,121 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p SimpleCommon SimpleMultipleUser" + +project(SimpleCommon_SimpleMultipleUser_idl_gen) : taoidldefaults, anytypecode { + avoids += ace_for_tao + custom_only = 1 + idlflags += -Wb,stub_export_macro=SIMPLEMULTIPLEUSER_STUB_Export \ + -Wb,stub_export_include=SimpleMultipleUser_stub_export.h \ + -Wb,skel_export_macro=SIMPLEMULTIPLEUSER_SVNT_Export \ + -Wb,skel_export_include=SimpleMultipleUser_svnt_export.h + + IDL_Files { + SimpleMultipleUser.idl + } +} + +project(SimpleCommon_SimpleMultipleUser_cidl_gen) : ciaocidldefaults, taoidldefaults { + avoids += ace_for_tao + custom_only = 1 + cidlflags += --svnt-export-macro SIMPLEMULTIPLEUSER_SVNT_Export \ + --svnt-export-include SimpleMultipleUser_svnt_export.h + idlflags += -Wb,export_macro=SIMPLEMULTIPLEUSER_EXEC_Export \ + -Wb,export_include=SimpleMultipleUser_exec_export.h \ + -SS + + CIDL_Files { + SimpleMultipleUser.cidl + } + + IDL_Files { + SimpleMultipleUserE.idl + } +} + +project(SimpleCommon_SimpleMultipleUser_stub) : ccm_stub { + avoids += ace_for_tao + after += SimpleCommon_SimpleMultipleUser_idl_gen SimpleCommon_stub + libs += SimpleCommon_stub + + sharedname = SimpleMultipleUser_stub + dynamicflags = SIMPLEMULTIPLEUSER_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleMultipleUserC.cpp + } + + Header_Files { + SimpleMultipleUserC.h + SimpleMultipleUser_stub_export.h + } + + Inline_Files { + SimpleMultipleUserC.inl + } +} + +project(SimpleCommon_SimpleMultipleUser_exec) : ciao_executor { + avoids += ace_for_tao + after += SimpleCommon_SimpleMultipleUser_cidl_gen SimpleCommon_SimpleMultipleUser_stub + sharedname = SimpleMultipleUser_exec + libs += SimpleMultipleUser_stub SimpleCommon_stub + + dynamicflags = SIMPLEMULTIPLEUSER_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleMultipleUserEC.cpp + SimpleMultipleUser_exec.cpp + } + + Header_Files { + SimpleMultipleUserEC.h + SimpleMultipleUser_exec.h + SimpleMultipleUser_exec_export.h + } + + Inline_Files { + SimpleMultipleUserEC.inl + } +} + + +project(SimpleCommon_SimpleMultipleUser_svnt) : ciao_servant { + avoids += ace_for_tao + after += SimpleCommon_skel SimpleCommon_SimpleMultipleUser_exec + sharedname = SimpleMultipleUser_svnt + libs += SimpleMultipleUser_exec \ + SimpleMultipleUser_stub \ + SimpleCommon_skel \ + SimpleCommon_stub + + dynamicflags = SIMPLEMULTIPLEUSER_SVNT_BUILD_DLL + + CIDL_Files { + } + + IDL_Files { + } + + Source_Files { + SimpleMultipleUserS.cpp + SimpleMultipleUser_svnt.cpp + } + + Header_Files { + SimpleMultipleUserS.h + SimpleMultipleUser_svnt.h + SimpleMultipleUser_svnt_export.h + } + + Inline_Files { + SimpleMultipleUserS.inl + } +} + + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_exec.cpp b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_exec.cpp new file mode 100644 index 00000000000..9fedb6b4bff --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_exec.cpp @@ -0,0 +1,176 @@ +// $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 "SimpleMultipleUser_exec.h" +#include "ciao/CIAO_common.h" + +namespace CIDL_SimpleMultipleUser_Impl +{ + //================================================================== + // Component Executor Implementation Class: SimpleMultipleUser_exec_i + //================================================================== + + SimpleMultipleUser_exec_i::SimpleMultipleUser_exec_i (void) + { + CIAO_TRACE ("SimpleMultipleUser_exec_i::SimpleMultipleUser_exec_i (void)"); + } + + SimpleMultipleUser_exec_i::~SimpleMultipleUser_exec_i (void) + { + CIAO_TRACE ("SimpleMultipleUser_exec_i::~SimpleMultipleUser_exec_i (void)"); + } + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + // Operations from Components::SessionComponent + + void + SimpleMultipleUser_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + CIAO_TRACE ("SimpleMultipleUser_exec_i::set_session_context ()"); + this->context_ = + ::Simple::CCM_SimpleMultipleUser_Context::_narrow (ctx); + + if (CORBA::is_nil (this->context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + SimpleMultipleUser_exec_i::configuration_complete () + { + CIAO_TRACE ("SimpleMultipleUser_exec_i::configuration_complete ()"); + // Your code here. + } + + void + SimpleMultipleUser_exec_i::ccm_activate () + { + CIAO_TRACE ("SimpleMultipleUser_exec_i::ccm_activate ()"); + + ::Simple::SimpleMultipleUser::trigConnections_var conns = + this->context_->get_connections_trig (); + + CIAO_DEBUG ((LM_NOTICE, CLINFO "SimpleMultipleUser_exec_i::ccm_activate - " + "Got %u connections to my receptacle\n", + conns->length ())); + + for (CORBA::ULong i = 0; i < conns->length (); ++i) + { + try + { + CIAO_DEBUG ((LM_NOTICE, CLINFO "SimpleMultipleUser_exec_i::ccm_activate - " + "Invoking %u'th connection\n", i)); + ::Simple::Trigger_var trig (conns[i].objref); + + trig->hello ("Test succeeded, hello from SimpleMultipleUser_exec"); + } + catch (CORBA::Exception &ex) + { + CIAO_ERROR ((LM_ERROR, CLINFO "SimpleMultipleUser_exec_i::ccm_activate () - " + "Caught CORBA exception on %u'th reference, details follow:\n", + i)); + ex._tao_print_exception (CLINFO "SimpleUser_exec_i::ccm_activate () - "); + } + catch (...) + { + CIAO_ERROR ((LM_ERROR, CLINFO "SimpleMultipleUser_exec_i::ccm_activate () - " + "Error: Caught unknown exception whilst invoking reference for port trig.\n")); + } + } + + // Your code here. + } + + void + SimpleMultipleUser_exec_i::ccm_passivate () + { + CIAO_TRACE ("SimpleMultipleUser_exec_i::ccm_passivate ()"); + // Your code here. + } + + void + SimpleMultipleUser_exec_i::ccm_remove () + { + CIAO_TRACE ("SimpleMultipleUser_exec_i::ccm_remove ()"); + // Your code here. + } + + //================================================================== + // Home Executor Implementation Class: SimpleMultipleUserHome_exec_i + //================================================================== + + SimpleMultipleUserHome_exec_i::SimpleMultipleUserHome_exec_i (void) + { + CIAO_TRACE ("SimpleMultipleUserHome_exec_i::SimpleMultipleUserHome_exec_i (void)"); + } + + SimpleMultipleUserHome_exec_i::~SimpleMultipleUserHome_exec_i (void) + { + CIAO_TRACE ("SimpleMultipleUserHome_exec_i::~SimpleMultipleUserHome_exec_i (void)"); + } + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + SimpleMultipleUserHome_exec_i::create () + { + CIAO_TRACE ("SimpleMultipleUserHome_exec_i::create ()"); + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX ( + retval, + SimpleMultipleUser_exec_i, + ::CORBA::NO_MEMORY ()); + + return retval; + } + + extern "C" SIMPLEMULTIPLEUSER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleMultipleUserHome_Impl (void) + { + CIAO_TRACE ("create_Simple_SimpleMultipleUserHome_Impl (void)"); + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN ( + retval, + SimpleMultipleUserHome_exec_i, + ::Components::HomeExecutorBase::_nil ()); + + return retval; + } +} + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_exec.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_exec.h new file mode 100644 index 00000000000..180cce92554 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_exec.h @@ -0,0 +1,98 @@ +// $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_SIMPLEMULTIPLEUSER_EXEC_H +#define CIAO_SIMPLEMULTIPLEUSER_EXEC_H + +#include /**/ "ace/pre.h" + +#include "SimpleMultipleUserEC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "SimpleMultipleUser_exec_export.h" +#include "tao/LocalObject.h" + +namespace CIDL_SimpleMultipleUser_Impl +{ + class SIMPLEMULTIPLEUSER_EXEC_Export SimpleMultipleUser_exec_i + : public virtual SimpleMultipleUser_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleMultipleUser_exec_i (void); + virtual ~SimpleMultipleUser_exec_i (void); + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + // Operations from Components::SessionComponent + + virtual void + set_session_context ( + ::Components::SessionContext_ptr ctx); + + virtual void configuration_complete (); + + virtual void ccm_activate (); + + virtual void ccm_passivate (); + + virtual void ccm_remove (); + + private: + ::Simple::CCM_SimpleMultipleUser_Context_var context_; + }; + + class SIMPLEMULTIPLEUSER_EXEC_Export SimpleMultipleUserHome_exec_i + : public virtual SimpleMultipleUserHome_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleMultipleUserHome_exec_i (void); + virtual ~SimpleMultipleUserHome_exec_i (void); + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + virtual ::Components::EnterpriseComponent_ptr + create (); + }; + + extern "C" SIMPLEMULTIPLEUSER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleMultipleUserHome_Impl (void); +} + +#include /**/ "ace/post.h" + +#endif /* CIAO_SIMPLEMULTIPLEUSER_EXEC_H */ + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_exec_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_exec_export.h new file mode 100644 index 00000000000..79cec9f8fe7 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_exec_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEMULTIPLEUSER_EXEC +// ------------------------------ +#ifndef SIMPLEMULTIPLEUSER_EXEC_EXPORT_H +#define SIMPLEMULTIPLEUSER_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEMULTIPLEUSER_EXEC_HAS_DLL) +# define SIMPLEMULTIPLEUSER_EXEC_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEMULTIPLEUSER_EXEC_HAS_DLL */ + +#if !defined (SIMPLEMULTIPLEUSER_EXEC_HAS_DLL) +# define SIMPLEMULTIPLEUSER_EXEC_HAS_DLL 1 +#endif /* ! SIMPLEMULTIPLEUSER_EXEC_HAS_DLL */ + +#if defined (SIMPLEMULTIPLEUSER_EXEC_HAS_DLL) && (SIMPLEMULTIPLEUSER_EXEC_HAS_DLL == 1) +# if defined (SIMPLEMULTIPLEUSER_EXEC_BUILD_DLL) +# define SIMPLEMULTIPLEUSER_EXEC_Export ACE_Proper_Export_Flag +# define SIMPLEMULTIPLEUSER_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEMULTIPLEUSER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEMULTIPLEUSER_EXEC_BUILD_DLL */ +# define SIMPLEMULTIPLEUSER_EXEC_Export ACE_Proper_Import_Flag +# define SIMPLEMULTIPLEUSER_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEMULTIPLEUSER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEMULTIPLEUSER_EXEC_BUILD_DLL */ +#else /* SIMPLEMULTIPLEUSER_EXEC_HAS_DLL == 1 */ +# define SIMPLEMULTIPLEUSER_EXEC_Export +# define SIMPLEMULTIPLEUSER_EXEC_SINGLETON_DECLARATION(T) +# define SIMPLEMULTIPLEUSER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEMULTIPLEUSER_EXEC_HAS_DLL == 1 */ + +// Set SIMPLEMULTIPLEUSER_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEMULTIPLEUSER_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEMULTIPLEUSER_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEMULTIPLEUSER_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEMULTIPLEUSER_EXEC_NTRACE */ + +#if (SIMPLEMULTIPLEUSER_EXEC_NTRACE == 1) +# define SIMPLEMULTIPLEUSER_EXEC_TRACE(X) +#else /* (SIMPLEMULTIPLEUSER_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEMULTIPLEUSER_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEMULTIPLEUSER_EXEC_NTRACE == 1) */ + +#endif /* SIMPLEMULTIPLEUSER_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_stub_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_stub_export.h new file mode 100644 index 00000000000..bf0be40ece3 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_stub_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEMULTIPLEUSER_STUB +// ------------------------------ +#ifndef SIMPLEMULTIPLEUSER_STUB_EXPORT_H +#define SIMPLEMULTIPLEUSER_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEMULTIPLEUSER_STUB_HAS_DLL) +# define SIMPLEMULTIPLEUSER_STUB_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEMULTIPLEUSER_STUB_HAS_DLL */ + +#if !defined (SIMPLEMULTIPLEUSER_STUB_HAS_DLL) +# define SIMPLEMULTIPLEUSER_STUB_HAS_DLL 1 +#endif /* ! SIMPLEMULTIPLEUSER_STUB_HAS_DLL */ + +#if defined (SIMPLEMULTIPLEUSER_STUB_HAS_DLL) && (SIMPLEMULTIPLEUSER_STUB_HAS_DLL == 1) +# if defined (SIMPLEMULTIPLEUSER_STUB_BUILD_DLL) +# define SIMPLEMULTIPLEUSER_STUB_Export ACE_Proper_Export_Flag +# define SIMPLEMULTIPLEUSER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEMULTIPLEUSER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEMULTIPLEUSER_STUB_BUILD_DLL */ +# define SIMPLEMULTIPLEUSER_STUB_Export ACE_Proper_Import_Flag +# define SIMPLEMULTIPLEUSER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEMULTIPLEUSER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEMULTIPLEUSER_STUB_BUILD_DLL */ +#else /* SIMPLEMULTIPLEUSER_STUB_HAS_DLL == 1 */ +# define SIMPLEMULTIPLEUSER_STUB_Export +# define SIMPLEMULTIPLEUSER_STUB_SINGLETON_DECLARATION(T) +# define SIMPLEMULTIPLEUSER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEMULTIPLEUSER_STUB_HAS_DLL == 1 */ + +// Set SIMPLEMULTIPLEUSER_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEMULTIPLEUSER_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEMULTIPLEUSER_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEMULTIPLEUSER_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEMULTIPLEUSER_STUB_NTRACE */ + +#if (SIMPLEMULTIPLEUSER_STUB_NTRACE == 1) +# define SIMPLEMULTIPLEUSER_STUB_TRACE(X) +#else /* (SIMPLEMULTIPLEUSER_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEMULTIPLEUSER_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEMULTIPLEUSER_STUB_NTRACE == 1) */ + +#endif /* SIMPLEMULTIPLEUSER_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_svnt_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_svnt_export.h new file mode 100644 index 00000000000..97f0fdf0f00 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleMultipleUser_svnt_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEMULTIPLEUSER_SVNT +// ------------------------------ +#ifndef SIMPLEMULTIPLEUSER_SVNT_EXPORT_H +#define SIMPLEMULTIPLEUSER_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEMULTIPLEUSER_SVNT_HAS_DLL) +# define SIMPLEMULTIPLEUSER_SVNT_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEMULTIPLEUSER_SVNT_HAS_DLL */ + +#if !defined (SIMPLEMULTIPLEUSER_SVNT_HAS_DLL) +# define SIMPLEMULTIPLEUSER_SVNT_HAS_DLL 1 +#endif /* ! SIMPLEMULTIPLEUSER_SVNT_HAS_DLL */ + +#if defined (SIMPLEMULTIPLEUSER_SVNT_HAS_DLL) && (SIMPLEMULTIPLEUSER_SVNT_HAS_DLL == 1) +# if defined (SIMPLEMULTIPLEUSER_SVNT_BUILD_DLL) +# define SIMPLEMULTIPLEUSER_SVNT_Export ACE_Proper_Export_Flag +# define SIMPLEMULTIPLEUSER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEMULTIPLEUSER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEMULTIPLEUSER_SVNT_BUILD_DLL */ +# define SIMPLEMULTIPLEUSER_SVNT_Export ACE_Proper_Import_Flag +# define SIMPLEMULTIPLEUSER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEMULTIPLEUSER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEMULTIPLEUSER_SVNT_BUILD_DLL */ +#else /* SIMPLEMULTIPLEUSER_SVNT_HAS_DLL == 1 */ +# define SIMPLEMULTIPLEUSER_SVNT_Export +# define SIMPLEMULTIPLEUSER_SVNT_SINGLETON_DECLARATION(T) +# define SIMPLEMULTIPLEUSER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEMULTIPLEUSER_SVNT_HAS_DLL == 1 */ + +// Set SIMPLEMULTIPLEUSER_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEMULTIPLEUSER_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEMULTIPLEUSER_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEMULTIPLEUSER_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEMULTIPLEUSER_SVNT_NTRACE */ + +#if (SIMPLEMULTIPLEUSER_SVNT_NTRACE == 1) +# define SIMPLEMULTIPLEUSER_SVNT_TRACE(X) +#else /* (SIMPLEMULTIPLEUSER_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEMULTIPLEUSER_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEMULTIPLEUSER_SVNT_NTRACE == 1) */ + +#endif /* SIMPLEMULTIPLEUSER_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleNull.cidl b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull.cidl new file mode 100644 index 00000000000..8c10398272a --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull.cidl @@ -0,0 +1,12 @@ +// $Id$ + +#include "SimpleNull.idl" + +composition session SimpleNull_Impl +{ + home executor SimpleNullHome_Exec + { + implements Simple::SimpleNullHome; + manages SimpleProvider_Exec; + }; +}; diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleNull.idl b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull.idl new file mode 100644 index 00000000000..d8f02901be4 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull.idl @@ -0,0 +1,14 @@ +// $Id$ + +#include <Components.idl> + +module Simple +{ + component SimpleNull + { + }; + + home SimpleNullHome manages SimpleNull + { + }; +}; diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleNull.mpc b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull.mpc new file mode 100644 index 00000000000..3e64dd78d9b --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull.mpc @@ -0,0 +1,119 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl SimpleNull" + +project(SimpleNull_idl_gen) : taoidldefaults, anytypecode { + avoids += ace_for_tao + custom_only = 1 + idlflags += -Wb,stub_export_macro=SIMPLENULL_STUB_Export \ + -Wb,stub_export_include=SimpleNull_stub_export.h \ + -Wb,skel_export_macro=SIMPLENULL_SVNT_Export \ + -Wb,skel_export_include=SimpleNull_svnt_export.h + + IDL_Files { + SimpleNull.idl + } +} + +project(SimpleNull_cidl_gen) : ciaocidldefaults, taoidldefaults { + avoids += ace_for_tao + custom_only = 1 + cidlflags += --svnt-export-macro SIMPLENULL_SVNT_Export \ + --svnt-export-include SimpleNull_svnt_export.h + idlflags += -Wb,export_macro=SIMPLENULL_EXEC_Export \ + -Wb,export_include=SimpleNull_exec_export.h \ + -SS + + CIDL_Files { + SimpleNull.cidl + } + + IDL_Files { + SimpleNullE.idl + } +} + +project(SimpleNull_stub) : ccm_stub { + avoids += ace_for_tao + after += SimpleNull_idl_gen + libs += + + sharedname = SimpleNull_stub + dynamicflags = SIMPLENULL_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleNullC.cpp + } + + Header_Files { + SimpleNullC.h + SimpleNull_stub_export.h + } + + Inline_Files { + SimpleNullC.inl + } +} + +project(SimpleNull_exec) : ciao_executor { + avoids += ace_for_tao + after += SimpleNull_cidl_gen SimpleNull_stub + sharedname = SimpleNull_exec + libs += SimpleNull_stub + + dynamicflags = SIMPLENULL_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleNullEC.cpp + SimpleNull_exec.cpp + } + + Header_Files { + SimpleNullEC.h + SimpleNull_exec.h + SimpleNull_exec_export.h + } + + Inline_Files { + SimpleNullEC.inl + } +} + + +project(SimpleNull_svnt) : ciao_servant { + avoids += ace_for_tao + after += SimpleNull_exec + sharedname = SimpleNull_svnt + libs += SimpleNull_exec \ + SimpleNull_stub + + dynamicflags = SIMPLENULL_SVNT_BUILD_DLL + + CIDL_Files { + } + + IDL_Files { + } + + Source_Files { + SimpleNullS.cpp + SimpleNull_svnt.cpp + } + + Header_Files { + SimpleNullS.h + SimpleNull_svnt.h + SimpleNull_svnt_export.h + } + + Inline_Files { + SimpleNullS.inl + } +} + + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_exec.cpp b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_exec.cpp new file mode 100644 index 00000000000..449981e53ec --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_exec.cpp @@ -0,0 +1,155 @@ +// $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 "SimpleNull_exec.h" +#include "ciao/CIAO_common.h" + +namespace CIDL_SimpleNull_Impl +{ + //================================================================== + // Component Executor Implementation Class: SimpleNull_exec_i + //================================================================== + + SimpleNull_exec_i::SimpleNull_exec_i (void) + { + CIAO_TRACE ("SimpleNull_exec_i::SimpleNull_exec_i (void)"); + CIAO_DEBUG ((LM_EMERGENCY, "SimpleNull - Test - Lifecycle event - SimpleNull_exec_i::SimpleNull_exec_i (void)\n")); + } + + SimpleNull_exec_i::~SimpleNull_exec_i (void) + { + CIAO_TRACE ("SimpleNull_exec_i::~SimpleNull_exec_i"); + CIAO_DEBUG ((LM_EMERGENCY, "SimpleNull - Test - Lifecycle event - SimpleNull_exec_i::~SimpleNull_exec_i\n")); + } + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + // Operations from Components::SessionComponent + + void + SimpleNull_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + CIAO_TRACE ("SimpleNull_exec_i::set_session_context"); + CIAO_DEBUG ((LM_EMERGENCY, "SimpleNull - Test - Lifecycle event - SimpleNull_exec_i::set_session_context\n")); + this->context_ = + ::Simple::CCM_SimpleNull_Context::_narrow (ctx); + + if (CORBA::is_nil (this->context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + SimpleNull_exec_i::configuration_complete () + { + CIAO_TRACE ("SimpleNull_exec_i::configuration_complete\n"); + CIAO_DEBUG ((LM_EMERGENCY, "SimpleNull - Test - Lifecycle event - SimpleNull_exec_i::configuration_complete\n")); + // Your code here. + } + + void + SimpleNull_exec_i::ccm_activate () + { + CIAO_TRACE ("SimpleNull_exec_i::ccm_activate"); + CIAO_DEBUG ((LM_EMERGENCY, "SimpleNull - Test - Lifecycle event - SimpleNull_exec_i::ccm_activate\n")); + // Your code here. + } + + void + SimpleNull_exec_i::ccm_passivate () + { + CIAO_TRACE ("SimpleNull_exec_i::ccm_passivate"); + CIAO_DEBUG ((LM_EMERGENCY, "SimpleNull - Test - Lifecycle event - SimpleNull_exec_i::ccm_passivate\n")); + // Your code here. + } + + void + SimpleNull_exec_i::ccm_remove () + { + CIAO_TRACE ("SimpleNull_exec_i::ccm_remove"); + CIAO_DEBUG ((LM_EMERGENCY, "SimpleNull - Test - Lifecycle event - SimpleNull_exec_i::ccm_remove\n")); + // Your code here. + } + + //================================================================== + // Home Executor Implementation Class: SimpleNullHome_exec_i + //================================================================== + + SimpleNullHome_exec_i::SimpleNullHome_exec_i (void) + { + CIAO_TRACE ("SimpleNullHome_exec_i::SimpleNullHome_exec_i"); + CIAO_DEBUG ((LM_EMERGENCY, "SimpleNull - Test - Lifecycle event - SimpleNullHome_exec_i::SimpleNullHome_exec_i\n")); + } + + SimpleNullHome_exec_i::~SimpleNullHome_exec_i (void) + { + CIAO_TRACE ("SimpleNullHome_exec_i::~SimpleNullHome_exec_i"); + CIAO_DEBUG ((LM_EMERGENCY, "SimpleNull - Test - Lifecycle event - SimpleNullHome_exec_i::~SimpleNullHome_exec_i\n")); + } + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + SimpleNullHome_exec_i::create () + { + CIAO_TRACE ("SimpleNullHome_exec_i::create"); + CIAO_DEBUG ((LM_EMERGENCY, "SimpleNull - Test - Lifecycle event - SimpleNullHome_exec_i::create\n")); + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX ( + retval, + SimpleNull_exec_i, + ::CORBA::NO_MEMORY ()); + + return retval; + } + + extern "C" SIMPLENULL_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleNullHome_Impl (void) + { + CIAO_TRACE ("create_Simple_SimpleNullHome_Impl"); + CIAO_DEBUG ((LM_EMERGENCY, "SimpleNull - Test - Lifecycle event - create_Simple_SimpleNullHome_Impl\n")); + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN ( + retval, + SimpleNullHome_exec_i, + ::Components::HomeExecutorBase::_nil ()); + + return retval; + } +} + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_exec.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_exec.h new file mode 100644 index 00000000000..00771543fb3 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_exec.h @@ -0,0 +1,98 @@ +// $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_SIMPLENULL_EXEC_H +#define CIAO_SIMPLENULL_EXEC_H + +#include /**/ "ace/pre.h" + +#include "SimpleNullEC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "SimpleNull_exec_export.h" +#include "tao/LocalObject.h" + +namespace CIDL_SimpleNull_Impl +{ + class SIMPLENULL_EXEC_Export SimpleNull_exec_i + : public virtual SimpleProvider_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleNull_exec_i (void); + virtual ~SimpleNull_exec_i (void); + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + // Operations from Components::SessionComponent + + virtual void + set_session_context ( + ::Components::SessionContext_ptr ctx); + + virtual void configuration_complete (); + + virtual void ccm_activate (); + + virtual void ccm_passivate (); + + virtual void ccm_remove (); + + private: + ::Simple::CCM_SimpleNull_Context_var context_; + }; + + class SIMPLENULL_EXEC_Export SimpleNullHome_exec_i + : public virtual SimpleNullHome_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleNullHome_exec_i (void); + virtual ~SimpleNullHome_exec_i (void); + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + virtual ::Components::EnterpriseComponent_ptr + create (); + }; + + extern "C" SIMPLENULL_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleNullHome_Impl (void); +} + +#include /**/ "ace/post.h" + +#endif /* CIAO_SIMPLENULL_EXEC_H */ + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_exec_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_exec_export.h new file mode 100644 index 00000000000..5d0ff473419 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_exec_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLENULL_EXEC +// ------------------------------ +#ifndef SIMPLENULL_EXEC_EXPORT_H +#define SIMPLENULL_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLENULL_EXEC_HAS_DLL) +# define SIMPLENULL_EXEC_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLENULL_EXEC_HAS_DLL */ + +#if !defined (SIMPLENULL_EXEC_HAS_DLL) +# define SIMPLENULL_EXEC_HAS_DLL 1 +#endif /* ! SIMPLENULL_EXEC_HAS_DLL */ + +#if defined (SIMPLENULL_EXEC_HAS_DLL) && (SIMPLENULL_EXEC_HAS_DLL == 1) +# if defined (SIMPLENULL_EXEC_BUILD_DLL) +# define SIMPLENULL_EXEC_Export ACE_Proper_Export_Flag +# define SIMPLENULL_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLENULL_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLENULL_EXEC_BUILD_DLL */ +# define SIMPLENULL_EXEC_Export ACE_Proper_Import_Flag +# define SIMPLENULL_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLENULL_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLENULL_EXEC_BUILD_DLL */ +#else /* SIMPLENULL_EXEC_HAS_DLL == 1 */ +# define SIMPLENULL_EXEC_Export +# define SIMPLENULL_EXEC_SINGLETON_DECLARATION(T) +# define SIMPLENULL_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLENULL_EXEC_HAS_DLL == 1 */ + +// Set SIMPLENULL_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLENULL_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLENULL_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLENULL_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLENULL_EXEC_NTRACE */ + +#if (SIMPLENULL_EXEC_NTRACE == 1) +# define SIMPLENULL_EXEC_TRACE(X) +#else /* (SIMPLENULL_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLENULL_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLENULL_EXEC_NTRACE == 1) */ + +#endif /* SIMPLENULL_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_stub_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_stub_export.h new file mode 100644 index 00000000000..17eef930019 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_stub_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLENULL_STUB +// ------------------------------ +#ifndef SIMPLENULL_STUB_EXPORT_H +#define SIMPLENULL_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLENULL_STUB_HAS_DLL) +# define SIMPLENULL_STUB_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLENULL_STUB_HAS_DLL */ + +#if !defined (SIMPLENULL_STUB_HAS_DLL) +# define SIMPLENULL_STUB_HAS_DLL 1 +#endif /* ! SIMPLENULL_STUB_HAS_DLL */ + +#if defined (SIMPLENULL_STUB_HAS_DLL) && (SIMPLENULL_STUB_HAS_DLL == 1) +# if defined (SIMPLENULL_STUB_BUILD_DLL) +# define SIMPLENULL_STUB_Export ACE_Proper_Export_Flag +# define SIMPLENULL_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLENULL_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLENULL_STUB_BUILD_DLL */ +# define SIMPLENULL_STUB_Export ACE_Proper_Import_Flag +# define SIMPLENULL_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLENULL_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLENULL_STUB_BUILD_DLL */ +#else /* SIMPLENULL_STUB_HAS_DLL == 1 */ +# define SIMPLENULL_STUB_Export +# define SIMPLENULL_STUB_SINGLETON_DECLARATION(T) +# define SIMPLENULL_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLENULL_STUB_HAS_DLL == 1 */ + +// Set SIMPLENULL_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLENULL_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLENULL_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLENULL_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLENULL_STUB_NTRACE */ + +#if (SIMPLENULL_STUB_NTRACE == 1) +# define SIMPLENULL_STUB_TRACE(X) +#else /* (SIMPLENULL_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLENULL_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLENULL_STUB_NTRACE == 1) */ + +#endif /* SIMPLENULL_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_svnt_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_svnt_export.h new file mode 100644 index 00000000000..9afa614f9a4 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleNull_svnt_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLENULL_SVNT +// ------------------------------ +#ifndef SIMPLENULL_SVNT_EXPORT_H +#define SIMPLENULL_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLENULL_SVNT_HAS_DLL) +# define SIMPLENULL_SVNT_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLENULL_SVNT_HAS_DLL */ + +#if !defined (SIMPLENULL_SVNT_HAS_DLL) +# define SIMPLENULL_SVNT_HAS_DLL 1 +#endif /* ! SIMPLENULL_SVNT_HAS_DLL */ + +#if defined (SIMPLENULL_SVNT_HAS_DLL) && (SIMPLENULL_SVNT_HAS_DLL == 1) +# if defined (SIMPLENULL_SVNT_BUILD_DLL) +# define SIMPLENULL_SVNT_Export ACE_Proper_Export_Flag +# define SIMPLENULL_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLENULL_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLENULL_SVNT_BUILD_DLL */ +# define SIMPLENULL_SVNT_Export ACE_Proper_Import_Flag +# define SIMPLENULL_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLENULL_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLENULL_SVNT_BUILD_DLL */ +#else /* SIMPLENULL_SVNT_HAS_DLL == 1 */ +# define SIMPLENULL_SVNT_Export +# define SIMPLENULL_SVNT_SINGLETON_DECLARATION(T) +# define SIMPLENULL_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLENULL_SVNT_HAS_DLL == 1 */ + +// Set SIMPLENULL_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLENULL_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLENULL_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLENULL_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLENULL_SVNT_NTRACE */ + +#if (SIMPLENULL_SVNT_NTRACE == 1) +# define SIMPLENULL_SVNT_TRACE(X) +#else /* (SIMPLENULL_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLENULL_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLENULL_SVNT_NTRACE == 1) */ + +#endif /* SIMPLENULL_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider.cidl b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider.cidl new file mode 100644 index 00000000000..cff76c14b89 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider.cidl @@ -0,0 +1,11 @@ +// $Id$ +#include "SimpleProvider.idl" + +composition session SimpleProvider_Impl +{ + home executor SimpleProviderHome_Exec + { + implements Simple::SimpleProviderHome; + manages SimpleProvider_Exec; + }; +}; diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider.idl b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider.idl new file mode 100644 index 00000000000..97e2c80984b --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider.idl @@ -0,0 +1,21 @@ +// $Id$ + +#ifndef SIMPLE_PROVIDER_IDL +#define SIMPLE_PROVIDER_IDL + +#include "SimpleCommon.idl" +#include "Components.idl" + +module Simple +{ + component SimpleProvider + { + provides Trigger trig; + }; + + home SimpleProviderHome manages SimpleProvider + { + }; +}; + +#endif /*SIMPLE_PROVIDER_IDL*/ diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider.mpc b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider.mpc new file mode 100644 index 00000000000..c917d235490 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider.mpc @@ -0,0 +1,121 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p SimpleCommon SimpleProvider" + +project(SimpleCommon_SimpleProvider_idl_gen) : taoidldefaults, anytypecode { + avoids += ace_for_tao + custom_only = 1 + idlflags += -Wb,stub_export_macro=SIMPLEPROVIDER_STUB_Export \ + -Wb,stub_export_include=SimpleProvider_stub_export.h \ + -Wb,skel_export_macro=SIMPLEPROVIDER_SVNT_Export \ + -Wb,skel_export_include=SimpleProvider_svnt_export.h + + IDL_Files { + SimpleProvider.idl + } +} + +project(SimpleCommon_SimpleProvider_cidl_gen) : ciaocidldefaults, taoidldefaults { + avoids += ace_for_tao + custom_only = 1 + cidlflags += --svnt-export-macro SIMPLEPROVIDER_SVNT_Export \ + --svnt-export-include SimpleProvider_svnt_export.h + idlflags += -Wb,export_macro=SIMPLEPROVIDER_EXEC_Export \ + -Wb,export_include=SimpleProvider_exec_export.h \ + -SS + + CIDL_Files { + SimpleProvider.cidl + } + + IDL_Files { + SimpleProviderE.idl + } +} + +project(SimpleCommon_SimpleProvider_stub) : ccm_stub { + avoids += ace_for_tao + after += SimpleCommon_SimpleProvider_idl_gen SimpleCommon_stub + libs += SimpleCommon_stub + + sharedname = SimpleProvider_stub + dynamicflags = SIMPLEPROVIDER_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleProviderC.cpp + } + + Header_Files { + SimpleProviderC.h + SimpleProvider_stub_export.h + } + + Inline_Files { + SimpleProviderC.inl + } +} + +project(SimpleCommon_SimpleProvider_exec) : ciao_executor { + avoids += ace_for_tao + after += SimpleCommon_SimpleProvider_cidl_gen SimpleCommon_SimpleProvider_stub + sharedname = SimpleProvider_exec + libs += SimpleProvider_stub SimpleCommon_stub + + dynamicflags = SIMPLEPROVIDER_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleProviderEC.cpp + SimpleProvider_exec.cpp + } + + Header_Files { + SimpleProviderEC.h + SimpleProvider_exec.h + SimpleProvider_exec_export.h + } + + Inline_Files { + SimpleProviderEC.inl + } +} + + +project(SimpleCommon_SimpleProvider_svnt) : ciao_servant { + avoids += ace_for_tao + after += SimpleCommon_skel SimpleCommon_SimpleProvider_exec + sharedname = SimpleProvider_svnt + libs += SimpleProvider_exec \ + SimpleProvider_stub \ + SimpleCommon_skel \ + SimpleCommon_stub + + dynamicflags = SIMPLEPROVIDER_SVNT_BUILD_DLL + + CIDL_Files { + } + + IDL_Files { + } + + Source_Files { + SimpleProviderS.cpp + SimpleProvider_svnt.cpp + } + + Header_Files { + SimpleProviderS.h + SimpleProvider_svnt.h + SimpleProvider_svnt_export.h + } + + Inline_Files { + SimpleProviderS.inl + } +} + + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_exec.cpp b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_exec.cpp new file mode 100644 index 00000000000..8271afe1faa --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_exec.cpp @@ -0,0 +1,178 @@ +// $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 "SimpleProvider_exec.h" +#include "ciao/CIAO_common.h" + +namespace CIDL_SimpleProvider_Impl +{ + //================================================================== + // Facet Executor Implementation Class: Trigger_exec_i + //================================================================== + + Trigger_exec_i::Trigger_exec_i (void) + { + CIAO_TRACE ("Trigger_exec_i::Trigger_exec_i (void)"); + } + + Trigger_exec_i::~Trigger_exec_i (void) + { + CIAO_TRACE ("Trigger_exec_i::~Trigger_exec_i (void)"); + } + + // Operations from ::Simple::Trigger + + void + Trigger_exec_i::hello ( + const char * hello ) + { + CIAO_TRACE ("Trigger_exec_i::hello ()"); + // Your code here. + CIAO_DEBUG ((LM_EMERGENCY, CLINFO "Trigger_exec_i::hello - " + "Got the following intofrmation from trig port: %s\n", + hello)); + } + + //================================================================== + // Component Executor Implementation Class: SimpleProvider_exec_i + //================================================================== + + SimpleProvider_exec_i::SimpleProvider_exec_i (void) + { + CIAO_TRACE ("SimpleProvider_exec_i::SimpleProvider_exec_i (void)"); + } + + SimpleProvider_exec_i::~SimpleProvider_exec_i (void) + { + CIAO_TRACE ("SimpleProvider_exec_i::~SimpleProvider_exec_i (void)"); + } + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + ::Simple::CCM_Trigger_ptr + SimpleProvider_exec_i::get_trig () + { + CIAO_TRACE ("SimpleProvider_exec_i::get_trig ()"); + return new Trigger_exec_i (); + } + + // Operations from Components::SessionComponent + + void + SimpleProvider_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + CIAO_TRACE ("SimpleProvider_exec_i::set_session_context ()"); + this->context_ = + ::Simple::CCM_SimpleProvider_Context::_narrow (ctx); + + if (CORBA::is_nil (this->context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + SimpleProvider_exec_i::configuration_complete () + { + CIAO_TRACE ("SimpleProvider_exec_i::configuration_complete ()"); + // Your code here. + } + + void + SimpleProvider_exec_i::ccm_activate () + { + CIAO_TRACE ("SimpleProvider_exec_i::ccm_activate ()"); + // Your code here. + } + + void + SimpleProvider_exec_i::ccm_passivate () + { + CIAO_TRACE ("SimpleProvider_exec_i::ccm_passivate ()"); + // Your code here. + } + + void + SimpleProvider_exec_i::ccm_remove () + { + CIAO_TRACE ("SimpleProvider_exec_i::ccm_remove ()"); + // Your code here. + } + + //================================================================== + // Home Executor Implementation Class: SimpleProviderHome_exec_i + //================================================================== + + SimpleProviderHome_exec_i::SimpleProviderHome_exec_i (void) + { + CIAO_TRACE ("SimpleProviderHome_exec_i::SimpleProviderHome_exec_i (void)"); + } + + SimpleProviderHome_exec_i::~SimpleProviderHome_exec_i (void) + { + CIAO_TRACE ("SimpleProviderHome_exec_i::~SimpleProviderHome_exec_i (void)"); + } + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + SimpleProviderHome_exec_i::create () + { + CIAO_TRACE ("SimpleProviderHome_exec_i::create ()"); + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX ( + retval, + SimpleProvider_exec_i, + ::CORBA::NO_MEMORY ()); + + return retval; + } + + extern "C" SIMPLEPROVIDER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleProviderHome_Impl (void) + { + CIAO_TRACE ("create_Simple_SimpleProviderHome_Impl (void)"); + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN ( + retval, + SimpleProviderHome_exec_i, + ::Components::HomeExecutorBase::_nil ()); + + return retval; + } +} + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_exec.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_exec.h new file mode 100644 index 00000000000..044c9aa56e3 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_exec.h @@ -0,0 +1,116 @@ +// $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_SIMPLEPROVIDER_EXEC_H +#define CIAO_SIMPLEPROVIDER_EXEC_H + +#include /**/ "ace/pre.h" + +#include "SimpleProviderEC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "SimpleProvider_exec_export.h" +#include "tao/LocalObject.h" + +namespace CIDL_SimpleProvider_Impl +{ + class SIMPLEPROVIDER_EXEC_Export Trigger_exec_i + : public virtual ::Simple::CCM_Trigger, + public virtual ::CORBA::LocalObject + { + public: + Trigger_exec_i (void); + virtual ~Trigger_exec_i (void); + + // Operations from ::Simple::Trigger + + virtual void + hello ( + const char * hello); + }; + + class SIMPLEPROVIDER_EXEC_Export SimpleProvider_exec_i + : public virtual SimpleProvider_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleProvider_exec_i (void); + virtual ~SimpleProvider_exec_i (void); + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + virtual ::Simple::CCM_Trigger_ptr + get_trig (); + + // Operations from Components::SessionComponent + + virtual void + set_session_context ( + ::Components::SessionContext_ptr ctx); + + virtual void configuration_complete (); + + virtual void ccm_activate (); + + virtual void ccm_passivate (); + + virtual void ccm_remove (); + + private: + ::Simple::CCM_SimpleProvider_Context_var context_; + }; + + class SIMPLEPROVIDER_EXEC_Export SimpleProviderHome_exec_i + : public virtual SimpleProviderHome_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleProviderHome_exec_i (void); + virtual ~SimpleProviderHome_exec_i (void); + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + virtual ::Components::EnterpriseComponent_ptr + create (); + }; + + extern "C" SIMPLEPROVIDER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleProviderHome_Impl (void); +} + +#include /**/ "ace/post.h" + +#endif /* CIAO_SIMPLEPROVIDER_EXEC_H */ + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_exec_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_exec_export.h new file mode 100644 index 00000000000..c5e9182f61f --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_exec_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEPROVIDER_EXEC +// ------------------------------ +#ifndef SIMPLEPROVIDER_EXEC_EXPORT_H +#define SIMPLEPROVIDER_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEPROVIDER_EXEC_HAS_DLL) +# define SIMPLEPROVIDER_EXEC_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEPROVIDER_EXEC_HAS_DLL */ + +#if !defined (SIMPLEPROVIDER_EXEC_HAS_DLL) +# define SIMPLEPROVIDER_EXEC_HAS_DLL 1 +#endif /* ! SIMPLEPROVIDER_EXEC_HAS_DLL */ + +#if defined (SIMPLEPROVIDER_EXEC_HAS_DLL) && (SIMPLEPROVIDER_EXEC_HAS_DLL == 1) +# if defined (SIMPLEPROVIDER_EXEC_BUILD_DLL) +# define SIMPLEPROVIDER_EXEC_Export ACE_Proper_Export_Flag +# define SIMPLEPROVIDER_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEPROVIDER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEPROVIDER_EXEC_BUILD_DLL */ +# define SIMPLEPROVIDER_EXEC_Export ACE_Proper_Import_Flag +# define SIMPLEPROVIDER_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEPROVIDER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEPROVIDER_EXEC_BUILD_DLL */ +#else /* SIMPLEPROVIDER_EXEC_HAS_DLL == 1 */ +# define SIMPLEPROVIDER_EXEC_Export +# define SIMPLEPROVIDER_EXEC_SINGLETON_DECLARATION(T) +# define SIMPLEPROVIDER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEPROVIDER_EXEC_HAS_DLL == 1 */ + +// Set SIMPLEPROVIDER_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEPROVIDER_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEPROVIDER_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEPROVIDER_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEPROVIDER_EXEC_NTRACE */ + +#if (SIMPLEPROVIDER_EXEC_NTRACE == 1) +# define SIMPLEPROVIDER_EXEC_TRACE(X) +#else /* (SIMPLEPROVIDER_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEPROVIDER_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEPROVIDER_EXEC_NTRACE == 1) */ + +#endif /* SIMPLEPROVIDER_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_stub_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_stub_export.h new file mode 100644 index 00000000000..795f3fec902 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_stub_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEPROVIDER_STUB +// ------------------------------ +#ifndef SIMPLEPROVIDER_STUB_EXPORT_H +#define SIMPLEPROVIDER_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEPROVIDER_STUB_HAS_DLL) +# define SIMPLEPROVIDER_STUB_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEPROVIDER_STUB_HAS_DLL */ + +#if !defined (SIMPLEPROVIDER_STUB_HAS_DLL) +# define SIMPLEPROVIDER_STUB_HAS_DLL 1 +#endif /* ! SIMPLEPROVIDER_STUB_HAS_DLL */ + +#if defined (SIMPLEPROVIDER_STUB_HAS_DLL) && (SIMPLEPROVIDER_STUB_HAS_DLL == 1) +# if defined (SIMPLEPROVIDER_STUB_BUILD_DLL) +# define SIMPLEPROVIDER_STUB_Export ACE_Proper_Export_Flag +# define SIMPLEPROVIDER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEPROVIDER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEPROVIDER_STUB_BUILD_DLL */ +# define SIMPLEPROVIDER_STUB_Export ACE_Proper_Import_Flag +# define SIMPLEPROVIDER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEPROVIDER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEPROVIDER_STUB_BUILD_DLL */ +#else /* SIMPLEPROVIDER_STUB_HAS_DLL == 1 */ +# define SIMPLEPROVIDER_STUB_Export +# define SIMPLEPROVIDER_STUB_SINGLETON_DECLARATION(T) +# define SIMPLEPROVIDER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEPROVIDER_STUB_HAS_DLL == 1 */ + +// Set SIMPLEPROVIDER_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEPROVIDER_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEPROVIDER_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEPROVIDER_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEPROVIDER_STUB_NTRACE */ + +#if (SIMPLEPROVIDER_STUB_NTRACE == 1) +# define SIMPLEPROVIDER_STUB_TRACE(X) +#else /* (SIMPLEPROVIDER_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEPROVIDER_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEPROVIDER_STUB_NTRACE == 1) */ + +#endif /* SIMPLEPROVIDER_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_svnt_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_svnt_export.h new file mode 100644 index 00000000000..5f6be2501b6 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleProvider_svnt_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEPROVIDER_SVNT +// ------------------------------ +#ifndef SIMPLEPROVIDER_SVNT_EXPORT_H +#define SIMPLEPROVIDER_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEPROVIDER_SVNT_HAS_DLL) +# define SIMPLEPROVIDER_SVNT_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEPROVIDER_SVNT_HAS_DLL */ + +#if !defined (SIMPLEPROVIDER_SVNT_HAS_DLL) +# define SIMPLEPROVIDER_SVNT_HAS_DLL 1 +#endif /* ! SIMPLEPROVIDER_SVNT_HAS_DLL */ + +#if defined (SIMPLEPROVIDER_SVNT_HAS_DLL) && (SIMPLEPROVIDER_SVNT_HAS_DLL == 1) +# if defined (SIMPLEPROVIDER_SVNT_BUILD_DLL) +# define SIMPLEPROVIDER_SVNT_Export ACE_Proper_Export_Flag +# define SIMPLEPROVIDER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEPROVIDER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEPROVIDER_SVNT_BUILD_DLL */ +# define SIMPLEPROVIDER_SVNT_Export ACE_Proper_Import_Flag +# define SIMPLEPROVIDER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEPROVIDER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEPROVIDER_SVNT_BUILD_DLL */ +#else /* SIMPLEPROVIDER_SVNT_HAS_DLL == 1 */ +# define SIMPLEPROVIDER_SVNT_Export +# define SIMPLEPROVIDER_SVNT_SINGLETON_DECLARATION(T) +# define SIMPLEPROVIDER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEPROVIDER_SVNT_HAS_DLL == 1 */ + +// Set SIMPLEPROVIDER_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEPROVIDER_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEPROVIDER_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEPROVIDER_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEPROVIDER_SVNT_NTRACE */ + +#if (SIMPLEPROVIDER_SVNT_NTRACE == 1) +# define SIMPLEPROVIDER_SVNT_TRACE(X) +#else /* (SIMPLEPROVIDER_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEPROVIDER_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEPROVIDER_SVNT_NTRACE == 1) */ + +#endif /* SIMPLEPROVIDER_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher.cidl b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher.cidl new file mode 100644 index 00000000000..d5bae5c32ee --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher.cidl @@ -0,0 +1,11 @@ +// $Id$ +#include "SimplePublisher.idl" + +composition session SimplePublisher_Impl +{ + home executor SimplePublisherHome_Exec + { + implements Simple::SimplePublisherHome; + manages SimplePublisher_Exec; + }; +}; diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher.idl b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher.idl new file mode 100644 index 00000000000..cee261fd15a --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher.idl @@ -0,0 +1,21 @@ +// $Id$ + +#ifndef SIMPLE_PUBLISHER_IDL +#define SIMPLE_PUBLISHER_IDL + +#include "SimpleCommon.idl" +#include "Components.idl" + +module Simple +{ + component SimplePublisher + { + publishes Hello hello; + }; + + home SimplePublisherHome manages SimplePublisher + { + }; +}; + +#endif /*SIMPLE_PUBLISHER_IDL*/ diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher.mpc b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher.mpc new file mode 100644 index 00000000000..232a4d462be --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher.mpc @@ -0,0 +1,121 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p SimpleCommon SimplePublisher" + +project(SimpleCommon_SimplePublisher_idl_gen) : taoidldefaults, anytypecode { + avoids += ace_for_tao + custom_only = 1 + idlflags += -Wb,stub_export_macro=SIMPLEPUBLISHER_STUB_Export \ + -Wb,stub_export_include=SimplePublisher_stub_export.h \ + -Wb,skel_export_macro=SIMPLEPUBLISHER_SVNT_Export \ + -Wb,skel_export_include=SimplePublisher_svnt_export.h + + IDL_Files { + SimplePublisher.idl + } +} + +project(SimpleCommon_SimplePublisher_cidl_gen) : ciaocidldefaults, taoidldefaults { + avoids += ace_for_tao + custom_only = 1 + cidlflags += --svnt-export-macro SIMPLEPUBLISHER_SVNT_Export \ + --svnt-export-include SimplePublisher_svnt_export.h + idlflags += -Wb,export_macro=SIMPLEPUBLISHER_EXEC_Export \ + -Wb,export_include=SimplePublisher_exec_export.h \ + -SS + + CIDL_Files { + SimplePublisher.cidl + } + + IDL_Files { + SimplePublisherE.idl + } +} + +project(SimpleCommon_SimplePublisher_stub) : ccm_stub { + avoids += ace_for_tao + after += SimpleCommon_SimplePublisher_idl_gen SimpleCommon_stub + libs += SimpleCommon_stub + + sharedname = SimplePublisher_stub + dynamicflags = SIMPLEPUBLISHER_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimplePublisherC.cpp + } + + Header_Files { + SimplePublisherC.h + SimplePublisher_stub_export.h + } + + Inline_Files { + SimplePublisherC.inl + } +} + +project(SimpleCommon_SimplePublisher_exec) : ciao_executor { + avoids += ace_for_tao + after += SimpleCommon_SimplePublisher_cidl_gen SimpleCommon_SimplePublisher_stub + sharedname = SimplePublisher_exec + libs += SimplePublisher_stub SimpleCommon_stub + + dynamicflags = SIMPLEPUBLISHER_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimplePublisherEC.cpp + SimplePublisher_exec.cpp + } + + Header_Files { + SimplePublisherEC.h + SimplePublisher_exec.h + SimplePublisher_exec_export.h + } + + Inline_Files { + SimplePublisherEC.inl + } +} + + +project(SimpleCommon_SimplePublisher_svnt) : ciao_servant { + avoids += ace_for_tao + after += SimpleCommon_skel SimpleCommon_SimplePublisher_exec + sharedname = SimplePublisher_svnt + libs += SimplePublisher_exec \ + SimplePublisher_stub \ + SimpleCommon_skel \ + SimpleCommon_stub + + dynamicflags = SIMPLEPUBLISHER_SVNT_BUILD_DLL + + CIDL_Files { + } + + IDL_Files { + } + + Source_Files { + SimplePublisherS.cpp + SimplePublisher_svnt.cpp + } + + Header_Files { + SimplePublisherS.h + SimplePublisher_svnt.h + SimplePublisher_svnt_export.h + } + + Inline_Files { + SimplePublisherS.inl + } +} + + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_exec.cpp b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_exec.cpp new file mode 100644 index 00000000000..d15ab0ce667 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_exec.cpp @@ -0,0 +1,148 @@ +// $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 "SimplePublisher_exec.h" +#include "ciao/CIAO_common.h" + +namespace CIDL_SimplePublisher_Impl +{ + //================================================================== + // Component Executor Implementation Class: SimplePublisher_exec_i + //================================================================== + + SimplePublisher_exec_i::SimplePublisher_exec_i (void) + { + CIAO_TRACE ("SimplePublisher_exec_i::SimplePublisher_exec_i (void)"); + } + + SimplePublisher_exec_i::~SimplePublisher_exec_i (void) + { + CIAO_TRACE ("SimplePublisher_exec_i::~SimplePublisher_exec_i (void)"); + } + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + // Operations from Components::SessionComponent + + void + SimplePublisher_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + CIAO_TRACE ("SimplePublisher_exec_i::set_session_context ()"); + this->context_ = + ::Simple::CCM_SimplePublisher_Context::_narrow (ctx); + + if (CORBA::is_nil (this->context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + SimplePublisher_exec_i::configuration_complete () + { + CIAO_TRACE ("SimplePublisher_exec_i::configuration_complete ()"); + // Your code here. + } + + void + SimplePublisher_exec_i::ccm_activate () + { + CIAO_TRACE ("SimplePublisher_exec_i::ccm_activate ()"); + ::Simple::Hello_var hello = new OBV_Simple::Hello ("Test successful, hello from SimplePublisher_exec_i"); + + this->context_->push_hello (hello._retn ()); + // Your code here. + } + + void + SimplePublisher_exec_i::ccm_passivate () + { + CIAO_TRACE ("SimplePublisher_exec_i::ccm_passivate ()"); + // Your code here. + } + + void + SimplePublisher_exec_i::ccm_remove () + { + CIAO_TRACE ("SimplePublisher_exec_i::ccm_remove ()"); + // Your code here. + } + + //================================================================== + // Home Executor Implementation Class: SimplePublisherHome_exec_i + //================================================================== + + SimplePublisherHome_exec_i::SimplePublisherHome_exec_i (void) + { + CIAO_TRACE ("SimplePublisherHome_exec_i::SimplePublisherHome_exec_i (void)"); + } + + SimplePublisherHome_exec_i::~SimplePublisherHome_exec_i (void) + { + CIAO_TRACE ("SimplePublisherHome_exec_i::~SimplePublisherHome_exec_i (void)"); + } + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + SimplePublisherHome_exec_i::create () + { + CIAO_TRACE ("SimplePublisherHome_exec_i::create ()"); + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX ( + retval, + SimplePublisher_exec_i, + ::CORBA::NO_MEMORY ()); + + return retval; + } + + extern "C" SIMPLEPUBLISHER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimplePublisherHome_Impl (void) + { + CIAO_TRACE ("create_Simple_SimplePublisherHome_Impl (void)"); + + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN ( + retval, + SimplePublisherHome_exec_i, + ::Components::HomeExecutorBase::_nil ()); + + return retval; + } +} + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_exec.h b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_exec.h new file mode 100644 index 00000000000..b25191f0a4a --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_exec.h @@ -0,0 +1,98 @@ +// $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_SIMPLEPUBLISHER_EXEC_H +#define CIAO_SIMPLEPUBLISHER_EXEC_H + +#include /**/ "ace/pre.h" + +#include "SimplePublisherEC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "SimplePublisher_exec_export.h" +#include "tao/LocalObject.h" + +namespace CIDL_SimplePublisher_Impl +{ + class SIMPLEPUBLISHER_EXEC_Export SimplePublisher_exec_i + : public virtual SimplePublisher_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimplePublisher_exec_i (void); + virtual ~SimplePublisher_exec_i (void); + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + // Operations from Components::SessionComponent + + virtual void + set_session_context ( + ::Components::SessionContext_ptr ctx); + + virtual void configuration_complete (); + + virtual void ccm_activate (); + + virtual void ccm_passivate (); + + virtual void ccm_remove (); + + private: + ::Simple::CCM_SimplePublisher_Context_var context_; + }; + + class SIMPLEPUBLISHER_EXEC_Export SimplePublisherHome_exec_i + : public virtual SimplePublisherHome_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimplePublisherHome_exec_i (void); + virtual ~SimplePublisherHome_exec_i (void); + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + virtual ::Components::EnterpriseComponent_ptr + create (); + }; + + extern "C" SIMPLEPUBLISHER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimplePublisherHome_Impl (void); +} + +#include /**/ "ace/post.h" + +#endif /* CIAO_SIMPLEPUBLISHER_EXEC_H */ + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_exec_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_exec_export.h new file mode 100644 index 00000000000..2f18677399f --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_exec_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEPUBLISHER_EXEC +// ------------------------------ +#ifndef SIMPLEPUBLISHER_EXEC_EXPORT_H +#define SIMPLEPUBLISHER_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEPUBLISHER_EXEC_HAS_DLL) +# define SIMPLEPUBLISHER_EXEC_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEPUBLISHER_EXEC_HAS_DLL */ + +#if !defined (SIMPLEPUBLISHER_EXEC_HAS_DLL) +# define SIMPLEPUBLISHER_EXEC_HAS_DLL 1 +#endif /* ! SIMPLEPUBLISHER_EXEC_HAS_DLL */ + +#if defined (SIMPLEPUBLISHER_EXEC_HAS_DLL) && (SIMPLEPUBLISHER_EXEC_HAS_DLL == 1) +# if defined (SIMPLEPUBLISHER_EXEC_BUILD_DLL) +# define SIMPLEPUBLISHER_EXEC_Export ACE_Proper_Export_Flag +# define SIMPLEPUBLISHER_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEPUBLISHER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEPUBLISHER_EXEC_BUILD_DLL */ +# define SIMPLEPUBLISHER_EXEC_Export ACE_Proper_Import_Flag +# define SIMPLEPUBLISHER_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEPUBLISHER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEPUBLISHER_EXEC_BUILD_DLL */ +#else /* SIMPLEPUBLISHER_EXEC_HAS_DLL == 1 */ +# define SIMPLEPUBLISHER_EXEC_Export +# define SIMPLEPUBLISHER_EXEC_SINGLETON_DECLARATION(T) +# define SIMPLEPUBLISHER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEPUBLISHER_EXEC_HAS_DLL == 1 */ + +// Set SIMPLEPUBLISHER_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEPUBLISHER_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEPUBLISHER_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEPUBLISHER_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEPUBLISHER_EXEC_NTRACE */ + +#if (SIMPLEPUBLISHER_EXEC_NTRACE == 1) +# define SIMPLEPUBLISHER_EXEC_TRACE(X) +#else /* (SIMPLEPUBLISHER_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEPUBLISHER_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEPUBLISHER_EXEC_NTRACE == 1) */ + +#endif /* SIMPLEPUBLISHER_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_stub_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_stub_export.h new file mode 100644 index 00000000000..8ab3300c5ca --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_stub_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEPUBLISHER_STUB +// ------------------------------ +#ifndef SIMPLEPUBLISHER_STUB_EXPORT_H +#define SIMPLEPUBLISHER_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEPUBLISHER_STUB_HAS_DLL) +# define SIMPLEPUBLISHER_STUB_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEPUBLISHER_STUB_HAS_DLL */ + +#if !defined (SIMPLEPUBLISHER_STUB_HAS_DLL) +# define SIMPLEPUBLISHER_STUB_HAS_DLL 1 +#endif /* ! SIMPLEPUBLISHER_STUB_HAS_DLL */ + +#if defined (SIMPLEPUBLISHER_STUB_HAS_DLL) && (SIMPLEPUBLISHER_STUB_HAS_DLL == 1) +# if defined (SIMPLEPUBLISHER_STUB_BUILD_DLL) +# define SIMPLEPUBLISHER_STUB_Export ACE_Proper_Export_Flag +# define SIMPLEPUBLISHER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEPUBLISHER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEPUBLISHER_STUB_BUILD_DLL */ +# define SIMPLEPUBLISHER_STUB_Export ACE_Proper_Import_Flag +# define SIMPLEPUBLISHER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEPUBLISHER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEPUBLISHER_STUB_BUILD_DLL */ +#else /* SIMPLEPUBLISHER_STUB_HAS_DLL == 1 */ +# define SIMPLEPUBLISHER_STUB_Export +# define SIMPLEPUBLISHER_STUB_SINGLETON_DECLARATION(T) +# define SIMPLEPUBLISHER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEPUBLISHER_STUB_HAS_DLL == 1 */ + +// Set SIMPLEPUBLISHER_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEPUBLISHER_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEPUBLISHER_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEPUBLISHER_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEPUBLISHER_STUB_NTRACE */ + +#if (SIMPLEPUBLISHER_STUB_NTRACE == 1) +# define SIMPLEPUBLISHER_STUB_TRACE(X) +#else /* (SIMPLEPUBLISHER_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEPUBLISHER_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEPUBLISHER_STUB_NTRACE == 1) */ + +#endif /* SIMPLEPUBLISHER_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_svnt_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_svnt_export.h new file mode 100644 index 00000000000..cbc5f4e56be --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimplePublisher_svnt_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEPUBLISHER_SVNT +// ------------------------------ +#ifndef SIMPLEPUBLISHER_SVNT_EXPORT_H +#define SIMPLEPUBLISHER_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEPUBLISHER_SVNT_HAS_DLL) +# define SIMPLEPUBLISHER_SVNT_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEPUBLISHER_SVNT_HAS_DLL */ + +#if !defined (SIMPLEPUBLISHER_SVNT_HAS_DLL) +# define SIMPLEPUBLISHER_SVNT_HAS_DLL 1 +#endif /* ! SIMPLEPUBLISHER_SVNT_HAS_DLL */ + +#if defined (SIMPLEPUBLISHER_SVNT_HAS_DLL) && (SIMPLEPUBLISHER_SVNT_HAS_DLL == 1) +# if defined (SIMPLEPUBLISHER_SVNT_BUILD_DLL) +# define SIMPLEPUBLISHER_SVNT_Export ACE_Proper_Export_Flag +# define SIMPLEPUBLISHER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEPUBLISHER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEPUBLISHER_SVNT_BUILD_DLL */ +# define SIMPLEPUBLISHER_SVNT_Export ACE_Proper_Import_Flag +# define SIMPLEPUBLISHER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEPUBLISHER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEPUBLISHER_SVNT_BUILD_DLL */ +#else /* SIMPLEPUBLISHER_SVNT_HAS_DLL == 1 */ +# define SIMPLEPUBLISHER_SVNT_Export +# define SIMPLEPUBLISHER_SVNT_SINGLETON_DECLARATION(T) +# define SIMPLEPUBLISHER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEPUBLISHER_SVNT_HAS_DLL == 1 */ + +// Set SIMPLEPUBLISHER_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEPUBLISHER_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEPUBLISHER_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEPUBLISHER_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEPUBLISHER_SVNT_NTRACE */ + +#if (SIMPLEPUBLISHER_SVNT_NTRACE == 1) +# define SIMPLEPUBLISHER_SVNT_TRACE(X) +#else /* (SIMPLEPUBLISHER_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEPUBLISHER_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEPUBLISHER_SVNT_NTRACE == 1) */ + +#endif /* SIMPLEPUBLISHER_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleUser.cidl b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser.cidl new file mode 100644 index 00000000000..e3afe5e12f6 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser.cidl @@ -0,0 +1,11 @@ +// $Id$ +#include "SimpleUser.idl" + +composition session SimpleUser_Impl +{ + home executor SimpleUserHome_Exec + { + implements Simple::SimpleUserHome; + manages SimpleUser_Exec; + }; +}; diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleUser.idl b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser.idl new file mode 100644 index 00000000000..90d4e67e542 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser.idl @@ -0,0 +1,21 @@ +// $Id$ + +#ifndef SIMPLE_USER_IDL +#define SIMPLE_USER_IDL + +#include "SimpleCommon.idl" +#include "Components.idl" + +module Simple +{ + component SimpleUser + { + uses Trigger trig; + }; + + home SimpleUserHome manages SimpleUser + { + }; +}; + +#endif /*SIMPLE_USER_IDL*/ diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleUser.mpc b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser.mpc new file mode 100644 index 00000000000..c33c4120a77 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser.mpc @@ -0,0 +1,121 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p SimpleCommon SimpleUser" + +project(SimpleCommon_SimpleUser_idl_gen) : taoidldefaults, anytypecode { + avoids += ace_for_tao + custom_only = 1 + idlflags += -Wb,stub_export_macro=SIMPLEUSER_STUB_Export \ + -Wb,stub_export_include=SimpleUser_stub_export.h \ + -Wb,skel_export_macro=SIMPLEUSER_SVNT_Export \ + -Wb,skel_export_include=SimpleUser_svnt_export.h + + IDL_Files { + SimpleUser.idl + } +} + +project(SimpleCommon_SimpleUser_cidl_gen) : ciaocidldefaults, taoidldefaults { + avoids += ace_for_tao + custom_only = 1 + cidlflags += --svnt-export-macro SIMPLEUSER_SVNT_Export \ + --svnt-export-include SimpleUser_svnt_export.h + idlflags += -Wb,export_macro=SIMPLEUSER_EXEC_Export \ + -Wb,export_include=SimpleUser_exec_export.h \ + -SS + + CIDL_Files { + SimpleUser.cidl + } + + IDL_Files { + SimpleUserE.idl + } +} + +project(SimpleCommon_SimpleUser_stub) : ccm_stub { + avoids += ace_for_tao + after += SimpleCommon_SimpleUser_idl_gen SimpleCommon_stub + libs += SimpleCommon_stub + + sharedname = SimpleUser_stub + dynamicflags = SIMPLEUSER_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleUserC.cpp + } + + Header_Files { + SimpleUserC.h + SimpleUser_stub_export.h + } + + Inline_Files { + SimpleUserC.inl + } +} + +project(SimpleCommon_SimpleUser_exec) : ciao_executor { + avoids += ace_for_tao + after += SimpleCommon_SimpleUser_cidl_gen SimpleCommon_SimpleUser_stub + sharedname = SimpleUser_exec + libs += SimpleUser_stub SimpleCommon_stub + + dynamicflags = SIMPLEUSER_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + SimpleUserEC.cpp + SimpleUser_exec.cpp + } + + Header_Files { + SimpleUserEC.h + SimpleUser_exec.h + SimpleUser_exec_export.h + } + + Inline_Files { + SimpleUserEC.inl + } +} + + +project(SimpleCommon_SimpleUser_svnt) : ciao_servant { + avoids += ace_for_tao + after += SimpleCommon_skel SimpleCommon_SimpleUser_exec + sharedname = SimpleUser_svnt + libs += SimpleUser_exec \ + SimpleUser_stub \ + SimpleCommon_skel \ + SimpleCommon_stub + + dynamicflags = SIMPLEUSER_SVNT_BUILD_DLL + + CIDL_Files { + } + + IDL_Files { + } + + Source_Files { + SimpleUserS.cpp + SimpleUser_svnt.cpp + } + + Header_Files { + SimpleUserS.h + SimpleUser_svnt.h + SimpleUser_svnt_export.h + } + + Inline_Files { + SimpleUserS.inl + } +} + + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_exec.cpp b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_exec.cpp new file mode 100644 index 00000000000..03d8eb16527 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_exec.cpp @@ -0,0 +1,169 @@ +// $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 "SimpleUser_exec.h" +#include "ciao/CIAO_common.h" + +namespace CIDL_SimpleUser_Impl +{ + //================================================================== + // Component Executor Implementation Class: SimpleUser_exec_i + //================================================================== + + SimpleUser_exec_i::SimpleUser_exec_i (void) + { + CIAO_TRACE ("SimpleUser_exec_i::SimpleUser_exec_i (void)"); + } + + SimpleUser_exec_i::~SimpleUser_exec_i (void) + { + CIAO_TRACE ("SimpleUser_exec_i::~SimpleUser_exec_i (void)"); + } + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + // Operations from Components::SessionComponent + + void + SimpleUser_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + CIAO_TRACE ("SimpleUser_exec_i::set_session_context ()"); + this->context_ = + ::Simple::CCM_SimpleUser_Context::_narrow (ctx); + + if (CORBA::is_nil (this->context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + SimpleUser_exec_i::configuration_complete () + { + CIAO_TRACE ("SimpleUser_exec_i::configuration_complete ()"); + // Your code here. + } + + void + SimpleUser_exec_i::ccm_activate () + { + CIAO_TRACE ("SimpleUser_exec_i::ccm_activate ()"); + + ::Simple::Trigger_var trig (this->context_->get_connection_trig ()); + + if (CORBA::is_nil (trig.in ())) + { + CIAO_ERROR ((LM_ERROR, CLINFO "SimpleUser_exec_i::ccm_activate () - " + "Error: Reference nil for port trig\n")); + return; + } + + // Your code here. + try + { + trig->hello ("Test successful; hello from SimpleUser."); + } + catch (CORBA::Exception &ex) + { + CIAO_ERROR ((LM_ERROR, CLINFO "SimpleUser_exec_i::ccm_activate () - " + "Caught CORBA exception, details follow:\n")); + ex._tao_print_exception (CLINFO "SimpleUser_exec_i::ccm_activate () - "); + } + catch (...) + { + CIAO_ERROR ((LM_ERROR, CLINFO "SimpleUser_exec_i::ccm_activate () - " + "Error: Caught unknown exception whilst invoking reference for port trig.\n")); + } + } + + void + SimpleUser_exec_i::ccm_passivate () + { + CIAO_TRACE ("SimpleUser_exec_i::ccm_passivate ()"); + // Your code here. + } + + void + SimpleUser_exec_i::ccm_remove () + { + CIAO_TRACE ("SimpleUser_exec_i::ccm_remove ()"); + // Your code here. + } + + //================================================================== + // Home Executor Implementation Class: SimpleUserHome_exec_i + //================================================================== + + SimpleUserHome_exec_i::SimpleUserHome_exec_i (void) + { + CIAO_TRACE ("SimpleUserHome_exec_i::SimpleUserHome_exec_i (void)"); + } + + SimpleUserHome_exec_i::~SimpleUserHome_exec_i (void) + { + CIAO_TRACE ("SimpleUserHome_exec_i::~SimpleUserHome_exec_i (void)"); + } + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + SimpleUserHome_exec_i::create () + { + CIAO_TRACE ("SimpleUserHome_exec_i::create ()"); + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX ( + retval, + SimpleUser_exec_i, + ::CORBA::NO_MEMORY ()); + + return retval; + } + + extern "C" SIMPLEUSER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleUserHome_Impl (void) + { + CIAO_TRACE ("create_Simple_SimpleUserHome_Impl (void)"); + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN ( + retval, + SimpleUserHome_exec_i, + ::Components::HomeExecutorBase::_nil ()); + + return retval; + } +} + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_exec.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_exec.h new file mode 100644 index 00000000000..9b28f1e36f2 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_exec.h @@ -0,0 +1,98 @@ +// $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_SIMPLEUSER_EXEC_H +#define CIAO_SIMPLEUSER_EXEC_H + +#include /**/ "ace/pre.h" + +#include "SimpleUserEC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "SimpleUser_exec_export.h" +#include "tao/LocalObject.h" + +namespace CIDL_SimpleUser_Impl +{ + class SIMPLEUSER_EXEC_Export SimpleUser_exec_i + : public virtual SimpleUser_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleUser_exec_i (void); + virtual ~SimpleUser_exec_i (void); + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + // Operations from Components::SessionComponent + + virtual void + set_session_context ( + ::Components::SessionContext_ptr ctx); + + virtual void configuration_complete (); + + virtual void ccm_activate (); + + virtual void ccm_passivate (); + + virtual void ccm_remove (); + + private: + ::Simple::CCM_SimpleUser_Context_var context_; + }; + + class SIMPLEUSER_EXEC_Export SimpleUserHome_exec_i + : public virtual SimpleUserHome_Exec, + public virtual ::CORBA::LocalObject + { + public: + SimpleUserHome_exec_i (void); + virtual ~SimpleUserHome_exec_i (void); + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + virtual ::Components::EnterpriseComponent_ptr + create (); + }; + + extern "C" SIMPLEUSER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Simple_SimpleUserHome_Impl (void); +} + +#include /**/ "ace/post.h" + +#endif /* CIAO_SIMPLEUSER_EXEC_H */ + diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_exec_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_exec_export.h new file mode 100644 index 00000000000..fcc935919a3 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_exec_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEUSER_EXEC +// ------------------------------ +#ifndef SIMPLEUSER_EXEC_EXPORT_H +#define SIMPLEUSER_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEUSER_EXEC_HAS_DLL) +# define SIMPLEUSER_EXEC_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEUSER_EXEC_HAS_DLL */ + +#if !defined (SIMPLEUSER_EXEC_HAS_DLL) +# define SIMPLEUSER_EXEC_HAS_DLL 1 +#endif /* ! SIMPLEUSER_EXEC_HAS_DLL */ + +#if defined (SIMPLEUSER_EXEC_HAS_DLL) && (SIMPLEUSER_EXEC_HAS_DLL == 1) +# if defined (SIMPLEUSER_EXEC_BUILD_DLL) +# define SIMPLEUSER_EXEC_Export ACE_Proper_Export_Flag +# define SIMPLEUSER_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEUSER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEUSER_EXEC_BUILD_DLL */ +# define SIMPLEUSER_EXEC_Export ACE_Proper_Import_Flag +# define SIMPLEUSER_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEUSER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEUSER_EXEC_BUILD_DLL */ +#else /* SIMPLEUSER_EXEC_HAS_DLL == 1 */ +# define SIMPLEUSER_EXEC_Export +# define SIMPLEUSER_EXEC_SINGLETON_DECLARATION(T) +# define SIMPLEUSER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEUSER_EXEC_HAS_DLL == 1 */ + +// Set SIMPLEUSER_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEUSER_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEUSER_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEUSER_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEUSER_EXEC_NTRACE */ + +#if (SIMPLEUSER_EXEC_NTRACE == 1) +# define SIMPLEUSER_EXEC_TRACE(X) +#else /* (SIMPLEUSER_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEUSER_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEUSER_EXEC_NTRACE == 1) */ + +#endif /* SIMPLEUSER_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_stub_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_stub_export.h new file mode 100644 index 00000000000..a31d19d5614 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_stub_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEUSER_STUB +// ------------------------------ +#ifndef SIMPLEUSER_STUB_EXPORT_H +#define SIMPLEUSER_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEUSER_STUB_HAS_DLL) +# define SIMPLEUSER_STUB_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEUSER_STUB_HAS_DLL */ + +#if !defined (SIMPLEUSER_STUB_HAS_DLL) +# define SIMPLEUSER_STUB_HAS_DLL 1 +#endif /* ! SIMPLEUSER_STUB_HAS_DLL */ + +#if defined (SIMPLEUSER_STUB_HAS_DLL) && (SIMPLEUSER_STUB_HAS_DLL == 1) +# if defined (SIMPLEUSER_STUB_BUILD_DLL) +# define SIMPLEUSER_STUB_Export ACE_Proper_Export_Flag +# define SIMPLEUSER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEUSER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEUSER_STUB_BUILD_DLL */ +# define SIMPLEUSER_STUB_Export ACE_Proper_Import_Flag +# define SIMPLEUSER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEUSER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEUSER_STUB_BUILD_DLL */ +#else /* SIMPLEUSER_STUB_HAS_DLL == 1 */ +# define SIMPLEUSER_STUB_Export +# define SIMPLEUSER_STUB_SINGLETON_DECLARATION(T) +# define SIMPLEUSER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEUSER_STUB_HAS_DLL == 1 */ + +// Set SIMPLEUSER_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEUSER_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEUSER_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEUSER_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEUSER_STUB_NTRACE */ + +#if (SIMPLEUSER_STUB_NTRACE == 1) +# define SIMPLEUSER_STUB_TRACE(X) +#else /* (SIMPLEUSER_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEUSER_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEUSER_STUB_NTRACE == 1) */ + +#endif /* SIMPLEUSER_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_svnt_export.h b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_svnt_export.h new file mode 100644 index 00000000000..897f82c3081 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/Components/SimpleUser_svnt_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl SIMPLEUSER_SVNT +// ------------------------------ +#ifndef SIMPLEUSER_SVNT_EXPORT_H +#define SIMPLEUSER_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (SIMPLEUSER_SVNT_HAS_DLL) +# define SIMPLEUSER_SVNT_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && SIMPLEUSER_SVNT_HAS_DLL */ + +#if !defined (SIMPLEUSER_SVNT_HAS_DLL) +# define SIMPLEUSER_SVNT_HAS_DLL 1 +#endif /* ! SIMPLEUSER_SVNT_HAS_DLL */ + +#if defined (SIMPLEUSER_SVNT_HAS_DLL) && (SIMPLEUSER_SVNT_HAS_DLL == 1) +# if defined (SIMPLEUSER_SVNT_BUILD_DLL) +# define SIMPLEUSER_SVNT_Export ACE_Proper_Export_Flag +# define SIMPLEUSER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define SIMPLEUSER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* SIMPLEUSER_SVNT_BUILD_DLL */ +# define SIMPLEUSER_SVNT_Export ACE_Proper_Import_Flag +# define SIMPLEUSER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define SIMPLEUSER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* SIMPLEUSER_SVNT_BUILD_DLL */ +#else /* SIMPLEUSER_SVNT_HAS_DLL == 1 */ +# define SIMPLEUSER_SVNT_Export +# define SIMPLEUSER_SVNT_SINGLETON_DECLARATION(T) +# define SIMPLEUSER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* SIMPLEUSER_SVNT_HAS_DLL == 1 */ + +// Set SIMPLEUSER_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (SIMPLEUSER_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define SIMPLEUSER_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define SIMPLEUSER_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !SIMPLEUSER_SVNT_NTRACE */ + +#if (SIMPLEUSER_SVNT_NTRACE == 1) +# define SIMPLEUSER_SVNT_TRACE(X) +#else /* (SIMPLEUSER_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define SIMPLEUSER_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (SIMPLEUSER_SVNT_NTRACE == 1) */ + +#endif /* SIMPLEUSER_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/SimpleComponentExplicitHome.cdp b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/SimpleComponentExplicitHome.cdp new file mode 100644 index 00000000000..5632d219c48 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/SimpleComponentExplicitHome.cdp @@ -0,0 +1,113 @@ +<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>SimpleComponent_Home</label> + <UUID>SimpleComponent_Home</UUID> + + <!-- Implementations declarations --> + + <!-- Server Dance implementation--> + <!-- Home implementation --> + <implementation xmi:id="SimpleNullHomeImplementation"> + <name>SimpleNullHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleNull_ExecArtifact" /> + <artifact xmi:idref="SimpleNull_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleNullHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleNullHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleNull_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleNull_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleNullComponentImplementation"> + <name>SimpleNullComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleNull_ExecArtifact" /> + <artifact xmi:idref="SimpleNull_SvntArtifact" /> + </implementation> + + <instance xmi:id="SimpleNullHomeInstance"> + <name>SimpleNullHome</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleNullHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleNullComponentInstance"> + <name>SimpleNullComponent</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleNullComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleNullHome</string> + </value> + </value> + </configProperty> + </instance> + + <!-- Artifacts declarations --> + <artifact xmi:id="SimpleNull_ExecArtifact"> + <name>SimpleNull_exec</name> + <source/> + <node/> + <location>SimpleNull_exec</location> + </artifact> + <artifact xmi:id="SimpleNull_SvntArtifact"> + <name>SimpleNull_svnt</name> + <source/> + <node/> + <location>SimpleNull_svnt</location> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/em_launcher.mpc b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/em_launcher.mpc new file mode 100644 index 00000000000..7c43e3bf284 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/em_launcher.mpc @@ -0,0 +1,6 @@ +project(simple_em_launcher) : ciao_config_handlers, dance_nodemanager_stub { + libs += CIAO_Logger + Source_Files { + simple_em_launcher.cpp + } +}
\ No newline at end of file diff --git a/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/simple_em_launcher.cpp b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/simple_em_launcher.cpp new file mode 100644 index 00000000000..f7bfa3862c1 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/simple_em_launcher.cpp @@ -0,0 +1,127 @@ +/** + * @file simple_nm_launcher.cpp + * @author William R. Otte <wotte@dre.vanderbilt.edu> + * + * Launches then immediately tears down a plan. + */ + +#include "ace/Log_Msg.h" +#include "tao/ORB.h" +#include "ciao/Logger/Logger_Service.h" +#include "ciao/Logger/Log_Macros.h" +#include "Deployment/Deployment_DomainApplicationC.h" +#include "Deployment/Deployment_ExecutionManagerC.h" +#include "Deployment/Deployment_DeploymentPlanC.h" +#include "tools/Config_Handlers/XML_File_Intf.h" + +int usage () +{ + ACE_ERROR ((LM_ERROR, "simple_nm_launcher <nm_url> <plan>\n")); + return -1; +} + +#include <iostream> + +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) +{ + CIAO_DISABLE_TRACE (); + + auto_ptr<CIAO::Logger_Service> logger; + + CIAO::Logger_Service + * dlf = ACE_Dynamic_Service<CIAO::Logger_Service>::instance ("CIAO_Logger_Backend_Factory"); + + if (!dlf) + dlf = new CIAO::Logger_Service; + + logger.reset (dlf); + logger->init (argc, argv); + + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); + + if (argc != 3) + return usage (); + + try + { + ACE_DEBUG ((LM_DEBUG, "*** simple_em_launcher: parsing XML\n")); + // Parse plan + CIAO::Config_Handlers::XML_File_Intf xml (argv[2]); + xml.add_search_path ("CIAO_ROOT", "/docs/schema/"); + + auto_ptr< ::Deployment::DeploymentPlan> plan (xml.release_plan ()); + + if (plan.get () == 0) + { + ACE_ERROR ((LM_ERROR, "*** error parsing XML document\n")); + throw 1; + } + + + ACE_DEBUG ((LM_DEBUG, "*** simple_em_launcher: resoling execution manager reference.\n")); + CORBA::Object_var obj = orb->string_to_object (argv[1]); + Deployment::ExecutionManager_var em = Deployment::ExecutionManager::_narrow (obj.in ()); + + if (CORBA::is_nil (em.in ())) + { + ACE_ERROR ((LM_ERROR, "*** simple_em_launcher: ExecutionManager reference is nil.")); + throw 1; + } + + ACE_DEBUG ((LM_DEBUG, "*** simple_em_launcher: calling prepareplan.\n")); + Deployment::DomainApplicationManager_var dam = em->preparePlan (*plan, + Deployment::ResourceCommitmentManager::_nil ()); + + ACE_DEBUG ((LM_DEBUG, "*** simple_em_launcher: calling startLaunch\n")); + Deployment::Connections_var conns; + Deployment::Properties props; + Deployment::Application_var app = dam->startLaunch (props, conns.out ()); + Deployment::DomainApplication_var da = Deployment::DomainApplication::_narrow (app.in ()); + + ACE_DEBUG ((LM_DEBUG, "*** simple_em_launcher: calling finishLaunch\n")); + da->finishLaunch (conns.in (), false); + + ACE_DEBUG ((LM_DEBUG, "*** simple_em_launcher: calling start\n")); + da->start (); + + ACE_DEBUG ((LM_DEBUG, "*** simple_em_launcher: start finished, sleeping 20 seconds.\n")); + ACE_OS::sleep (20); + ACE_DEBUG ((LM_DEBUG, "*** simple_em_launcher: waking up from sleep, calling destroyApplication\n")); + + dam->destroyApplication (da.in ()); + + ACE_DEBUG ((LM_DEBUG, "*** simple_em_launcher: calling destroyManager\n")); + + em->destroyManager (dam.in ()); + + ACE_DEBUG ((LM_DEBUG, "*** simple_em_launcher: destroyManager completed.\n")); + + orb->destroy (); + } + catch (Deployment::StopError &ex) + { + ACE_ERROR ((LM_ERROR, "*** Caught StopError exception with name %s and reason %s\n", + ex.name.in (), ex.reason.in ())); + return -1; + } + catch (Deployment::StartError &ex) + { + ACE_ERROR ((LM_ERROR, "*** Caught StartError exception with name %s and reason %s\n", + ex.name.in (), ex.reason.in ())); + return -1; + } + catch (CORBA::Exception &ex) + { + ACE_ERROR ((LM_ERROR, "*** Caught CORBA exception: %s\n", + ex._info ().c_str ())); + return -1; + + } + catch (...) + { + orb->destroy (); + ACE_ERROR ((LM_ERROR, "*** Caugn unknown exception\n")); + return -1; + } + return 0; +} diff --git a/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/EmitsConnectionExplicitHome.cdp b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/EmitsConnectionExplicitHome.cdp new file mode 100644 index 00000000000..6ac17b1e9e9 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/EmitsConnectionExplicitHome.cdp @@ -0,0 +1,227 @@ +<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>SimpleComponent_Home</label> + <UUID>SimpleComponent_Home</UUID> + + <!-- Implementations declarations --> + + <!-- Home implementation --> + <implementation xmi:id="SimpleEmitterHomeImplementation"> + <name>SimpleEmitterHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleEmitter_ExecArtifact" /> + <artifact xmi:idref="SimpleEmitter_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleEmitterHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleEmitterHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleEmitter_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleEmitter_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleEmitterComponentImplementation"> + <name>SimpleEmitterComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleEmitter_ExecArtifact" /> + <artifact xmi:idref="SimpleEmitter_SvntArtifact" /> + </implementation> + + <implementation xmi:id="SimpleConsumerHomeImplementation"> + <name>SimpleConsumerHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleConsumer_ExecArtifact" /> + <artifact xmi:idref="SimpleConsumer_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleConsumerHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleConsumerHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumer_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumer_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleConsumerComponentImplementation"> + <name>SimpleConsumerComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleConsumer_ExecArtifact" /> + <artifact xmi:idref="SimpleConsumer_SvntArtifact" /> + </implementation> + + <instance xmi:id="SimpleEmitterHomeInstance"> + <name>SimpleEmitterHome</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleEmitterHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleEmitterComponentInstance"> + <name>SimpleEmitterComponent</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleEmitterComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleEmitterHome</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleConsumerHomeInstance"> + <name>SimpleConsumerHome</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleConsumerHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleConsumerComponentInstance"> + <name>SimpleConsumerComponent</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleConsumerComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumerHome</string> + </value> + </value> + </configProperty> + </instance> + + <connection> + <name>TestConnection</name> + <internalEndpoint> + <portName>hello</portName> + <provider>false</provider> + <kind>EventEmitter</kind> + <instance xmi:idref="SimpleEmitterComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>hello_</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance xmi:idref="SimpleConsumerComponentInstance" /> + </internalEndpoint> + </connection> + + <!-- Artifacts declarations --> + <artifact xmi:id="SimpleEmitter_ExecArtifact"> + <name>SimpleEmitter_exec</name> + <source/> + <node/> + <location>SimpleEmitter_exec</location> + </artifact> + <artifact xmi:id="SimpleEmitter_SvntArtifact"> + <name>SimpleEmitter_svnt</name> + <source/> + <node/> + <location>SimpleEmitter_svnt</location> + </artifact> + + <artifact xmi:id="SimpleConsumer_ExecArtifact"> + <name>SimpleConsumer_exec</name> + <source/> + <node/> + <location>SimpleConsumer_exec</location> + </artifact> + <artifact xmi:id="SimpleConsumer_SvntArtifact"> + <name>SimpleConsumer_svnt</name> + <source/> + <node/> + <location>SimpleConsumer_svnt</location> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/MultiplexConnectionExplicitHome.cdp b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/MultiplexConnectionExplicitHome.cdp new file mode 100644 index 00000000000..45ff31929c3 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/MultiplexConnectionExplicitHome.cdp @@ -0,0 +1,262 @@ +<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>SimpleComponent_Home</label> + <UUID>SimpleComponent_Home</UUID> + + <!-- Implementations declarations --> + + <!-- Home implementation --> + <implementation xmi:id="SimpleProviderHomeImplementation"> + <name>SimpleProviderHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleProvider_ExecArtifact" /> + <artifact xmi:idref="SimpleProvider_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleProviderHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleProviderHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleProvider_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleProvider_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleProviderComponentImplementation"> + <name>SimpleProviderComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleProvider_ExecArtifact" /> + <artifact xmi:idref="SimpleProvider_SvntArtifact" /> + </implementation> + + <implementation xmi:id="SimpleMultipleUserHomeImplementation"> + <name>SimpleMultipleUserHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleMultipleUser_ExecArtifact" /> + <artifact xmi:idref="SimpleMultipleUser_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleMultipleUserHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleMultipleUserHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleMultipleUser_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleMultipleUser_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleMultipleUserComponentImplementation"> + <name>SimpleMultipleUserComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleMultipleUser_ExecArtifact" /> + <artifact xmi:idref="SimpleMultipleUser_SvntArtifact" /> + </implementation> + + <instance xmi:id="SimpleProviderHomeInstance"> + <name>SimpleProviderHome</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleProviderHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleProviderComponentInstance"> + <name>SimpleProviderComponent</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleProviderComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleProviderHome</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleMultipleUserHomeInstance"> + <name>SimpleMultipleUserHome</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleMultipleUserHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleMultipleUserComponentInstance"> + <name>SimpleMultipleUserComponent</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleMultipleUserComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleMultipleUserHome</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleMultipleUserComponentInstanceReverse"> + <name>SimpleMultipleUserComponentReverse</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleMultipleUserComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleMultipleUserHome</string> + </value> + </value> + </configProperty> + </instance> + + <connection> + <name>TestConnection</name> + <internalEndpoint> + <portName>trig</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="SimpleProviderComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>trig</portName> + <provider>false</provider> + <kind>MultiplexReceptacle</kind> + <instance xmi:idref="SimpleMultipleUserComponentInstance" /> + </internalEndpoint> + </connection> + + <connection> + <name>TestConnectionReverse</name> + <internalEndpoint> + <portName>trig</portName> + <provider>false</provider> + <kind>MultiplexReceptacle</kind> + <instance xmi:idref="SimpleMultipleUserComponentInstanceReverse" /> + </internalEndpoint> + <internalEndpoint> + <portName>trig</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="SimpleProviderComponentInstance" /> + </internalEndpoint> + </connection> + + <!-- Artifacts declarations --> + <artifact xmi:id="SimpleProvider_ExecArtifact"> + <name>SimpleProvider_exec</name> + <source/> + <node/> + <location>SimpleProvider_exec</location> + </artifact> + <artifact xmi:id="SimpleProvider_SvntArtifact"> + <name>SimpleProvider_svnt</name> + <source/> + <node/> + <location>SimpleProvider_svnt</location> + </artifact> + + <artifact xmi:id="SimpleMultipleUser_ExecArtifact"> + <name>SimpleMultipleUser_exec</name> + <source/> + <node/> + <location>SimpleMultipleUser_exec</location> + </artifact> + <artifact xmi:id="SimpleMultipleUser_SvntArtifact"> + <name>SimpleMultipleUser_svnt</name> + <source/> + <node/> + <location>SimpleMultipleUser_svnt</location> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/PublishConnectionExplicitHome.cdp b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/PublishConnectionExplicitHome.cdp new file mode 100644 index 00000000000..53a0a54482d --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/PublishConnectionExplicitHome.cdp @@ -0,0 +1,227 @@ +<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>SimpleComponent_Home</label> + <UUID>SimpleComponent_Home</UUID> + + <!-- Implementations declarations --> + + <!-- Home implementation --> + <implementation xmi:id="SimplePublisherHomeImplementation"> + <name>SimplePublisherHomeImplementation</name> + <source/> + <artifact xmi:idref="SimplePublisher_ExecArtifact" /> + <artifact xmi:idref="SimplePublisher_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimplePublisherHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimplePublisherHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimplePublisher_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimplePublisher_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimplePublisherComponentImplementation"> + <name>SimplePublisherComponentImplementation</name> + <source/> + <artifact xmi:idref="SimplePublisher_ExecArtifact" /> + <artifact xmi:idref="SimplePublisher_SvntArtifact" /> + </implementation> + + <implementation xmi:id="SimpleConsumerHomeImplementation"> + <name>SimpleConsumerHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleConsumer_ExecArtifact" /> + <artifact xmi:idref="SimpleConsumer_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleConsumerHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleConsumerHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumer_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumer_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleConsumerComponentImplementation"> + <name>SimpleConsumerComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleConsumer_ExecArtifact" /> + <artifact xmi:idref="SimpleConsumer_SvntArtifact" /> + </implementation> + + <instance xmi:id="SimplePublisherHomeInstance"> + <name>SimplePublisherHome</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimplePublisherHomeImplementation" /> + </instance> + + <instance xmi:id="SimplePublisherComponentInstance"> + <name>SimplePublisherComponent</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimplePublisherComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimplePublisherHome</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleConsumerHomeInstance"> + <name>SimpleConsumerHome</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleConsumerHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleConsumerComponentInstance"> + <name>SimpleConsumerComponent</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleConsumerComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleConsumerHome</string> + </value> + </value> + </configProperty> + </instance> + + <connection> + <name>TestConnection</name> + <internalEndpoint> + <portName>hello</portName> + <provider>false</provider> + <kind>EventPublisher</kind> + <instance xmi:idref="SimplePublisherComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>hello_</portName> + <provider>true</provider> + <kind>EventConsumer</kind> + <instance xmi:idref="SimpleConsumerComponentInstance" /> + </internalEndpoint> + </connection> + + <!-- Artifacts declarations --> + <artifact xmi:id="SimplePublisher_ExecArtifact"> + <name>SimplePublisher_exec</name> + <source/> + <node/> + <location>SimplePublisher_exec</location> + </artifact> + <artifact xmi:id="SimplePublisher_SvntArtifact"> + <name>SimplePublisher_svnt</name> + <source/> + <node/> + <location>SimplePublisher_svnt</location> + </artifact> + + <artifact xmi:id="SimpleConsumer_ExecArtifact"> + <name>SimpleConsumer_exec</name> + <source/> + <node/> + <location>SimpleConsumer_exec</location> + </artifact> + <artifact xmi:id="SimpleConsumer_SvntArtifact"> + <name>SimpleConsumer_svnt</name> + <source/> + <node/> + <location>SimpleConsumer_svnt</location> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/SimpleAttributeExplicitHome.cdp b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/SimpleAttributeExplicitHome.cdp new file mode 100644 index 00000000000..d66eef2c70b --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/SimpleAttributeExplicitHome.cdp @@ -0,0 +1,179 @@ +<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>SimpleComponent_Home</label> + <UUID>SimpleComponent_Home</UUID> + + <!-- Implementations declarations --> + + <!-- Server Dance implementation--> + <!-- Home implementation --> + <implementation xmi:id="SimpleAttributeHomeImplementation"> + <name>SimpleAttributeHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleAttribute_ExecArtifact" /> + <artifact xmi:idref="SimpleAttribute_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleAttributeHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleAttributeHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleAttribute_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleAttribute_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleAttributeComponentImplementation"> + <name>SimpleAttributeComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleAttribute_ExecArtifact" /> + <artifact xmi:idref="SimpleAttribute_SvntArtifact" /> + </implementation> + + <instance xmi:id="SimpleAttributeHomeInstance"> + <name>SimpleAttributeHome</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleAttributeHomeImplementation" /> + <configProperty> + <name>str_attr</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Initialized Attribute!</string> + </value> + </value> + </configProperty> + <configProperty> + <name>long_attr</name> + <value> + <type> + <kind>tk_long</kind> + </type> + <value> + <long>1</long> + </value> + </value> + </configProperty> + <configProperty> + <name>short_attr</name> + <value> + <type> + <kind>tk_short</kind> + </type> + <value> + <short>1</short> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleAttributeComponentInstance"> + <name>SimpleAttributeComponent</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleAttributeComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleAttributeHome</string> + </value> + </value> + </configProperty> + <configProperty> + <name>str_attr</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Initialized Attribute!</string> + </value> + </value> + </configProperty> + <configProperty> + <name>long_attr</name> + <value> + <type> + <kind>tk_long</kind> + </type> + <value> + <long>1</long> + </value> + </value> + </configProperty> + <configProperty> + <name>short_attr</name> + <value> + <type> + <kind>tk_short</kind> + </type> + <value> + <short>1</short> + </value> + </value> + </configProperty> + </instance> + + <!-- Artifacts declarations --> + <artifact xmi:id="SimpleAttribute_ExecArtifact"> + <name>SimpleAttribute_exec</name> + <source/> + <node/> + <location>SimpleAttribute_exec</location> + </artifact> + <artifact xmi:id="SimpleAttribute_SvntArtifact"> + <name>SimpleAttribute_svnt</name> + <source/> + <node/> + <location>SimpleAttribute_svnt</location> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/SimplexConnectionExplicitHome.cdp b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/SimplexConnectionExplicitHome.cdp new file mode 100644 index 00000000000..f3f1e1ca6e9 --- /dev/null +++ b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/SimplexConnectionExplicitHome.cdp @@ -0,0 +1,262 @@ +<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>SimpleComponent_Home</label> + <UUID>SimpleComponent_Home</UUID> + + <!-- Implementations declarations --> + + <!-- Home implementation --> + <implementation xmi:id="SimpleProviderHomeImplementation"> + <name>SimpleProviderHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleProvider_ExecArtifact" /> + <artifact xmi:idref="SimpleProvider_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleProviderHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleProviderHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleProvider_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleProvider_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleProviderComponentImplementation"> + <name>SimpleProviderComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleProvider_ExecArtifact" /> + <artifact xmi:idref="SimpleProvider_SvntArtifact" /> + </implementation> + + <implementation xmi:id="SimpleUserHomeImplementation"> + <name>SimpleUserHomeImplementation</name> + <source/> + <artifact xmi:idref="SimpleUser_ExecArtifact" /> + <artifact xmi:idref="SimpleUser_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see §10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleUserHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Simple_SimpleUserHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleUser_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleUser_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SimpleUserComponentImplementation"> + <name>SimpleUserComponentImplementation</name> + <source/> + <artifact xmi:idref="SimpleUser_ExecArtifact" /> + <artifact xmi:idref="SimpleUser_SvntArtifact" /> + </implementation> + + <instance xmi:id="SimpleProviderHomeInstance"> + <name>SimpleProviderHome</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleProviderHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleProviderComponentInstance"> + <name>SimpleProviderComponent</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleProviderComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleProviderHome</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleUserHomeInstance"> + <name>SimpleUserHome</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleUserHomeImplementation" /> + </instance> + + <instance xmi:id="SimpleUserComponentInstance"> + <name>SimpleUserComponent</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleUserComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleUserHome</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="SimpleUserComponentInstanceReverse"> + <name>SimpleUserComponentReverse</name> + <node>Node</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SimpleUserComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.ExplicitHome</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>SimpleUserHome</string> + </value> + </value> + </configProperty> + </instance> + + <connection> + <name>TestConnection</name> + <internalEndpoint> + <portName>trig</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="SimpleProviderComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>trig</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="SimpleUserComponentInstance" /> + </internalEndpoint> + </connection> + + <connection> + <name>TestConnectionReverse</name> + <internalEndpoint> + <portName>trig</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="SimpleUserComponentInstanceReverse" /> + </internalEndpoint> + <internalEndpoint> + <portName>trig</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="SimpleProviderComponentInstance" /> + </internalEndpoint> + </connection> + + <!-- Artifacts declarations --> + <artifact xmi:id="SimpleProvider_ExecArtifact"> + <name>SimpleProvider_exec</name> + <source/> + <node/> + <location>SimpleProvider_exec</location> + </artifact> + <artifact xmi:id="SimpleProvider_SvntArtifact"> + <name>SimpleProvider_svnt</name> + <source/> + <node/> + <location>SimpleProvider_svnt</location> + </artifact> + + <artifact xmi:id="SimpleUser_ExecArtifact"> + <name>SimpleUser_exec</name> + <source/> + <node/> + <location>SimpleUser_exec</location> + </artifact> + <artifact xmi:id="SimpleUser_SvntArtifact"> + <name>SimpleUser_svnt</name> + <source/> + <node/> + <location>SimpleUser_svnt</location> + </artifact> + + </Deployment:DeploymentPlan> diff --git a/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/simple_nm_launcher.cpp b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/simple_nm_launcher.cpp index 67dfbbcd6c9..e4720418449 100644 --- a/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/simple_nm_launcher.cpp +++ b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/simple_nm_launcher.cpp @@ -24,21 +24,13 @@ int usage () int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { - std::cerr << "1\n"; - CIAO_DISABLE_TRACE (); - std::cerr << "1\n"; - auto_ptr<CIAO::Logger_Service> logger; - std::cerr << "1\n"; - CIAO::Logger_Service * dlf = ACE_Dynamic_Service<CIAO::Logger_Service>::instance ("CIAO_Logger_Backend_Factory"); - std::cerr << "1\n"; - if (!dlf) dlf = new CIAO::Logger_Service; diff --git a/CIAO/DAnCE/tests/NameServiceTest/NameServiceTest.mpc b/CIAO/DAnCE/tests/NameServiceTest/NameServiceTest.mpc index 155a491df35..695fa177909 100644 --- a/CIAO/DAnCE/tests/NameServiceTest/NameServiceTest.mpc +++ b/CIAO/DAnCE/tests/NameServiceTest/NameServiceTest.mpc @@ -1,5 +1,5 @@ -project (*NameServiceTestServer): dance, taoserver, iortable, naming, dance_logger { +project (*NameServiceTestServer): dance, taoserver, iortable, naming_serv, dance_logger { exename = NameServiceTestServer IDL_Files { diff --git a/CIAO/DAnCE/tests/RedirectionServiceTest/RedirectionServiceTest.mpc b/CIAO/DAnCE/tests/RedirectionServiceTest/RedirectionServiceTest.mpc index 033b57c2f26..b587494e045 100644 --- a/CIAO/DAnCE/tests/RedirectionServiceTest/RedirectionServiceTest.mpc +++ b/CIAO/DAnCE/tests/RedirectionServiceTest/RedirectionServiceTest.mpc @@ -1,5 +1,5 @@ -project (*RedirectionServiceTestServer): dance, taoserver, iortable, naming, dance_redirection_service, dance_logger { +project (*RedirectionServiceTestServer): dance, taoserver, iortable, naming, dance_redirection_service, dance_logger, naming_serv { exename = RedirectionServiceTestServer IDL_Files { diff --git a/CIAO/MPC/config/cidlc.mpb b/CIAO/MPC/config/cidlc.mpb index 727e3365cbd..d2ee254d115 100644 --- a/CIAO/MPC/config/cidlc.mpb +++ b/CIAO/MPC/config/cidlc.mpb @@ -5,7 +5,7 @@ project: boost_filesystem, boost_regex, exceptions, crosscompile, boost_system { includes += $(CIAO_ROOT) $(CIAO_ROOT)/CCF $(ACE_ROOT)/contrib/utility libpaths += $(CIAO_ROOT)/CCF/CCF $(ACE_ROOT)/lib - specific(nmake, vc71, vc8) { + specific(nmake, vc71, vc8, vc9) { compile_flags += /wd4290 /wd4800 /wd4250 /wd4355 /wd4996 } diff --git a/CIAO/MPC/config/dance_node_manager.mpb b/CIAO/MPC/config/dance_node_manager.mpb index b1ade93a847..93a4d3cff8b 100644 --- a/CIAO/MPC/config/dance_node_manager.mpb +++ b/CIAO/MPC/config/dance_node_manager.mpb @@ -1,7 +1,7 @@ // -*- MPC -*- // $Id$ -project : dance, dance_node_application_manager { - after += NodeManager +project : dance, dance_node_application_manager, naming_serv { + after += Node_Manager_Module libs += DAnCE_NodeManager } diff --git a/CIAO/ciao/ComponentServer/CIAO_ServerActivator_Impl.cpp b/CIAO/ciao/ComponentServer/CIAO_ServerActivator_Impl.cpp index a1ae89404f0..1f951888394 100644 --- a/CIAO/ciao/ComponentServer/CIAO_ServerActivator_Impl.cpp +++ b/CIAO/ciao/ComponentServer/CIAO_ServerActivator_Impl.cpp @@ -208,6 +208,7 @@ namespace CIAO server->uuid_.c_str ())); // Now we need to get a copy of the one that was inserted... pid_t pid = this->spawn_component_server (*server, cmd_options); + ACE_UNUSED_ARG (pid); ACE_Time_Value timeout (this->spawn_delay_); diff --git a/CIAO/ciao/Containers/Session/Session_Container.cpp b/CIAO/ciao/Containers/Session/Session_Container.cpp index 18a14123ed7..ae40971e07b 100644 --- a/CIAO/ciao/Containers/Session/Session_Container.cpp +++ b/CIAO/ciao/Containers/Session/Session_Container.cpp @@ -682,7 +682,7 @@ namespace CIAO if (sess == 0) throw CIAO::InvalidComponent (); - CIAO_TRACE ((LM_TRACE, CLINFO "Session_Container::activate_component - " + CIAO_DEBUG ((LM_TRACE, CLINFO "Session_Container::activate_component - " "Invoking CCM activate on provided component object reference.")); sess->activate_component (); } @@ -730,7 +730,7 @@ namespace CIAO if (sess == 0) throw CIAO::InvalidComponent (); - CIAO_TRACE ((LM_TRACE, CLINFO "Session_Container::passivate_component - " + CIAO_DEBUG ((LM_TRACE, CLINFO "Session_Container::passivate_component - " "Invoking CCM activate on provided component object reference.")); sess->passivate_component (); } diff --git a/CIAO/ciao/Containers/Session/Session_Container.mpc b/CIAO/ciao/Containers/Session/Session_Container.mpc index 1802a428ee8..3ce03fe4548 100644 --- a/CIAO/ciao/Containers/Session/Session_Container.mpc +++ b/CIAO/ciao/Containers/Session/Session_Container.mpc @@ -8,7 +8,6 @@ project(CIAO_Session_Container) : ccm_svnt, ciao_lib, ciao_container_base, utils idlflags += -Wb,export_macro=Session_Container_Export IDL_Files { -// Session_Container.idl } Source_Files { Session_Container.cpp diff --git a/CIAO/ciao/Containers/Swapping/Dynamic_Component_Activator.h b/CIAO/ciao/Containers/Swapping/Dynamic_Component_Activator.h index ec3b49cd4a5..8c59e8c8087 100644 --- a/CIAO/ciao/Containers/Swapping/Dynamic_Component_Activator.h +++ b/CIAO/ciao/Containers/Swapping/Dynamic_Component_Activator.h @@ -22,13 +22,12 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "ccm/CCM_ContainerC.h" - +#include "ace/Hash_Map_Manager_T.h" #include "tao/PortableServer/Key_Adapters.h" #include "tao/LocalObject.h" #include "tao/PortableServer/ServantActivatorC.h" -#include "ciao/CIAO_common.h" -#include "ace/Hash_Map_Manager_T.h" +#include "ccm/CCM_ContainerC.h" +#include "ciao/Logger/Log_Macros.h" #if defined(_MSC_VER) #pragma warning(push) diff --git a/CIAO/ciao/Servants/Servant_Impl_Base.cpp b/CIAO/ciao/Servants/Servant_Impl_Base.cpp index bc02cad0cdf..3975b4ff41b 100644 --- a/CIAO/ciao/Servants/Servant_Impl_Base.cpp +++ b/CIAO/ciao/Servants/Servant_Impl_Base.cpp @@ -659,7 +659,7 @@ namespace CIAO } void - Servant_Impl_Base::set_attributes (const Components::ConfigValues &descr) + Servant_Impl_Base::set_attributes (const Components::ConfigValues &/*descr*/) { CIAO_TRACE ("Servant_Impl_Base::set_attributes"); throw CORBA::NO_IMPLEMENT (); @@ -681,8 +681,8 @@ namespace CIAO } ::Components::Cookie * - Servant_Impl_Base::subscribe (const char * publisher_name, - ::Components::EventConsumerBase_ptr subscriber) + Servant_Impl_Base::subscribe (const char *, + ::Components::EventConsumerBase_ptr) { CIAO_TRACE ("Servant_Impl_Base::subscribe"); throw CORBA::NO_IMPLEMENT (); @@ -690,23 +690,23 @@ namespace CIAO ::Components::EventConsumerBase_ptr - Servant_Impl_Base::unsubscribe (const char * publisher_name, - ::Components::Cookie * ck) + Servant_Impl_Base::unsubscribe (const char *, + ::Components::Cookie *) { CIAO_TRACE ("Servant_Impl_Base::unsubscribe"); throw CORBA::NO_IMPLEMENT (); } void - Servant_Impl_Base::connect_consumer (const char * emitter_name, - ::Components::EventConsumerBase_ptr consumer) + Servant_Impl_Base::connect_consumer (const char *, + ::Components::EventConsumerBase_ptr) { CIAO_TRACE ("Servant_Impl_Base::connect_consumer"); throw CORBA::NO_IMPLEMENT (); } ::Components::EventConsumerBase_ptr - Servant_Impl_Base::disconnect_consumer (const char * source_name) + Servant_Impl_Base::disconnect_consumer (const char *) { CIAO_TRACE ("Servant_Impl_Base::disconnect_consumer"); throw CORBA::NO_IMPLEMENT (); @@ -727,7 +727,7 @@ namespace CIAO } ::CORBA::Boolean - Servant_Impl_Base::same_component (::CORBA::Object_ptr object_ref) + Servant_Impl_Base::same_component (::CORBA::Object_ptr) { CIAO_TRACE ("Servant_Impl_Base::same_component"); throw CORBA::NO_IMPLEMENT (); @@ -735,16 +735,16 @@ namespace CIAO ::Components::Cookie * - Servant_Impl_Base::connect (const char * name, - ::CORBA::Object_ptr connection) + Servant_Impl_Base::connect (const char *, + ::CORBA::Object_ptr) { CIAO_TRACE ("Servant_Impl_Base::connect"); throw CORBA::NO_IMPLEMENT (); } ::CORBA::Object_ptr - Servant_Impl_Base::disconnect (const char * name, - ::Components::Cookie * ck) + Servant_Impl_Base::disconnect (const char *, + ::Components::Cookie *) { CIAO_TRACE ("Servant_Impl_Base::disconnect"); throw CORBA::NO_IMPLEMENT (); diff --git a/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.mpc b/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.mpc index 9fb0ca78c19..d61788edbac 100644 --- a/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.mpc +++ b/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.mpc @@ -2,6 +2,7 @@ // $Id$ project (CIAO_RTEvent) : naming, rtevent_serv, ciao_events_base_dnc, ace_output { + requires += dummy_label sharedname = CIAO_RTEvent idlflags += -Wb,export_include=CIAO_RTEVENT_Export.h \ -Wb,export_macro=CIAO_RTEVENT_Export diff --git a/CIAO/tests/CIAO_ComponentServer/SimpleComponent/run_test.pl b/CIAO/tests/CIAO_ComponentServer/SimpleComponent/run_test.pl new file mode 100755 index 00000000000..847e8ba1032 --- /dev/null +++ b/CIAO/tests/CIAO_ComponentServer/SimpleComponent/run_test.pl @@ -0,0 +1,44 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +use lib "$ENV{ACE_ROOT}/bin"; +use PerlACE::Run_Test; +use PerlACE::TestTarget; + +$status = 0; +$debug_level = '0'; +$ciao_root = "$ENV{CIAO_ROOT}"; + +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } +} + +my $target = PerlACE::TestTarget::create_target ($PerlACE::TestConfig); +my $host = new PerlACE::TestTarget; + +if (PerlACE::is_vxworks_test()) { + $SV1 = new PerlACE::ProcessVX ("client", "-ORBDebuglevel $debug_level -s $ciao_root/bin/ciao_componentserver -d 120"); +} +else { + $SV1 = $target->CreateProcess ("client", "-ORBDebuglevel $debug_level -s $ciao_root/bin/ciao_componentserver -d 120"); +} + +$server1 = $SV1->SpawnWaitKill (300); + +if ($server1 != 0) { + print STDERR "ERROR: server1 returned $server\n"; + exit 1; +} + +$target->GetStderrLog(); + +$target->DeleteFile($iorfile); +$host->DeleteFile ($iorbase); + +exit $status; diff --git a/CIAO/tools/Config_Handlers/IRDD_Handler.cpp b/CIAO/tools/Config_Handlers/IRDD_Handler.cpp index 1e9a9ea6f1e..f834fcbd192 100644 --- a/CIAO/tools/Config_Handlers/IRDD_Handler.cpp +++ b/CIAO/tools/Config_Handlers/IRDD_Handler.cpp @@ -23,8 +23,7 @@ namespace CIAO void IRDD_Handler::handle_irdd (const InstanceResourceDeploymentDescription& desc, - Deployment::InstanceResourceDeploymentDescription& toconfig) - throw (Config_Error) + Deployment::InstanceResourceDeploymentDescription& toconfig) { CIAO_TRACE("IRDD_Handler::instance_resource_deployment_descr"); @@ -67,9 +66,7 @@ namespace CIAO } InstanceResourceDeploymentDescription - IRDD_Handler::instance_resource_deployment_descr ( - const Deployment::InstanceResourceDeploymentDescription& src) - throw (Config_Error) + IRDD_Handler::instance_resource_deployment_descr (const Deployment::InstanceResourceDeploymentDescription& src) { CIAO_TRACE("IRDD_Handler::instance_resource_deployment_descr - reverse"); diff --git a/CIAO/tools/Config_Handlers/IRDD_Handler.h b/CIAO/tools/Config_Handlers/IRDD_Handler.h index 4bac2d3c5f5..af641813e26 100644 --- a/CIAO/tools/Config_Handlers/IRDD_Handler.h +++ b/CIAO/tools/Config_Handlers/IRDD_Handler.h @@ -55,11 +55,11 @@ namespace CIAO static void handle_irdd (const InstanceResourceDeploymentDescription& desc, Deployment::InstanceResourceDeploymentDescription& toconfig) - throw (Config_Error); + /*throw (Config_Error)*/; static InstanceResourceDeploymentDescription instance_resource_deployment_descr (const Deployment::InstanceResourceDeploymentDescription& src) - throw (Config_Error); + /*throw (Config_Error)*/; }; typedef Sequence_Handler < InstanceResourceDeploymentDescription, diff --git a/CIAO/tools/Config_Handlers/XML_Typedefs.cpp b/CIAO/tools/Config_Handlers/XML_Typedefs.cpp index 7826aaa2e01..9d57ac17e92 100644 --- a/CIAO/tools/Config_Handlers/XML_Typedefs.cpp +++ b/CIAO/tools/Config_Handlers/XML_Typedefs.cpp @@ -12,4 +12,3 @@ namespace CIAO XML_Helper::HELPER XML_Helper::XML_HELPER (XML_Helper::_xml_resolver, XML_Helper::_xml_error_handler); } } - diff --git a/CIAO/tools/Config_Handlers/XML_Typedefs.h b/CIAO/tools/Config_Handlers/XML_Typedefs.h index c9070e1f54e..e40a7d2465a 100644 --- a/CIAO/tools/Config_Handlers/XML_Typedefs.h +++ b/CIAO/tools/Config_Handlers/XML_Typedefs.h @@ -19,10 +19,10 @@ namespace CIAO class XSC_XML_Handlers_Export XML_Helper { public: - typedef CIAO::XML::Environment_Resolver PATH_RESOLVER; - typedef CIAO::XML::XML_Schema_Resolver< CIAO::XML::Environment_Resolver > XML_RESOLVER; - typedef CIAO::XML::XML_Error_Handler ERROR_HANDLER; - typedef CIAO::XML::XML_Helper< XML_RESOLVER, ERROR_HANDLER > HELPER; + typedef ::CIAO::XML::Environment_Resolver PATH_RESOLVER; + typedef ::CIAO::XML::XML_Schema_Resolver< ::CIAO::XML::Environment_Resolver > XML_RESOLVER; + typedef ::CIAO::XML::XML_Error_Handler ERROR_HANDLER; + typedef ::CIAO::XML::XML_Helper< XML_RESOLVER, ERROR_HANDLER > HELPER; static PATH_RESOLVER _path_resolver; static XML_RESOLVER _xml_resolver; @@ -34,4 +34,5 @@ namespace CIAO } } + #endif /* XML_TYPEDEFS_H */ diff --git a/CIAO/tools/Config_Handlers/XSCRT/XML.hpp b/CIAO/tools/Config_Handlers/XSCRT/XML.hpp index 5dd6ec2ab14..8f21ea8263d 100644 --- a/CIAO/tools/Config_Handlers/XSCRT/XML.hpp +++ b/CIAO/tools/Config_Handlers/XSCRT/XML.hpp @@ -462,8 +462,11 @@ namespace XSCRT { string xns (ns); +#if defined(XERCES_VERSION_MAJOR) && XERCES_VERSION_MAJOR > 2 XMLCh const* p (e.dom_element ()->lookupPrefix (xns.c_str ())); - +#else + XMLCh const* p (e.dom_element ()->lookupNamespacePrefix (xns.c_str (), false)); +#endif if (p == 0) { diff --git a/CIAO/tools/XML/XML.mpc b/CIAO/tools/XML/XML.mpc index 24c89526e46..398f2cfdd55 100644 --- a/CIAO/tools/XML/XML.mpc +++ b/CIAO/tools/XML/XML.mpc @@ -2,9 +2,7 @@ project (CIAO_XML_Utils) : acelib, xerces, ciao_lib { sharedname += CIAO_XML_Utils - after += ACE dynamicflags = CIAO_XML_UTILS_BUILD_DLL - macros += XML_USE_PTHREADS includes += .. Source_Files { diff --git a/CIAO/tools/XML/XML_Error_Handler.cpp b/CIAO/tools/XML/XML_Error_Handler.cpp index f11f5f2591d..782008cbdf6 100644 --- a/CIAO/tools/XML/XML_Error_Handler.cpp +++ b/CIAO/tools/XML/XML_Error_Handler.cpp @@ -7,6 +7,7 @@ #include <xercesc/dom/DOMLocator.hpp> #include <xercesc/sax/SAXParseException.hpp> #include "XercesString.h" +#include <iostream> #include <iostream> diff --git a/CIAO/tools/XML/XML_Helper.tpp b/CIAO/tools/XML/XML_Helper.tpp index 56edec4ee4e..53ad48ff5f7 100644 --- a/CIAO/tools/XML/XML_Helper.tpp +++ b/CIAO/tools/XML/XML_Helper.tpp @@ -239,22 +239,10 @@ namespace CIAO XML_Helper<Resolver, Error>::write_DOM (XERCES_CPP_NAMESPACE::DOMDocument *doc, const ACE_TCHAR *file) const { - throw 1; - /* @@TODO: Reimplement for xerces 3. - - try - { - bool retn; - std::auto_ptr <XERCES_CPP_NAMESPACE::DOMWriter> writer (impl_->createDOMWriter()); - - if (writer->canSetFeature (XMLUni::fgDOMWRTFormatPrettyPrint, - true)) - writer->setFeature (XMLUni::fgDOMWRTFormatPrettyPrint, true); - - std::auto_ptr <xercesc::XMLFormatTarget> ft (new xercesc::LocalFileFormatTarget(file)); - retn = writer->writeNode(ft.get (), *doc); - - return retn; + /*try + {*/ + throw 1; + /* @@TODO: Reimplement for xerces 3. } catch (const xercesc::XMLException &e) { @@ -276,8 +264,7 @@ namespace CIAO e.getSrcFile (), e.getSrcLine ())); return false; - } - */ + }*/ } } } diff --git a/CIAO/tools/XML/XML_Schema_Resolver.cpp b/CIAO/tools/XML/XML_Schema_Resolver.cpp index 06ca27112f5..4157b79bbe2 100644 --- a/CIAO/tools/XML/XML_Schema_Resolver.cpp +++ b/CIAO/tools/XML/XML_Schema_Resolver.cpp @@ -62,7 +62,7 @@ namespace CIAO XStr path (*i); path.append(systemId); - xercesc::FileHandle file (XMLPlatformUtils::openFile (path)); + FileHandle file (XMLPlatformUtils::openFile (path)); if (file != 0) { |