ForgeDocs
Documentation for the forge framework
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
Forge.Collections.BufferedItem< T > Class Template Reference

A set of items where only one is active and used. More...

Public Member Functions

 BufferedItem (int count=2)
 Initializes a new instance of the BufferedItem{T} class. More...
 
 BufferedItem (params T[] instances)
 Initializes a new instance of the BufferedItem{T} class. More...
 
Swap ()
 Swaps out the _currentKeyboardState item for the next one. More...
 
Get ()
 Gets the currently active item. More...
 
Get (int relativeOffset)
 Returns an item in the rotation queue that is relative to the current item by the given offset. More...
 

Detailed Description

A set of items where only one is active and used.

Template Parameters
TThe type of item stored.
Type Constraints
T :new() 

Constructor & Destructor Documentation

Forge.Collections.BufferedItem< T >.BufferedItem ( int  count = 2)

Initializes a new instance of the BufferedItem{T} class.

Parameters
countThe number of instances to allocate
Forge.Collections.BufferedItem< T >.BufferedItem ( params T[]  instances)

Initializes a new instance of the BufferedItem{T} class.

Parameters
instancesThe instances to swap between.

Member Function Documentation

T Forge.Collections.BufferedItem< T >.Get ( )

Gets the currently active item.

T Forge.Collections.BufferedItem< T >.Get ( int  relativeOffset)

Returns an item in the rotation queue that is relative to the current item by the given offset.

Parameters
relativeOffsetHow far away from the current item
Returns
T Forge.Collections.BufferedItem< T >.Swap ( )

Swaps out the _currentKeyboardState item for the next one.

Returns
The item that was deactivated

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