The Gaudi Framework
v26r0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
Units.cpp
Go to the documentation of this file.
1
// $Id:$
2
// ============================================================================
3
// Include files
4
// ============================================================================
5
#include "
Units.h
"
6
// ============================================================================
7
namespace
gp = Gaudi::Parsers;
8
// ============================================================================
9
bool
gp::Units::Add(
const
std::string& name,
double
value
) {
10
return
Add(name, value,
Position
());
11
}
12
// ============================================================================
13
bool
gp::Units::Add(
const
std::string& name,
double
value
,
14
const
Position
& pos) {
15
std::pair<Container::iterator,bool> result =
16
units_.insert(
17
Container::value_type(name,
ValueWithPosition
(value, pos))
18
);
19
return
result.second;
20
}
21
// ============================================================================
22
bool
gp::Units::Find(
const
std::string& name,
double
& result)
const
{
23
24
ValueWithPosition
r;
25
if
(Find(name,r)){
26
result = r.first;
27
return
true
;
28
}
29
return
false
;
30
}
31
// ============================================================================
32
bool
gp::Units::Find(
const
std::string& name,
33
ValueWithPosition
& result)
const
{
34
Container::const_iterator it = units_.find(name);
35
if
(it != units_.end()) {
36
result = it->second;
37
return
true
;
38
}
39
return
false
;
40
}
Gaudi::Parsers::Position
Definition:
Position.h:13
dump_component_properties.value
list value
Definition:
dump_component_properties.py:12
Units.h
Gaudi::Parsers::Units::ValueWithPosition
Container::mapped_type ValueWithPosition
Definition:
Units.h:21
GaudiCoreSvc
src
JobOptionsSvc
Units.cpp
Generated on Tue Jan 20 2015 20:27:18 for The Gaudi Framework by
1.8.7