The Vish Visualization Shell 0.3
Vish
Public Member Functions | List of all members
MemCore::WeakRefMap< Key, Value, Map > Class Template Reference

Convenience template class for mapping of keys to weak reference pointers; provides a read-only search operation using the () operator. More...

#include <elementary/memcore/RefMap.hpp>

Inheritance diagram for MemCore::WeakRefMap< Key, Value, Map >:

Public Member Functions

ValuePtr_t operator() (const Key &K) const
 Search for an object stored in this map.
 

Detailed Description

template<typename Key, class Value, class Map = std::map<Key, MemCore::WeakPtr<Value> >>
class MemCore::WeakRefMap< Key, Value, Map >

Convenience template class for mapping of keys to weak reference pointers; provides a read-only search operation using the () operator.

All objects stored in this RefMap are not kept alive.

See also
RefMap

Member Function Documentation

◆ operator()()

template<typename Key , class Value , class Map = std::map<Key, MemCore::WeakPtr<Value> >>
ValuePtr_t MemCore::WeakRefMap< Key, Value, Map >::operator() ( const Key &  K) const
inline

Search for an object stored in this map.

Note that this operation is ambigious, as it may find a null pointer stored in this map. If it is important to distinguish between a stored null pointer versus a key not found, then the map's find() version needs to be used.