Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JobInputterFactory.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 protocols/jd2/JobInputterFactory.hh
11 /// @brief JobInputterFactory
12 /// @author Steven Lewis smlewi@gmail.com, Brian Weitzner brian.weitzner@gmail.com
13 
14 
15 #ifndef INCLUDED_protocols_jd2_JobInputterFactory_hh
16 #define INCLUDED_protocols_jd2_JobInputterFactory_hh
17 
18 // Unit Headers
22 
23 // Utility Headers
24 #include <utility/factory/WidgetRegistrator.hh>
25 #include <utility/pointer/ReferenceCount.hh>
26 
27 // c++ headers
28 #include <map>
29 
30 #include <utility/vector1.hh>
31 
32 
33 namespace protocols {
34 namespace jd2 {
35 
36 /// @brief This templated class will register an instance of an
37 /// JobInputterCreator (class T) with the JobInputterFactory. It will ensure
38 /// that no JobInputterCreator is registered twice, and, centralizes
39 /// this registration logic so that thread safety issues can be handled in
40 /// one place
41 template < class T >
42 class JobInputterRegistrator : public utility::factory::WidgetRegistrator< JobInputterFactory, T >
43 {
44 public:
45  typedef utility::factory::WidgetRegistrator< JobInputterFactory, T > parent;
46 public:
48 };
49 
50 
52 {
53 public:
54  typedef std::map< std::string, JobInputterCreatorOP > JobInputterMap;
55 
56 public:
57  virtual ~JobInputterFactory();
58 
59  static
61 
62  void factory_register( JobInputterCreatorOP creator );
63 
64  ///@brief return JobInputter defined by input parameters (contained in option system and #defines for MPI, etc)
66 
67 private:
68  JobInputterOP get_JobInputter_from_string( std::string const & job_inputter_type );
69 
71 
72  // Unimplemented -- uncopyable
75 
76 private:
78 
80 
81 };
82 
83 } //namespace jd2
84 } //namespace protocols
85 
86 #endif //INCLUDED_protocols_jd2_JobInputterFactory_hh