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
core
pose
metrics
CalculatorFactory.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
11
/// @brief
12
/// @author John Karanicolas
13
14
15
#ifndef INCLUDED_core_pose_metrics_CalculatorFactory_hh
16
#define INCLUDED_core_pose_metrics_CalculatorFactory_hh
17
18
#include <
core/pose/metrics/PoseMetricCalculatorBase.hh
>
19
20
21
// C++ Headers
22
#include <map>
23
24
#include <utility/vector1.hh>
25
26
27
28
namespace
core {
29
namespace
pose {
30
namespace
metrics {
31
32
// Note: CalculatorFactory is a singleton class
33
class
CalculatorFactory
{
34
public
:
35
36
static
CalculatorFactory
&
Instance
() {
37
static
CalculatorFactory
singleton;
38
return
singleton;
39
}
40
41
void
register_calculator
(
std::string
const
& calculator_name,
PoseMetricCalculatorOP
const
new_calculator );
42
43
bool
check_calculator_exists
(
std::string
const
& calculator_name );
44
45
/// @brief remove a calculator from the factory
46
/// @return true if calculator removed, false if no such calculator
47
bool
remove_calculator
(
std::string
const
& calculator_name );
48
49
/// @brief clear all calculators from factory
50
/// @return false if no calculators in list, true otherwise
51
bool
clear_calculators
();
52
53
PoseMetricCalculatorOP
retrieve_calculator
(
std::string
const
& calculator_name );
54
55
private
:
56
57
CalculatorFactory
() {};
58
CalculatorFactory
(
CalculatorFactory
const
& src );
59
CalculatorFactory
const
&
operator=
(
CalculatorFactory
const
& src );
60
61
std::map< std::string, PoseMetricCalculatorOP >
calculators_
;
62
63
};
64
65
66
}
// namespace metrics
67
}
// namespace pose
68
}
// namespace core
69
70
71
#endif
Generated on Sat Jun 1 2013 11:34:16 for Rosetta 3.5 by
1.8.4