XML support

Any CLAM Component can be stored to XML as long as a StoreOn and Load methods are provided for that particular type [Garcia and Amatrian, 2001]. Dynamic Types, and therefore Processing Data and Processing Configs, are Components. But DTs can make use of their introspection capabilities and offer automatic built-in XML persistence. When implementing a new Dynamic Type class, XML storage facilities are obtained for free, without adding a single line of code. Nevertheless if the user wants a different output from the one automatically derived, the StoreOn operation of the concrete component can be overridden.

For passivating a Component an XMLStorage object has to be instantiated. Then the Dump operation of this object must be called, sending the component that has to be passivated, and the filename as arguments of the operation.

For activating a Component the interface is very similar. An XMLStorage must be instantiated and then the Restore operation must be called sending the component and the filename as arguments of the operation.

It is interesting to note that other application frameworks such as Ptolemy (see 2.2) have also relied on XML for data persistence.

2004-10-18