librime: rime::Table Class Reference

| librime 1.2 Rime Input Method Engine, the core library

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

`#include <table.h>`

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

## Public Member Functions
RIME_DLL | Table (const path &file_path)
virtual | ~Table ()
RIME_DLL bool | Load ()
RIME_DLL bool | Save ()
RIME_DLL bool | Build (const Syllabary &syllabary, const Vocabulary &vocabulary, size_t num_entries, uint32_t dict_file_checksum=0)
bool | GetSyllabary (Syllabary *syllabary)
RIME_DLL string | GetSyllableById (int syllable_id)
RIME_DLL TableAccessor | QueryWords (int syllable_id)
RIME_DLL TableAccessor | QueryPhrases (const Code &code)
RIME_DLL bool | Query (const SyllableGraph &syll_graph, size_t start_pos, TableQueryResult *result)
RIME_DLL string | GetEntryText (const table::Entry &entry)
uint32_t | dict_file_checksum () const
table::Metadata * | metadata () const
Public Member Functions inherited from rime::MappedFile
| MappedFile (const MappedFile &)=delete
MappedFile & | operator= (const MappedFile &)=delete
bool | Exists () const
bool | IsOpen () const
void | Close ()
bool | Remove ()
template<class T>
T * | Find (size_t offset)
const path & | file_path () const
size_t | file_size () const

## Protected Attributes
table::Metadata * | metadata_ = nullptr
table::Syllabary * | syllabary_ = nullptr
table::Index * | index_ = nullptr
the< StringTable > | string_table_
the< StringTableBuilder > | string_table_builder_

## Additional Inherited Members
Protected Member Functions inherited from rime::MappedFile
| MappedFile (const path &file_path)
virtual | ~MappedFile ()
bool | Create (size_t capacity)
bool | OpenReadOnly ()
bool | OpenReadWrite ()
bool | Flush ()
bool | Resize (size_t capacity)
bool | ShrinkToFit ()
template<class T>
T * | Allocate (size_t count=1)
template<class T>
Array< T > * | CreateArray (size_t array_size)
String * | CreateString (const string &str)
bool | CopyString (const string &src, String *dest)
size_t | capacity () const
char * | address () const

## Constructor & Destructor Documentation

## ◆ Table()

rime::Table::Table | ( | const path & | file_path | ) |

## ◆ ~Table()

rime::Table::~Table | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ Build()

bool rime::Table::Build | ( | const Syllabary & | syllabary,
|  | const Vocabulary & | vocabulary,
|  | size_t | num_entries,
|  | uint32_t | dict_file_checksum = 0 )

## ◆ dict_file_checksum()

uint32_t rime::Table::dict_file_checksum | ( |  | ) | const

## ◆ GetEntryText()

string rime::Table::GetEntryText | ( | const table::Entry & | entry | ) |

## ◆ GetSyllabary()

bool rime::Table::GetSyllabary | ( | Syllabary * | syllabary | ) |

## ◆ GetSyllableById()

string rime::Table::GetSyllableById | ( | int | syllable_id | ) |

## ◆ Load()

bool rime::Table::Load | ( |  | ) |

## ◆ metadata()

table::Metadata * rime::Table::metadata | ( |  | ) | const
| inline

## ◆ Query()

bool rime::Table::Query | ( | const SyllableGraph & | syll_graph,
|  | size_t | start_pos,
|  | TableQueryResult * | result )

## ◆ QueryPhrases()

TableAccessor rime::Table::QueryPhrases | ( | const Code & | code | ) |

## ◆ QueryWords()

TableAccessor rime::Table::QueryWords | ( | int | syllable_id | ) |

## ◆ Save()

bool rime::Table::Save | ( |  | ) |

## Member Data Documentation

## ◆ index_

table::Index* rime::Table::index_ = nullptr
| protected

## ◆ metadata_

table::Metadata* rime::Table::metadata_ = nullptr
| protected

## ◆ string_table_

the<StringTable> rime::Table::string_table_
| protected

## ◆ string_table_builder_

the<StringTableBuilder> rime::Table::string_table_builder_
| protected

## ◆ syllabary_

table::Syllabary* rime::Table::syllabary_ = nullptr
| protected

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

- table.h
- table.cc