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
comparative_modeling
features
ResidueFeatureFactory.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/comparative_modeling/features/ResidueFeatureFactory.cc
11
/// @brief Factory for creating various types of ResidueFeatures.
12
/// @author James Thompson
13
14
// Unit headers
15
#include <
protocols/comparative_modeling/features/ResidueFeature.hh
>
16
#include <
protocols/comparative_modeling/features/ResidueFeature.fwd.hh
>
17
#include <
protocols/comparative_modeling/features/ResidueFeatureFactory.hh
>
18
19
// Package headers
20
#include <
protocols/comparative_modeling/features/SSFeature.hh
>
21
#include <
protocols/comparative_modeling/features/TorsionFeature.hh
>
22
23
#include <utility/exit.hh>
24
25
#include <utility/vector1.hh>
26
27
28
namespace
protocols {
29
namespace
comparative_modeling {
30
namespace
features {
31
32
void
33
ResidueFeatureFactory::add_type
(
ResidueFeatureOP
new_feature ) {
34
std::string
const
type_name( new_feature->type() );
35
feature_types_
[ type_name ] = new_feature;
36
}
37
38
ResidueFeatureOP
39
ResidueFeatureFactory::get_residue_feature
(
40
std::string
const
& type
41
)
const
{
42
ResidueFeatureTypes::const_iterator iter =
feature_types_
.find( type );
43
if
( iter !=
feature_types_
.end() ) {
44
return
iter->second->clone();
45
}
else
{
46
utility_exit_with_message(
47
"ResidueFeatureFactory: unknown ResidueFeature type: "
+ type
48
);
49
return
NULL;
50
}
51
}
52
53
ResidueFeatureFactory::ResidueFeatureFactory
(
void
) {
54
// initialization of ResidueFeatures which this factory knows how to
55
// instantiate
56
add_type
(
new
SSFeature
() );
57
add_type
(
new
TorsionFeature
() );
58
}
59
60
}
// namespace features
61
}
// namespace comparative_modeling
62
}
// namespace core
Generated on Sat Jun 1 2013 11:45:26 for Rosetta 3.5 by
1.8.4