Container Classes
Magnum contains its own set of container classes with functionality compared to the well known STL containers, but being taylored to the special needs of real-time programs like graphics intensive applications.
The most common containers are supported (lists, arrays, stacks, sets multisets, maps and multimaps) with some special additions:
- Chain. A chain is a container comparable to a list, but especially designed for large items with high creation costs. All items that can be contained in a chain must be derived from a special class called Chainable, and an item can only be inserted into one chain at a time. The insertion itself does not perform any copy operation, but simply inserts the item into a linked list.
- Allocator. Most container classes use a so called allocator class for creating new items. The allocator included in Magnum is optimised for managing large counts of small items while avoiding too many real allocations by using memory pools.
- Cache. A special cache class is also part off the Magnum container module offering an abstract caching mechanism for shared objects like textures and shaders.
- Scheduler. The scheduler class is for managing tasks that have dependencies on other tasks. This class ensures that all tasks are performed in the correct order and that all dependencies are inserted, too.