All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Units.h
Go to the documentation of this file.
1 // $Id:$
2 #ifndef JOBOPTIONSVC_UNITS_H_
3 #define JOBOPTIONSVC_UNITS_H_
4 // ============================================================================
5 // Include files
6 // ============================================================================
7 // STD & STL:
8 // ============================================================================
9 #include <string>
10 #include <map>
11 // ============================================================================
12 #include "Position.h"
13 // ============================================================================
14 
15 // ============================================================================
16 namespace Gaudi { namespace Parsers {
17 // ============================================================================
18 class Units {
19  public:
20  typedef std::map<std::string, std::pair<double, Position> > Container;
21  typedef Container::mapped_type ValueWithPosition;
22 
23  bool Add(const std::string& name, double value);
24  bool Add(const std::string& name, double value, const Position& pos);
25 
26  bool Find(const std::string& name, ValueWithPosition& result) const;
27  bool Find(const std::string& name, double& result) const;
28  std::string ToString() const;
29  private:
31 };
32 
33 // ============================================================================
34 } /* Gaudi */ } /* Parsers */
35 // ============================================================================
36 
37 #endif /* UNITS_H_ */
bool Find(const std::string &name, ValueWithPosition &result) const
Definition: Units.cpp:32
Container units_
Definition: Units.h:30
std::map< std::string, std::pair< double, Position > > Container
Definition: Units.h:20
Container::mapped_type ValueWithPosition
Definition: Units.h:21
bool Add(const std::string &name, double value)
Definition: Units.cpp:9
This is a number of static methods for bootstrapping the Gaudi framework.
Definition: Bootstrap.h:14
std::string ToString() const