logo

Wallaroo

C++ Dependency Injection

Wiring File XML schema

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">


  <xs:simpleType name="paramclasstype">
    <xs:restriction base="xs:string">
      <xs:enumeration value="char"/>
      <xs:enumeration value="unsigned char"/>
      <xs:enumeration value="int"/>
      <xs:enumeration value="unsigned int"/>
      <xs:enumeration value="long"/>
      <xs:enumeration value="double"/>
      <xs:enumeration value="bool"/>
      <xs:enumeration value="string"/>
    </xs:restriction>
  </xs:simpleType>


<xs:complexType name="attributetype">
  <xs:sequence>
    <xs:element name="name" type="xs:token"/>
    <xs:element name="value" type="xs:string"/>
  </xs:sequence>
</xs:complexType>


<xs:complexType name="paramtype">
  <xs:sequence>
    <xs:element name="type" type="paramclasstype"/>
    <xs:element name="value" type="xs:string"/>
  </xs:sequence>
</xs:complexType>


<xs:element name="part">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="name" type="xs:token"/>
      <xs:element name="class" type="xs:token"/>
      <xs:element name="attribute" minOccurs="0" maxOccurs="unbounded" type="attributetype"/>
      <xs:element name="parameter1" minOccurs="0" type="paramtype"/>
      <xs:element name="parameter2" minOccurs="0" type="paramtype"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>


<xs:element name="wire">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="source" type="xs:token"/>
      <xs:element name="dest" type="xs:token"/>
      <xs:element name="collaborator" type="xs:token"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>
              

<xs:element name="wallaroo">
  <xs:complexType>
    <xs:sequence>

      <xs:element name="plugins" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="shared" type="xs:Name" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>

      <xs:element name="parts">
        <xs:complexType>
          <xs:sequence>
            <xs:element ref="part" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>

      <xs:element name="wiring" minOccurs="0" maxOccurs="1">
        <xs:complexType>
          <xs:sequence>
            <xs:element ref="wire" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>    

    </xs:sequence>
  </xs:complexType>
</xs:element>

</xs:schema>