Basic elements: parameter and attrib

A composite node, which has child nodes other than a text node, often has (parameter*) and (attrib*). In ohmms, any class with overloaded operators << and >> is a candidate who can use these elements.

The parameter element provides a generic way of assigning the values of simple types: intrinsic types (double, int, ...) and template types whose size is fixed at compiler time (TinyVector<double,3>, Tensor<double,3>...). This way, we do not have to introduce a new element whenever we introduce a new data member to a class or whenever we need a new parameter to control a simulation. The datatype attribute is meant to specify what the data type of the content is. However, the name attribute is often sufficient to tell a program what the data type is.

The attrib element is similar to the parameter element in that it provides a generic way of assigning the values of some types. The main difference is that the size of the data is not fixed at compiler time, i.e., it is intended for array-type data. In ohmms, std::stl containers or vectorized containers work on the attrib element.

The parameter element is expected to overwrite previous elements that are mapped to the same object. The expected action of attrib elements is not well defined: new data can be appended to the existing object or can overwrite it.