使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
nl::Weave::System::ObjectPool
#include <src/system/SystemObject.h>
A class template used for allocating Object subclass objects from an ObjectArena<> template union.
摘要
| 详细信息 |
| 模板参数 |
T
|
|
N
|
要从竞技场分配的 T 类(正整数)对象数。
|
|
公共静态函数
|
Size(void)
|
size_t
Returns the number of objects that can be simultaneously retained from a pool.
|
公共函数
|
Get(const Layer & aLayer, size_t aIndex)
|
T *
Returns a pointer the object at \c aIndex or \c NULL if the object is not retained by \c aLayer.
|
GetStatistics(nl::Weave::System::Stats::count_t & aNumInUse, nl::Weave::System::Stats::count_t & aHighWatermark)
|
void
|
TryCreate(Layer & aLayer)
|
T *
Tries to initially retain the first object in the pool that is not retained by any layer.
|
公共静态函数
大小
size_t Size(
void
)
Returns the number of objects that can be simultaneously retained from a pool.
公共函数
Get
T * Get(
const Layer & aLayer,
size_t aIndex
)
Returns a pointer the object at \c aIndex or \c NULL if the object is not retained by \c aLayer.
GetStatistics
void GetStatistics(
nl::Weave::System::Stats::count_t & aNumInUse,
nl::Weave::System::Stats::count_t & aHighWatermark
)
TryCreate
T * TryCreate(
Layer & aLayer
)
Tries to initially retain the first object in the pool that is not retained by any layer.
如未另行说明,则本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。如需了解详情,请参阅 Google Developers 网站政策。Java 是 Oracle 和/或其关联公司的注册商标。OPENTHREAD 和相关标记是 Thread Group 的商标,经许可后使用。
最后更新时间 (UTC):2025-07-24。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-07-24。"],[],[]]