3#include "libxr_def.hpp"
21template <
typename Derived,
typename Data>
34 return static_cast<Derived*
>(
this)->PushBytes(&item);
42 ErrorCode Pop(Data& item) {
return static_cast<Derived*
>(
this)->PopBytes(&item); }
48 ErrorCode Pop() {
return static_cast<Derived*
>(
this)->PopBytes(
nullptr); }
强类型队列的公共薄包装 / Common thin wrapper for typed queues.
ErrorCode Pop()
丢弃一个队头元素 / Discard one front element.
ErrorCode Push(const Data &item)
推入一个强类型元素 / Push one typed element.
ErrorCode Pop(Data &item)
弹出一个强类型元素 / Pop one typed element.
Data ValueType
队列元素类型 / Queue element type.
LibXR 命名空间 / LibXR namespace.
ErrorCode
定义错误码枚举 / Defines an enumeration for error codes