|
Broom 1.0.0
A thread-local C++ Garbage Collector
|
#include <broom-unordered-map.h>


Public Member Functions | |
| DEF_TYPES () | |
| unordered_map (std::initializer_list< std::pair< const Key, T > > il) | |
| unordered_map (std::initializer_list< std::pair< const Key, T > > il, typename Base::size_type bucket_count, const Hash &hash=Hash(), const KeyEqual &equal=KeyEqual(), const Allocator &alloc=Allocator()) | |
| virtual void | Visit (Visitor *visitor) const |
Public Member Functions inherited from broom::BroomValue | |
| virtual | ~BroomValue () |
Additional Inherited Members | |
Protected Member Functions inherited from broom::BroomValue | |
| BroomValue (GarbageCollector *gc) | |
| BroomValue () | |
| BroomValue (const BroomValue &other) | |
| BroomValue & | operator= (const BroomValue &other) |
| BroomValue & | operator= (BroomValue &&other) noexcept |
A Broom wrapper for std::unordered_map. broom::unordered_map aims to cover all the cases where one might want to use a std::unordered_map, while still remaining safe in the context of garbage collection. Since std::unordered_map is not on the stack and won't be scanned automatically, any managed pointer in it will be garbage collected prematurely. broom::unordered_map aims to alleviate this concern by implementing it as a precise root. broom::unordered_map also supports the usage of managed pointers as keys. They will be scanned along with the values. broom::unordered_map is only available as an interface and you should never rely on its implementation details, as they may change.
Definition at line 32 of file broom-unordered-map.h.
|
inline |
Definition at line 42 of file broom-unordered-map.h.
|
inline |
Definition at line 44 of file broom-unordered-map.h.
| broom::unordered_map< Key, T, Hash, KeyEqual, Allocator >::DEF_TYPES | ( | ) |
|
inlinevirtual |
An abstract Visit() method that needs to be implemented by any class that inherits from this class. The Visit() method is expected to call the visitor's Visitor::Visit() method on any managed pointer member.
| visitor | The Visitor object that implements a Visitor::Visit() method. |
Implements broom::BroomValue.
Definition at line 51 of file broom-unordered-map.h.