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