ATLAS Offline Software
IUnitInterpreter.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // IUnitInterpreter.h, (c) ATLAS Detector software
8 // Author: Thomas Gillam (thomas.gillam@cern.ch)
9 // ExpressionParsing library
11 
12 #ifndef UNIT_INTERPRETER_H
13 #define UNIT_INTERPRETER_H
14 
15 #include <string>
16 #include <map>
17 
18 namespace ExpressionParsing {
20  public:
21  virtual ~IUnitInterpreter() { }
22 
23  bool isKnownUnit(const std::string &unitname) const;
24  double unitValue(const std::string &unitname) const;
25 
26  private:
27  virtual const std::map<std::string, double> &unitMap() const = 0;
28  };
29 }
30 
31 #endif // UNIT_INTERPRETER_H
ExpressionParsing::IUnitInterpreter::unitMap
virtual const std::map< std::string, double > & unitMap() const =0
ExpressionParsing::IUnitInterpreter::~IUnitInterpreter
virtual ~IUnitInterpreter()
Definition: IUnitInterpreter.h:21
ExpressionParsing::IUnitInterpreter
Definition: IUnitInterpreter.h:19
ExpressionParsing::IUnitInterpreter::isKnownUnit
bool isKnownUnit(const std::string &unitname) const
Definition: IUnitInterpreter.cxx:17
ExpressionParsing
Namespace holding all the expression evaluation code.
Definition: ExpressionParser.h:26
ExpressionParsing::IUnitInterpreter::unitValue
double unitValue(const std::string &unitname) const
Definition: IUnitInterpreter.cxx:22