YSTest
PreAlpha_b400_20130424
The YSLib Test Project
|
消息队列。 更多...
#include <ymsg.h>
Public 类型 | |
typedef size_type | SizeType |
typedef const_iterator | Iterator |
迭代器。 | |
Public 成员函数 | |
MessageQueue ()=default | |
无参数构造:默认实现。 | |
~MessageQueue () | |
bool | IsEmpty () const ynothrow |
判断消息队列是否为空。 | |
SizeType | GetSize () const ynothrow |
取队列中消息容量。 | |
Iterator | GetBegin () const ynothrow |
取队列起始迭代器。 | |
Iterator | GetEnd () const ynothrow |
取队列终止迭代器。 | |
Priority | GetMaxPriority () const ynothrow |
取消息队列中消息的最大优先级。 | |
void | Clear () |
清除消息队列。 | |
bool | Erase (Iterator i) |
从队列中删除迭代器指定的消息。、 | |
void | Merge (MessageQueue &) |
合并消息队列:移动指定消息队列中的所有消息至此消息队列中。 | |
void | Peek (Message &msg) const |
从消息队列中取优先级最高的消息存至 msg 中。 | |
void | Pop () |
丢弃消息队列中优先级最高的消息。 | |
void | Push (const Message &msg, Priority prior) |
若消息有效,以指定优先级插入至消息队列中。 | |
void | Push (const Message &&msg, Priority prior) |
若消息有效,以指定优先级插入至消息队列中。 | |
void | Remove (Priority) |
移除不大于指定优先级的消息。 | |
额外继承的成员函数 | |
![]() | |
noncopyable (const noncopyable &)=delete | |
禁止复制构造。 | |
noncopyable & | operator= (const noncopyable &)=delete |
禁止赋值复制。 | |
noncopyable ()=default | |
protected 构造:默认实现。 | |
~noncopyable ()=default | |
protected 析构:默认实现。 | |
typedef const_iterator YSLib::Messaging::MessageQueue::Iterator |
typedef size_type YSLib::Messaging::MessageQueue::SizeType |
|
inlinedefault |
无参数构造:默认实现。
|
inline |
|
inline |
|
inline |
|
inline |
void MessageQueue::Merge | ( | MessageQueue & | mq | ) |
|
inline |
|
inline |
void MessageQueue::Remove | ( | Priority | p | ) |