Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JD2ResourceManager.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/resource_manager/planner/JD2ResourceManager.hh
11 /// @brief The ResourceManager that is compatible with the JD2 JobDistributor
12 /// @author Andrew Leaver-Fay
13 /// @author Brian Weitzner
14 /// @author Matthew O'Meara
15 
16 #ifndef INCLUDED_protocols_jd2_JD2ResourceManager_hh
17 #define INCLUDED_protocols_jd2_JD2ResourceManager_hh
18 
19 // Unit Headers
20 
21 // Package headers
23 #include <basic/resource_manager/LazyResourceManager.hh>
24 #include <basic/resource_manager/FallbackConfiguration.fwd.hh>
25 #include <basic/resource_manager/types.hh>
26 
27 //C++ headers
28 #include <istream>
29 #include <string>
30 
31 namespace protocols {
32 namespace jd2 {
33 
34 class JD2ResourceManager : public basic::resource_manager::LazyResourceManager
35 {
36 public:
37  // this class is allowed to instantiate a the JD2 resource manager,
38  // but no other class may do so.
40 
41 protected:
43 
44 public:
45 
46  virtual
47  void
48  clear();
49 
50  static
53 
54  virtual ~JD2ResourceManager();
55 
56  basic::resource_manager::ResourceOP
58  basic::resource_manager::ResourceDescription const & resource_description);
59 
60  bool
62  basic::resource_manager::ResourceDescription const & resource_description);
63 
64  void
66  utility::tag::TagPtr tags );
67 
68  void
70  utility::tag::TagPtr tags );
71 
72 
73  void
75  utility::tag::TagPtr tags );
76 
77 private:
78  // Functions to help parsing
79 
80  void
83 
84  void
87 
88  void
90  basic::resource_manager::LoaderType const & loader_type);
91 
92  basic::resource_manager::ResourceTag
95  basic::resource_manager::LoaderType const & loader_type,
96  basic::resource_manager::LocatorID const & locator_id);
97 
98  void
100  utility::tag::TagPtr tags);
101 
102 
103  basic::resource_manager::LocatorTag
106  basic::resource_manager::LoaderType const & loader_type,
107  basic::resource_manager::LocatorID & locator_id);
108 
109  basic::resource_manager::ResourceOptionsTag
112  basic::resource_manager::LoaderType const & loader_type,
113  basic::resource_manager::ResourceTag const & resource_tag);
114 
115 public: // options access
116 
117  virtual
118  bool
119  get_option(
120  utility::options::BooleanOptionKey key ) const;
121 
122  virtual
124  get_option(
125  utility::options::BooleanVectorOptionKey key ) const;
126 
127  virtual
129  get_option(
130  utility::options::FileOptionKey key ) const;
131 
132  virtual
134  get_option(
135  utility::options::FileVectorOptionKey key ) const;
136 
137  virtual
138  int
139  get_option(
140  utility::options::IntegerOptionKey key ) const;
141 
142  virtual
144  get_option(
145  utility::options::IntegerVectorOptionKey key ) const;
146 
147  virtual
148  utility::file::PathName const &
149  get_option(
150  utility::options::PathOptionKey key ) const;
151 
152  virtual
154  get_option(
155  utility::options::PathVectorOptionKey key ) const;
156 
157  virtual
159  get_option(
160  utility::options::RealOptionKey key ) const;
161 
162  virtual
164  get_option(
165  utility::options::RealVectorOptionKey key ) const;
166 
167  virtual
168  std::string const &
169  get_option(
170  utility::options::StringOptionKey key ) const;
171 
172  virtual
174  get_option(
175  utility::options::StringVectorOptionKey key ) const;
176 
177  virtual
178  bool
179  has_option(
180  utility::options::BooleanOptionKey key ) const;
181 
182  virtual
183  bool
184  has_option(
185  utility::options::BooleanVectorOptionKey key ) const;
186 
187  virtual
188  bool
189  has_option(
190  utility::options::FileOptionKey key ) const;
191 
192  virtual
193  bool
194  has_option(
195  utility::options::FileVectorOptionKey key ) const;
196 
197  virtual
198  bool
199  has_option(
200  utility::options::IntegerOptionKey key ) const;
201 
202  virtual
203  bool
204  has_option(
205  utility::options::IntegerVectorOptionKey key ) const;
206 
207  virtual
208  bool
209  has_option(
210  utility::options::PathOptionKey key ) const;
211 
212  virtual
213  bool
214  has_option(
215  utility::options::PathVectorOptionKey key ) const;
216 
217  virtual
218  bool
219  has_option(
220  utility::options::RealOptionKey key ) const;
221 
222  virtual
223  bool
224  has_option(
225  utility::options::RealVectorOptionKey key ) const;
226 
227  virtual
228  bool
229  has_option(
230  utility::options::StringOptionKey key ) const;
231 
232  virtual
233  bool
234  has_option(
235  utility::options::StringVectorOptionKey key ) const;
236 
237 private:
238 
239  basic::resource_manager::ResourceOP
241  basic::resource_manager::FallbackConfigurationCOP fallback,
242  basic::resource_manager::ResourceDescription const & resource_description
243  );
244 
245 private:
246  std::map< std::string, std::string > fallback_resource_descriptions_created_;
247 
248 };
249 
250 
251 
252 } // namespace resource_manager
253 } // namespace basic
254 
255 #endif