Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LoopsDefinerFactory.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/loops/loops_definers/LoopsDefinerFactory.hh
11 /// @brief Factory for creating LoopsDefiner objects
12 /// @author Matthew O'Meara (mattjomeara@gmail.com)
13 
14 
15 #ifndef INCLUDED_protocols_loops_loops_definers_LoopsDefinerFactory_hh
16 #define INCLUDED_protocols_loops_loops_definers_LoopsDefinerFactory_hh
17 
18 // Unit Headers
21 
22 // Project Headers
25 
26 // Platform Headers
27 #include <core/pose/Pose.fwd.hh>
28 #include <utility/factory/WidgetRegistrator.hh>
29 
30 // C++ Headers
31 #include <map>
32 
33 #include <utility/vector1.hh>
34 
35 
36 namespace protocols {
37 namespace loops {
38 namespace loops_definers {
39 
40 
41 /// Create LoopsDefiner Reporters
43 
44 public: // types
45 
46  typedef std::map< std::string, LoopsDefinerCreatorCOP > LoopsDefinerCreatorMap;
47 
48 private: // constructors
49 
50  // Private constructor to make it singleton managed
52  LoopsDefinerFactory(const LoopsDefinerFactory & src); // unimplemented
53 
54  LoopsDefinerFactory const &
55  operator=( LoopsDefinerFactory const & ); // unimplemented
56 
57 public:
58 
59  // Warning this is not called because of the singleton pattern
60  virtual
62 
63  static
65  get_instance();
66 
67  void
70 
71  bool
72  has_type(
73  std::string const & ) const;
74 
77 
80  std::string const & type_name);
81 
82 private:
83 
86 };
87 
88 /// @brief This templated class will register an instance of an
89 /// LoopsDefinerCreator (class T) with the
90 /// LoopsDefinerFactory. It will ensure that no
91 /// LoopsDefinerCreator is registered twice, and, centralizes this
92 /// registration logic so that thread safety issues can be handled in
93 /// one place
94 template < class T >
95 class LoopsDefinerRegistrator : public utility::factory::WidgetRegistrator< LoopsDefinerFactory, T >
96 {
97 public:
98  typedef utility::factory::WidgetRegistrator< LoopsDefinerFactory, T > parent;
99 public:
101 };
102 
103 
104 
105 } // namespace
106 } // namespace
107 } // namespace
108 
109 #endif