Rosetta  2021.16
 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::jump_selector::JumpSelectorFactory Class Reference

#include <JumpSelectorFactory.hh>

Inheritance diagram for core::select::jump_selector::JumpSelectorFactory:
Inheritance graph
[legend]

Public Member Functions

void factory_register (JumpSelectorCreatorOP 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 jump selector. More...
 
JumpSelectorOP new_jump_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 JumpSelctorCreators 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_jump_selector_xml_schema (utility::tag::XMLSchemaDefinition &xsd) const
 The JumpSelectorFactory is the point of entry for the definition of the XML Schemas for every JumpSelector that may be instantiated from a file. It is responsible for defining an xs:group named "jump_selector" listing each of the jump-selector-complex types that may be initialized using the JumpSelectorFactory and to iterate across each of the JumpSelectorCreators it contains asking them for the XML schema of the JumpSelector they are responsible for creating. More...
 
std::map< std::string,
JumpSelectorCreatorOP > 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 jump_selector_xml_schema_group_name ()
 

Private Member Functions

 JumpSelectorFactory ()
 
 JumpSelectorFactory (JumpSelectorFactory const &)=delete
 
JumpSelectorFactory const & operator= (JumpSelectorFactory const &)=delete
 

Private Attributes

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

Friends

class utility::SingletonBase< JumpSelectorFactory >
 

Constructor & Destructor Documentation

core::select::jump_selector::JumpSelectorFactory::JumpSelectorFactory ( )
private
core::select::jump_selector::JumpSelectorFactory::JumpSelectorFactory ( JumpSelectorFactory const &  )
privatedelete

Member Function Documentation

std::map< std::string, JumpSelectorCreatorOP > const & core::select::jump_selector::JumpSelectorFactory::creator_map ( ) const

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

References creator_map_.

void core::select::jump_selector::JumpSelectorFactory::define_jump_selector_xml_schema ( utility::tag::XMLSchemaDefinition &  xsd) const

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

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

References core::select::jump_selector::complex_type_name_for_jump_selector(), creator_map_, and jump_selector_xml_schema_group_name().

void core::select::jump_selector::JumpSelectorFactory::factory_register ( JumpSelectorCreatorOP  creator)
bool core::select::jump_selector::JumpSelectorFactory::has_type ( std::string const &  selector_type) const

References creator_map_.

Referenced by new_jump_selector(), and provide_xml_schema().

std::string core::select::jump_selector::JumpSelectorFactory::jump_selector_xml_schema_group_name ( )
static
JumpSelectorOP core::select::jump_selector::JumpSelectorFactory::new_jump_selector ( std::string const &  selector_name,
utility::tag::TagCOP  tag,
basic::datacache::DataMap &  datamap 
) const

References creator_map_, and has_type().

JumpSelectorFactory const& core::select::jump_selector::JumpSelectorFactory::operator= ( JumpSelectorFactory const &  )
privatedelete
void core::select::jump_selector::JumpSelectorFactory::provide_xml_schema ( std::string const &  selector_name,
utility::tag::XMLSchemaDefinition &  xsd 
) const

Get the XML schema for a given jump selector.

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

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

References creator_map_, and has_type().

void core::select::jump_selector::JumpSelectorFactory::set_throw_on_double_registration ( )

Should the Factory throw an exception or call utility::exit when it encounters the second of two JumpSelctorCreators 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< JumpSelectorFactory >
friend

Member Data Documentation

std::map< std::string, JumpSelectorCreatorOP > core::select::jump_selector::JumpSelectorFactory::creator_map_
private
bool core::select::jump_selector::JumpSelectorFactory::throw_on_double_registration_
private

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