LiquidFun
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Protected Attributes | List of all members
b2FreeList Class Reference

#include <b2FreeList.h>

Public Member Functions

 b2FreeList ()
 Construct the free list.
 
 ~b2FreeList ()
 Destroy the free list.
 
b2IntrusiveListNodeAllocate ()
 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 b2IntrusiveListNodeGetAllocatedList () const
 Get the list which tracks allocated items.
 
const b2IntrusiveListNodeGetFreeList () const
 Get the list which tracks free items.
 

Protected Attributes

b2IntrusiveListNode m_allocated
 List of allocated items.
 
b2IntrusiveListNode m_free
 List of free items.
 

Detailed Description

Fast - O(1) - list based allocator for items that can be inserted into b2IntrusiveListNode lists.

Member Function Documentation

void b2FreeList::AddToFreeList ( b2IntrusiveListNode node)

Add an item to the freelist so that it can be allocated using b2FreeList::Allocate().


The documentation for this class was generated from the following files: