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
loops
loops_definers
LoopsDefinerFactory.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/loops/loops_definers/LoopsDefinerFactory.hh
11
/// @brief Factory for creating LoopsDefiner objects
12
/// @author Matthew O'Meara (mattjomeara@gmail.com)
13
14
15
#ifndef INCLUDED_protocols_loops_loops_definers_LoopsDefinerFactory_hh
16
#define INCLUDED_protocols_loops_loops_definers_LoopsDefinerFactory_hh
17
18
// Unit Headers
19
#include <
protocols/loops/loops_definers/LoopsDefinerFactory.fwd.hh
>
20
#include <
protocols/loops/loops_definers/LoopsDefinerCreator.fwd.hh
>
21
22
// Project Headers
23
#include <
protocols/loops/loops_definers/LoopsDefiner.fwd.hh
>
24
#include <
protocols/loops/Loops.fwd.hh
>
25
26
// Platform Headers
27
#include <
core/pose/Pose.fwd.hh
>
28
#include <utility/factory/WidgetRegistrator.hh>
29
30
// C++ Headers
31
#include <map>
32
33
#include <utility/vector1.hh>
34
35
36
namespace
protocols {
37
namespace
loops {
38
namespace
loops_definers {
39
40
41
/// Create LoopsDefiner Reporters
42
class
LoopsDefinerFactory
{
43
44
public
:
// types
45
46
typedef
std::map< std::string, LoopsDefinerCreatorCOP >
LoopsDefinerCreatorMap
;
47
48
private
:
// constructors
49
50
// Private constructor to make it singleton managed
51
LoopsDefinerFactory
();
52
LoopsDefinerFactory
(
const
LoopsDefinerFactory
& src);
// unimplemented
53
54
LoopsDefinerFactory
const
&
55
operator=
(
LoopsDefinerFactory
const
& );
// unimplemented
56
57
public
:
58
59
// Warning this is not called because of the singleton pattern
60
virtual
61
~LoopsDefinerFactory
();
62
63
static
64
LoopsDefinerFactory
*
65
get_instance
();
66
67
void
68
factory_register
(
69
LoopsDefinerCreatorOP
);
70
71
bool
72
has_type
(
73
std::string
const
& )
const
;
74
75
utility::vector1< std::string >
76
get_all_loops_definer_names
()
const
;
77
78
LoopsDefinerOP
79
create_loops_definer
(
80
std::string
const
& type_name);
81
82
private
:
83
84
static
LoopsDefinerFactory
*
instance_
;
85
LoopsDefinerCreatorMap
types_
;
86
};
87
88
/// @brief This templated class will register an instance of an
89
/// LoopsDefinerCreator (class T) with the
90
/// LoopsDefinerFactory. It will ensure that no
91
/// LoopsDefinerCreator is registered twice, and, centralizes this
92
/// registration logic so that thread safety issues can be handled in
93
/// one place
94
template
<
class
T >
95
class
LoopsDefinerRegistrator
:
public
utility::factory::WidgetRegistrator< LoopsDefinerFactory, T >
96
{
97
public
:
98
typedef
utility::factory::WidgetRegistrator< LoopsDefinerFactory, T >
parent
;
99
public
:
100
LoopsDefinerRegistrator
() :
parent
() {}
101
};
102
103
104
105
}
// namespace
106
}
// namespace
107
}
// namespace
108
109
#endif
Generated on Sat Jun 1 2013 11:59:08 for Rosetta 3.5 by
1.8.4