hgl 0.5.25
A compiler/interpreter suite for developing images
List of all members
HGL::Common::RAIIFactory< T, arrayDel, Container, capacity > Class Template Reference

Template to implement a RAII factory. More...

#include "raiifactory.h"

Inheritance diagram for HGL::Common::RAIIFactory< T, arrayDel, Container, capacity >:
[legend]

Detailed Description

template<class T, bool arrayDel = false, class Container = std::vector<const T *>, std::size_t capacity = 50>
class HGL::Common::RAIIFactory< T, arrayDel, Container, capacity >

Template to implement a RAII factory.

Note
There exists an specialisation for std::set to improve performance if there are mostly calls to RAIIFactory::release
Template Parameters
Tthe type to keep track of
arrayDelflag to indicate that T is an array
Containertype of container to store references
capacitythe capacity to hold before minimizing the memory usage
Author
Heiko Schäfer heiko.nosp@m.@hgl.nosp@m..rang.nosp@m.un.d.nosp@m.e