Rosetta
|
A class for keeping track of a collection of citations for a particular Rosetta module. More...
#include <CitationCollection.hh>
Public Member Functions | |
CitationCollection ()=delete | |
Default constructor, deleted. More... | |
CitationCollection (std::string const &module_name, CitedModuleType const module_type) | |
Options constructor. The module type must not be CustomType. More... | |
CitationCollection (std::string const &module_name, std::string const &module_type_name) | |
Options constructor for custom module types. A string must be provided for the name of the module type. More... | |
~CitationCollection () override=default | |
Destructor. More... | |
CitationCollection (CitationCollection const &)=default | |
Copy constructor. More... | |
CitationCollection & | operator= (CitationCollection const &)=default |
Assignment operator. More... | |
CitationCollectionOP | clone () const |
Clone operator: copy this object and return an owning pointer to the copy. More... | |
bool | operator== (CitationCollectionBase const &other) const override |
Comparison operator, generalized on the base class. More... | |
bool | operator== (CitationCollection const &other) const |
Comparison operator. More... | |
void | add_citation (CitationCOP citation_in) |
Add a citation without cloning it. More... | |
std::string const & | module_name () const |
Get this module's name. More... | |
std::string const & | module_type () const |
Get this module's type. More... | |
void | get_citations_formatted (std::ostream &outstream, CitationFormat const format=CitationFormat::DefaultStyle) const |
Get the citations, written out prettily to a string stream. More... | |
bool | has_multiple_citations () const |
Does this collection have more than one citation? More... | |
![]() | |
VirtualBase ()=default | |
Default constructor. More... | |
virtual | ~VirtualBase ()=default |
The virtual destructor is one of the main reasons for the VirtualBase class. More... | |
VirtualBase (VirtualBase const &)=default | |
VirtualBase (VirtualBase &&)=default | |
VirtualBase & | operator= (VirtualBase const &)=default |
VirtualBase & | operator= (VirtualBase &&)=default |
Static Public Member Functions | |
static std::string const & | get_enumerated_module_type_name (CitedModuleType const module_type) |
Get the module type name. More... | |
Private Attributes | |
utility::vector1< CitationCOP > | citations_ |
Citations in this citation collection. More... | |
std::string | module_name_ |
The name of the module for which citations are being provided. More... | |
CitedModuleType | module_type_ = CitedModuleType::Mover |
The type of module for which citations are being provided. More... | |
std::string | module_type_name_ |
For custom module types, provide a string. More... | |
A class for keeping track of a collection of citations for a particular Rosetta module.
|
delete |
Default constructor, deleted.
basic::citation_manager::CitationCollection::CitationCollection | ( | std::string const & | module_name, |
CitedModuleType const | module_type | ||
) |
Options constructor. The module type must not be CustomType.
Options constructor. The module_type must not be CustomType.
References basic::citation_manager::CustomType, module_name(), module_type(), runtime_assert, and runtime_assert_string_msg.
basic::citation_manager::CitationCollection::CitationCollection | ( | std::string const & | module_name, |
std::string const & | module_type_name | ||
) |
Options constructor for custom module types. A string must be provided for the name of the module type.
References basic::citation_manager::CustomType, module_name(), and runtime_assert_string_msg.
|
overridedefault |
Destructor.
|
default |
Copy constructor.
void basic::citation_manager::CitationCollection::add_citation | ( | CitationCOP | citation_in | ) |
CitationCollectionOP basic::citation_manager::CitationCollection::clone | ( | ) | const |
Clone operator: copy this object and return an owning pointer to the copy.
void basic::citation_manager::CitationCollection::get_citations_formatted | ( | std::ostream & | outstream, |
CitationFormat const | format = CitationFormat::DefaultStyle |
||
) | const |
Get the citations, written out prettily to a string stream.
Multiple citations will be on multiple lines, but there's no newline at the start or the end of the output.
References citations_, count, and pyrosetta.tests.distributed.test_dask::format.
|
static |
Get the module type name.
The module_type cannot be CitedModuleType::CustomType (or this will throw).
References basic::citation_manager::Application, basic::citation_manager::ConstraintGenerator, basic::citation_manager::CrosslinkerMoverHelper, basic::citation_manager::CustomType, debug_assert, basic::citation_manager::EnergyMethod, basic::citation_manager::Filter, module_type(), basic::citation_manager::Mover, basic::citation_manager::NeuralNetwork, basic::citation_manager::PackerPalette, basic::citation_manager::ResidueSelector, runtime_assert, basic::citation_manager::ScoreFunction, basic::citation_manager::ScoreTerm, basic::citation_manager::SimpleMetric, basic::citation_manager::Singleton, and basic::citation_manager::TaskOperation.
Referenced by module_type(), and basic::citation_manager::UnpublishedModuleInfo::module_type().
bool basic::citation_manager::CitationCollection::has_multiple_citations | ( | ) | const |
Does this collection have more than one citation?
References citations_.
|
inline |
std::string const & basic::citation_manager::CitationCollection::module_type | ( | ) | const |
Get this module's type.
References basic::citation_manager::CustomType, get_enumerated_module_type_name(), module_type_, and module_type_name_.
Referenced by CitationCollection(), and get_enumerated_module_type_name().
|
default |
Assignment operator.
bool basic::citation_manager::CitationCollection::operator== | ( | CitationCollection const & | other | ) | const |
Comparison operator.
Compares only module name and module type, not reference list.
References module_name_, module_type_, and module_type_name_.
|
overridevirtual |
Comparison operator, generalized on the base class.
Checks if both are CitationCollection, and if so defers to the operator== below.
Implements basic::citation_manager::CitationCollectionBase.
References ptr().
|
private |
Citations in this citation collection.
Referenced by add_citation(), get_citations_formatted(), and has_multiple_citations().
|
private |
The name of the module for which citations are being provided.
Referenced by module_name(), and operator==().
|
private |
The type of module for which citations are being provided.
Referenced by module_type(), and operator==().
|
private |
For custom module types, provide a string.
Referenced by module_type(), and operator==().