//
// Visit_AssemblyConfigProperty
//
void QED_Deployment_Visitor::
Visit_AssemblyConfigProperty (const PICML::AssemblyConfigProperty & config)
{
  PICML::Property property = config.dstAssemblyConfigProperty_end ();

  // Overwrite the default configuration value, or store a new
  // configuration value.
  this->default_props_[property.name ()] = property.DataValue ();
}
//
// Visit_ConfigProperty
//
void QED_Deployment_Visitor::
Visit_ConfigProperty (const PICML::ConfigProperty & config)
{
  PICML::Property property = config.dstConfigProperty_end ();

  // Store the default config property. It may get overwritten by
  // the assembly configuration.
  this->default_props_[property.name ()] = property.DataValue ();
}
//
// Visit_Property
//
void QED_Deployment_Visitor::
Visit_Property (const PICML::Property & property)
{
  std::string value = property.DataValue ();

  this->root_.top ()->setAttribute (
    Utils::XStr ("value"),
    Utils::XStr (std::string (property.DataValue ())));
}
Exemple #4
0
//
// get_impl_entry_point
//
void CUTS_EISA_Generator_Base::
get_impl_entry_point (const PICML::
                      ComponentImplementationContainer & container)
{
  const CUTS_BE_Impl_Node * node = 0;

  if (!CUTS_BE_EISA_PREPROCESSOR->impls ().find (container.name (), node))
    return;

  CUTS_BE_Impl_Node::Artifact_Set::const_iterator iter;

  for (iter  = node->artifacts_.begin ();
       iter != node->artifacts_.end ();
       iter ++)
  {
    std::string name = iter->name ();
    size_t index = name.rfind ("_exec");

    if (index == name.length () - 5)
    {
      // We found the artifact that ends in _exec!!!
      typedef std::set <PICML::ArtifactExecParameter> ExecParameter_Set;
      ExecParameter_Set params = iter->dstArtifactExecParameter ();

      for (ExecParameter_Set::iterator piter = params.begin ();
           piter != params.end ();
           piter ++)
      {
        PICML::Property property = piter->dstArtifactExecParameter_end ();

        if ((std::string)property.name () == "entryPoint")
          this->entry_point_ = property.DataValue ();
      }
    }
  }
}
Exemple #5
0
void CUTS_BE_Action_Property_T <CUTS_BE_Xml>::
generate (const PICML::Property & property)
{
  // Get the datatype for the property.
  PICML::DataType datatype = property.DataType_child ();

  if (datatype != Udm::null)
  {
    try
    {
      PICML::PredefinedType type =
        PICML::PredefinedType::Cast (datatype.ref ());

      this->ctx_.outfile_
        << "<property name=\"" << property.name () << "\" "
        << "type=\"" << type.name () << "\" value=\""
        << property.DataValue () << "\" />" << std::endl;
    }
    catch (...)
    {

    }
  }
}
//
// Visit_AttributeValue
//
void QED_Deployment_Visitor::
Visit_AttributeValue (const PICML::AttributeValue & attrval)
{
  PICML::Property property = attrval.dstAttributeValue_end ();
  property.Accept (*this);
}