Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TreeBuilderFactory.cc
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/nonlocal/TreeBuilderFactory.cc
11 /// @author Christopher Miles (cmiles@uw.edu)
12 
13 // Unit header
15 
16 // C/C++ headers
17 #include <string>
18 
19 // External headers
20 #include <boost/algorithm/string/case_conv.hpp>
21 
22 // Utility headers
23 #include <utility/exit.hh>
24 
25 // Package headers
29 
30 #include <utility/vector1.hh>
31 
32 
33 namespace protocols {
34 namespace nonlocal {
35 
37  // case-insensitive input
38  std::string type = builder_name;
39  boost::to_lower(type);
40 
41  if (type == "star") {
42  return new StarTreeBuilder();
43  } else if (type == "simple") {
44  return new SimpleTreeBuilder();
45  } else {
46  utility_exit_with_message("Invalid builder_type: " + type);
47  }
48  return NULL;
49 }
50 
51 } // namespace nonlocal
52 } // namespace protocols