![]() ![]() |
NRAO Home > CASA > Programming > XML Element Tags |
The XML files found in code/xmlcasa/implement/* describe the interfaces to the tool and tasks found in CASA. These XML files use a small number of element tags to describe the interfaces. By using the following elements with their attributes we can fairly well describe the interface as well as specifying system wide defaults and in the near future enumerated types for input arguments.
While there are some code excerpts to illustrate how an element is constructed, the best (and hopefully working) examples will be found in the xml files themselves located in code/xmlcasa/implement/*/*.xml.
Tag Name | Description |
---|---|
tool | A tool typically has the following elements, short description, description, one or more methods and an example. |
task | A task is very similar to a tool method. The main difference being it will be a complex set of calls to one or more tool methods. As such it may contain output, inout, and input elements. It should always have a shortdescription, description, and returns elements. |
code | Helper code for the C++ code generaterator. It will contain the private and or include elements. Currently no attributes. |
include | Additional include statements, handy for forward declarations. During development this should just be a single file to avoid having to rerun the code generator each time a change is made. Currently no attributes. |
private | What to additionally include in the private part of a class. Also during development this should just be a single include file to avoid having to rerun the code generator when making changes. Currently no attributes. |
shortdescription | A short terse description, typically one or two lines. This will typically appear in the scripting languages help text. Currently no attributes. |
description | A more detail description of what the tool, task, method, parameter is. The use of latex in this block is supported for generating html and pdf documentation. Currently no attributes. |
method | A method or function of an object belonging to a tool. A method will typically contain a shortdescription, description, returns, and example elements. It may also have output, inout, and input elements. |
output | An output element consists of one or more param elements that will be returned by the method or task. Currently no attributes. |
inout | An inout element consists of one or more param elements that will be used as input for a method or task and possibly modified and returned as output. Currently no attributes. |
input | An input element consists of one or more param elements that will be used as input by a method or task. Other tools maybe used as input if properly registered with the system. Currently no attributes. |
param | A param element describes an argument to a task or tool method. Typically it will have a description element and if it has a default value on or more value elements. |
any |
An any type, for unknown or records, i.e. string or int. |
comments | The comments element |
link | The link element |
defaultrecord | The default record |
value | A number or string, can be nested. If the value element is specfied in an input element, multiple values maybe present to indicate an enumeration of allowed values. The last value specified will be the default. This behavior may change, i.e. an addtional default attribute could be added to explicity identify the default value. |
returns | Description of what the Method/Task returns, similar to a param element. |
example | An example element is used to demonstrate how a tool, task or method is used by the user. We will likely make additional tags or attributes to allow inclusions of working files. |
A tool typically has the following elements, short description, description, one or more methods and an example.
Attribute | Required? | Description |
---|---|---|
name | yes | This is the name of the tool. |
module | no | This is the module to which the tool belongs |
A task is very similar to a tool method. The main difference being it will be a complex set of calls to one or more tool methods. As such it may contain output, inout, and input elements. It should always have a shortdescription, description, and returns elements.
Attribute | Required? | Description |
---|---|---|
name | yes | This is the name of the task. |
module | no | This is the module to which the task belongs |
Helper code for the C++ code generaterator. It will contain the private and or include elements. Currently no attributes.
xmlcasa/synthesis/imager_forward.h
#include <xmlcasa/synthesis/imager_private.h>
Additional include statements, handy for forward declarations. During development this should just be a single file to avoid having to rerun the code generator each time a change is made. Currently no attributes.
xmlcasa/synthesis/imager_forward.h
#include <xmlcasa/synthesis/imager_private.h>
What to additionally include in the private part of a class. Also during development this should just be a single include file to avoid having to rerun the code generator when making changes. Currently no attributes.
xmlcasa/synthesis/imager_forward.h
#include <xmlcasa/synthesis/imager_private.h>
A short terse description, typically one or two lines. This will typically appear in the scripting languages help text. Currently no attributes.
A more detail description of what the tool, task, method, parameter is. The use of latex in this block is supported for generating html and pdf documentation. Currently no attributes.
The default record Currently no attributes.
A method or function of an object belonging to a tool. A method will typically contain a shortdescription, description, returns, and example elements. It may also have output, inout, and input elements.
Attribute | Required? | Description |
---|---|---|
type | yes | Allowed options are function or constructor. Currently constructors are ignored |
name | yes | This is the name of the method. |
An output element consists of one or more param elements that will be returned by the method or task. Currently no attributes.
An inout element consists of one or more param elements that will be used as input for a method or tasked and possibly modified and returned as output. Currently no attributes.
An input element consists of one or more param elements that will be used as input by a method or task. Other tools maybe used as input if properly registered with the system. Currently no attributes.
A param element describes an argument to a task or tool method. Typically it will have a description element and if it has a default value on or more value elements.
Attribute | Required? | Description |
---|---|---|
name | yes | This is the name of the param. |
xsi:type | yes | Choose from the following types: any, int, bool, string, double, intArray, boolArray, stringArray, doubleArray, casa*(tool) |
units | no | By specifying a unit attribute, the param because a quantity. |
Description of what the Method/Task returns, similar to a param element.
Attribute | Required? | Description |
---|---|---|
type | yes | You may specify a return type as one of the types specified in the param xsi:type attribute, additionally you may specify a tool as a return type. |
An example element is used to demonstrate how a tool, task or method is used by the user. We will likely make additional tags or attributes to allow inclusions of working files. Currently no attributes.
An any type, for unknown or records, i.e. string or int.
Attribute | Required? | Description |
---|---|---|
type | yes | Currently an any element may be specified as either a record or variant |
The link element. A way to specify the a link to an external document. value.
Attribute | Required? | Description |
---|---|---|
anchor | yes | HTML locator |
The comments element. No attributes currently.
A number or string, can be nested. If the value element is specfied in an input element, multiple values maybe present to indicate an enumeration of allowed values. The last value specified will be the default. This behavior may change, i.e. an addtional default attribute could be added to explicity identify the default value.
Attribute | Required? | Description |
---|---|---|
name | no | A value my have an optional name, the name is required if part of a record element. |
type | no | The type may be specified as either vector, scalar, array, or struct(for complex) |
xsi:type | no | Maybe any of the types in specified in the param xsi:type attribute |
shape | no | Currently not implemented |
Copyright © 2007 Associated Universities Inc., Washington, D.C.
This code is available under the terms of the GNU General Public Lincense
Home |
Contact Us |
Directories |
Site Map |
Help |
Privacy Policy |
Search
Modified on
Saturday, 05-Jan-2007 13:17:19 MST