Changes in src/Formula.hpp [426f2a:d8a0ec]
- File:
-
- 1 edited
-
src/Formula.hpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Formula.hpp
r426f2a rd8a0ec 16 16 17 17 #include "types.hpp" 18 #include "helpers.hpp"19 18 20 19 class element; … … 23 22 { 24 23 public: 25 typedef const element*key_type;24 typedef element* key_type; 26 25 typedef unsigned int mapped_type; 27 26 typedef std::pair<key_type, mapped_type> value_type; … … 66 65 67 66 unsigned int getElementCount() const; 68 bool hasElement( key_type)const;67 bool hasElement(const element*) const; 69 68 bool hasElement(atomicNumber_t) const; 70 69 bool hasElement(const std::string&) const; 71 70 72 void operator+=( key_type);71 void operator+=(const element*); 73 72 void operator+=(atomicNumber_t); 74 73 void operator+=(const std::string&); 75 74 76 void operator-=( key_type);75 void operator-=(const element*); 77 76 void operator-=(atomicNumber_t); 78 77 void operator-=(const std::string&); 79 78 80 void addElements( key_type,unsigned int);79 void addElements(const element*,unsigned int); 81 80 void addElements(atomicNumber_t,unsigned int); 82 81 void addElements(const std::string&,unsigned int); 83 82 84 void addFormula(const Formula&,unsigned int);85 86 enumeration<key_type> enumerateElements() const;87 88 83 // only const versions, because someone might try to increment a previously 89 84 // not set element 90 const unsigned int operator[]( key_type) const;85 const unsigned int operator[](const element*) const; 91 86 const unsigned int operator[](atomicNumber_t) const; 92 87 const unsigned int operator[](std::string) const; … … 103 98 104 99 private: 105 void parseFromString(std::string::const_iterator&,std::string::const_iterator&,char) throw(ParseError);106 int parseMaybeNumber(std::string::const_iterator &it,std::string::const_iterator &end) throw(ParseError);107 100 // this contains all counts of elements in the formula 108 101 // the size of the actual structure might be used in comparisons
Note:
See TracChangeset
for help on using the changeset viewer.
