nl::Weave::System::ObjectPool

#include <src/system/SystemObject.h>

A class template used for allocating Object subclass objects from an ObjectArena<> template union.

摘要

具体说明
模板参数
T
要从 Area 分配的 Object 的子类。
N
要从 arena 中分配的 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.

公共函数

获取

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.