nl::Weave::System::ObjectPool

#include <src/system/SystemObject.h>

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

Tóm tắt

Thông tin chi tiết
Thông số mẫu
T
một lớp con của Object (Đối tượng) sẽ được phân bổ từ đấu trường.
N
số nguyên dương các đối tượng của lớp T để phân bổ từ đấu trường.

Hàm tĩnh công khai

Size(void)
size_t
Returns the number of objects that can be simultaneously retained from a pool.

Hàm công khai

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.

Hàm tĩnh công khai

Kích thước

size_t Size(
  void
)

Returns the number of objects that can be simultaneously retained from a pool.

Hàm công khai

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.