libFAUDES
Sections
Index
|
Faudes object serialization.Objects of a class derived from the univarsal base faudes::Type provide a uniform interface for serialization. More...
Detailed DescriptionObjects of a class derived from the univarsal base faudes::Type provide a uniform interface for serialization. It includes reading and writing the objects configuration data from/to a file or a std::string; see faudes::Type for the actual interface. Serialization is implemented by three classes
A token is of type string, number, or tag. Tags indicate the beginning or end of a section, must balance, and must be XML compliant. The character data inbeween tags is interpreted as a sequence of strings and numbers, to e.g. conveniently represent a list of events, transition or states. While the Token class implements reading and writing tokens from a C++ stream, the TokenReader and TokenWriter classes keep track of nested sections. Thus, opening a file via a TokenReader allows to scan for a particular section or to loop over all tokens from a particular section. Technical Note: XML format Up to libFAUDES 2.16b, the actual stream format was intended to be human editable, and this will continue to be the case for generators and alphabets. However, since the initial design of libFAUDES, a number of other faudes types where inroduced, mainly to configure the run-time behaviour of tools like the simulator or hardware access. For the latter kind of objects, we feel that a more rigoruos XML format is preferable, since this enables the usage of professional XML editors/tools for configuration and data maintenance. Thus, in 2.16f we started to implement an alternative serialization format which will co-exist with the old format for some time. During this transitional phase, libFAUDES will read both formats and use the new XML format as a default for output (exept for generators and alphabets, which will continue to use the native format as a default). The transitional phase is expected be completed until libFAUDES 2.20, the utility |
libFAUDES 2.20d --- 2011.04.26 --- c++ source docu by doxygen