Exemple #1
0
//
// write_Attribute_begin
//
void CUTS_EISA_Generator_Base::
write_Attribute_begin (const PICML::Attribute & attr)
{
  std::string attr_name = attr.name ();
  PICML::AttributeMember member = attr.AttributeMember_child ();
  PICML::MemberType mtype = member.ref ();

  this->out_
    << attr_name << " (" << CIAO_IN_TYPE (mtype)
    << " " << attr_name << ")";
}
Exemple #2
0
//
// write_method_begin
//
void CUTS_EISA_Header_Generator::
write_Attribute_begin (const PICML::Attribute & attr)
{
  if (std::string (attr.name ()) != "configuration")
  {
    // Generate the getter method for the attribute.
    PICML::Attribute temp_attr (attr);
    PICML::ReadonlyAttribute ro = PICML::ReadonlyAttribute::Cast (temp_attr);

    this->write_ReadonlyAttribute_begin (ro);
    this->write_ReadonlyAttribute_end (ro);

    // Close the getter method and generate the setter method
    // for the current attribute.
    this->out_
      << single_line_comment ("set " + (std::string)attr.name ())
      << "virtual void ";

    this->_super::write_Attribute_begin (attr);
  }
}
//
// Visit_Attribute
//
void QED_Deployment_Visitor::
Visit_Attribute (const PICML::Attribute & attr)
{
  PICML::AttributeValue attrval = attr.dstAttributeValue ();

  if (attrval != Udm::null)
  {
    // Create an XML element for the attribute.
    xercesc::DOMElement * element =
      this->doc_->createElementNS (Utils::XStr ("http://www.springframework.org/schema/beans"),
                                   Utils::XStr ("property"));

    element->setAttribute (Utils::XStr ("name"),
                           Utils::XStr (std::string (attr.name ())));

    // Insert the XML element into the document.
    this->root_.top ()->appendChild (element);

    // Save the element and visit the attribute value.
    this->root_.push (element);
    attrval.Accept (*this);
    this->root_.pop ();
  }
}
Exemple #4
0
//
// write_method_end
//
void CUTS_EISA_Header_Generator::
write_Attribute_end (const PICML::Attribute & attr)
{
  if (std::string (attr.name ()) != "configuration")
    this->out_ << ";" << std::endl;
}