Esempio n. 1
0
//
// Visit_RootFolder
//
void QED_Deployment_Visitor::
Visit_RootFolder (const PICML::RootFolder & root)
{
  // Generate the component instance configuration.
  typedef
    std::vector <PICML::ComponentImplementations>
    ComponentImplementations_Set;

  ComponentImplementations_Set folders =
    root.ComponentImplementations_children ();

  std::for_each (folders.begin (),
                 folders.end (),
                 boost::bind (&ComponentImplementations_Set::value_type::Accept,
                              _1,
                              boost::ref (*this)));

  // Generate the deployment plans in this project.
  typedef
    std::vector <PICML::DeploymentPlans>
    DeploymentPlans_Set;

  DeploymentPlans_Set plans = root.DeploymentPlans_kind_children ();

  std::for_each (plans.begin (),
                 plans.end (),
                 boost::bind (&DeploymentPlans_Set::value_type::Accept,
                              _1,
                              boost::ref (*this)));
}
//
// Visit_RootFolder
//
void Set_Classpath_Script_Generator::
Visit_RootFolder (const PICML::RootFolder & folder)
{
  typedef std::vector <PICML::ComponentImplementations> Folder_Set;
  Folder_Set folders = folder.ComponentImplementations_children ();

  std::for_each (folders.begin (),
                 folders.end (),
                 boost::bind (&Folder_Set::value_type::Accept,
                              _1,
                              boost::ref (*this)));

  if (!this->impls_.empty ())
  {
    // Make sure the ./bin directory exist.
    std::string bindir = this->basedir_ + "/bin";
    ACE_OS::mkdir (bindir.c_str ());

    // Now, generate the scripts in the bin directory
    this->generate_sh_script (bindir);
    this->generate_bat_script (bindir);
  }
}