Lyric is a C++ library. It is distributed under the terms and conditions of the GNU general public license (GPL) at no charge. If you don't have a copy of the GPL, you can get one at GNU.
For now Lyric contains the following main parts:
- Multidimensional memory management (a set of 1D and 2D templated container classes)
- Templated dynamic (on demand) memory mangement for lists, maps, etc.
- Strings, paths, and regular expressions.
- I/O classes (still heavy development to do).
- Date, time, and chronometer classes.
- C++ exception based error handling.
Lyric is intended to simplify programmers life. It's first target was to allow C++ newbies to write memory safe programs. Container classes handle memory reservation on demand and clean-up everything automagically once the container disapears (for example at the end of a function). It allows to use items from the containers with the
[index]operator, as in C, so many programs can easily be ported to C++ using Lyric. The = operator is implemented as a clone operator. Never will pointers be copied around. It's safer and consistent with the behaviour of the = operator for C++ builtin types (such as int or float). Other languages/libraries are very inconsistent with such memory and = operator issues.
For code optimisation reasons all memory reservations are made in mono-block. Yes, even the 2D ones, which are then accessible with the
[line][column]operator using an trick that makes the compiler believe it is a true
[...][...]operation (thus letting it fully optimize code). This mono-block strategy came from image processing, the basic task Lyric (or better it's ancestror, the LTS-Platform) was designed for. On todays workstations (even PC/Linux boxes) memory is not such an issue, mainly thank to low prices. And this design allows MMX optimisations on Intel platforms, and cache optimisations on DEC-Alpha's (if I remember well the Alpha cache mechanism).