diff options
Diffstat (limited to 'CIAO/RACE/Input_Adapters/PlanGenerator')
17 files changed, 0 insertions, 2040 deletions
diff --git a/CIAO/RACE/Input_Adapters/PlanGenerator/Injector.cpp b/CIAO/RACE/Input_Adapters/PlanGenerator/Injector.cpp deleted file mode 100644 index a0eaa7bbb9b..00000000000 --- a/CIAO/RACE/Input_Adapters/PlanGenerator/Injector.cpp +++ /dev/null @@ -1,180 +0,0 @@ -/** - * @file Injector.cpp - * @author Will Otte <wotte@dre.vanderbilt.edu> - * @author Stoyan Paunov - * - * $Id$ - */ - -#include "Input_Adapters/PlanGenerator/PlanGeneratorC.h" -#include "ace/OS.h" -#include "ace/Get_Opt.h" -#include "ace/SString.h" -#include "orbsvcs/CosNamingC.h" -#include "ace/Auto_Ptr.h" - -#include <iostream> -using namespace std; - -namespace CIAO -{ - namespace RACE - { - namespace Injector - { - const char *package_name = 0; - const char *iia_ior_file = 0; - const char *iia_name = "RACE::InteractiveInput"; - - bool teardown = false; - - static void - usage (const ACE_TCHAR* program) - { - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("Usage %s\n") - ACE_TEXT ("-p <Name of package to fetch from the RepoMan>\n") - ACE_TEXT ("-t <Teardown plan>\n") - ACE_TEXT ("-k <Interactive_Input_Adaptor IOR, " - "use naming service if not present\n"), - program)); - } - - static bool - parse_args (int argc, - ACE_TCHAR *argv[]) - { - ACE_Get_Opt get_opt (argc, - argv, - ACE_TEXT ("p:k:thn:")); - int c; - - while ((c = get_opt ()) != EOF) - { - switch (c) - { - case 'p': - package_name = get_opt.opt_arg (); - break; - - case 'k': - iia_ior_file = get_opt.opt_arg (); - break; - - case 't': - teardown = true; - break; - - case 'n': - iia_name = get_opt.opt_arg (); - - case 'h': - default: - usage (argv[0]); - return false; - } - } - - return true; - } - - CORBA::Object_ptr - fetch_reference_naming (CORBA::ORB_ptr orb, - const ACE_CString &name) - { - ACE_ERROR ((LM_ERROR, "Resolving via nameservice...\n")); - using namespace CosNaming; - - // Resolve naming service - CORBA::Object_var tmp = - orb->resolve_initial_references ("NameService"); - - NamingContext_var pns = - NamingContext::_narrow (tmp.in ()); - - Name ns_name; - CORBA::ULong i = 0; - - ACE_Tokenizer tok ( name.rep ()); - tok.delimiter_replace (':', 0); - tok.delimiter_replace ('/', 0); - - char *name_element = 0; - while ((name_element = tok.next ()) != 0) - { - ns_name.length (ns_name.length () + 1); - ns_name[i].id = CORBA::string_dup (name_element); - ++i; - } - - - return pns->resolve (ns_name); - } - - static int - run_main_implementation (int argc, ACE_TCHAR *argv[]) - { - try - { - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, ""); - - if (!parse_args (argc, argv)) - return -1; - - - // Resolve our input adapter... - CORBA::Object_var tmp; - - cout << "resolving: " << iia_ior_file << endl; - - if (iia_ior_file != 0) - tmp = orb->string_to_object (iia_ior_file); - else // must be a name.... - tmp = fetch_reference_naming (orb.in (), iia_name); - - CIAO::RACE::PlanGenerator_var iia - = CIAO::RACE::PlanGenerator::_narrow (tmp.in ()); - - // Create deploy input event. - CIAO::RACE::Deploy_Input_var input = - new OBV_CIAO::RACE::Deploy_Input; - - input->package_name (package_name); - - if (teardown) - { - input->command (::CIAO::RACE::TEARDOWN); - } - else - { - input->command (::CIAO::RACE::DEPLOY); - } - - // Get the consumer for the IIA - ::CIAO::RACE::Deploy_InputConsumer_var consumer = - iia->get_consumer_deployment (); - - // push the event - consumer->push_Deploy_Input (input.in ()); - - } - catch (...) - { - ACE_ERROR ((LM_ERROR, - "(%P|%t) Injector: Unknown exception\n")); - return -1; - } - - return 0; - } - - } //namespace Injector - } //namespace RACE -} //Namespace CIAO - -int main (int argc, ACE_TCHAR **argv) -{ - return CIAO::RACE::Injector::run_main_implementation (argc, argv); -} - diff --git a/CIAO/RACE/Input_Adapters/PlanGenerator/PCVisitorBase.cpp b/CIAO/RACE/Input_Adapters/PlanGenerator/PCVisitorBase.cpp deleted file mode 100644 index 040ecb9eb45..00000000000 --- a/CIAO/RACE/Input_Adapters/PlanGenerator/PCVisitorBase.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/* -*- C++ -*- */ - -//======================================================================== -/* - * file PCVisitorBase.cpp - * - * $Id$ - * - * This file is a dummy which either includes the PCVisitorBase.inl or - * is ignored. - * - * author Stoyan Paunov <spaunov@isis.vanderbilt.edu> - */ -//======================================================================== - -#include "PCVisitorBase.h" - - PCVisitorBase::PCVisitorBase (void) - { - } - -#if !defined (__ACE_INLINE__) -#include "PCVisitorBase.inl" -#endif /* __ACE_INLINE__ */ diff --git a/CIAO/RACE/Input_Adapters/PlanGenerator/PCVisitorBase.h b/CIAO/RACE/Input_Adapters/PlanGenerator/PCVisitorBase.h deleted file mode 100644 index cd3cb2b8752..00000000000 --- a/CIAO/RACE/Input_Adapters/PlanGenerator/PCVisitorBase.h +++ /dev/null @@ -1,214 +0,0 @@ -/* -*- C++ -*- */ - -//======================================================================== -/** - * file PCVisitorBase.h - * - * $Id$ - * - * This file contains the virtual base class for the PackageConfiguration - * Visitor which is used to traverse the PackageConfiguration element - * defined in the PackagingData.idl. The PackageConfiguration has a - * number of sequence elements. This class actually implements the - * operations which involve sequences and delegates the calls to - * the operations which handle single elements from the sequence type. - * - * author Stoyan Paunov <spaunov@isis.vanderbilt.edu> - */ -//======================================================================== - -#ifndef PC_VISITOR_BASE_H -#define PC_VISITOR_BASE_H - -#include /**/ "ace/pre.h" -#include "ciao/DeploymentC.h" -#include "ciao/Deployment_DataC.h" -#include "ciao/Packaging_DataC.h" -#include "ace/SString.h" //for the ACE_CString -#include "ace/Containers_T.h" //for ACE_Unbounded_Stack - - -//forward declaration -class PCVisitorBase; - -//======================================================================== -/** - * class PCAdapter - * - * This class is used as an Adapter around the CIAO::Depolyment elements - * which are part of the PackageConfiguration traversal hierarchy in - * order to adapt each element to exhibit 'Visitor Node'-like structure. - * This allows us to use the Visitor double-dispatch traversal paradigm. - */ -//======================================================================== - -template <typename E> -class PCAdapter -{ -public: - PCAdapter (E& element) : element_ (element) {} - void Accept (PCVisitorBase &v) {v.Visit (*this);} - E& get () {return this-element_;} - -private: - E &element_; -}; - - -template <typename T> -void Accept (PCVisitorBase &v, T& element_to_visit) -{ - v.Visit (element_to_visit); -} - -//======================================================================== -/** - * function - visit_sequence - * - * This function is used to handle sequences of elements where each - * element takes the form of a Visitor Node. - */ -//======================================================================== - - -/// I am using this to dispatch sequences -template <typename SEQ> -void visit_sequence (SEQ &seq, PCVisitorBase& v) -{ - const CORBA::ULong size = seq.length (); - - for (CORBA::ULong i = 0; i < size; ++i) - { - Accept(v, seq[i]); - } -} - -//======================================================================== -/** - * class PCVisitorBase - * - * This class is a virtual base class for the PackageConfiguration Visitor - * The operation which deal with sequences are implemented here by means - * of the visit_sequence function above, in order to make the logic of - * derived classes easier to write. Writers of derived classes need only - * overload the functions which deal with single elements. Sequences are - * always handled here. - */ -//======================================================================== - - -class PCVisitorBase -{ -public: - - //constructor - PCVisitorBase (void); - - ///function what dispatches sequences - template <typename SEQ> - friend void visit_sequence (SEQ &seq, PCVisitorBase& v); - - /// A whole slew of overloaded routines for different IDL - /// data types part of the PackageConfiguration. - - virtual - void Visit (Deployment::PackageConfiguration &pc) = 0; - void Visit (Deployment::PackageConfigurations &pcs); - - //!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-! - - //ComponentPackageDescription descendents - virtual - void Visit (Deployment::ComponentPackageDescription &cpd) = 0; - void Visit (Deployment::ComponentPackageDescriptions &cpds); - - virtual - void Visit (Deployment::ComponentInterfaceDescription &cid) = 0; - //void Visit (Deployment::ComponentInterfaceDescriptions &cids); - - virtual - void Visit (Deployment::PackagedComponentImplementation &pci) = 0; - void Visit (Deployment::PackagedComponentImplementations &pcis); - - virtual - void Visit (Deployment::ComponentImplementationDescription &cid) = 0; - //void Visit (Deployment::ComponentImplementationDescriptions &cids); - - virtual - void Visit (Deployment::ComponentAssemblyDescription &cad) = 0; - void Visit (Deployment::ComponentAssemblyDescriptions &cads); - - virtual - void Visit (Deployment::SubcomponentInstantiationDescription &sid) = 0; - void Visit (Deployment::SubcomponentInstantiationDescriptions &sids); - - virtual - void Visit (Deployment::MonolithicImplementationDescription &mid) = 0; - void Visit (Deployment::MonolithicImplementationDescriptions &mids); - - virtual - void Visit (Deployment::NamedImplementationArtifact &nia) = 0; - void Visit (Deployment::NamedImplementationArtifacts &nias); - - virtual - void Visit (Deployment::ImplementationArtifactDescription &iad) = 0; - //void Visit (Deployment::ImplementationArtifactDescriptions &iads); - - //!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-! - - //ComponentPackageReference descendents - virtual - void Visit (Deployment::ComponentPackageReference &cpr) = 0; - void Visit (Deployment::ComponentPackageReferences &cprs); - - //!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-! - - //properties - virtual - void Visit (Deployment::AssemblyPropertyMapping &apm) = 0; - void Visit (Deployment::AssemblyPropertyMappings &apms); - - virtual - void Visit (Deployment::Property &property) = 0; - void Visit (Deployment::Properties &properties); - - - //requirements & capabilities - virtual - void Visit (Deployment::Requirement &requirement) = 0; - void Visit (Deployment::Requirements &requirements); - - virtual - void Visit (Deployment::Capability &capability) = 0; - void Visit (Deployment::Capabilities &capabilities); - - virtual - void Visit (Deployment::ImplementationRequirement &ir) = 0; - void Visit (Deployment::ImplementationRequirements &irs); - - virtual - void Visit (Deployment::ImplementationDependency &id) = 0; - void Visit (Deployment::ImplementationDependencies &ids); - - //ports and connections - virtual - void Visit (Deployment::AssemblyConnectionDescription &acd) = 0; - void Visit (Deployment::AssemblyConnectionDescriptions &acds); - - virtual - void Visit (Deployment::SubcomponentPortEndpoint &spe) = 0; - void Visit (Deployment::SubcomponentPortEndpoints &spes); - - virtual - void Visit (Deployment::ComponentExternalPortEndpoint &cepe) = 0; - void Visit (Deployment::ComponentExternalPortEndpoints &cepes); - -}; - -#if defined (__ACE_INLINE__) -#include "PCVisitorBase.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" - -#endif /* PC_VISITOR_BASE_H */ diff --git a/CIAO/RACE/Input_Adapters/PlanGenerator/PCVisitorBase.inl b/CIAO/RACE/Input_Adapters/PlanGenerator/PCVisitorBase.inl deleted file mode 100644 index f6787601353..00000000000 --- a/CIAO/RACE/Input_Adapters/PlanGenerator/PCVisitorBase.inl +++ /dev/null @@ -1,162 +0,0 @@ -/* -*- C++ -*- */ - -//======================================================================== -/* - * file PCVisitorBase.inl - * - * $Id$ - * - * This file contains the implementation of the sequence-based - * PackageConfiguration Visitor functions. By implementing these - * we relieve developers of derived classes of the burden of handling - * the correct traversal of sequence-based elements. This implementation - * used the visit_sequence templatized function to do the heavy lifting. - * - * author Stoyan Paunov <spaunov@isis.vanderbilt.edu - */ -//======================================================================== - - - /// A whole slew of overloaded routines for different IDL - /// data types part of the PackageConfiguration. - - ACE_INLINE void PCVisitorBase::Visit - (Deployment::PackageConfigurations &pcs) - { - visit_sequence (pcs, *this); - } - - //!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-! - - //ComponentPackageDescription descendents - - ACE_INLINE void PCVisitorBase::Visit - (Deployment::ComponentPackageDescriptions &cpds) - { - visit_sequence (cpds, *this); - } - - //NOT a member of Deployment - - //ACE_INLINE void PCVisitorBase::Visit - // (Deployment::ComponentInterfaceDescriptions &cids) - //{ - // visit_sequence (cids, *this); - //} - - ACE_INLINE void PCVisitorBase::Visit - (Deployment::PackagedComponentImplementations &pcis) - { - visit_sequence (pcis, *this); - } - - //NOT a member of Deployment - - //ACE_INLINE void PCVisitorBase::Visit - // (Deployment::ComponentImplementationDescriptions &cids) - //{ - // visit_sequence (cids, *this); - //} - - ACE_INLINE void PCVisitorBase::Visit - (Deployment::ComponentAssemblyDescriptions &cads) - { - visit_sequence (cads, *this); - } - - ACE_INLINE void PCVisitorBase::Visit - (Deployment::SubcomponentInstantiationDescriptions &sids) - { - visit_sequence (sids, *this); - } - - ACE_INLINE void PCVisitorBase::Visit - (Deployment::MonolithicImplementationDescriptions &mids) - { - visit_sequence (mids, *this); - } - - ACE_INLINE void PCVisitorBase::Visit - (Deployment::NamedImplementationArtifacts &nias) - { - visit_sequence (nias, *this); - } - - //ACE_INLINE void PCVisitorBase::Visit - // (Deployment::ImplementationArtifactDescriptions &iads) - //{ - // visit_sequence (iads, *this); - //} - - //!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-! - - //ComponentPackageReference descendents - - ACE_INLINE void PCVisitorBase::Visit - (Deployment::ComponentPackageReferences &cprs) - { - visit_sequence (cprs, *this); - } - - //!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-! - - //properties - - ACE_INLINE void PCVisitorBase::Visit - (Deployment::AssemblyPropertyMappings &apms) - { - visit_sequence (apms, *this); - } - - ACE_INLINE void PCVisitorBase::Visit - (Deployment::Properties &properties) - { - visit_sequence (properties, *this); - } - - //requirements & capabilities - - ACE_INLINE void PCVisitorBase::Visit - (Deployment::Requirements &requirements) - { - visit_sequence (requirements, *this); - } - - ACE_INLINE void PCVisitorBase::Visit - (Deployment::Capabilities &capabilities) - { - visit_sequence (capabilities, *this); - } - - ACE_INLINE void PCVisitorBase::Visit - (Deployment::ImplementationRequirements &irs) - { - visit_sequence (irs, *this); - } - - ACE_INLINE void PCVisitorBase::Visit - (Deployment::ImplementationDependencies &ids) - { - visit_sequence (ids, *this); - } - - //ports and connections - - ACE_INLINE void PCVisitorBase::Visit - (Deployment::AssemblyConnectionDescriptions &acds) - { - visit_sequence (acds, *this); - } - - ACE_INLINE void PCVisitorBase::Visit - (Deployment::SubcomponentPortEndpoints &spes) - { - visit_sequence (spes, *this); - } - - ACE_INLINE void PCVisitorBase::Visit - (Deployment::ComponentExternalPortEndpoints &cepes) - { - visit_sequence (cepes, *this); - } - diff --git a/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator.cdp b/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator.cdp deleted file mode 100644 index 56ab62c4cb6..00000000000 --- a/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator.cdp +++ /dev/null @@ -1,86 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no" ?> -<Deployment:deploymentPlan xmlns:Deployment="http://www.omg.org/Deployment" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd"> - - <UUID>1D2C2C63-CE33-4088-9443-781F080D8888</UUID> - - <implementation id="_73898E70-9FF1-4881-9313-A2DE181EEEEE"> - <name>RT1H_Combined.RA_ComponentImplementations.PlanGeneratorImplementation.PlanGeneratorMonolithicImpl</name> - <source/> - <artifact>__AD4B52E0-111C-49E2-BE47-29CFF978676F</artifact> - <artifact>__E4AF24BF-5A39-BBB1-8217-6343D7D55598</artifact> - <artifact>__76A0CEFE-22F7-FFF7-BB91-F309FFFAD33C</artifact> - </implementation> - - <instance id="_2BD4D476-2F5B-4CCC-A8CF-311084273028"> - <name>RT1H_Combined.ComponentImplementations.RACE.RACE.PlanGenerator</name> - <node>PlanGenerator</node> - <source/> - <implementation>_73898E70-9FF1-4881-9313-A2DE181EEEEE</implementation> - <configProperty> - <name>ComponentIOR</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>PlanGenerator.ior</string> - </value> - </value> - </configProperty> - <configProperty> - <name>RegisterNaming</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>RACE::InteractiveInput</string> - </value> - </value> - </configProperty> - </instance> - - <artifact id="__AD4B52E0-111C-49E2-BE47-29CFF978676F"> - <name>RT1H_Combined.RA_ImplementationArtifacts.PlanGeneratorArtifacts.PlanGenerator_stub</name> - <source/> - <node/> - <location>PlanGenerator_stub</location> - </artifact> - - <artifact id="__E4AF24BF-5A39-BBB1-8217-6343D7D55598"> - <name>RT1H_Combined.RA_ImplementationArtifacts.PlanGeneratorArtifacts.PlanGenerator_svnt</name> - <source/> - <node/> - <location>PlanGenerator_svnt</location> - <execParameter> - <name>entryPoint</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>create_CIAO_RACE_PlanGenerator_Home_Servant</string> - </value> - </value> - </execParameter> - </artifact> - - <artifact id="__76A0CEFE-22F7-FFF7-BB91-F309FFFAD33C"> - <name>RT1H_Combined.RA_ImplementationArtifacts.PlanGeneratorArtifacts.PlanGenerator_exec</name> - <source/> - <node/> - <location>PlanGenerator_exec</location> - <execParameter> - <name>entryPoint</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>create_CIAO_RACE_PlanGenerator_Home_Impl</string> - </value> - </value> - </execParameter> - </artifact> - -</Deployment:deploymentPlan> diff --git a/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator.cidl b/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator.cidl deleted file mode 100644 index 9ceb659e753..00000000000 --- a/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator.cidl +++ /dev/null @@ -1,26 +0,0 @@ -//PlanGenerator.cidl,v 1.1 spaunov Exp -//Author: Stoyan Paunov -//$Id$ - -#ifndef RACE_PLAN_GENERATOR_INPUT_ADAPTER_CIDL -#define RACE_PLAN_GENERATOR_INPUT_ADAPTER_CIDL - -#include "PlanGenerator.idl" - -module CIAO -{ - module RACE - { - composition session PlanGenerator_Impl - { - home executor PlanGenerator_Home_Exec - { - implements RACE::PlanGenerator_Home; - manages PlanGenerator_Exec; - }; - }; - }; -}; - - -#endif /* RACE_PLAN_GENERATOR_INPUT_ADAPTER_CIDL */ diff --git a/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator.cpp b/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator.cpp deleted file mode 100644 index eb761275c6e..00000000000 --- a/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator.cpp +++ /dev/null @@ -1,451 +0,0 @@ -/* -*- C++ -*- */ - -//======================================================================== -/* - * file Plan_Generator.cpp - * - * $Id$ - * - * This file contains the implementation of the PackageConfiguration - * Visitor class Plan_Generator which derives from PCVisitorBase. Each - * Visit function focuses on the functionality necessary to process - * the PackageConfiguration element which is passed to it as an argument - * and on dispatching the next sequence of calls in the correct order! - * - * This implementation takes a PackageConfiguration and tries to grow - * a DeploymentPlan out of it by expanding the latter in width and depth - * simultaneously. At each level of the PackageConfiguration the - * Plan_Generator first expands the DeploymentPlan vertically at the - * corrsponding level and then dispatches the children of the current - * PackageConfiguration element. This in turn might and most probably - * will cause another vertical expansion of the DeploymentPlan, however - * for a different element. This effect is produced due to the flattened - * structure of the DeploymentPlan. - * - * author Stoyan Paunov <spaunov@isis.vanderbilt.edu - */ -//======================================================================== - -#include "PCVisitorBase.h" -#include "PlanGenerator.h" - -#include "ace/OS_Memory.h" //for ACE_NEW* macros -#include "ace/SString.h" //for ACE_CString - -#include "ciao/DeploymentC.h" -#include "ciao/Deployment_DataC.h" -#include "ciao/Packaging_DataC.h" - -#include "Config_Handlers/DnC_Dump.h" - -#include <iostream> -using namespace std; - - //Constructor - Plan_Generator::Plan_Generator (Deployment::DeploymentPlan &plan, - Deployment::PackageConfiguration &pc) - : PCVisitorBase (), - plan_ (plan), - pc_ (pc), - last_cad_ (0) - { - } - - //entry point for the protected visitor to get it do start - //the visitation process - void Plan_Generator::Visit () - { - Accept (*this, this->pc_); - } - - // A whole slew of overloaded routines for different IDL - // data types part of the PackageConfiguration. - - - void Plan_Generator::Visit (Deployment::PackageConfiguration &pc) - { - - //visit the ComponentPackageDescription - if (pc.basePackage.length ()) - { - //currently no support for that anywhere - //for (size_t r = 0; r = pc.selectRequirement.length (); ++r); - - Accept (*this, pc.basePackage); - } - else - ACE_DEBUG ((LM_WARNING, - "[Plan_Generator - PackageConfiguration] We currently " - "do NOT support package references, specializedConfigs", - "or imports!\n")); - } - - //!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-! - - //ComponentPackageDescription descendents - - void Plan_Generator::Visit (Deployment::ComponentPackageDescription &cpd) - { - Accept (*this, cpd.realizes); - //for (size_t impl = 0; impl < cpd.implementation.length (); ++impl) - Accept (*this, cpd.implementation[0]); - } - - - void Plan_Generator::Visit (Deployment::ComponentInterfaceDescription &cid) - { - //Might want to populate this too once PICML starts supporting it - } - - - void Plan_Generator::Visit (Deployment::PackagedComponentImplementation &pci) - { - Accept (*this, pci.referencedImplementation); - - size_t plan_impl_len = plan_.implementation.length (); - size_t plan_inst_len = plan_.instance.length (); - - //NOTE: order here matters. Need to populate the - //MonolithicDeploymentDescription and the - //InstanceDeploymentDescription first, - //then call the update_configProperty - if (plan_impl_len > 0 && plan_inst_len > 0) - update_configProperty (pci, - plan_.implementation[plan_impl_len - 1], - plan_.instance[plan_inst_len - 1]); - } - - - void Plan_Generator::Visit (Deployment::ComponentImplementationDescription &cid) - { - if (cid.assemblyImpl.length ()) - Accept (*this, cid.assemblyImpl); - else - //;//Do nothing - monolithic component deployment not supported - Accept (*this, cid.monolithicImpl); - } - - - void Plan_Generator::Visit (Deployment::ComponentAssemblyDescription &cad) - { - //NOTE: order matters for these calls. We need to populate - //the instances before we try to polulate the connections - - //set the last ComponentAssemblyDescription - this->last_cad_ = &cad; - - //visit the SubcomponentInstantiationDescription - Accept (*this, cad.instance); - //visit the connections - Accept (*this, cad.connection); - - //reset the last ComponentAssemblyDescription - this->last_cad_ = NULL; - } - - - void Plan_Generator::Visit (Deployment::SubcomponentInstantiationDescription &sid) - { - //visit the ComponentPackageDescription (again) - if (sid.basePackage.length ()) - { - size_t inst_len = plan_.instance.length (); - plan_.instance.length (inst_len + 1); - - update_configProperty (sid, plan_.instance[inst_len]); - - plan_.instance[inst_len].name = sid.name; - size_t impl_len = plan_.implementation.length (); - plan_.implementation.length (impl_len + 1); - - ACE_CString mdname (plan_.instance[inst_len].name); - mdname += "-mdd"; - plan_.implementation[impl_len].name = mdname.c_str (); - - plan_.instance[inst_len].implementationRef = impl_len; - - Accept (*this, sid.basePackage); - } - else - ACE_DEBUG ((LM_WARNING, - "[Plan_Generator - SubcomponentInstantiationDescription] ", - "We currently do NOT support package references, ", - "specializedConfigs or imports!\n")); - } - - - void Plan_Generator::Visit (Deployment::MonolithicImplementationDescription &mid) - { - //NOTE: There are usually 3 NamedImplementationArtifacts per - //MonolithicImplementationDescription *_stub, *_svnt & *_exec - - //visit the NamedImplementationArtifacts - Accept (*this, mid.primaryArtifact); - } - - - void Plan_Generator::Visit (Deployment::NamedImplementationArtifact &nia) - { - //increase the artifact length by one - size_t arti_len = plan_.artifact.length (); - plan_.artifact.length (arti_len + 1); - plan_.artifact[arti_len].name = nia.name; - - //increase the artifactRef length by one and - //update the reference - - //get the index of the last MonolithicDeploymentDescription - size_t last_mdd = plan_.implementation.length () - 1; - Deployment::MonolithicDeploymentDescription& mdd = plan_.implementation[last_mdd]; - size_t ref_len = mdd.artifactRef.length (); - mdd.artifactRef.length (ref_len + 1); - mdd.artifactRef[ref_len] = arti_len; - - //visit the actual ImplementationArtifactDescriptor - Accept (*this, nia.referencedArtifact); - } - - - void Plan_Generator::Visit (Deployment::ImplementationArtifactDescription &iad) - { - - size_t last_arti = plan_.artifact.length (); - size_t plan_loc_len = plan_.artifact[last_arti - 1].location.length (); - size_t num_loc = iad.location.length (); - for (size_t i = 0; i < num_loc; ++i) - { - Deployment::ArtifactDeploymentDescription& add = plan_.artifact[last_arti - 1]; - add.location.length (plan_loc_len + 1); - add.location[plan_loc_len] = iad.location[i]; - ++plan_loc_len; - - //update execParameter - update_execParameter (iad, add); - } - } - - //!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-! - - //ComponentPackageReference descendents - - void Plan_Generator::Visit (Deployment::ComponentPackageReference &cpr) - { - //not implemented - } - - //!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-! - - //properties - - void Plan_Generator::Visit (Deployment::AssemblyPropertyMapping &apm) - { - - } - - - void Plan_Generator::Visit (Deployment::Property &property) - { - - } - - - //requirements & capabilities - - void Plan_Generator::Visit (Deployment::Requirement &requirement) - { - - } - - - void Plan_Generator::Visit (Deployment::Capability &capability) - { - - } - - - void Plan_Generator::Visit (Deployment::ImplementationRequirement &ir) - { - - } - - - void Plan_Generator::Visit (Deployment::ImplementationDependency &id) - { - - } - - //ports and connections - - void Plan_Generator::Visit (Deployment::AssemblyConnectionDescription &acd) - { - if (!this->last_cad_) - return; - - Deployment::ComponentAssemblyDescription& cad = *(this->last_cad_); - - size_t plan_conn_len = plan_.connection.length (); - plan_.connection.length (plan_conn_len + 1); - plan_.connection[plan_conn_len].name = acd.name; - - size_t iep_len = acd.internalEndpoint.length (); - size_t plan_iep_len = - plan_.connection[plan_conn_len].internalEndpoint.length (); - - //cout << "==> " << acd.name << " has " << iep_len << " and " - // << acd.externalEndpoint.length () << endl << endl ; - - plan_.connection[plan_conn_len].internalEndpoint.length (plan_iep_len + iep_len); - - for (size_t i = 0; i < iep_len; ++i) - { - plan_.connection[plan_conn_len] - .internalEndpoint[plan_iep_len + i].portName = - acd.internalEndpoint[i].portName; - - size_t inst_ref = acd.internalEndpoint[i].instanceRef; - const char* inst_name = cad.instance[inst_ref].name; - size_t plan_inst_len = plan_.instance.length (); - - for (size_t j = 0; j < plan_inst_len; ++j) - { - const char* plan_inst_name = plan_.instance[j].name; - if (ACE_OS::strcmp (plan_inst_name, inst_name) == 0) - { - plan_.connection[plan_conn_len] - .internalEndpoint[plan_iep_len + i].instanceRef = j; - break; - } - } - - //Now traverse the interface - - //NOTE: move these up and refactor! - Deployment::SubcomponentInstantiationDescription& scid = - cad.instance[inst_ref]; - Deployment::PlanSubcomponentPortEndpoint& pspe = - plan_.connection[plan_conn_len] - .internalEndpoint[plan_iep_len + i]; - - size_t pkg_len = scid.basePackage.length (); - for (size_t k = 0; k < pkg_len; ++k) - { - Deployment::ComponentPackageDescription& package = scid.basePackage[k]; - - //empty unfortunately - Deployment::ComponentInterfaceDescription cid = package.realizes; - //cid = package.implementation[0].referencedImplementation.implements; - - size_t port_len = cid.port.length (); - for (size_t p = 0; p < port_len; ++p) - { - const char* cid_pname = cid.port[p].name; - const char* pspe_pname = pspe.portName; - //cout << "CMP: " << pspe_pname << " <=> " << cid_pname << endl; - if (ACE_OS::strcmp (cid_pname, pspe_pname) == 0) - { - pspe.kind = cid.port[p].kind; - - //cout << "-->" << pspe_pname << " Port kind is " - // << pspe.kind << endl; - - goto interface_end; - break; // ??? - } - } - } - -interface_end: - //cout << endl; - ; - - } - - } - - - void Plan_Generator::Visit (Deployment::SubcomponentPortEndpoint &spe) - { - - } - - - void Plan_Generator::Visit (Deployment::ComponentExternalPortEndpoint &cepe) - { - - } - -//several helper functions - - void Plan_Generator:: - update_execParameter (Deployment::ImplementationArtifactDescription& iad, - Deployment::ArtifactDeploymentDescription& add) - { - //update execParameters - size_t num_execP = iad.execParameter.length (); - for (size_t j = 0; j < num_execP; ++j) - { - size_t execP_len = add.execParameter.length (); - add.execParameter.length (execP_len + 1); - add.execParameter[execP_len] = iad.execParameter[j]; - ++execP_len; - } - } - - void Plan_Generator:: - update_configProperty (Deployment::SubcomponentInstantiationDescription &scid, - Deployment::InstanceDeploymentDescription &idd) - { - size_t scid_plen = - scid.configProperty.length (); - - size_t idd_plen = idd.configProperty.length (); - idd.configProperty.length (idd_plen + scid_plen); - - for (size_t i = 0; i < scid_plen; ++i) - idd.configProperty[idd_plen + i] = - scid.configProperty[i]; - - } - - void Plan_Generator:: - update_configProperty (Deployment::PackagedComponentImplementation& pcid, - Deployment::MonolithicDeploymentDescription& mid, - Deployment::InstanceDeploymentDescription& idd) - { - bool update; - size_t pcid_plen = pcid.referencedImplementation - .configProperty.length (); - - size_t mid_eplen = mid.execParameter.length (); - mid.execParameter.length (mid_eplen + pcid_plen); - - for (size_t i = 0; i < pcid_plen; ++i) - { - update = true; - mid.execParameter[mid_eplen + i] = pcid.referencedImplementation - .configProperty[i]; - - const char* pname = pcid.referencedImplementation - .configProperty[i].name; - - size_t idd_plen = idd.configProperty.length (); - - for (size_t j = 0; j < idd_plen; ++j) - { - const char* idd_pname = idd.configProperty[j].name; - if (ACE_OS::strcmp (idd_pname, pname) == 0) - { - update = false; - break; - } - } - - if (update) - { - idd.configProperty.length (idd_plen + 1); - idd.configProperty[idd_plen] = - pcid.referencedImplementation.configProperty[i]; - } - } - } - diff --git a/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator.h b/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator.h deleted file mode 100644 index 3117540082c..00000000000 --- a/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator.h +++ /dev/null @@ -1,151 +0,0 @@ -/* -*- C++ -*- */ - -//======================================================================== -/** - * file PlanGenerator.h - * - * $Id$ - * - * This file contains a number of Visitor classes which are used to - * traverse the PackageConfiguration element defined in the - * PackagingData.idl - * - * author Stoyan Paunov <spaunov@isis.vanderbilt.edu> - */ -//======================================================================== - -#ifndef PLAN_GENERATOR_H -#define PLAN_GENERATOR_H - -#include "PCVisitorBase.h" //for the base visitor - -#include /**/ "ace/pre.h" -#include "ace/SString.h" //for the ACE_CString - -#include "ciao/DeploymentC.h" -#include "ciao/Deployment_BaseC.h" -#include "ciao/Deployment_DataC.h" -#include "ciao/Packaging_DataC.h" - - -//=========================================================================== -/** - * class Plan_Generator - * - * This class is is the actual implementation for the PackageConfiguration - * Visitor. It derives from PCVisitorBase and overloads the functions which - * deal with single elements. Sequences are handled in the base class. - */ -//=========================================================================== - - -class Plan_Generator : public PCVisitorBase -{ -public: - - //constructor - Plan_Generator (Deployment::DeploymentPlan &plan, - Deployment::PackageConfiguration &pc); - - ///Entry point to protected Visitor functions - void Visit (); - -protected: - /// A whole slew of overloaded routines for different IDL - /// data types part of the PackageConfiguration. - - virtual - void Visit (Deployment::PackageConfiguration &pc); - - //!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-! - - //ComponentPackageDescription descendents - virtual - void Visit (Deployment::ComponentPackageDescription &cpd); - - virtual - void Visit (Deployment::ComponentInterfaceDescription &cid); - - virtual - void Visit (Deployment::PackagedComponentImplementation &pci); - - virtual - void Visit (Deployment::ComponentImplementationDescription &cid); - - virtual - void Visit (Deployment::ComponentAssemblyDescription &cad); - - virtual - void Visit (Deployment::SubcomponentInstantiationDescription &sid); - - virtual - void Visit (Deployment::MonolithicImplementationDescription &mid); - - virtual - void Visit (Deployment::NamedImplementationArtifact &nia); - - virtual - void Visit (Deployment::ImplementationArtifactDescription &iad); - - //!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-! - - //ComponentPackageReference descendents - virtual - void Visit (Deployment::ComponentPackageReference &cpr); - - //!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-! - - //properties - virtual - void Visit (Deployment::AssemblyPropertyMapping &apm); - - virtual - void Visit (Deployment::Property &property); - - - //requirements & capabilities - virtual - void Visit (Deployment::Requirement &requirement); - - virtual - void Visit (Deployment::Capability &capability); - - virtual - void Visit (Deployment::ImplementationRequirement &ir); - - virtual - void Visit (Deployment::ImplementationDependency &id); - - //ports and connections - virtual - void Visit (Deployment::AssemblyConnectionDescription &acd); - - virtual - void Visit (Deployment::SubcomponentPortEndpoint &spe); - - virtual - void Visit (Deployment::ComponentExternalPortEndpoint &cepe); - -protected: - ///several helper functions - void update_execParameter (Deployment::ImplementationArtifactDescription& iad, - Deployment::ArtifactDeploymentDescription& add); - - void update_configProperty (Deployment::SubcomponentInstantiationDescription &scid, - Deployment::InstanceDeploymentDescription &idd); - - void update_configProperty (Deployment::PackagedComponentImplementation& pcid, - Deployment::MonolithicDeploymentDescription& mid, - Deployment::InstanceDeploymentDescription& idd); - -private: - - Deployment::DeploymentPlan& plan_; - Deployment::PackageConfiguration& pc_; - Deployment::ComponentAssemblyDescription* last_cad_; - -}; - -#include /**/ "ace/post.h" - -#endif /* PLAN_GENERATOR_H */ diff --git a/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator.idl b/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator.idl deleted file mode 100644 index 3dd220b9b8b..00000000000 --- a/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator.idl +++ /dev/null @@ -1,33 +0,0 @@ -//PlanGenerator.idl,v 1.1 spaunov Exp -//Author: Stoyan Paunov -//$Id$ - -#ifndef RACE_PLAN_GENERATOR_INPUT_ADAPTER_IDL -#define RACE_PLAN_GENERATOR_INPUT_ADAPTER_IDL - -#include <Components.idl> -#include "Input_Adapters/Base/Input_Adapter.idl" -#include "common/RACE_common.idl" - -module CIAO -{ - module RACE - { - eventtype Deploy_Input - { - public string package_name; - public Action command; - }; - - component PlanGenerator : Input_Adapter - { - consumes Deploy_Input deployment; - }; - - home PlanGenerator_Home manages PlanGenerator - { - }; - }; -}; - -#endif /* RACE_PLAN_GENERATOR_INPUT_ADAPTER_IDL */ diff --git a/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator.mpc.disable b/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator.mpc.disable deleted file mode 100644 index fdb014ef9cc..00000000000 --- a/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator.mpc.disable +++ /dev/null @@ -1,118 +0,0 @@ -// generate_component_mpc.pl -//Author: Stoyan Paunov -//PlanGenerator.mpc, spaunov -//$Id$ - -project(PlanGenerator_stub): ciao_deployment_stub, ciao_race_component { - after += Input_Adapter_stub - sharedname = PlanGenerator_stub - idlflags += -Sc \ - -Wb,stub_export_macro=PLANGENERATOR_STUB_Export \ - -Wb,stub_export_include=PlanGenerator_stub_export.h \ - -Wb,skel_export_macro=PLANGENERATOR_SVNT_Export \ - -Wb,skel_export_include=PlanGenerator_svnt_export.h - dynamicflags = PLANGENERATOR_STUB_BUILD_DLL - libs += Input_Adapter_stub \ - Plan_Analyzer_Interface_stub - - IDL_Files { - PlanGenerator.idl - } - - Source_Files { - PlanGeneratorC.cpp - } - - Header_Files { - PlanGeneratorC.h - } - - Inline_Files { - PlanGeneratorC.inl - } -} - -project(PlanGenerator_svnt) : ciao_servant_dnc, ciao_race_component { - after += PlanGenerator_stub \ - Input_Adapter_svnt - sharedname = PlanGenerator_svnt - libs += PlanGenerator_stub \ - Input_Adapter_stub \ - Input_Adapter_svnt \ - Plan_Analyzer_Interface_stub - - idlflags += -Sc \ - -Wb,export_macro=PLANGENERATOR_SVNT_Export \ - -Wb,export_include=PlanGenerator_svnt_export.h - - dynamicflags = PLANGENERATOR_SVNT_BUILD_DLL - - CIDL_Files { - PlanGenerator.cidl - } - - IDL_Files { - PlanGeneratorE.idl - } - - Source_Files { - PlanGeneratorEC.cpp - PlanGeneratorS.cpp - PlanGenerator_svnt.cpp - } - - Header_Files { - PlanGeneratorEC.h - PlanGeneratorS.h - PlanGenerator_svnt.h - } - - Inline_Files { - PlanGeneratorEC.inl - PlanGeneratorS.inl - PlanGenerator_svnt.inl - } -} - - -project(PlanGenerator_exec) : ciao_component_dnc, ciao_config_handlers, ciao_race_component { - after += PlanGenerator_svnt XSC_Config_Handlers - sharedname = PlanGenerator_exec - libs += PlanGenerator_stub \ - PlanGenerator_svnt \ - Input_Adapter_stub \ - Input_Adapter_svnt \ - Plan_Analyzer_Interface_stub \ - - idlflags += -Sc \ - -Wb,export_macro=PLANGENERATOR_EXEC_Export \ - -Wb,export_include=PlanGenerator_exec_export.h - dynamicflags = PLANGENERATOR_EXEC_BUILD_DLL - - requires += RepositoryManager - after += RepositoryManager - includes += $(CIAO_ROOT)/DAnCE/RepositoryManager - - IDL_Files { - - } - - Source_Files { - PlanGenerator_exec.cpp - PCVisitorBase.cpp - PlanGenerator.cpp - $(CIAO_ROOT)/DAnCE/RepositoryManager/RepositoryManagerDaemonC.cpp - } -} - -project(PlanGenerator_Injector) : ciao_component_dnc, ciao_race_component, taoexe { - exename = injector - - libs += PlanGenerator_stub - - IDL_Files { - } - Source_Files { - Injector.cpp - } -} diff --git a/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator_deployment.dat b/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator_deployment.dat deleted file mode 100644 index 3621981b2c8..00000000000 --- a/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator_deployment.dat +++ /dev/null @@ -1 +0,0 @@ -PlanGenerator corbaloc:iiop:localhost:50000/NodeManager diff --git a/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator_exec.cpp b/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator_exec.cpp deleted file mode 100644 index 4b02edb3cc1..00000000000 --- a/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator_exec.cpp +++ /dev/null @@ -1,276 +0,0 @@ -// $Id$ -// Author: Stoyan Paunov - -#include "PlanGenerator_exec.h" -#include "ciao/CIAO_common.h" -#include "Config_Handlers/XML_File_Intf.h" -#include "Config_Handlers/Package_Handlers/PCD_Handler.h" -#include "Config_Handlers/Common.h" -#include "Config_Handlers/DnC_Dump.h" - -#include "DAnCE/RepositoryManager/RepositoryManagerDaemonC.h" -#include "PlanGenerator.h" - -#include <iostream> -using namespace std; - - -namespace CIAO -{ - namespace RACE - { - namespace CIDL_PlanGenerator_Impl - { - //================================================================== - // Component Executor Implementation Class: - // PlanGenerator_exec_i - //================================================================== - - PlanGenerator_exec_i::PlanGenerator_exec_i (void) - { - } - - PlanGenerator_exec_i::~PlanGenerator_exec_i (void) - { - } - - // Supported or inherited operations. - - // Attribute operations. - - // Port operations. - - void - PlanGenerator_exec_i::push_deployment ( - ::CIAO::RACE::Deploy_Input * ev - ACE_ENV_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - try - { - - //Get the IOR of the RepoMan from the naming service - - //Obtain a ref to the orb - CORBA::ORB_ptr orb = this->context_->_ciao_the_Container ()->the_ORB (); - - //form the path to the RepoMan IOR file - ACE_CString RepoMan_ior = ("file://"); - RepoMan_ior += ACE_OS::getenv ("CIAO_ROOT"); - RepoMan_ior += "/DAnCE/RepositoryManager/RepositoryManagerDeamon.ior"; - - cout << "RepoMan ior file: " << RepoMan_ior.c_str () << endl; - - CORBA::Object_var obj = - orb->string_to_object (RepoMan_ior.c_str ()); - - CIAO::RepositoryManagerDaemon_var rm = - CIAO::RepositoryManagerDaemon::_narrow (obj.in ()); - - if (CORBA::is_nil (rm.in ())) - { - ACE_ERROR ((LM_ERROR, - "Unable to acquire RepositoryManagerDaemon's objref\n")); - - ACE_THROW (CORBA::INTERNAL ()); - } - - //now obtian the corresponding PackageConfiguration from - //the RepositoryManager - - Deployment::PackageConfiguration* rmpc; - - try - { - //retrieve the curresponding PackageConfiguration - //from the RepoMan - rmpc = rm->findPackageByName (ev->package_name ()); - - ACE_DEBUG ((LM_INFO, - "The package was found!\nUUID: %s\n", - rmpc->UUID)); - } - catch (Deployment::NoSuchName &) - { - ACE_ERROR ((LM_ERROR, - "Error! Package not found! Location update failed!\n")); - - ACE_THROW (CORBA::INTERNAL ()); - - } - catch (CORBA::Exception &) - { - ACE_ERROR ((LM_ERROR, - "Error! General exception! Location update failed!\n")); - - ACE_THROW (CORBA::INTERNAL ()); - } - - //now create the plan - - Deployment::DeploymentPlan* plan = 0; - ACE_NEW_THROW_EX (plan, - Deployment::DeploymentPlan (), - CORBA::INTERNAL ()); - - Plan_Generator pgen (*plan, *rmpc); - - //start the generation - pgen.Visit (); - - //So now what? - ::Deployment::DnC_Dump::dump (*plan); - - //do not call the plan analyzer just yet - return; - - //creat an action sequence and populate it - ::CIAO::RACE::Plan_Actions plan_action_seq; - - /// Create a Plan_Action_seq structure of length 1. - plan_action_seq.length (1); - - /// Now populate the Plan_Action_seq structure. - plan_action_seq [0].command = ev->command (); - plan_action_seq [0].plan = *plan; - plan_action_seq [0].package = *rmpc; - - /// Now invoke the plan_analyzer. - this->context_->get_connection_ingress () - ->analyze_plan (plan_action_seq); - } - catch (...) - { - ACE_ERROR ((LM_ERROR, "Exception caught in push_deployment\n")); - } - } - - // Operations from Components::SessionComponent - - void - PlanGenerator_exec_i::set_session_context ( - ::Components::SessionContext_ptr ctx - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::CCMException)) - { - this->context_ = - PlanGenerator_Context::_narrow ( - ctx - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - if (this->context_ == 0) - { - ACE_THROW (CORBA::INTERNAL ()); - } - } - - void - PlanGenerator_exec_i::ciao_preactivate ( - ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::CCMException)) - { - // Your code here. - } - - void - PlanGenerator_exec_i::ciao_postactivate ( - ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::CCMException)) - { - // Your code here. - } - - void - PlanGenerator_exec_i::ccm_activate ( - ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::CCMException)) - { - // Your code here. - } - - void - PlanGenerator_exec_i::ccm_passivate ( - ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::CCMException)) - { - // Your code here. - } - - void - PlanGenerator_exec_i::ccm_remove ( - ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::CCMException)) - { - // Your code here. - } - - //================================================================== - // Home Executor Implementation Class: PlanGenerator_Home_exec_i - //================================================================== - - PlanGenerator_Home_exec_i::PlanGenerator_Home_exec_i (void) - { - } - - PlanGenerator_Home_exec_i::~PlanGenerator_Home_exec_i (void) - { - } - - // Supported or inherited operations. - - // Home operations. - - // Factory and finder operations. - - // Attribute operations. - - // Implicit operations. - - ::Components::EnterpriseComponent_ptr - PlanGenerator_Home_exec_i::create ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::CCMException)) - { - ::Components::EnterpriseComponent_ptr retval = - ::Components::EnterpriseComponent::_nil (); - - ACE_NEW_THROW_EX ( - retval, - PlanGenerator_exec_i, - CORBA::NO_MEMORY ()); - ACE_CHECK_RETURN (::Components::EnterpriseComponent::_nil ()); - - return retval; - } - - extern "C" PLANGENERATOR_EXEC_Export ::Components::HomeExecutorBase_ptr - create_CIAO_RACE_PlanGenerator_Home_Impl (void) - { - ::Components::HomeExecutorBase_ptr retval = - ::Components::HomeExecutorBase::_nil (); - - ACE_NEW_RETURN ( - retval, - PlanGenerator_Home_exec_i, - ::Components::HomeExecutorBase::_nil ()); - - return retval; - } - } - } -} diff --git a/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator_exec.h b/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator_exec.h deleted file mode 100644 index e72e0329e5b..00000000000 --- a/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator_exec.h +++ /dev/null @@ -1,129 +0,0 @@ -// $Id$ -//Author: Stoyan Paunov - - -#ifndef CIAO_PLANGENERATOR_EXEC_H -#define CIAO_PLANGENERATOR_EXEC_H - -#include /**/ "ace/pre.h" - -#include "PlanGenerator_svnt.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "PlanGenerator_exec_export.h" -#include "tao/LocalObject.h" - -namespace CIAO -{ - namespace RACE - { - namespace CIDL_PlanGenerator_Impl - { - class PLANGENERATOR_EXEC_Export PlanGenerator_exec_i - : public virtual PlanGenerator_Exec, - public virtual TAO_Local_RefCounted_Object - { - public: - PlanGenerator_exec_i (void); - virtual ~PlanGenerator_exec_i (void); - - // Supported or inherited operations. - - // Attribute operations. - - // Port operations. - - virtual void - push_deployment ( - ::CIAO::RACE::Deploy_Input *ev - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - // Operations from Components::SessionComponent - - virtual void - set_session_context ( - ::Components::SessionContext_ptr ctx - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::CCMException)); - - virtual void - ciao_preactivate ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::CCMException)); - - virtual void - ciao_postactivate ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::CCMException)); - - virtual void - ccm_activate ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::CCMException)); - - virtual void - ccm_passivate ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::CCMException)); - - virtual void - ccm_remove ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::CCMException)); - - protected: - PlanGenerator_Context *context_; - }; - - class PLANGENERATOR_EXEC_Export PlanGenerator_Home_exec_i - : public virtual PlanGenerator_Home_Exec, - public virtual TAO_Local_RefCounted_Object - { - public: - PlanGenerator_Home_exec_i (void); - virtual ~PlanGenerator_Home_exec_i (void); - - // Supported or inherited operations. - - // Home operations. - - // Factory and finder operations. - - // Attribute operations. - - // Implicit operations. - - virtual ::Components::EnterpriseComponent_ptr - create ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::CCMException)); - }; - - extern "C" PLANGENERATOR_EXEC_Export ::Components::HomeExecutorBase_ptr - create_CIAO_RACE_PlanGenerator_Home_Impl (void); - } - } -} - -#include /**/ "ace/post.h" - -#endif /* CIAO_PLANGENERATOR_EXEC_H */ - diff --git a/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator_exec_export.h b/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator_exec_export.h deleted file mode 100644 index b4bb3c8e00d..00000000000 --- a/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator_exec_export.h +++ /dev/null @@ -1,58 +0,0 @@ - -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl PLANGENERATOR_EXEC -// ------------------------------ -#ifndef PLANGENERATOR_EXEC_EXPORT_H -#define PLANGENERATOR_EXEC_EXPORT_H - -#include "ace/config-all.h" - -#if defined (ACE_AS_STATIC_LIBS) && !defined (PLANGENERATOR_EXEC_HAS_DLL) -# define PLANGENERATOR_EXEC_HAS_DLL 0 -#endif /* ACE_AS_STATIC_LIBS && PLANGENERATOR_EXEC_HAS_DLL */ - -#if !defined (PLANGENERATOR_EXEC_HAS_DLL) -# define PLANGENERATOR_EXEC_HAS_DLL 1 -#endif /* ! PLANGENERATOR_EXEC_HAS_DLL */ - -#if defined (PLANGENERATOR_EXEC_HAS_DLL) && (PLANGENERATOR_EXEC_HAS_DLL == 1) -# if defined (PLANGENERATOR_EXEC_BUILD_DLL) -# define PLANGENERATOR_EXEC_Export ACE_Proper_Export_Flag -# define PLANGENERATOR_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define PLANGENERATOR_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* PLANGENERATOR_EXEC_BUILD_DLL */ -# define PLANGENERATOR_EXEC_Export ACE_Proper_Import_Flag -# define PLANGENERATOR_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define PLANGENERATOR_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* PLANGENERATOR_EXEC_BUILD_DLL */ -#else /* PLANGENERATOR_EXEC_HAS_DLL == 1 */ -# define PLANGENERATOR_EXEC_Export -# define PLANGENERATOR_EXEC_SINGLETON_DECLARATION(T) -# define PLANGENERATOR_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* PLANGENERATOR_EXEC_HAS_DLL == 1 */ - -// Set PLANGENERATOR_EXEC_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (PLANGENERATOR_EXEC_NTRACE) -# if (ACE_NTRACE == 1) -# define PLANGENERATOR_EXEC_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define PLANGENERATOR_EXEC_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !PLANGENERATOR_EXEC_NTRACE */ - -#if (PLANGENERATOR_EXEC_NTRACE == 1) -# define PLANGENERATOR_EXEC_TRACE(X) -#else /* (PLANGENERATOR_EXEC_NTRACE == 1) */ -# if !defined (ACE_HAS_TRACE) -# define ACE_HAS_TRACE -# endif /* ACE_HAS_TRACE */ -# define PLANGENERATOR_EXEC_TRACE(X) ACE_TRACE_IMPL(X) -# include "ace/Trace.h" -#endif /* (PLANGENERATOR_EXEC_NTRACE == 1) */ - -#endif /* PLANGENERATOR_EXEC_EXPORT_H */ - -// End of auto generated file. diff --git a/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator_stub_export.h b/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator_stub_export.h deleted file mode 100644 index 2a3f42d0fd4..00000000000 --- a/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator_stub_export.h +++ /dev/null @@ -1,58 +0,0 @@ - -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl PLANGENERATOR_STUB -// ------------------------------ -#ifndef PLANGENERATOR_STUB_EXPORT_H -#define PLANGENERATOR_STUB_EXPORT_H - -#include "ace/config-all.h" - -#if defined (ACE_AS_STATIC_LIBS) && !defined (PLANGENERATOR_STUB_HAS_DLL) -# define PLANGENERATOR_STUB_HAS_DLL 0 -#endif /* ACE_AS_STATIC_LIBS && PLANGENERATOR_STUB_HAS_DLL */ - -#if !defined (PLANGENERATOR_STUB_HAS_DLL) -# define PLANGENERATOR_STUB_HAS_DLL 1 -#endif /* ! PLANGENERATOR_STUB_HAS_DLL */ - -#if defined (PLANGENERATOR_STUB_HAS_DLL) && (PLANGENERATOR_STUB_HAS_DLL == 1) -# if defined (PLANGENERATOR_STUB_BUILD_DLL) -# define PLANGENERATOR_STUB_Export ACE_Proper_Export_Flag -# define PLANGENERATOR_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define PLANGENERATOR_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* PLANGENERATOR_STUB_BUILD_DLL */ -# define PLANGENERATOR_STUB_Export ACE_Proper_Import_Flag -# define PLANGENERATOR_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define PLANGENERATOR_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* PLANGENERATOR_STUB_BUILD_DLL */ -#else /* PLANGENERATOR_STUB_HAS_DLL == 1 */ -# define PLANGENERATOR_STUB_Export -# define PLANGENERATOR_STUB_SINGLETON_DECLARATION(T) -# define PLANGENERATOR_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* PLANGENERATOR_STUB_HAS_DLL == 1 */ - -// Set PLANGENERATOR_STUB_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (PLANGENERATOR_STUB_NTRACE) -# if (ACE_NTRACE == 1) -# define PLANGENERATOR_STUB_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define PLANGENERATOR_STUB_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !PLANGENERATOR_STUB_NTRACE */ - -#if (PLANGENERATOR_STUB_NTRACE == 1) -# define PLANGENERATOR_STUB_TRACE(X) -#else /* (PLANGENERATOR_STUB_NTRACE == 1) */ -# if !defined (ACE_HAS_TRACE) -# define ACE_HAS_TRACE -# endif /* ACE_HAS_TRACE */ -# define PLANGENERATOR_STUB_TRACE(X) ACE_TRACE_IMPL(X) -# include "ace/Trace.h" -#endif /* (PLANGENERATOR_STUB_NTRACE == 1) */ - -#endif /* PLANGENERATOR_STUB_EXPORT_H */ - -// End of auto generated file. diff --git a/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator_svnt_export.h b/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator_svnt_export.h deleted file mode 100644 index 212dd57a8e9..00000000000 --- a/CIAO/RACE/Input_Adapters/PlanGenerator/PlanGenerator_svnt_export.h +++ /dev/null @@ -1,58 +0,0 @@ - -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl PLANGENERATOR_SVNT -// ------------------------------ -#ifndef PLANGENERATOR_SVNT_EXPORT_H -#define PLANGENERATOR_SVNT_EXPORT_H - -#include "ace/config-all.h" - -#if defined (ACE_AS_STATIC_LIBS) && !defined (PLANGENERATOR_SVNT_HAS_DLL) -# define PLANGENERATOR_SVNT_HAS_DLL 0 -#endif /* ACE_AS_STATIC_LIBS && PLANGENERATOR_SVNT_HAS_DLL */ - -#if !defined (PLANGENERATOR_SVNT_HAS_DLL) -# define PLANGENERATOR_SVNT_HAS_DLL 1 -#endif /* ! PLANGENERATOR_SVNT_HAS_DLL */ - -#if defined (PLANGENERATOR_SVNT_HAS_DLL) && (PLANGENERATOR_SVNT_HAS_DLL == 1) -# if defined (PLANGENERATOR_SVNT_BUILD_DLL) -# define PLANGENERATOR_SVNT_Export ACE_Proper_Export_Flag -# define PLANGENERATOR_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define PLANGENERATOR_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* PLANGENERATOR_SVNT_BUILD_DLL */ -# define PLANGENERATOR_SVNT_Export ACE_Proper_Import_Flag -# define PLANGENERATOR_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define PLANGENERATOR_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* PLANGENERATOR_SVNT_BUILD_DLL */ -#else /* PLANGENERATOR_SVNT_HAS_DLL == 1 */ -# define PLANGENERATOR_SVNT_Export -# define PLANGENERATOR_SVNT_SINGLETON_DECLARATION(T) -# define PLANGENERATOR_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* PLANGENERATOR_SVNT_HAS_DLL == 1 */ - -// Set PLANGENERATOR_SVNT_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (PLANGENERATOR_SVNT_NTRACE) -# if (ACE_NTRACE == 1) -# define PLANGENERATOR_SVNT_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define PLANGENERATOR_SVNT_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !PLANGENERATOR_SVNT_NTRACE */ - -#if (PLANGENERATOR_SVNT_NTRACE == 1) -# define PLANGENERATOR_SVNT_TRACE(X) -#else /* (PLANGENERATOR_SVNT_NTRACE == 1) */ -# if !defined (ACE_HAS_TRACE) -# define ACE_HAS_TRACE -# endif /* ACE_HAS_TRACE */ -# define PLANGENERATOR_SVNT_TRACE(X) ACE_TRACE_IMPL(X) -# include "ace/Trace.h" -#endif /* (PLANGENERATOR_SVNT_NTRACE == 1) */ - -#endif /* PLANGENERATOR_SVNT_EXPORT_H */ - -// End of auto generated file. diff --git a/CIAO/RACE/Input_Adapters/PlanGenerator/README.txt b/CIAO/RACE/Input_Adapters/PlanGenerator/README.txt deleted file mode 100644 index 8cbc5665f85..00000000000 --- a/CIAO/RACE/Input_Adapters/PlanGenerator/README.txt +++ /dev/null @@ -1,15 +0,0 @@ - - -//Author: Stoyan Paunov - -This is the README for the PlanGenerator Input Adapter for RACE. This input -adapter has similar functionality to the Interactive Input Adapter, however -instead of parsing the descriptors on disk, it takes the provided by the -injector package name, retrieves the corresponding PackageConfiguration, and -finally build a DeploymentPlan in memory. Due to the fact that the XML parsing -is avoided, the operation takes a lot less time than its counterpart in the -Interactive Input Adapter. An added benefit is that the implementation arti- -facts in the constructed DeploymentPlan to point to the HTTP server collocated -with the RepositoryManager. - - |