00001
00002
00003
00004
00005
00006
00007 #ifndef DEFTABLE_HH
00008 #define DEFTABLE_HH
00009
00010 #include <string>
00011 #include <map>
00012
00013 namespace HepPDT {
00014
00016
00023 class DefTable {
00024 typedef std::map<std::string,double> TempDefMap;
00025
00026 public:
00027 typedef TempDefMap::const_iterator const_iterator;
00028 typedef TempDefMap::iterator iterator;
00029
00030 DefTable( );
00031 ~DefTable() { ; }
00032
00033
00034
00036 void addDefinition( std::string const & def, double val ) { tempDefines[def] = val; }
00037
00038
00039
00041 bool hasDefinition( std::string const & def ) const;
00042
00043
00044
00046 int size() const { return tempDefines.size(); }
00048 double definition( std::string const & def );
00050 void writeDefinitions() const;
00051
00053 iterator begin() { return tempDefines.begin(); }
00055 const_iterator begin() const { return tempDefines.begin(); }
00056
00058 iterator end() { return tempDefines.end(); }
00060 const_iterator end() const { return tempDefines.end(); }
00061
00062 private:
00063 TempDefMap tempDefines;
00064
00065
00066 DefTable & operator = ( DefTable const & );
00067 DefTable( DefTable const & );
00068
00069 };
00070
00071 }
00072
00073 #endif // DEFTABLE_HH