22#include <kiwano/2d/Actor.h>
23#include <kiwano/render/TextLayout.h>
37 void PushBack(
const T& val)
40 Reserve(Capacity() * 2);
50 const T& Front()
const
52 return buffer_[front_];
57 return buffer_[front_];
62 return buffer_[ClampCursor(rear_, 1)];
67 return buffer_[ClampCursor(rear_, 1)];
70 bool IsEmpty()
const noexcept
72 return front_ = rear_;
75 bool IsFull()
const noexcept
77 return front_ == (rear_ + 1) % Capacity();
82 return ClampCursor(rear_, front_);
85 size_t Capacity()
const
87 return buffer_.size();
90 void Reserve(
size_t capacity)
92 buffer_.resize(capacity);
100 front_ = (front_ + 1) % Capacity();
105 rear_ = (rear_ + 1) % Capacity();
108 size_t ClampCursor(
size_t cursor,
size_t off)
const
110 return (cursor + Capacity() - off) % Capacity();
137 void OnUpdate(
Duration dt)
override;
143 std::locale comma_locale_;
调试节点
Definition: DebugActor.h:129
引用计数智能指针
Definition: RefBasePtr.hpp:35
渲染上下文
Definition: RenderContext.h:62
Definition: DebugActor.h:30
文本布局
Definition: TextLayout.h:37
文本样式
Definition: TextStyle.h:51
时间段
Definition: Duration.h:48