Front Matter

Abstract:

The python language (www.python.org) is an object oriented high level language used in a lot of projects. Many useful tools provide a python wrapping to interact with the tool via python (pyqt, vtk wrapping python, omniorb python, ...).

One particuliar feature of python is its lack of type checking. It means that you can write a function in python and call it with an integer, a float, a string or a more evoluate structure. The work of type checking is on developper side.

In this context, the python xdata module provide ways to declare types in python classes. The type declared for an attribute can be very restrictive (for example, an integer with a min and a max value) or not restrictive at all (for instance, the attribute can be an integer or a list or an instance of another class).

Once a set of classes is written using the xdata grammar described in details in this documentation, a simple gui (graphical user interface) written in pyqt is provided. It allows to interact graphically with the set of classes : instance creations, tooltips declarations (for documentation), popup declarations on each object, ...

More-over, when a class if fully typed using the xdata grammar and when a version of salome (www.salome-platform.org) is installed on the system at compilation stage, a salome component is automatically generated and fully usable without more work from the developper. The main xdata jobs is to write the idl (interface description language) files necessary for salome and to branch the gui dialog boxes from the pyqt xdata gui tool to the salome desktop.

There are two templates provided with xdata distribution (they are located in share/xdata/templates after installation stage). The easiest way to begin with xdata is to copy one of this templates locally and modify the source files to fit your developpements.

If you have already written classes, xdata module support multiple inheritence (as python do) and in that case, the only job you have to do is to write wrapping classes to declare what are the types of the attributes and methods.

If you have already written dialog boxes, xdata module provide a way to replace the default xdata dialog boxes by your own ones. It is sufficiant in that case to declare a createDialog class method in your class. This method of class will be called at each dialog box creation.

Any questions, requests, bugs should be sent to .