librime 1.2
Rime Input Method Engine, the core library
algebra.h
Go to the documentation of this file.
1//
2// Copyright RIME Developers
3// Distributed under the BSD License
4//
5// 2012-01-19 GONG Chen <chen.sst@gmail.com>
6//
7
8#ifndef RIME_ALGEBRA_H_
9#define RIME_ALGEBRA_H_
10
11#include <rime/common.h>
12#include <rime/config.h>
13#include "spelling.h"
14
15namespace rime {
16
17class Calculation;
18class Schema;
19
20class Script : public map<string, vector<Spelling>> {
21 public:
22 RIME_DLL bool AddSyllable(const string& syllable);
23 void Merge(const string& s,
24 const SpellingProperties& sp,
25 const vector<Spelling>& v);
26 void Dump(const path& file_path) const;
27};
28
30 public:
31 RIME_DLL bool Load(an<ConfigList> settings);
32 // "spelling" -> "gnilleps"
33 RIME_DLL bool Apply(string* value);
34 // {z, y, x} -> {a, b, c, d}
35 RIME_DLL bool Apply(Script* value);
36
37 protected:
38 vector<of<Calculation>> calculation_;
39};
40
41} // namespace rime
42
43#endif // RIME_ALGEBRA_H_
#define RIME_DLL
Definition rime_api.h:33
Definition algebra.cc:12
std::shared_ptr< T > an
Definition common.h:60
Definition algebra.h:20
void Merge(const string &s, const SpellingProperties &sp, const vector< Spelling > &v)
Definition algebra.cc:22
void Dump(const path &file_path) const
Definition algebra.cc:40
RIME_DLL bool AddSyllable(const string &syllable)
Definition algebra.cc:14
Definition algebra.h:29
RIME_DLL bool Load(an< ConfigList > settings)
Definition algebra.cc:54
RIME_DLL bool Apply(string *value)
Definition algebra.cc:88
vector< of< Calculation > > calculation_
Definition algebra.h:38
Definition calculus.h:19
Definition spelling.h:24
Definition common.h:84
Definition schema.h:15