blob: cc3f97eb4d7d0f5b352af2a36cc9039bb3b08af2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#pragma once
#include <map>
#include <memory>
#include <string>
namespace icu
{
class Transliterator;
}
class Transliteration
{
public:
~Transliteration();
static Transliteration & Instance();
void Init(std::string const & icuDataDir);
bool Transliterate(std::string const & str, int8_t langCode, std::string & out) const;
private:
Transliteration() = default;
std::map<std::string, std::unique_ptr<icu::Transliterator>> m_transliterators;
};
|