librime 1.2
Rime Input Method Engine, the core library
table.h File Reference
#include <cstring>
#include <rime/common.h>
#include <rime/dict/mapped_file.h>
#include <rime/dict/vocabulary.h>
#include <rime/dict/string_table.h>
Include dependency graph for table.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  rime::table::Entry
struct  rime::table::LongEntry
struct  rime::table::HeadIndexNode
struct  rime::table::TrunkIndexNode
class  rime::TableAccessor
class  rime::TableQuery
class  rime::Table

Namespaces

namespace  rime
namespace  rime::table

Macros

#define RIME_TABLE_UNION(U, V, A, a, B, b)

Typedefs

using rime::table::Syllabary = Array<StringType>
using rime::table::Code = List<SyllableId>
using rime::table::Weight = float
using rime::table::HeadIndex = Array<HeadIndexNode>
using rime::table::TrunkIndex = Array<TrunkIndexNode>
using rime::table::TailIndex = Array<LongEntry>
using rime::table::Index = HeadIndex
using rime::TableQueryResult = map<int, vector<TableAccessor>>

Functions

 rime::table::RIME_TABLE_UNION (StringType, int32_t, String, str, StringId, str_id)
 rime::table::RIME_TABLE_UNION (PhraseIndex, Array< char >, TrunkIndex, trunk, TailIndex, tail)

Macro Definition Documentation

◆ RIME_TABLE_UNION

#define RIME_TABLE_UNION ( U,
V,
A,
a,
B,
b )
Value:
struct U { \
V value; \
const A& a() const { \
return *reinterpret_cast<const A*>(this); \
} \
const B& b() const { \
return *reinterpret_cast<const B*>(this); \
} \
A& a() { \
return *reinterpret_cast<A*>(this); \
} \
B& b() { \
return *reinterpret_cast<B*>(this); \
} \
}