Skip to content

Output of the C code parser

BorjaFG edited this page Feb 3, 2017 · 1 revision

#XML elements used to define configurable parameters in a Simion application

  • APP : Root node. All the elements hang from this one.

    Attributes:

    • Name (string): the name of the root node in the exported XML configuration file
  • INCLUDE : This is used to import class definitions from an external XML file. No attributes, the name of the file is the text value itself. There can be more than one INCLUDE node. These XML files can contain:

    • CLASS : Definition of a reusable class.

      Attributes:

      • Name: the name of the class
    • ENUMERATION: Definition of an enumerated type (list of strings). The enumerated types are tagged <ENUMERATION> and the values within these enumerated type are defined: <VALUE>val1</VALUE> <VALUE>val2</VALUE>

      Attributes:

      • Name: the name of the enumerated type

      Example:
      <ENUMERATION Name="DISTRIBUTIONS">
      <VALUE>linear</VALUE>
      <VALUE>quadratic</VALUE>
      </ENUMERATION>
      ...

  • BRANCH : Deferred class definition. Instead of explicitly defining this node, we refer to a predefined class from some xml file (included with INCLUDED)

    Attributes:

    • Name: the name of the node. The default XML tag exported if attribute XMLTag doesn't exist.
    • Comment [optional]: explanatory short text to be displayed as help when the mouse is on the element.
    • Class: name of the class that defines this branch
    • Window [optional]: window were the branch is to be edited. "New" value opens a new windows, if the attribute doesn't exist, the info is displayed on the same window.
    • Optional: is this parameter optional?
  • CHOICE : Among several elements, only one is selected. Optionally, depending on the option selected, a different XML file will be loaded and a name will be associated to it. The goal is to dynamically define classes depending on a selected option.

    Attributes:

    • Name: the name of the node. The default XML tag exported if attribute XMLTag doesn't exist.
    • LoadXML [optional]: name given to the XML. If the attribute doesn't exist, no XML will be loaded.
  • CHOICE-ELEMENT : Entries on a CHOICE. Defined via children (branches and values).

    • Name: the name of the node. The default XML tag exported if attribute XMLTag doesn't exist.
    • XML: XML file to be loaded when this child is selected
    • Class: The name of this node's class
  • DOUBLE-VALUE : A constant real value.

    Attributes:

    • Name: the name of the node. The default XML tag exported if attribute XMLTag doesn't exist.
    • Default: default value.
    • Optional: is this parameter optional?
    • Comment [optional]: explanatory short text to be displayed as help when the mouse is on the element.
  • BOOL-VALUE : A constant bool value.

    Attributes:

    • Name: the name of the node. The default XML tag exported if attribute XMLTag doesn't exist.
    • Default: default value.
    • Optional: is this parameter optional?
    • Comment [optional]: explanatory short text to be displayed as help when the mouse is on the element.
  • INTEGER-VALUE : Constant integer value.

    Attributes:

    • Name: the name of the node. The default XML tag exported if attribute XMLTag doesn't exist.
    • Default: default value.
    • Optional: is this parameter optional?
    • Comment [optional]: explanatory short text to be displayed as help when the mouse is on the element
  • STRING-VALUE : Constant string value.

    Attributes:

    • Name: the name of the node. The default XML tag exported if attribute XMLTag doesn't exist.
    • Default: default value. If it is not defined, the default value will be a null string.
    • Optional: is this parameter optional?
    • Comment [optional]: explanatory short text to be displayed as help when the mouse is on the element
  • FILE-PATH-VALUE : Path to a file (string).

    Attributes:

    • Name: the name of the node. The default XML tag exported if attribute XMLTag doesn't exist.
    • Default: default value. If it is not defined, the default value will be a null string.
    • Comment [optional]: explanatory short text to be displayed as help when the mouse is on the element
  • DIR-PATH-VALUE : Path to a directory (string).

    Attributes:

    • Name: the name of the node. The default XML tag exported if attribute XMLTag doesn't exist.
    • Default: default value. If it is not defined, the default value will be a null string.
    • Comment [optional]: explanatory short text to be displayed as help when the mouse is on the element
  • ENUM-VALUE : Value from an enumerated type.

    Attributes:

    • Name: the name of the node. The default XML tag exported if attribute XMLTag doesn't exist.
    • Class: the name of the enumerated type (these types hang from the <ENUMERATED-TYPES/> node). The possible values hang from the enumerated-type node, and are tagged using VALUE: <VALUE>true</VALUE>,<VALUE>false</VALUE>.
    • Default: default value. If it is not defined or the value isn't among the enumerated ones, the first enumerated value will be selected by default.
    • Comment [optional]: explanatory short text to be displayed as help when the mouse is on the element
  • MULTI-VALUED : Collection of instances a class. No child. Interface: "+" and "-"

    Attributes:

    • Name: the name of the node. The default XML tag exported if attribute XMLTag doesn't exist.
    • Class: the name of the class.
    • Comment [optional]: explanatory short text to be displayed as help when the mouse is on the element
  • XML-NODE-REF : String contained in a list of strings loaded by a CHOICE node. This list (and the selected item) has to be refreshed each time the xml file is reloaded.

    Attributes:

    • Name: the name of the node. The default XML tag exported if attribute XMLTag doesn't exist.
    • XMLFile: name given to a xml tree in memory (i.e. "WORLD-DEFINITION") from which the list of values is retrieved
    • HangingFrom: the name of a 1st-level child whose children will populate the list of possible values (i.e. "STATE")
Clone this wiki locally