librime: rime::TableEncoder Class Reference

| librime 1.2 Rime Input Method Engine, the core library

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
rime::TableEncoder Class Reference

`#include <encoder.h>`

Inheritance diagram for rime::TableEncoder:
[legend]
Collaboration diagram for rime::TableEncoder:
[legend]

## Public Member Functions
| TableEncoder (PhraseCollector *collector=NULL)
bool | LoadSettings (Config *config)
bool | Encode (const RawCode &code, string *result)
bool | EncodePhrase (const string &phrase, const string &value)
bool | IsCodeExcluded (const string &code)
bool | loaded () const
const vector< TableEncodingRule > & | encoding_rules () const
const string & | tail_anchor () const
Public Member Functions inherited from rime::Encoder
| Encoder (PhraseCollector *collector)
virtual | ~Encoder ()=default
void | set_collector (PhraseCollector *collector)

## Protected Member Functions
bool | ParseFormula (const string &formula, TableEncodingRule *rule)
int | CalculateCodeIndex (const string &code, int index, int start)
bool | DfsEncode (const string &phrase, const string &value, size_t start_pos, RawCode *code, int *limit)

## Protected Attributes
bool | loaded_
vector< TableEncodingRule > | encoding_rules_
vector< boost::regex > | exclude_patterns_
string | tail_anchor_
int | max_phrase_length_
Protected Attributes inherited from rime::Encoder
PhraseCollector * | collector_

## Constructor & Destructor Documentation

## ◆ TableEncoder()

rime::TableEncoder::TableEncoder | ( | PhraseCollector * | collector = NULL | ) |

## Member Function Documentation

## ◆ CalculateCodeIndex()

int rime::TableEncoder::CalculateCodeIndex | ( | const string & | code,
|  | int | index,
|  | int | start )
| protected

## ◆ DfsEncode()

bool rime::TableEncoder::DfsEncode | ( | const string & | phrase,
|  | const string & | value,
|  | size_t | start_pos,
|  | RawCode * | code,
|  | int * | limit )
| protected

## ◆ Encode()

bool rime::TableEncoder::Encode | ( | const RawCode & | code,
|  | string * | result )

## ◆ EncodePhrase()

bool rime::TableEncoder::EncodePhrase | ( | const string & | phrase,
|  | const string & | value )
| virtual

Implements rime::Encoder.

## ◆ encoding_rules()

const vector< TableEncodingRule > & rime::TableEncoder::encoding_rules | ( |  | ) | const
| inline

## ◆ IsCodeExcluded()

bool rime::TableEncoder::IsCodeExcluded | ( | const string & | code | ) |

## ◆ loaded()

bool rime::TableEncoder::loaded | ( |  | ) | const
| inline

## ◆ LoadSettings()

bool rime::TableEncoder::LoadSettings | ( | Config * | config | ) |
| virtual

Reimplemented from rime::Encoder.

## ◆ ParseFormula()

bool rime::TableEncoder::ParseFormula | ( | const string & | formula,
|  | TableEncodingRule * | rule )
| protected

## ◆ tail_anchor()

const string & rime::TableEncoder::tail_anchor | ( |  | ) | const
| inline

## Member Data Documentation

## ◆ encoding_rules_

vector<TableEncodingRule> rime::TableEncoder::encoding_rules_
| protected

## ◆ exclude_patterns_

vector<boost::regex> rime::TableEncoder::exclude_patterns_
| protected

## ◆ loaded_

bool rime::TableEncoder::loaded_
| protected

## ◆ max_phrase_length_

int rime::TableEncoder::max_phrase_length_
| protected

## ◆ tail_anchor_

string rime::TableEncoder::tail_anchor_
| protected

The documentation for this class was generated from the following files:

- encoder.h
- encoder.cc