|
Gaudi Framework, version v23r4 |
| Home | Generated: Mon Sep 17 2012 |
00001 // $Id:$ 00002 #ifndef JOBOPTIONSVC_UNITS_H_ 00003 #define JOBOPTIONSVC_UNITS_H_ 00004 // ============================================================================ 00005 // Include files 00006 // ============================================================================ 00007 // STD & STL: 00008 // ============================================================================ 00009 #include <string> 00010 #include <map> 00011 // ============================================================================ 00012 #include "Position.h" 00013 // ============================================================================ 00014 00015 // ============================================================================ 00016 namespace Gaudi { namespace Parsers { 00017 // ============================================================================ 00018 class Units { 00019 public: 00020 typedef std::map<std::string, std::pair<double, Position> > Container; 00021 typedef Container::mapped_type ValueWithPosition; 00022 00023 bool Add(const std::string& name, double value); 00024 bool Add(const std::string& name, double value, const Position& pos); 00025 00026 bool Find(const std::string& name, ValueWithPosition& result) const; 00027 bool Find(const std::string& name, double& result) const; 00028 std::string ToString() const; 00029 private: 00030 Container units_; 00031 }; 00032 00033 // ============================================================================ 00034 } /* Gaudi */ } /* Parsers */ 00035 // ============================================================================ 00036 00037 #endif /* UNITS_H_ */