Rosetta 3.5
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
protocols
nonlocal
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
14
#include <
protocols/nonlocal/TreeBuilderFactory.hh
>
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
26
#include <
protocols/nonlocal/SimpleTreeBuilder.hh
>
27
#include <
protocols/nonlocal/StarTreeBuilder.hh
>
28
#include <
protocols/nonlocal/TreeBuilder.fwd.hh
>
29
30
#include <utility/vector1.hh>
31
32
33
namespace
protocols {
34
namespace
nonlocal {
35
36
TreeBuilderOP
TreeBuilderFactory::get_builder
(
const
std::string
& builder_name) {
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
Generated on Sat Jun 1 2013 12:01:46 for Rosetta 3.5 by
1.8.4