| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
#ifndef _FCITX5_ZHUYIN_ZHUYINSYMBOL_H_ |
| 8 |
#define _FCITX5_ZHUYIN_ZHUYINSYMBOL_H_ |
| 9 |
|
| 10 |
#include <cstdio> |
| 11 |
#include <istream> |
| 12 |
#include <string> |
| 13 |
#include <unordered_map> |
| 14 |
#include <vector> |
| 15 |
|
| 16 |
namespace fcitx { |
| 17 |
|
| 18 |
class ZhuyinSymbol { |
| 19 |
public: |
| 20 |
ZhuyinSymbol(); |
| 21 |
void load(std::istream &in); |
| 22 |
const std::vector<std::string> &lookup(const std::string &key) const; |
| 23 |
void reset(); |
| 24 |
void initBuiltin(); |
| 25 |
void clear(); |
| 26 |
|
| 27 |
private: |
| 28 |
std::unordered_map<std::string, std::vector<std::string>> symbols_; |
| 29 |
std::unordered_map<std::string, size_t> symbolToGroup_; |
| 30 |
std::vector<std::vector<std::string>> groups_; |
| 31 |
}; |
| 32 |
|
| 33 |
} |
| 34 |
|
| 35 |
#endif |