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