A key for looking up previously-loaded scorefunctions (which the ScoreFunctionFactory stores in a map of owning pointers indexed by keys of this type).
More...
#include <ScoreFunctionFactory.hh>
|
| | ScoreFunctionKey ()=delete |
| | Default constructor – explicitly deleted. More...
|
| |
| | ScoreFunctionKey (std::string const &weights_file, std::string const &comma_separated_patches, utility::options::OptionCollection const *const options_collection_ptr) |
| | Options constructor – used to set contents of key. More...
|
| |
| | ~ScoreFunctionKey ()=default |
| |
| bool | operator< (ScoreFunctionKey const &other) const |
| | Comparison operator is needed to use this as the key for a map. We'll just use a thin wrapper for std::tuple's less than operator. More...
|
| |
|
| std::tuple< std::string, std::string, utility::options::OptionCollection const * > | keytuple_ |
| | Internally, we still use a tuple since tuple::operator< is already defined. More...
|
| |
A key for looking up previously-loaded scorefunctions (which the ScoreFunctionFactory stores in a map of owning pointers indexed by keys of this type).
The key is the weights file name as a string, a comma-separated list of patches as another string, and a raw pointer to the options collection. Note that a raw pointer is appropriate in this case since the goal is NOT to access the options collection, but simply to have a unique identifier for whether we've seen it before. An owning pointer or even a weak pointer (access pointer) would incur unncessary overhead that we don't need for that goal. If an OptionCollection could be hashed, that might be an even better unique identifier, but for now, we'll use the memory location.
- Author
- Vikram K. Mulligan (vmull.nosp@m.igan.nosp@m.@flat.nosp@m.iron.nosp@m.insti.nosp@m.tute.nosp@m..org).
◆ ScoreFunctionKey() [1/2]
| core::scoring::ScoreFunctionKey::ScoreFunctionKey |
( |
| ) |
|
|
delete |
Default constructor – explicitly deleted.
◆ ScoreFunctionKey() [2/2]
| core::scoring::ScoreFunctionKey::ScoreFunctionKey |
( |
std::string const & |
weights_file, |
|
|
std::string const & |
comma_separated_patches, |
|
|
utility::options::OptionCollection const *const |
options_collection_ptr |
|
) |
| |
|
inline |
Options constructor – used to set contents of key.
◆ ~ScoreFunctionKey()
| core::scoring::ScoreFunctionKey::~ScoreFunctionKey |
( |
| ) |
|
|
default |
◆ operator<()
| bool core::scoring::ScoreFunctionKey::operator< |
( |
ScoreFunctionKey const & |
other | ) |
const |
|
inline |
Comparison operator is needed to use this as the key for a map. We'll just use a thin wrapper for std::tuple's less than operator.
References keytuple_.
◆ keytuple_
| std::tuple< std::string, std::string, utility::options::OptionCollection const * > core::scoring::ScoreFunctionKey::keytuple_ |
|
private |
Internally, we still use a tuple since tuple::operator< is already defined.
Referenced by operator<().
The documentation for this struct was generated from the following file: