Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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  namespace Parsers {
17  // ============================================================================
18  class Units final {
19  public:
21  typedef Container::mapped_type ValueWithPosition;
22 
23  bool Add( std::string name, double value );
24  bool Add( 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 
30  private:
31  Container units_;
32  };
33 
34  // ============================================================================
35  } // namespace Parsers
36 } // namespace Gaudi
37 // ============================================================================
38 
39 #endif /* UNITS_H_ */
bool Find(const std::string &name, ValueWithPosition &result) const
Definition: Units.cpp:21
Container units_
Definition: Units.h:31
STL class.
STL class.
std::map< std::string, std::pair< double, Position > > Container
Definition: Units.h:20
Container::mapped_type ValueWithPosition
Definition: Units.h:21
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