Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RotamerRecoveryFactory.hh
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file src/protocols/rotamer_recovery/RotamerRecoveryFactory.hh
11 /// @brief Factory for creating RotamerRecovery objects
12 /// @author Matthew O'Meara (mattjomeara@gmail.com)
13 
14 
15 #ifndef INCLUDED_protocols_rotamer_recovery_RotamerRecoveryFactory_hh
16 #define INCLUDED_protocols_rotamer_recovery_RotamerRecoveryFactory_hh
17 
18 // Unit Headers
20 
21 // Project Headers
27 
28 // Platform Headers
29 #include <utility/factory/WidgetRegistrator.hh>
30 #include <utility/vector1.hh>
31 
32 // C++ Headers
33 // AUTO-REMOVED #include <string>
34 #include <map>
35 
36 
37 
38 
39 namespace protocols {
40 namespace rotamer_recovery {
41 
42 /// Create Rotamer_Recovery Reporters
44 
45  // Private constructor to make it singleton managed
47  RotamerRecoveryFactory(const RotamerRecoveryFactory & src); // unimplemented
48 
50  operator=( RotamerRecoveryFactory const & ); // unimplemented
51 
52 public:
53 
54  // Warning this is not called because of the singleton pattern
55  virtual ~RotamerRecoveryFactory();
56 
58 
59  void factory_register( RRProtocolCreatorCOP creator );
60  void factory_register( RRComparerCreatorCOP creator );
61  void factory_register( RRReporterCreatorCOP creator );
65 
68  std::string const & protocol,
69  std::string const & comparer,
70  std::string const & reporter);
71 
72 private:
73 
75 
76 
77  typedef std::map< std::string, protocols::rotamer_recovery::RRProtocolCreatorCOP > RRProtocolCreatorMap;
79 
80  typedef std::map< std::string, protocols::rotamer_recovery::RRComparerCreatorCOP > RRComparerCreatorMap;
82 
83  typedef std::map< std::string, protocols::rotamer_recovery::RRReporterCreatorCOP > RRReporterCreatorMap;
85 
86 };
87 
88 
89 /// @brief This templated class will register an instance of an
90 /// RotamerRecoveryCreator (class T) with the
91 /// RotamerRecoveryFactory. It will ensure that no
92 /// RotamerRecoveryCreator is registered twice, and, centralizes this
93 /// registration logic so that thread safety issues can be handled in
94 /// one place
95 template < class T >
96 class RotamerRecoveryRegistrator : public utility::factory::WidgetRegistrator< RotamerRecoveryFactory, T >
97 {
98 public:
99  typedef utility::factory::WidgetRegistrator< RotamerRecoveryFactory, T > parent;
100 public:
102 };
103 
104 
105 } // namespace
106 } // namespace
107 
108 #endif