librime: messenger.h Source File

| librime 1.2 Rime Input Method Engine, the core library

messenger.h
Go to the documentation of this file.
1//
2// Copyright RIME Developers
3// Distributed under the BSD License
4//
5// 2012-12-16 GONG Chen <chen.sst@gmail.com>
6//
7#ifndef RIME_MESSENGER_H_
8#define RIME_MESSENGER_H_
9
10#include <rime/common.h>
11
12namespace rime {
13
14 class Messenger {
15 public:
16 using MessageSink =
17 signal<void(const string& message_type, const string& message_value)>;
18
19 MessageSink& message_sink() { return message_sink_; }
20
21 protected:
22 MessageSink message_sink_;
23};
24
25} // namespace rime
26
27#endif // RIME_MESSENGER_H_
common.h
rime
Definition algebra.cc:12
rime::Messenger
Definition messenger.h:14
rime::Messenger::message_sink_
MessageSink message_sink_
Definition messenger.h:22
rime::Messenger::message_sink
MessageSink & message_sink()
Definition messenger.h:19
rime::Messenger::MessageSink
signal< void(const string &message_type, const string &message_value)> MessageSink
Definition messenger.h:16