#include <chemistry/qc/mbptr12/registry.h>

Public Member Functions | |
| bool | key_exists (const Key &key) const |
| key exists? | |
| bool | value_exists (const Value &value) const |
| value exists? | |
| const Value & | value (const Key &key) const |
| returns object that corresponds to this key. If key is not known, throws | |
| const Key & | key (const Value &obj) const |
| returns key that corresponds to this object. If obj is not known, throws | |
| void | add (const Key &key, const Value &obj) |
| registers this object | |
| void | add (const std::pair< Key, Value > &keyval_pair) |
| useful version | |
Static Public Member Functions | |
| static Ref< Registry > | instance () |
| static void | save_instance (const Ref< Registry > &, StateOut &) |
| static Ref< Registry > | restore_instance (StateIn &) |
Friends | |
| class | CreationPolicy< Registry< Key, Value, CreationPolicy, KeyEqual, ValueEqual > > |
Classes | |
| class | not_found |
| struct | SameType |
| used to compare types | |
| struct | SameType< T, T > |
Registry is not a SavableState, but it behaves like one (see save_instance and restore_instance methods). Therefore both Key and Value are assumed to be usable with StateIn and StateOut.
KeyEqual and ValueEqual are Functor types that define the equivalence of two Key (or Value) objects. By default std::equal_to is used. For pointer types std::equal_to may not be appropriate since it will not distinguish 2 equivalent but distinct objects.