labs-edaf30/lab2/dictionary.h

25 lines
439 B
C
Raw Normal View History

2021-10-27 15:15:47 +02:00
#ifndef DICTIONARY_H
#define DICTIONARY_H
2024-11-20 17:46:21 +01:00
#include "word.h"
#include <filesystem>
2021-10-27 15:15:47 +02:00
#include <string>
#include <vector>
2024-11-20 17:46:21 +01:00
using std::vector;
using std::filesystem::path;
2021-10-27 15:15:47 +02:00
class Dictionary {
2024-11-20 17:46:21 +01:00
public:
Dictionary();
bool contains(const std::string &word) const;
std::vector<std::string> get_suggestions(const std::string &word) const;
int slurp(path p);
int spit(path p);
private:
vector<Word> words[25];
2021-10-27 15:15:47 +02:00
};
#endif