Gaudi Framework, version v23r5

Home   Generated: Wed Nov 28 2012
 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) {
16  units_.insert(
18  );
19  return result.second;
20 }
21 // ============================================================================
22 bool gp::Units::Find(const std::string& name, double& result) const {
23 
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 }

Generated at Wed Nov 28 2012 12:17:12 for Gaudi Framework, version v23r5 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004