Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JobOutputterFactory.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/JobOutputterFactory.hh
11 /// @brief JobOutputterFactory
12 /// @author Steven Lewis smlewi@gmail.com, Brian Weitzner brian.weitzner@gmail.com
13 
14 
15 #ifndef INCLUDED_protocols_jd2_JobOutputterFactory_hh
16 #define INCLUDED_protocols_jd2_JobOutputterFactory_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 /// JobOutputterCreator (class T) with the JobOutputterFactory. It will ensure
38 /// that no JobOutputterCreator 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 JobOutputterRegistrator : public utility::factory::WidgetRegistrator< JobOutputterFactory, T >
43 {
44 public:
45  typedef utility::factory::WidgetRegistrator< JobOutputterFactory, T > parent;
46 public:
48 };
49 
50 
52 {
53 public:
54  typedef std::map< std::string, JobOutputterCreatorOP > JobOutputterMap;
55 
56 public:
57  virtual ~JobOutputterFactory();
58 
59  static
61 
63 
64  ///@brief return JobOutputter defined by output parameters (contained in option system and #defines for MPI, etc)
66 
67  ///@brief return JobOutputter defined by output parameters (contained in option system and #defines for MPI, etc). The difference is that if the option system, etc, says nothing about output (which as of this writing defaults to PDBJobOutputter), this function leaves the input Outputter unchanged. This allows overriding the default outputter choice in your executable (without abusing the mutability of the options system)
69 
70 private:
71  JobOutputterOP get_JobOutputter_from_string( std::string const & job_outputter_type );
72 
74 
75  // Unimplemented -- uncopyable
78 
79 private:
81 
83 
84 };
85 
86 } //namespace jd2
87 } //namespace protocols
88 
89 #endif //INCLUDED_protocols_jd2_JobOutputterFactory_hh