|
Rosetta
|
Key lookup map and collection. More...
#include <KeyLookup.hh>
Public Types | |
| typedef K | key_type |
| typedef Map::mapped_type | mapped_type |
| typedef Map::value_type | value_type |
| typedef Map::reference | reference |
| typedef Map::const_reference | const_reference |
| typedef Map::size_type | size_type |
| typedef Keys::const_iterator | const_iterator |
| typedef K | Key |
| typedef Map::mapped_type | Mapped |
| typedef Map::value_type | Value |
| typedef Map::reference | Reference |
| typedef Map::const_reference | ConstReference |
| typedef Map::size_type | Size |
| typedef Keys::const_iterator | ConstIterator |
Static Public Member Functions | |
| static void | add (Key const &key) |
| Add a key. More... | |
| static void | add (Key const &key, std::string const &identifier) |
| Add a key with an extra (non-unique) identifier. More... | |
| template<typename KeyC > | |
| static Key const & | gen (std::string const &id) |
| Key with an identifier: Generate key if not present. More... | |
| template<typename KeyC > | |
| static Key const & | gen (std::string const &id, std::string const &identifier) |
| Key with an identifier: Generate key if not present. More... | |
| template<typename KeyC > | |
| static Key const & | gen (std::string const &id, std::string const &identifier, std::string const &code) |
| Key with an identifier: Generate key if not present. More... | |
| static void | remove (Key const &key) |
| Remove a key. More... | |
| static void | clear () |
| Clear the collection and lookup map. More... | |
| static Size | size () |
| Size. More... | |
| static bool | empty () |
| Empty? More... | |
| static bool | has (std::string const &id) |
| Has a key with an identifier? More... | |
| static bool | has (Key const &key) |
| Has a key? More... | |
| static Key const & | key (std::string const &id) |
| Key with an identifier. More... | |
| static Key::Size | n_key () |
| Number of keys with distinct indexes. More... | |
| static ConstIterator | begin () |
| Begin const iterator. More... | |
| static ConstIterator | end () |
| End const iterator. More... | |
Private Types | |
| typedef VariantKey< K > | Key_ |
| typedef std::set< Key_ > | Keys |
| typedef Key_ const * | KeyP |
| typedef std::map< std::string, KeyP > | Map |
Private Member Functions | |
| KeyLookup ()=default | |
| Default constructor. More... | |
| KeyLookup (KeyLookup const &a) | |
| Copy constructor. More... | |
| ~KeyLookup ()=default | |
| Destructor. More... | |
| KeyLookup & | operator= (KeyLookup const &a) |
| Copy assignment. More... | |
Static Private Member Functions | |
| static void | insert (std::string const &id, Key_ const &key) |
| Insert a pair< identifier, KeyP > into the lookup map. More... | |
| static void | insert_nonunique (std::string const &id, Key_ const &key) |
| Insert a pair< identifier, KeyP > into the lookup map: Allow non-unique identifier. More... | |
| static void | erase (std::string const &id) |
| Erase a pair< identifier, KeyP > from the lookup map. More... | |
| static std::string | stripped_whitespace (std::string const &s) |
| Whitespace stripped tails copy of a string. More... | |
| static Keys & | keys () |
| Key collection. More... | |
| static Map & | m () |
| Map from identifier to (non-owning) pointer to key. More... | |
| static bool | not_blank (std::string const &s) |
| string is not blank? More... | |
Key lookup map and collection.
| typedef Keys::const_iterator utility::keys::KeyLookup< K >::const_iterator |
| typedef Map::const_reference utility::keys::KeyLookup< K >::const_reference |
| typedef Keys::const_iterator utility::keys::KeyLookup< K >::ConstIterator |
| typedef Map::const_reference utility::keys::KeyLookup< K >::ConstReference |
| typedef K utility::keys::KeyLookup< K >::Key |
|
private |
| typedef K utility::keys::KeyLookup< K >::key_type |
|
private |
|
private |
|
private |
| typedef Map::mapped_type utility::keys::KeyLookup< K >::Mapped |
| typedef Map::mapped_type utility::keys::KeyLookup< K >::mapped_type |
| typedef Map::reference utility::keys::KeyLookup< K >::reference |
| typedef Map::reference utility::keys::KeyLookup< K >::Reference |
| typedef Map::size_type utility::keys::KeyLookup< K >::Size |
| typedef Map::size_type utility::keys::KeyLookup< K >::size_type |
| typedef Map::value_type utility::keys::KeyLookup< K >::Value |
| typedef Map::value_type utility::keys::KeyLookup< K >::value_type |
|
inlineprivatedefault |
Default constructor.
|
inlineprivate |
Copy constructor.
|
inlineprivatedefault |
Destructor.
|
inlinestatic |
Add a key.
References create_a3b_hbs::first, utility::keys::KeyLookup< K >::insert(), utility::keys::KeyLookup< K >::key(), and utility::keys::KeyLookup< K >::keys().
Referenced by job_manager.MoveStatsWindow::__init__(), utility::options::AnyOptionKey::AnyOptionKey(), utility::options::AnyVectorOptionKey::AnyVectorOptionKey(), utility::options::BooleanOptionKey::BooleanOptionKey(), utility::options::BooleanVectorOptionKey::BooleanVectorOptionKey(), pyrosetta.bindings.pose.ResidueLabelAccessor::discard(), utility::options::FileOptionKey::FileOptionKey(), utility::options::FileVectorOptionKey::FileVectorOptionKey(), utility::keys::KeyLookup< K >::gen(), utility::options::IntegerOptionKey::IntegerOptionKey(), utility::options::IntegerVectorOptionKey::IntegerVectorOptionKey(), utility::options::PathOptionKey::PathOptionKey(), utility::options::PathVectorOptionKey::PathVectorOptionKey(), utility::options::RealOptionKey::RealOptionKey(), utility::options::RealVectorOptionKey::RealVectorOptionKey(), utility::options::ResidueChainVectorOptionKey::ResidueChainVectorOptionKey(), utility::options::StringOptionKey::StringOptionKey(), and utility::options::StringVectorOptionKey::StringVectorOptionKey().
|
inlinestatic |
Add a key with an extra (non-unique) identifier.
References create_a3b_hbs::first, utility::keys::KeyLookup< K >::insert(), utility::keys::KeyLookup< K >::insert_nonunique(), utility::keys::KeyLookup< K >::key(), and utility::keys::KeyLookup< K >::keys().
Referenced by job_manager.MoveStatsWindow::__init__(), and pyrosetta.bindings.pose.ResidueLabelAccessor::discard().
|
inlinestatic |
Begin const iterator.
References utility::keys::KeyLookup< K >::keys().
Referenced by utility::keys::lookup::begin< K >::operator()().
|
inlinestatic |
Clear the collection and lookup map.
References utility::keys::KeyLookup< K >::keys(), and utility::keys::KeyLookup< K >::m().
Referenced by pyrosetta.bindings.pose.ResidueLabelAccessor::discard().
|
inlinestatic |
Empty?
References utility::keys::KeyLookup< K >::keys().
|
inlinestatic |
End const iterator.
References utility::keys::KeyLookup< K >::keys().
Referenced by utility::keys::lookup::end< K >::operator()().
|
inlinestaticprivate |
Erase a pair< identifier, KeyP > from the lookup map.
References utility::keys::KeyLookup< K >::m(), utility::keys::KeyLookup< K >::not_blank(), and utility::keys::KeyLookup< K >::stripped_whitespace().
Referenced by utility::keys::KeyLookup< K >::remove().
|
inlinestatic |
Key with an identifier: Generate key if not present.
References utility::keys::KeyLookup< K >::add(), create_a3b_hbs::i, utility::keys::KeyLookup< K >::key(), utility::keys::KeyLookup< K >::m(), and utility::keys::KeyLookup< K >::stripped_whitespace().
|
inlinestatic |
Key with an identifier: Generate key if not present.
References utility::keys::KeyLookup< K >::add(), create_a3b_hbs::i, utility::keys::KeyLookup< K >::key(), utility::keys::KeyLookup< K >::m(), and utility::keys::KeyLookup< K >::stripped_whitespace().
|
inlinestatic |
Key with an identifier: Generate key if not present.
References utility::keys::KeyLookup< K >::add(), create_a3b_hbs::i, utility::keys::KeyLookup< K >::key(), utility::keys::KeyLookup< K >::m(), and utility::keys::KeyLookup< K >::stripped_whitespace().
|
inlinestatic |
Has a key?
References utility::keys::KeyLookup< K >::key(), and utility::keys::KeyLookup< K >::keys().
|
inlinestatic |
Has a key with an identifier?
References utility::keys::KeyLookup< K >::m(), and utility::keys::KeyLookup< K >::stripped_whitespace().
Referenced by utility::keys::lookup::has< K >::operator()().
|
inlinestaticprivate |
Insert a pair< identifier, KeyP > into the lookup map.
References debug_assert, utility::keys::KeyLookup< K >::key(), utility::keys::KeyLookup< K >::m(), utility::keys::KeyLookup< K >::not_blank(), and utility::keys::KeyLookup< K >::stripped_whitespace().
Referenced by utility::keys::KeyLookup< K >::add().
|
inlinestaticprivate |
Insert a pair< identifier, KeyP > into the lookup map: Allow non-unique identifier.
References utility::keys::KeyLookup< K >::key(), utility::keys::KeyLookup< K >::m(), utility::keys::KeyLookup< K >::not_blank(), and utility::keys::KeyLookup< K >::stripped_whitespace().
Referenced by utility::keys::KeyLookup< K >::add().
|
inlinestatic |
Key with an identifier.
References debug_assert, create_a3b_hbs::i, utility::keys::KeyLookup< K >::m(), and utility::keys::KeyLookup< K >::stripped_whitespace().
Referenced by utility::keys::KeyLookup< K >::add(), utility::keys::KeyLookup< K >::gen(), utility::keys::KeyLookup< K >::has(), utility::keys::KeyLookup< K >::insert(), utility::keys::KeyLookup< K >::insert_nonunique(), utility::keys::lookup::key< K >::operator()(), and utility::keys::KeyLookup< K >::remove().
|
inlinestaticprivate |
Key collection.
Referenced by pyrosetta.bindings.pose.PoseResidueLabelMaskAccessor::__iter__(), pyrosetta.io.silent_file_map.SilentFilePoseAccessor::__iter__(), pyrosetta.io.silent_file_map.SilentFileEnergyAccessor::__iter__(), pyrosetta.bindings.pose.PoseResidueLabelMaskAccessor::__len__(), pyrosetta.io.silent_file_map.SilentFilePoseAccessor::__len__(), pyrosetta.io.silent_file_map.SilentFileEnergyAccessor::__len__(), utility::keys::KeyLookup< K >::add(), utility::keys::KeyLookup< K >::begin(), utility::keys::KeyLookup< K >::clear(), utility::keys::KeyLookup< K >::empty(), utility::keys::KeyLookup< K >::end(), utility::keys::KeyLookup< K >::has(), utility::keys::KeyLookup< K >::remove(), and utility::keys::KeyLookup< K >::size().
|
inlinestaticprivate |
Map from identifier to (non-owning) pointer to key.
Referenced by utility::keys::KeyLookup< K >::clear(), utility::keys::KeyLookup< K >::erase(), utility::keys::KeyLookup< K >::gen(), utility::keys::KeyLookup< K >::has(), utility::keys::KeyLookup< K >::insert(), utility::keys::KeyLookup< K >::insert_nonunique(), utility::keys::KeyLookup< K >::key(), and utility::keys::KeyLookup< K >::remove().
|
inlinestatic |
Number of keys with distinct indexes.
References n_key.
|
inlinestaticprivate |
string is not blank?
References docking::s, and ObjexxFCL::WHITESPACE().
Referenced by utility::keys::KeyLookup< K >::erase(), utility::keys::KeyLookup< K >::insert(), and utility::keys::KeyLookup< K >::insert_nonunique().
|
inlineprivate |
Copy assignment.
|
inlinestatic |
|
inlinestatic |
Size.
References utility::keys::KeyLookup< K >::keys().
|
inlinestaticprivate |
Whitespace stripped tails copy of a string.
References compute_difference::b, test.T009_Exceptions::e, docking::s, and ObjexxFCL::WHITESPACE().
Referenced by utility::keys::KeyLookup< K >::erase(), utility::keys::KeyLookup< K >::gen(), utility::keys::KeyLookup< K >::has(), utility::keys::KeyLookup< K >::insert(), utility::keys::KeyLookup< K >::insert_nonunique(), and utility::keys::KeyLookup< K >::key().