![]() |
Tesseract 0.28.4
|
Used to create a cache of objects. More...
#include <clone_cache.h>
Public Member Functions | |
| CloneCache (std::shared_ptr< CacheType > original, const long &cache_size=5) | |
| const std::shared_ptr< CacheType > & | operator-> () |
| std::shared_ptr< CacheType > | clone () |
| Gets a clone of original_. | |
| void | setCacheSize (long size) |
| Set the cache size. | |
| long | getCacheSize () const |
| Get the set cache size. | |
| long | getCurrentCacheSize () const |
| Get the current size of the cache. | |
| void | updateCache () |
| If original_ has changed it will update or rebuild the cache of objects. | |
Public Attributes | |
| const bool | supports_update |
Protected Member Functions | |
| void | createClone () |
| std::shared_ptr< CacheType > | getClone () const |
Used to create a cache of objects.
CacheType needs the following methods CacheType::Ptr clone() const; int getRevision() const; bool update(Const CacheType::ConstPtr&); // optional
|
inline |
Gets a clone of original_.
|
inline |
Set the cache size.
| size | The size of the cache. |
|
inline |
Get the set cache size.
|
inline |
Get the current size of the cache.