One of the most important goals of OpenExposition is ease of use. For this reason, a lot of the user interface construction happens automatically, behind the scenes. For example, instantiated
exposition elements (e.g. variable entry fields) are automatically assigned to the currently created
exposer (e.g. window) currently being created. Also, it is the responsibility of the exposer to automatically deallocate the exposition elements allocated to it.
The same principle applies to most constructs used in OpenExposition - hence, most things should be allocated dynamically, and at the appropriate time. The following example illustrates the appropriate sequence of instatiations for an exposer and exposition:
The Python Exposer is defined in its own class, which is instantiated at the appropriate time...
pyexposer = new PythonExposer("Python");
The class constructor will then instatiate all of the expositions...
PythonExposer::PythonExposer (string const &name) : Exposer(name), accumulate(false)
{
...
*new VariableExpo<string> (output, "output")
<< new Property(Property::multi_line)
<< new Property(Property::read_only);
...
Instantiating the exposer automatically assignes to it the following expositions. The Exposition Properties are manually assigned to the exposition (using the << operator), but it is still the responsibility of the exposition to eventually dealloate them.
OpenExposition should currently work with variables of (and methods that return) type bool, int, long, float, double, string, and void. Template use in OpenExposition makes it easy to extend it to other types, but a few things need to be hard-coded. For now, it would be best to use OpenExposition for variables and methods of above types.
Documentation generated on 14 Jun 2006 for OpenExposition by
1.4.6>
Development hosted by