ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
ELM is a multi-purpose library used by the OTAWA project (http://www.otawa.fr). It provides :
Please take a look at the module part for detailed description.
ELM provides a lot of OS-independent simple and reliable types in Integer Operations together with efficient complex integer functions.
The Character String module provides several class to manage strings: C-string wrapper (elm::CString), mostly 0 cost substring extraction, fast and light string class (elm::String), string buffer (elm::StringBuffer) to build strings and automatic string building class (elm::AutoString) with very handy syntax (
_ << a1 << a2 << ...).
Facilities to handle efficiently are also provided in Array.
One goal of ELM is to provide very powerful and efficient data structures. They includes:
All these classes share the same syntax for iterators:
To make easier the use of data structure and allows inter-operations, each one implements a set of interfaces known in C++ as concepts (module Concepts).
The Input / Output System module is split in two layers. The higher layer (classes elm::io::Output and elm::io::Input) are responsible for format-aware input / output (mostly equivalent to STL istream / ostream). They provide formatter class (elm::io::IntFormat and elm::io::FloatFormat) to fine-tune their work. The IO errors are processed by rising exceptions.
The lower layer handles input-output as a stream of bytes but the provided classes allows to pipe efficiently these classes together, offering a significant potential of control on the streams. All stream classes implement either the elm::io::InStream or elm::io::OutStream and supports error handling through synchronized error return. Both allows to get the OS-error message from getLastError() method.
Basically, input stream and output stream gives access to the OS streams but other classes allows to buffer IO (elm::io::BufferedInStream or elm::io::BufferedOutStream), to use block of data as streams (elm::io::BlockInStream, elm::io::BlockOutStream), to compute checksums (elm::checksum::Fletcher; elm::checksum::MD5). In addition, input and output stream can piped with the elm::io::StreamPipe or diverted with elm::io::TeeOutStream.
ELM implements also several classes to abstract the host OS. The following features have been tested on Linux, Windows and MacOSX:
In the future, classes to handle threads and sockets will be added.
ELM supplies several classes to handle allocation and de-allocation: