The Gaudi Framework  v29r0 (ff2e7097)
Units.h
Go to the documentation of this file.
1 #ifndef JOBOPTIONSVC_UNITS_H_
2 #define JOBOPTIONSVC_UNITS_H_
3 // ============================================================================
4 // Include files
5 // ============================================================================
6 // STD & STL:
7 // ============================================================================
8 #include <map>
9 #include <string>
10 // ============================================================================
11 #include "Position.h"
12 // ============================================================================
13 
14 // ============================================================================
15 namespace Gaudi
16 {
17  namespace Parsers
18  {
19  // ============================================================================
20  class Units final
21  {
22  public:
24  typedef Container::mapped_type ValueWithPosition;
25 
26  bool Add( std::string name, double value );
27  bool Add( std::string name, double value, const Position& pos );
28 
29  bool Find( const std::string& name, ValueWithPosition& result ) const;
30  bool Find( const std::string& name, double& result ) const;
31  std::string ToString() const;
32 
33  private:
34  Container units_;
35  };
36 
37  // ============================================================================
38  } /* Gaudi */
39 } /* Parsers */
40 // ============================================================================
41 
42 #endif /* UNITS_H_ */
bool Find(const std::string &name, ValueWithPosition &result) const
Definition: Units.cpp:23
Container units_
Definition: Units.h:34
STL class.
STL class.
std::map< std::string, std::pair< double, Position > > Container
Definition: Units.h:23
Container::mapped_type ValueWithPosition
Definition: Units.h:24
bool Add(std::string name, double value)
Definition: Units.cpp:8
std::string ToString() const
Helper functions to set/get the application return code.
Definition: __init__.py:1