Broom 1.0.0
A thread-local C++ Garbage Collector
Loading...
Searching...
No Matches
Public Member Functions | List of all members
broom::unordered_multimap< Key, T, Hash, KeyEqual, Allocator > Class Template Reference

#include <broom-unordered-multimap.h>

Inheritance diagram for broom::unordered_multimap< Key, T, Hash, KeyEqual, Allocator >:
Inheritance graph
[legend]
Collaboration diagram for broom::unordered_multimap< Key, T, Hash, KeyEqual, Allocator >:
Collaboration graph
[legend]

Public Member Functions

 unordered_multimap (std::initializer_list< std::pair< const Key, T > > il)
 
 unordered_multimap (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)
 
BroomValueoperator= (const BroomValue &other)
 
BroomValueoperator= (BroomValue &&other) noexcept
 

Detailed Description

template<typename Key, typename T, typename Hash = std::hash<Key>, typename KeyEqual = std::equal_to<Key>, typename Allocator = std::allocator<std::pair<const Key, T>>>
class broom::unordered_multimap< Key, T, Hash, KeyEqual, Allocator >

A Broom wrapper for std::unordered_multimap. broom::unordered_multimap aims to cover all the cases where one might want to use a std::unordered_multimap, while still remaining safe in the context of garbage collection. Since std::unordered_multimap is not on the stack and won't be scanned automatically, any managed pointer in it will be garbage collected prematurely. broom::unordered_multimap aims to alleviate this concern by implementing it as a precise root. broom::unordered_multimap also supports the usage of managed pointers as keys. They will be scanned along with the values. broom::unordered_multimap 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-multimap.h.

Constructor & Destructor Documentation

◆ unordered_multimap() [1/2]

template<typename Key , typename T , typename Hash = std::hash<Key>, typename KeyEqual = std::equal_to<Key>, typename Allocator = std::allocator<std::pair<const Key, T>>>
broom::unordered_multimap< Key, T, Hash, KeyEqual, Allocator >::unordered_multimap ( std::initializer_list< std::pair< const Key, T > >  il)
inline

Definition at line 40 of file broom-unordered-multimap.h.

◆ unordered_multimap() [2/2]

template<typename Key , typename T , typename Hash = std::hash<Key>, typename KeyEqual = std::equal_to<Key>, typename Allocator = std::allocator<std::pair<const Key, T>>>
broom::unordered_multimap< Key, T, Hash, KeyEqual, Allocator >::unordered_multimap ( 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() 
)
inline

Definition at line 42 of file broom-unordered-multimap.h.

Member Function Documentation

◆ Visit()

template<typename Key , typename T , typename Hash = std::hash<Key>, typename KeyEqual = std::equal_to<Key>, typename Allocator = std::allocator<std::pair<const Key, T>>>
virtual void broom::unordered_multimap< Key, T, Hash, KeyEqual, Allocator >::Visit ( Visitor visitor) const
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.

Parameters
visitorThe Visitor object that implements a Visitor::Visit() method.

Implements broom::BroomValue.

Definition at line 50 of file broom-unordered-multimap.h.


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