librime: rime::Candidate Class Reference

| librime 1.2 Rime Input Method Engine, the core library

Public Member Functions | Static Public Member Functions | List of all members
rime::Candidate Class Referenceabstract

`#include <candidate.h>`

Inheritance diagram for rime::Candidate:
[legend]

## Public Member Functions
| Candidate ()=default
| Candidate (const string &type, size_t start, size_t end, double quality=0.)
virtual | ~Candidate ()=default
int | compare (const Candidate &other)
const string & | type () const
size_t | start () const
size_t | end () const
double | quality () const
virtual const string & | text () const =0
virtual string | comment () const
virtual string | preedit () const
void | set_type (const string &type)
void | set_start (size_t start)
void | set_end (size_t end)
void | set_quality (double quality)

## Static Public Member Functions
static an< Candidate > | GetGenuineCandidate (const an< Candidate > &cand)
static vector< of< Candidate > > | GetGenuineCandidates (const an< Candidate > &cand)

## Constructor & Destructor Documentation

## ◆ Candidate() [1/2]

rime::Candidate::Candidate | ( |  | ) |
| default

## ◆ Candidate() [2/2]

rime::Candidate::Candidate | ( | const string & | type,
|  | size_t | start,
|  | size_t | end,
|  | double | quality = 0. )
| inline

## ◆ ~Candidate()

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

## Member Function Documentation

## ◆ comment()

virtual string rime::Candidate::comment | ( |  | ) | const
| inlinevirtual

Reimplemented in rime::Phrase, rime::ShadowCandidate, rime::SimpleCandidate, and rime::UniquifiedCandidate.

## ◆ compare()

int rime::Candidate::compare | ( | const Candidate & | other | ) |

## ◆ end()

size_t rime::Candidate::end | ( |  | ) | const
| inline

## ◆ GetGenuineCandidate()

an< Candidate > rime::Candidate::GetGenuineCandidate | ( | const an< Candidate > & | cand | ) |
| static

## ◆ GetGenuineCandidates()

vector< of< Candidate > > rime::Candidate::GetGenuineCandidates | ( | const an< Candidate > & | cand | ) |
| static

## ◆ preedit()

virtual string rime::Candidate::preedit | ( |  | ) | const
| inlinevirtual

Reimplemented in rime::Phrase, rime::ShadowCandidate, rime::SimpleCandidate, and rime::UniquifiedCandidate.

## ◆ quality()

double rime::Candidate::quality | ( |  | ) | const
| inline

## ◆ set_end()

void rime::Candidate::set_end | ( | size_t | end | ) |
| inline

## ◆ set_quality()

void rime::Candidate::set_quality | ( | double | quality | ) |
| inline

## ◆ set_start()

void rime::Candidate::set_start | ( | size_t | start | ) |
| inline

## ◆ set_type()

void rime::Candidate::set_type | ( | const string & | type | ) |
| inline

## ◆ start()

size_t rime::Candidate::start | ( |  | ) | const
| inline

## ◆ text()

virtual const string & rime::Candidate::text | ( |  | ) | const
| pure virtual

Implemented in rime::Phrase, rime::ShadowCandidate, rime::SimpleCandidate, and rime::UniquifiedCandidate.

## ◆ type()

const string & rime::Candidate::type | ( |  | ) | const
| inline

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

- candidate.h
- candidate.cc