nl::Weave::System::ObjectPool

#include <src/system/SystemObject.h>

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

요약

세부정보
템플릿 매개변수
T
영역에서 할당할 Object의 서브클래스.
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.

공개 함수

가져오기

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.