Tesseract
Motion Planning Environment
|
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_. More... | |
void | setCacheSize (long size) |
Set the cache size. More... | |
long | getCacheSize () const |
Get the set cache size. More... | |
long | getCurrentCacheSize () const |
Get the current size of the cache. More... | |
void | updateCache () |
If original_ has changed it will update or rebuild the cache of objects. More... | |
Public Attributes | |
const bool | supports_update |
Protected Member Functions | |
void | createClone () |
std::shared_ptr< CacheType > | getClone () const |
Protected Attributes | |
std::shared_ptr< CacheType > | original_ |
std::size_t | cache_size_ { 5 } |
The assigned cache size. More... | |
std::deque< std::shared_ptr< CacheType > > | cache_ |
A vector of cached objects. More... | |
std::mutex | cache_mutex_ |
The mutex used when reading and writing to cache_. More... | |
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 |
|
inline |
Gets a clone of original_.
|
inlineprotected |
|
inline |
Get the set cache size.
|
inlineprotected |
|
inline |
Get the current size of the cache.
|
inline |
|
inline |
Set the cache size.
size | The size of the cache. |
|
inline |
If original_ has changed it will update or rebuild the cache of objects.
|
protected |
A vector of cached objects.
|
mutableprotected |
The mutex used when reading and writing to cache_.
|
protected |
The assigned cache size.
|
protected |
const bool tesseract_common::CloneCache< CacheType >::supports_update |