StrangeIoC  0.6.0
The IoC/Binding Framework for Unity3D and C#
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Public Member Functions | List of all members
strange.extensions.pool.impl.Pool< T > Class Template Reference
Inheritance diagram for strange.extensions.pool.impl.Pool< T >:
strange.extensions.pool.impl.Pool strange.extensions.pool.api.IPool< T > strange.extensions.pool.api.IPool strange.extensions.pool.api.IPoolable strange.extensions.pool.api.IPool strange.framework.api.IManagedList strange.framework.api.IManagedList

Public Member Functions

new T GetInstance ()
 Gets an instance from the pool if one is available. More...
 
- Public Member Functions inherited from strange.extensions.pool.impl.Pool
virtual IManagedList Add (object value)
 Add a value to this List.
 
virtual IManagedList Add (object[] list)
 Add a set of values to this List.
 
virtual IManagedList Remove (object value)
 Remove a value from this List.
 
virtual IManagedList Remove (object[] list)
 Remove a set of values from this List.
 
virtual void ReturnInstance (object value)
 Returns an instance to the pool. More...
 
virtual void Clean ()
 Remove all instance references from the Pool. More...
 
void Restore ()
 Clean up this instance for reuse. More...
 
void Retain ()
 Keep this instance from being returned to the pool More...
 
void Release ()
 Release this instance back to the pool. More...
 

Additional Inherited Members

- Protected Member Functions inherited from strange.extensions.pool.impl.Pool
virtual void removeInstance (object value)
 Permanently removes an instance from the Pool More...
 
void failIf (bool condition, string message, PoolExceptionType type)
 
- Protected Attributes inherited from strange.extensions.pool.impl.Pool
Stack instancesAvailable = new Stack ()
 Stack of instances still in the Pool.
 
HashSet< object > instancesInUse = new HashSet<object> ()
 A HashSet of the objects checked out of the Pool.
 
int _instanceCount
 
- Properties inherited from strange.extensions.pool.impl.Pool
IInstanceProvider instanceProvider [get, set]
 
virtual object value [get]
 
virtual bool uniqueValues [get, set]
 
virtual Enum constraint [get, set]
 
System.Type poolType [get, set]
 The object Type of the first object added to the pool. More...
 
int instanceCount [get]
 
virtual int available [get]
 
virtual int size [get, set]
 
virtual PoolOverflowBehavior overflowBehavior [get, set]
 
virtual PoolInflationType inflationType [get, set]
 
bool retain [get, set]
 
- Properties inherited from strange.extensions.pool.api.IPool
IInstanceProvider instanceProvider [get, set]
 A class that provides instances to the pool when it needs them. More...
 
Type poolType [get, set]
 The object Type of the first object added to the pool. More...
 
int available [get]
 Returns the count of non-committed instances More...
 
int size [get, set]
 Gets or sets the size of the pool. More...
 
int instanceCount [get]
 Returns the total number of instances currently managed by this pool. More...
 
PoolOverflowBehavior overflowBehavior [get, set]
 Gets or sets the overflow behavior of this pool. More...
 
PoolInflationType inflationType [get, set]
 Gets or sets the type of inflation for infinite-sized pools. More...
 

Member Function Documentation

new T strange.extensions.pool.impl.Pool< T >.GetInstance ( )
inline

Gets an instance from the pool if one is available.

Returns
The instance.

Implements strange.extensions.pool.api.IPool< T >.


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