#include <b2FreeList.h>
Public Member Functions | |
| b2FreeList () | |
| Construct the free list. | |
| ~b2FreeList () | |
| Destroy the free list. | |
| b2IntrusiveListNode * | Allocate () |
| Allocate an item from the freelist. | |
| void | Free (b2IntrusiveListNode *node) |
| Free an item from the freelist. | |
| void | AddToFreeList (b2IntrusiveListNode *node) |
| void | RemoveAll () |
| Remove all items (allocated and free) from the freelist. | |
| const b2IntrusiveListNode & | GetAllocatedList () const |
| Get the list which tracks allocated items. | |
| const b2IntrusiveListNode & | GetFreeList () const |
| Get the list which tracks free items. | |
Protected Attributes | |
| b2IntrusiveListNode | m_allocated |
| List of allocated items. | |
| b2IntrusiveListNode | m_free |
| List of free items. | |
Fast - O(1) - list based allocator for items that can be inserted into b2IntrusiveListNode lists.
| void b2FreeList::AddToFreeList | ( | b2IntrusiveListNode * | node | ) |
Add an item to the freelist so that it can be allocated using b2FreeList::Allocate().