Static Public Member Functions | Static Private Attributes | List of all members
tesseract_collision::tesseract_collision_bullet::BulletCollisionShapeCache Class Reference

#include <bullet_collision_shape_cache.h>

Static Public Member Functions

static std::shared_ptr< BulletCollisionShapeget (const std::shared_ptr< const tesseract_geometry::Geometry > &key)
 Retrieve the cache entry by key. More...
 
static void insert (const std::shared_ptr< const tesseract_geometry::Geometry > &key, const std::shared_ptr< BulletCollisionShape > &value)
 Insert a new entry into the cache. More...
 
static void prune ()
 Remove any entries which are no longer valid. More...
 

Static Private Attributes

static std::map< boost::uuids::uuid, std::weak_ptr< BulletCollisionShape > > cache_
 The static cache. More...
 
static std::mutex mutex_
 The shared mutex for thread safety. More...
 

Detailed Description

Definition at line 54 of file bullet_collision_shape_cache.h.

Member Function Documentation

◆ get()

std::shared_ptr< BulletCollisionShape > tesseract_collision::tesseract_collision_bullet::BulletCollisionShapeCache::get ( const std::shared_ptr< const tesseract_geometry::Geometry > &  key)
static

Retrieve the cache entry by key.

Parameters
keyThe cache key
Returns
If key exists the entry is returned, otherwise a nullptr is returned

Definition at line 54 of file bullet_collision_shape_cache.cpp.

◆ insert()

void tesseract_collision::tesseract_collision_bullet::BulletCollisionShapeCache::insert ( const std::shared_ptr< const tesseract_geometry::Geometry > &  key,
const std::shared_ptr< BulletCollisionShape > &  value 
)
static

Insert a new entry into the cache.

Parameters
keyThe cache key
valueThe value to store

Definition at line 45 of file bullet_collision_shape_cache.cpp.

◆ prune()

void tesseract_collision::tesseract_collision_bullet::BulletCollisionShapeCache::prune ( )
static

Remove any entries which are no longer valid.

Definition at line 70 of file bullet_collision_shape_cache.cpp.

Member Data Documentation

◆ cache_

std::map< boost::uuids::uuid, std::weak_ptr< BulletCollisionShape > > tesseract_collision::tesseract_collision_bullet::BulletCollisionShapeCache::cache_
staticprivate

The static cache.

Definition at line 77 of file bullet_collision_shape_cache.h.

◆ mutex_

std::mutex tesseract_collision::tesseract_collision_bullet::BulletCollisionShapeCache::mutex_
staticprivate

The shared mutex for thread safety.

Definition at line 79 of file bullet_collision_shape_cache.h.


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


tesseract_collision
Author(s): Levi Armstrong
autogenerated on Sun May 18 2025 03:01:53