summaryrefslogtreecommitdiffstats
path: root/xbmc/input/InputCodingTableKorean.h
blob: 55a64d6c4760ba1fe219f497bcfe2553301d7b3a (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
28
29
30
31
32
33
34
35
36
37
/*
 *  Copyright (C) 2005-2018 Team Kodi
 *  This file is part of Kodi - https://kodi.tv
 *
 *  SPDX-License-Identifier: GPL-2.0-or-later
 *  See LICENSES/README.md for more information.
 */

#pragma once

#include "InputCodingTable.h"

#include <map>
#include <string>
#include <vector>

class CInputCodingTableKorean : public IInputCodingTable
{
public:
  CInputCodingTableKorean();
  ~CInputCodingTableKorean() override = default;

  bool GetWordListPage(const std::string& strCode, bool isFirstPage) override;
  std::vector<std::wstring> GetResponse(int) override;

  void SetTextPrev(const std::string& strTextPrev) override;
  std::string ConvertString(const std::string& strCode) override;
  int GetType() override { return TYPE_CONVERT_STRING; }

protected:
  int MergeCode(int choseong, int jungseong, int jongseong);
  std::wstring InputToKorean(const std::wstring& input);

private:
  std::vector<std::wstring> m_words;
  std::string m_strTextPrev;
};