1 #ifndef LIBDCP_LUT_CACHE_H
2 #define LIBDCP_LUT_CACHE_H
5 #include <boost/shared_ptr.hpp>
11 boost::shared_ptr<T> get (int bit_depth, float gamma)
13 for (typename std::list<boost::shared_ptr<T> >::iterator i = _cache.begin(); i != _cache.end(); ++i) {
14 if ((*i)->bit_depth() == bit_depth && (*i)->gamma() == gamma) {
19 boost::shared_ptr<T> lut (new T (bit_depth, gamma));
20 _cache.push_back (lut);
25 std::list<boost::shared_ptr<T> > _cache;