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
features
FeaturesReporterFactory.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 src/protocols/features/FeaturesReporterFactory.hh
11
/// @brief Factory for creating FeaturesReporter objects
12
/// @author Matthew O'Meara (mattjomeara@gmail.com)
13
14
15
#ifndef INCLUDED_protocols_features_FeaturesReporterFactory_hh
16
#define INCLUDED_protocols_features_FeaturesReporterFactory_hh
17
18
// Unit Headers
19
#include <
protocols/features/FeaturesReporterFactory.fwd.hh
>
20
21
// Project Headers
22
#include <
protocols/features/FeaturesReporter.fwd.hh
>
23
#include <
protocols/features/FeaturesReporterCreator.fwd.hh
>
24
25
// Platform Headers
26
#include <
core/pose/Pose.fwd.hh
>
27
#include <
protocols/filters/Filter.fwd.hh
>
28
#include <
protocols/moves/Mover.fwd.hh
>
29
#include <
protocols/moves/DataMap.fwd.hh
>
30
#include <utility/tag/Tag.fwd.hh>
31
#include <utility/factory/WidgetRegistrator.hh>
32
33
// C++ Headers
34
#include <map>
35
36
#include <utility/vector1.hh>
37
38
39
namespace
protocols {
40
namespace
features {
41
42
/// Create Features Reporters
43
class
FeaturesReporterFactory
{
44
45
// Private constructor to make it singleton managed
46
FeaturesReporterFactory
();
47
FeaturesReporterFactory
(
const
FeaturesReporterFactory
& src);
// unimplemented
48
49
FeaturesReporterFactory
const
&
50
operator=
(
FeaturesReporterFactory
const
& );
// unimplemented
51
52
public
:
53
54
// Warning this is not called because of the singleton pattern
55
virtual
~FeaturesReporterFactory
();
56
57
static
FeaturesReporterFactory
*
get_instance
();
58
59
void
factory_register
(
FeaturesReporterCreatorCOP
creator );
60
FeaturesReporterOP
get_features_reporter
(
std::string
const
& type_name );
61
62
/// @brief convienence header for use with RosettaScripts parse_my_tag interface
63
FeaturesReporterOP
64
get_features_reporter
(
65
utility::tag::TagPtr
const
tag,
66
protocols::moves::DataMap
& data,
67
protocols::filters::Filters_map
const
& filters,
68
protocols::moves::Movers_map
const
& movers,
69
core::pose::Pose
const
& pose);
70
71
/// @brief Replace the load-time FeaturesReporterCreator with another creator.
72
// undefined, commenting out to fix PyRosetta build void replace_creator( FeaturesReporterCreatorCOP creator );
73
74
// undefined, commenting out to fix PyRosetta build FeaturesReporterCreatorCOP
75
// get_creator( std::string const & type_name );
76
77
utility::vector1<std::string>
get_all_features_names
();
78
private
:
79
80
static
FeaturesReporterFactory
*
instance_
;
81
82
typedef
std::map< std::string, protocols::features::FeaturesReporterCreatorCOP >
FeaturesReporterCreatorMap
;
83
FeaturesReporterCreatorMap
types_
;
84
};
85
86
87
/// @brief This templated class will register an instance of an
88
/// FeaturesReporterCreator (class T) with the
89
/// FeaturesReporterFactory. It will ensure that no
90
/// FeaturesReporterCreator is registered twice, and, centralizes this
91
/// registration logic so that thread safety issues can be handled in
92
/// one place
93
template
<
class
T >
94
class
FeaturesReporterRegistrator
:
public
utility::factory::WidgetRegistrator< FeaturesReporterFactory, T >
95
{
96
public
:
97
typedef
utility::factory::WidgetRegistrator< FeaturesReporterFactory, T >
parent
;
98
public
:
99
FeaturesReporterRegistrator
() :
parent
() {}
100
};
101
102
103
104
}
// namespace
105
}
// namespace
106
107
#endif
Generated on Sat Jun 1 2013 11:49:01 for Rosetta 3.5 by
1.8.4