/* * SPDX-FileCopyrightText: 2017-2017 CSSlayer * * SPDX-License-Identifier: LGPL-2.1-or-later * */ #ifndef _PINYINHELPER_PINYINLOOKUP_H_ #define _PINYINHELPER_PINYINLOOKUP_H_ #include #include #include #include #include namespace fcitx { struct PinyinLookupData { uint8_t consonant; uint8_t vocal; uint8_t tone; }; class PinyinLookup { public: bool load(); std::vector lookup(uint32_t hz); std::vector> fullLookup(uint32_t hz); private: std::unordered_map> data_; bool loaded_ = false; bool loadResult_ = false; }; } // namespace fcitx #endif // _PINYINHELPER_PINYINLOOKUP_H_