Rosetta  2020.11
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
core::select::residue_selector::ResidueSelectorFactory Class Reference

#include <ResidueSelectorFactory.hh>

Inheritance diagram for core::select::residue_selector::ResidueSelectorFactory:
Inheritance graph
[legend]

Public Member Functions

void factory_register (ResidueSelectorCreatorOP creator)
 
bool has_type (std::string const &) const
 
void provide_xml_schema (std::string const &selector_name, utility::tag::XMLSchemaDefinition &xsd) const
 Get the XML schema for a given residue selector. More...
 
ResidueSelectorOP new_residue_selector (std::string const &selector_name, utility::tag::TagCOP tag, basic::datacache::DataMap &datamap) const
 
void set_throw_on_double_registration ()
 Should the Factory throw an exception or call utility::exit when it encounters the second of two ResidueSelectorCreators with the same keyname? It's default behavior is to call utility::exit, but this method allows you to set it so that it will throw an exception instead (which is unit testable). More...
 
void define_residue_selector_xml_schema (utility::tag::XMLSchemaDefinition &xsd) const
 The ResidueSelectorFactory is the point of entry for the definition of the XML Schemas for every ResidueSelector that may be instantiated from a file. It is responsible for defining an xs:group named "residue_selector" listing each of the residue-selector-complex types that may be initialized using the ResidueSelectorFactory and to iterate across each of the ResidueSelectorCreators it contains asking them for the XML schema of the ResidueSelector they are responsible for creating. More...
 
std::map< std::string,
ResidueSelectorCreatorOP >
const & 
creator_map () const
 Read access to the map of creator names to creators – for unit testing purposes only. More...
 

Static Public Member Functions

static std::string residue_selector_xml_schema_group_name ()
 

Private Member Functions

 ResidueSelectorFactory ()
 
 ResidueSelectorFactory (ResidueSelectorFactory const &)=delete
 
ResidueSelectorFactory const & operator= (ResidueSelectorFactory const &)=delete
 

Private Attributes

std::map< std::string,
ResidueSelectorCreatorOP
creator_map_
 
bool throw_on_double_registration_
 

Friends

class utility::SingletonBase< ResidueSelectorFactory >
 

Constructor & Destructor Documentation

core::select::residue_selector::ResidueSelectorFactory::ResidueSelectorFactory ( )
private
core::select::residue_selector::ResidueSelectorFactory::ResidueSelectorFactory ( ResidueSelectorFactory const &  )
privatedelete

Member Function Documentation

std::map< std::string, ResidueSelectorCreatorOP > const & core::select::residue_selector::ResidueSelectorFactory::creator_map ( ) const

Read access to the map of creator names to creators – for unit testing purposes only.

References creator_map_.

void core::select::residue_selector::ResidueSelectorFactory::define_residue_selector_xml_schema ( utility::tag::XMLSchemaDefinition &  xsd) const

The ResidueSelectorFactory is the point of entry for the definition of the XML Schemas for every ResidueSelector that may be instantiated from a file. It is responsible for defining an xs:group named "residue_selector" listing each of the residue-selector-complex types that may be initialized using the ResidueSelectorFactory and to iterate across each of the ResidueSelectorCreators it contains asking them for the XML schema of the ResidueSelector they are responsible for creating.

By convention, the named assigned to each of the complexTypes for ResidueSelectors should be what is returned by the function "complex_type_name_for_residue_selector" (declared in core/select/residue_selectors/util.hh) when given the argument returned by that ResidueSelector's ResidueSelectorCreator's keyname() function. So long as the writing of XML schema for your residue selector is accomplished by the calling the functions in core/select/residue_selectors/util.hh, then this should happen automatically.

References core::select::residue_selector::complex_type_name_for_residue_selector(), creator_map_, and residue_selector_xml_schema_group_name().

void core::select::residue_selector::ResidueSelectorFactory::factory_register ( ResidueSelectorCreatorOP  creator)
bool core::select::residue_selector::ResidueSelectorFactory::has_type ( std::string const &  selector_type) const
ResidueSelectorOP core::select::residue_selector::ResidueSelectorFactory::new_residue_selector ( std::string const &  selector_name,
utility::tag::TagCOP  tag,
basic::datacache::DataMap &  datamap 
) const
ResidueSelectorFactory const& core::select::residue_selector::ResidueSelectorFactory::operator= ( ResidueSelectorFactory const &  )
privatedelete
void core::select::residue_selector::ResidueSelectorFactory::provide_xml_schema ( std::string const &  selector_name,
utility::tag::XMLSchemaDefinition &  xsd 
) const

Get the XML schema for a given residue selector.

Throws an error if the residue selector is unknown to Rosetta.

Author
Vikram K. Mulligan (vmull.nosp@m.ig@u.nosp@m.w.edu)

References creator_map_, and has_type().

Referenced by protocols::rosetta_scripts::print_information().

std::string core::select::residue_selector::ResidueSelectorFactory::residue_selector_xml_schema_group_name ( )
static
void core::select::residue_selector::ResidueSelectorFactory::set_throw_on_double_registration ( )

Should the Factory throw an exception or call utility::exit when it encounters the second of two ResidueSelectorCreators with the same keyname? It's default behavior is to call utility::exit, but this method allows you to set it so that it will throw an exception instead (which is unit testable).

References throw_on_double_registration_.

Friends And Related Function Documentation

friend class utility::SingletonBase< ResidueSelectorFactory >
friend

Member Data Documentation

std::map< std::string, ResidueSelectorCreatorOP > core::select::residue_selector::ResidueSelectorFactory::creator_map_
private
bool core::select::residue_selector::ResidueSelectorFactory::throw_on_double_registration_
private

The documentation for this class was generated from the following files: