iphreeqc/phreeqcpp/Dictionary.h
Scott Charlton 1d5c59a175 Add 'phreeqcpp/' from commit 'da9d06b423a87ed5eae503c0faf779ac11c96027'
git-subtree-dir: phreeqcpp
git-subtree-mainline: ba5f2ba885b4cc757201e28f9b4dce158f7cc66b
git-subtree-split: da9d06b423a87ed5eae503c0faf779ac11c96027
2018-07-31 16:56:09 -06:00

29 lines
716 B
C++

#if !defined(DICTIONARY_H_INCLUDED)
#define DICTIONARY_H_INCLUDED
#include <iostream>
#include <map>
#include <vector>
#include <sstream>
class Phreeqc;
class Dictionary
{
public:
Dictionary(void);
Dictionary(std::string & words_string);
~Dictionary(void);
int Find(std::string str);
int MapSize() {return (int) this->dictionary_map.size();}
int OssSize() {return (int) this->dictionary_oss.str().size();}
std::ostringstream &GetDictionaryOss() {return this->dictionary_oss;}
std::vector<std::string> &GetWords() {return this->words;}
protected:
std::map<std::string, int> dictionary_map;
std::vector<std::string> words;
std::ostringstream dictionary_oss;
};
#endif // !defined(DICTIONARY_H_INCLUDED)