librime: shape.h Source File

| librime 1.2 Rime Input Method Engine, the core library

shape.h
Go to the documentation of this file.
1//
2// Copyright RIME Developers
3// Distributed under the BSD License
4//
5// 2013-07-02 GONG Chen <chen.sst@gmail.com>
6//
7
8#ifndef RIME_SHAPE_H_
9#define RIME_SHAPE_H_
10
11#include <rime/formatter.h>
12#include <rime/processor.h>
13
14namespace rime {
15
16 class ShapeFormatter : public Formatter {
17 public:
18 ShapeFormatter(const Ticket& ticket) : Formatter(ticket) {}
19 virtual void Format(string* text);
20};
21
22 class ShapeProcessor : public Processor {
23 public:
24 ShapeProcessor(const Ticket& ticket)
25 : Processor(ticket), formatter_(ticket) {}
26 virtual ProcessResult ProcessKeyEvent(const KeyEvent& key_event);
27
28 private:
29 ShapeFormatter formatter_;
30};
31
32} // namespace rime
33
34#endif // RIME_FORMATTER_H_
formatter.h
processor.h
rime
Definition algebra.cc:12
rime::ProcessResult
ProcessResult
Definition processor.h:18
rime::Formatter::Formatter
Formatter(const Ticket &ticket)
Definition formatter.h:21
rime::ShapeFormatter
Definition shape.h:16
rime::ShapeFormatter::Format
virtual void Format(string *text)
Definition shape.cc:16
rime::ShapeFormatter::ShapeFormatter
ShapeFormatter(const Ticket &ticket)
Definition shape.h:18
rime::ShapeProcessor::ProcessKeyEvent
virtual ProcessResult ProcessKeyEvent(const KeyEvent &key_event)
Definition shape.cc:38
rime::ShapeProcessor::ShapeProcessor
ShapeProcessor(const Ticket &ticket)
Definition shape.h:24
rime::KeyEvent
Definition key_event.h:17
rime::Processor::Processor
Processor(const Ticket &ticket)
Definition processor.h:26
rime::Ticket
Definition ticket.h:17