You.i Engine
yi::deprecated::CYIStreamer Class Reference

Detailed Description

This class provides a mechanism whereby items in a list can be removed and inserted back into the list automatically based on a numerical range or through a maximum number of items.

Deprecated:
This class has been deprecated and may be removed in a future release. The CYIStreamer class should be used instead.

#include <deprecated/YiStreamer.h>

Public Member Functions

 CYIStreamer ()
 
virtual ~CYIStreamer ()
 
void AddItem (std::unique_ptr< CYIStreamedItem > pItem)
 
int32_t InsertItem (std::unique_ptr< CYIStreamedItem > pItem, int32_t nPosition)
 
void RemoveItem (int32_t nPosition)
 
void DeleteItem (int32_t nPosition)
 
void Empty (bool bDeleteItemsLater=false)
 
CYIStreamedItemGetItem (int32_t nPosition)
 
CYIStreamedItemGetFirst ()
 
CYIStreamedItemGetLast ()
 
int32_t Count ()
 
void SetRangeWidth (float fRange)
 
float GetRangeWidth () const
 
void SetMaxStreamedItems (uint32_t uMaxItemCount)
 
uint32_t GetMaxStreamedItems () const
 
virtual void CenterAt (float fPosition)
 

Protected Attributes

CYIStreamerPriv * m_pPriv
 

Constructor & Destructor Documentation

yi::deprecated::CYIStreamer::CYIStreamer ( )
virtual yi::deprecated::CYIStreamer::~CYIStreamer ( )
virtual

Member Function Documentation

void yi::deprecated::CYIStreamer::AddItem ( std::unique_ptr< CYIStreamedItem pItem)

Adds an pItem to the streamer; pItem cannot be null.

virtual void yi::deprecated::CYIStreamer::CenterAt ( float  fPosition)
virtual

Centers the stream at the given fPosition.

int32_t yi::deprecated::CYIStreamer::Count ( )

Returns the number of items in the stream.

void yi::deprecated::CYIStreamer::DeleteItem ( int32_t  nPosition)

Deletes an item at the specified nPosition; the nPosition must be within a valid range [0 <= nPosition <= Count()].

void yi::deprecated::CYIStreamer::Empty ( bool  bDeleteItemsLater = false)

Empties the list of all items; the items being removed are deleted. If the bDeleteItemsLater is true, the a delete later event will be created and posted to the back of the event queue.

CYIStreamedItem* yi::deprecated::CYIStreamer::GetFirst ( )

Returns the first item in the list, or nullptr if there are no items.

CYIStreamedItem* yi::deprecated::CYIStreamer::GetItem ( int32_t  nPosition)

Returns the item at the specified nPosition; the nPosition must be within a valid range [0 <= nPosition <= Count()].

CYIStreamedItem* yi::deprecated::CYIStreamer::GetLast ( )

Returns the last item in the list, or nullptr if there are no items.

uint32_t yi::deprecated::CYIStreamer::GetMaxStreamedItems ( ) const

Returns the maximum number of items which can be streamed in before an item is unloaded.

float yi::deprecated::CYIStreamer::GetRangeWidth ( ) const

Returns the range width of the streamer; the value defaults to a range width of zero.

int32_t yi::deprecated::CYIStreamer::InsertItem ( std::unique_ptr< CYIStreamedItem pItem,
int32_t  nPosition 
)

Inserts an pItem in the streamer at the specified nPosition; pItem cannot be null, and the nPostion must a valid range [0 <= nPosition <= Count()].

void yi::deprecated::CYIStreamer::RemoveItem ( int32_t  nPosition)

Removes an item at the specified bPosition; the item will not be deleted, and the nPostion must be a valid range [0 <= nPosition <= Count()].

void yi::deprecated::CYIStreamer::SetMaxStreamedItems ( uint32_t  uMaxItemCount)

Sets the nMaxItemCount of items which can be streamed in before an item is unloaded. This allows for intuitive control over how many items can be cached; items which are currently visible will be unloaded last.

void yi::deprecated::CYIStreamer::SetRangeWidth ( float  fRange)

Sets a numerical range window for the streamer, if the sum of the item widths exceed the range, then one or more items will be unloaded; items which are currently visible will be unloaded last.

Member Data Documentation

CYIStreamerPriv* yi::deprecated::CYIStreamer::m_pPriv
protected

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