17 #if !defined(ON_FSP_DEFS_INC_) 18 #define ON_FSP_DEFS_INC_ 33 size_t element_count_estimate,
34 size_t block_element_count
size_t SizeofElement() const
Definition: opennurbs_fsp_defs.h:41
T * FirstElement()
Get the first element when iterating through the list of elements.
Definition: opennurbs_fsp_defs.h:105
void Destroy()
Destroy the pool and free all the heap. The pool cannot be used again until Create() is called...
Definition: opennurbs_fsp_defs.h:65
T * AllocateElement()
Definition: opennurbs_fsp_defs.h:47
T * NextBlock(size_t *block_element_count)
Get the next block when iterating through the blocks.
Definition: opennurbs_fsp_defs.h:143
void * CurrentElement() const
void * FirstBlock(size_t *block_element_count)
Get a pointer to the first element in the first block.
ON_SimpleFixedSizePoolIterator(const class ON_SimpleFixedSizePool< T > &fsp)
Definition: opennurbs_fsp_defs.h:95
void * Element(size_t element_index) const
Get the i-th elment in the fixed size pool.
void * NextElement()
Get the next element when iterating through the list of elements. If FirstElement() is not called...
bool Create(size_t element_count_estimate, size_t block_element_count)
Create a fixed size memory pool.
Definition: opennurbs_fsp_defs.h:32
void * NextBlock(size_t *block_element_count)
Get the next block when iterating through the blocks.
size_t ActiveElementCount() const
Definition: opennurbs_fsp_defs.h:71
Definition: opennurbs_fsp.h:19
size_t ElementIndex(const void *element_pointer) const
Get the fixed size pool index of an element.
void ReturnElement(T *p)
Return an element to the pool.
Definition: opennurbs_fsp_defs.h:53
T * Element(size_t element_index) const
Get the i-th elment in the pool.
Definition: opennurbs_fsp_defs.h:83
size_t ActiveElementCount() const
void ReturnAll()
Return all allocated elements to the pool. No heap is freed and the pool remains initialized and read...
Definition: opennurbs_fsp_defs.h:59
void Destroy()
Destroy the pool and free all the heap. The pool cannot be used again until Create() is called...
Definition: opennurbs_fsp.h:411
Definition: opennurbs_fsp.h:548
~ON_SimpleFixedSizePool()
Definition: opennurbs_fsp_defs.h:26
size_t SizeofElement() const
void Reset()
Sets the state of the iterator to the initial state that exists after construction. This is useful if the iterator has been used the get one or more elements and then the referenced fixed size pool is modified or code wants to begin iteration again a used a call to NextElement() to return the first element.
void ReturnAll()
Return all allocated elements to the pool. No heap is freed and the pool remains initialized and read...
ON_SimpleFixedSizePool()
construction ////////////////////////////////////////////////////////
Definition: opennurbs_fsp_defs.h:21
size_t TotalElementCount() const
size_t TotalElementCount() const
Definition: opennurbs_fsp_defs.h:77
void * FirstElement()
Get the first element when iterating through the list of elements.
T * CurrentElement()
Definition: opennurbs_fsp_defs.h:124
size_t ElementIndex(T *) const
Definition: opennurbs_fsp_defs.h:89
void Reset()
Sets the state of the iterator to the initail state that exists after construction. This is useful if the iterator has been used the get one or more elements and then the referenced fixed size pool is modified or code wants to begin iteration again a used a call to NextElement() to return the first element.
Definition: opennurbs_fsp_defs.h:131
Definition: opennurbs_fsp.h:239
T * NextElement()
Get the next element when iterating through the list of elements. If FirstElement() is not called...
Definition: opennurbs_fsp_defs.h:118
bool Create(size_t sizeof_element, size_t element_count_estimate, size_t block_element_capacity)
Create a fixed size memory pool.
T * FirstBlock(size_t *block_element_count)
Get a pointer to the first element in the first block.
Definition: opennurbs_fsp_defs.h:137
void ReturnElement(void *p)
Return an element to the pool.