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
filters
FilterFactory.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 protocols/filters/FilterFactory.hh
11
/// @brief
12
/// @author ashworth
13
14
#ifndef INCLUDED_protocols_filters_FilterFactory_hh
15
#define INCLUDED_protocols_filters_FilterFactory_hh
16
17
// Unit Headers
18
#include <
protocols/filters/FilterFactory.fwd.hh
>
19
#include <
protocols/filters/FilterCreator.hh
>
20
#include <
protocols/filters/Filter.fwd.hh
>
21
22
#include <
protocols/moves/DataMap.fwd.hh
>
23
#include <
protocols/moves/Mover.fwd.hh
>
24
//#include <protocols/filters/Filter.fwd.hh> // Filters_map (typedef)
25
26
// Project headers
27
#include <
core/pose/Pose.fwd.hh
>
28
29
// Utility Headers
30
#include <utility/factory/WidgetRegistrator.hh>
31
#include <utility/pointer/ReferenceCount.hh>
32
#include <utility/tag/Tag.fwd.hh>
33
34
// c++ headers
35
#include <map>
36
37
#include <utility/vector1.hh>
38
39
40
namespace
protocols {
41
namespace
filters {
42
43
/// @brief This templated class will register an instance of an
44
/// FilterCreator (class T) with the FilterFactory. It will ensure
45
/// that no FilterCreator is registered twice, and, centralizes
46
/// this registration logic so that thread safety issues can be handled in
47
/// one place
48
template
<
class
T >
49
class
FilterRegistrator
:
public
utility::factory::WidgetRegistrator< FilterFactory, T >
50
{
51
public
:
52
typedef
utility::factory::WidgetRegistrator< FilterFactory, T >
parent
;
53
public
:
54
FilterRegistrator
() :
parent
() {}
55
};
56
57
58
class
FilterFactory
// singletons need not derive from RefCount : public utility::pointer::ReferenceCount
59
{
60
public
:
61
typedef
std::map< std::string, FilterCreatorOP >
FilterMap
;
62
typedef
utility::tag::Tag
Tag
;
63
typedef
utility::tag::TagPtr
TagPtr
;
64
typedef
core::pose::Pose
Pose
;
65
66
public
:
67
virtual
~FilterFactory
();
68
69
static
70
FilterFactory
*
get_instance
();
71
72
void
factory_register
(
FilterCreatorOP
creator );
73
74
/// @brief Create a mover given its identifying string
75
FilterOP
newFilter
(
std::string
const
& );
76
77
///@brief return new Mover by Tag parsing; the identifying string for the Mover is in the Tag
78
FilterOP
79
newFilter
(
80
TagPtr
const
,
81
moves::DataMap
&,
82
protocols::filters::Filters_map
const
&,
83
protocols::moves::Movers_map
const
&,
84
Pose
const
&
85
);
86
87
private
:
88
FilterFactory
();
89
90
// Unimplemented -- uncopyable
91
FilterFactory
(
FilterFactory
const
& );
92
FilterFactory
const
&
operator =
(
FilterFactory
const
& );
93
94
private
:
95
static
FilterFactory
*
instance_
;
96
97
FilterMap
filter_creator_map_
;
98
99
};
100
101
}
//namespace moves
102
}
//namespace protocols
103
104
#endif
Generated on Sat Jun 1 2013 11:49:48 for Rosetta 3.5 by
1.8.4