28 #ifndef YSL_INC_Core_ymsg_h_
29 #define YSL_INC_Core_ymsg_h_ 1
32 #include YFM_YSLib_Core_YObject
33 #include YFM_YSLib_Adaptor_YContainer
68 friend class MessageQueue;
92 :
id(m), content(std::move(vo))
113 ImplRet(content = std::move(c), *this)
118 PDefHOp(Message&, =, Message msg)
ynothrow
133 operator==(const Message&, const Message&);
150 swap(Message&) ynothrow;
157 inline DefSwap(ynothrow, Message)
167 private multimap<
Priority, Message, std::greater<Priority>>
171 using BaseType = multimap<Priority, Message, std::greater<Priority>>;
177 using BaseType::iterator;
178 using BaseType::const_iterator;
192 DefGetter(
const ynothrow, Priority, MaxPriority,
193 empty() ? 0 : begin()->
first)
199 Merge(MessageQueue&);
207 Peek(Message&)
const;
221 Push(
const Message&, Priority);
227 Push(Message&&, Priority);
238 using BaseType::begin;
240 using BaseType::cbegin;
242 using BaseType::cend;
244 using BaseType::clear;
246 using BaseType::crbegin;
248 using BaseType::crend;
250 using BaseType::empty;
254 using BaseType::erase;
256 using BaseType::insert;
258 using BaseType::max_size;
260 using BaseType::rbegin;
262 using BaseType::rend;
264 using BaseType::size;
298 using Messaging::Message;
#define DefDeDtor(_t)
定义默认析构函数。
static auto first(const _tIterator &i) -> decltype((i->first))
MessageException(const std::string &msg="")
#define DefDeCopyCtor(_t)
enum MessageSpace{Null=0x0000, Set=0x0003, Quit=0x0012, Bound=0x0014, Task=0x0016, Paint=0x00AF, Input=0x00FF} MessageID
MessageSignal(const std::string &msg="")
#define DefGetter(_q, _t, _n,...)
Message(ID msg_id=0)
构造:使用消息标识和空消息内容。
void swap(any &x, any &y)
交换对象。
不可复制对象:禁止派生类调用默认原型的复制构造函数和复制赋值操作符。
#define DefDeMoveCtor(_t)
#define ynothrow
YSLib 无异常抛出保证:若支持 noexcept 关键字, 指定特定的 noexcept 异常规范。
GSStringTemplate< char >::basic_string string
Message(ID m, ValueObject &&vo) ynothrow
yconstexpr Priority NormalPriority(0x80)
默认消息优先级。
#define yconstexpr
指定编译时常量表达式。
#define DefCvt(_q, _t,...)