fcl_collision_geometry_cache.h
Go to the documentation of this file.
1 
27 #ifndef TESSERACT_COLLISION_FCL_COLLISION_GEOMETRY_CACHE_H
28 #define TESSERACT_COLLISION_FCL_COLLISION_GEOMETRY_CACHE_H
29 
30 #include <map>
31 #include <memory>
32 #include <mutex>
33 
37 #include <boost/uuid/uuid.hpp>
39 
40 #include <tesseract_geometry/fwd.h>
41 
43 {
45 {
46 public:
52  static void insert(const std::shared_ptr<const tesseract_geometry::Geometry>& key,
53  const std::shared_ptr<fcl::CollisionGeometryd>& value);
54 
60  static std::shared_ptr<fcl::CollisionGeometryd> get(const std::shared_ptr<const tesseract_geometry::Geometry>& key);
61 
63  static void prune();
64 
65 private:
67  static std::map<boost::uuids::uuid, std::weak_ptr<fcl::CollisionGeometryd>> cache_; // NOLINT
69  static std::mutex mutex_; // NOLINT
70 };
71 } // namespace tesseract_collision::tesseract_collision_fcl
72 
73 #endif // TESSERACT_COLLISION_FCL_COLLISION_GEOMETRY_CACHE_H
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
tesseract_collision::tesseract_collision_fcl::FCLCollisionGeometryCache::get
static std::shared_ptr< fcl::CollisionGeometryd > get(const std::shared_ptr< const tesseract_geometry::Geometry > &key)
Retrieve the cache entry by key.
Definition: fcl_collision_geometry_cache.cpp:49
collision_geometry.h
tesseract_collision::tesseract_collision_fcl::FCLCollisionGeometryCache::cache_
static std::map< boost::uuids::uuid, std::weak_ptr< fcl::CollisionGeometryd > > cache_
The static cache.
Definition: fcl_collision_geometry_cache.h:67
tesseract_collision::tesseract_collision_fcl
Definition: fcl_collision_geometry_cache.h:42
tesseract_collision::tesseract_collision_fcl::FCLCollisionGeometryCache::mutex_
static std::mutex mutex_
The shared mutex for thread safety.
Definition: fcl_collision_geometry_cache.h:69
tesseract_collision::tesseract_collision_fcl::FCLCollisionGeometryCache::prune
static void prune()
Remove any entries which are no longer valid.
Definition: fcl_collision_geometry_cache.cpp:65
TESSERACT_COMMON_IGNORE_WARNINGS_POP
Definition: create_convex_hull.cpp:37
fwd.h
tesseract_collision::tesseract_collision_fcl::FCLCollisionGeometryCache
Definition: fcl_collision_geometry_cache.h:44
tesseract_collision::tesseract_collision_fcl::FCLCollisionGeometryCache::insert
static void insert(const std::shared_ptr< const tesseract_geometry::Geometry > &key, const std::shared_ptr< fcl::CollisionGeometryd > &value)
Insert a new entry into the cache.
Definition: fcl_collision_geometry_cache.cpp:40
macros.h


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