tesseract  v4.0.0-17-g361f3264
Open Source OCR Engine
tesseract::ObjectCache< T > Class Template Reference

#include <object_cache.h>

Collaboration diagram for tesseract::ObjectCache< T >:

Classes

struct  ReferenceCount
 

Public Member Functions

 ObjectCache ()=default
 
 ~ObjectCache ()
 
T * Get (STRING id, TessResultCallback< T *> *loader)
 
bool Free (T *t)
 
void DeleteUnusedObjects ()
 

Private Attributes

CCUtilMutex mu_
 
GenericVector< ReferenceCountcache_
 

Constructor & Destructor Documentation

◆ ObjectCache()

template<typename T>
tesseract::ObjectCache< T >::ObjectCache ( )
default

◆ ~ObjectCache()

template<typename T>
tesseract::ObjectCache< T >::~ObjectCache ( )
inline

Member Function Documentation

◆ DeleteUnusedObjects()

template<typename T>
void tesseract::ObjectCache< T >::DeleteUnusedObjects ( )
inline

◆ Free()

template<typename T>
bool tesseract::ObjectCache< T >::Free ( T *  t)
inline

◆ Get()

template<typename T>
T* tesseract::ObjectCache< T >::Get ( STRING  id,
TessResultCallback< T *> *  loader 
)
inline

Member Data Documentation

◆ cache_

template<typename T>
GenericVector<ReferenceCount> tesseract::ObjectCache< T >::cache_
private

◆ mu_

template<typename T>
CCUtilMutex tesseract::ObjectCache< T >::mu_
private

The documentation for this class was generated from the following file: