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
multistate_design
SingleStateEntityData.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 SingleStateEntityData.hh
11
/// @brief
12
/// @author Colin A. Smith
13
14
#ifndef INCLUDED_protocols_multistate_design_SingleStateEntityData_hh
15
#define INCLUDED_protocols_multistate_design_SingleStateEntityData_hh
16
17
#include <
protocols/multistate_design/SingleStateEntityData.fwd.hh
>
18
19
#include <
core/types.hh
>
20
#include <basic/MetricValue.hh>
21
// AUTO-REMOVED #include <basic/MetricValueIO.hh>
22
23
#include <string>
24
#include <map>
25
26
namespace
protocols {
27
namespace
multistate_design {
28
29
class
SingleStateEntityData
{
30
31
public
:
32
33
typedef
std::map<std::string, basic::MetricValueBaseOP >
MetricValueMap
;
34
35
SingleStateEntityData
() :
fitness_
(0) {}
36
virtual
~SingleStateEntityData
() {}
37
38
core::Real
fitness
()
const
{
return
fitness_
; }
39
void
fitness
(
core::Real
fitness
) {
fitness_
=
fitness
; }
40
41
basic::MetricValueBaseCOP
42
metric_value
(
43
std::string
const
& name
44
)
const
45
{
46
MetricValueMap::const_iterator iter(
metric_value_map_
.find(name));
47
if
(iter !=
metric_value_map_
.end())
return
NULL;
48
return
iter->second;
49
}
50
51
void
52
metric_value
(
53
std::string
const
& name,
54
basic::MetricValueBaseOP
metric_value
55
)
56
{
57
metric_value_map_
[name] =
metric_value
;
58
}
59
60
MetricValueMap
const
&
61
metric_value_map
()
const
62
{
63
return
metric_value_map_
;
64
}
65
66
virtual
void
write_checkpoint
( std::ostream & os )
const
;
67
virtual
bool
read_checkpoint
( std::istream & is );
68
69
private
:
70
71
core::Real
fitness_
;
72
MetricValueMap
metric_value_map_
;
73
};
74
75
}
// namespace multistate_design
76
}
// namespace protocols
77
78
#endif
Generated on Sat Jun 1 2013 12:00:46 for Rosetta 3.5 by
1.8.4