Panda3D
|
Public Member Functions | |
def | __init__ |
def | __repr__ |
def | add |
def | checkin |
def | checkout |
def | cleanup |
def | getNumItems |
def | hasFree |
def | isFree |
def | isUsed |
def | remove |
def | reset |
Static Public Attributes | |
tuple | notify = DirectNotifyGlobal.directNotify.newCategory("Pool") |
def __init__ | ( | self, | |
free = None |
|||
) |
def __repr__ | ( | self | ) |
def add | ( | self, | |
item | |||
) |
Add an item to the free list.
def checkin | ( | self, | |
item | |||
) |
Put back a checked out item. Error if the item is not checked out.
def checkout | ( | self | ) |
Get an arbitrary item from the pool.
def cleanup | ( | self, | |
cleanupFunc = None |
|||
) |
Completely cleanup the pool and all of its objects. cleanupFunc will be called on every free and used item.
def getNumItems | ( | self | ) |
Returns the number of free items and the number of used items.
def hasFree | ( | self | ) |
Returns true if there is at least one free item.
def isFree | ( | self, | |
item | |||
) |
Returns true if this item is free for check out.
def isUsed | ( | self, | |
item | |||
) |
Returns true if this item has already been checked out.
def remove | ( | self, | |
item | |||
) |
Remove an item. Error is flagged if the item is not in the pool.
def reset | ( | self | ) |
Resets the pool so all items are free.
tuple notify = DirectNotifyGlobal.directNotify.newCategory("Pool") [static] |