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
18class 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:
31};
32
33} // namespace rime
34
35#endif // RIME_SEGMENTOR_H_
Definition algebra.cc:12
Definition component.h:21
Definition engine.h:20
Definition segmentation.h:60
virtual bool Proceed(Segmentation *segmentation)=0
string name_space() const
Definition segmentor.h:26
string name_space_
Definition segmentor.h:30
virtual ~Segmentor()=default
Engine * engine_
Definition segmentor.h:29
Segmentor(const Ticket &ticket)
Definition segmentor.h:20
Definition ticket.h:17