librime: rime::StringTable Class Reference

| librime 1.2 Rime Input Method Engine, the core library

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

`#include <string_table.h>`

Inheritance diagram for rime::StringTable:
[legend]

## Public Member Functions
| StringTable ()=default
virtual | ~StringTable ()=default
| StringTable (const char *ptr, size_t size)
bool | HasKey (const string &key)
StringId | Lookup (const string &key)
void | CommonPrefixMatch (const string &query, vector< StringId > *result)
void | Predict (const string &query, vector< StringId > *result)
string | GetString (StringId string_id)
size_t | NumKeys () const
size_t | BinarySize () const

## Protected Attributes
marisa::Trie | trie_

## Constructor & Destructor Documentation

## ◆ StringTable() [1/2]

rime::StringTable::StringTable | ( |  | ) |
| default

## ◆ ~StringTable()

virtual rime::StringTable::~StringTable | ( |  | ) |
| virtualdefault

## ◆ StringTable() [2/2]

rime::StringTable::StringTable | ( | const char * | ptr,
|  | size_t | size )

## Member Function Documentation

## ◆ BinarySize()

size_t rime::StringTable::BinarySize | ( |  | ) | const

## ◆ CommonPrefixMatch()

void rime::StringTable::CommonPrefixMatch | ( | const string & | query,
|  | vector< StringId > * | result )

## ◆ GetString()

string rime::StringTable::GetString | ( | StringId | string_id | ) |

## ◆ HasKey()

bool rime::StringTable::HasKey | ( | const string & | key | ) |

## ◆ Lookup()

StringId rime::StringTable::Lookup | ( | const string & | key | ) |

## ◆ NumKeys()

size_t rime::StringTable::NumKeys | ( |  | ) | const

## ◆ Predict()

void rime::StringTable::Predict | ( | const string & | query,
|  | vector< StringId > * | result )

## Member Data Documentation

## ◆ trie_

marisa::Trie rime::StringTable::trie_
| protected

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

- string_table.h
- string_table.cc