librime: segmentor.h Source File

| librime 1.2 Rime Input Method Engine, the core library

segmentor.h
Go to the documentation of this file.
1//
2// Copyright RIME Developers
3// Distributed under the BSD License
4//
5// 2011-05-15 GONG Chen <chen.sst@gmail.com>
6//
7#ifndef RIME_SEGMENTOR_H_
8#define RIME_SEGMENTOR_H_
9
10#include <rime/component.h>
11#include <rime/ticket.h>
12
13namespace rime {
14
15class Engine;
16class Segmentation;
17
18 class Segmentor : public Class<Segmentor, const Ticket&> {
19 public:
20 explicit Segmentor(const Ticket& ticket)
21 : engine_(ticket.engine), name_space_(ticket.name_space) {}
22 virtual ~Segmentor() = default;
23
24 virtual bool Proceed(Segmentation* segmentation) = 0;
25
26 string name_space() const { return name_space_; }
27
28 protected:
29 Engine* engine_;
30 string name_space_;
31};
32
33} // namespace rime
34
35#endif // RIME_SEGMENTOR_H_
component.h
ticket.h
rime
Definition algebra.cc:12
rime::Class
Definition component.h:21
rime::Engine
Definition engine.h:20
rime::Segmentation
Definition segmentation.h:60
rime::Segmentor::Proceed
virtual bool Proceed(Segmentation *segmentation)=0
rime::Segmentor::name_space
string name_space() const
Definition segmentor.h:26
rime::Segmentor::name_space_
string name_space_
Definition segmentor.h:30
rime::Segmentor::~Segmentor
virtual ~Segmentor()=default
rime::Segmentor::engine_
Engine * engine_
Definition segmentor.h:29
rime::Segmentor::Segmentor
Segmentor(const Ticket &ticket)
Definition segmentor.h:20
rime::Ticket
Definition ticket.h:17