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)
 
size_t InsertItem (std::unique_ptr< CYIStreamedItem > pItem, size_t position)
 
void RemoveItem (size_t position)
 
void DeleteItem (size_t position)
 
void Empty (bool deleteItemsLater=false)
 
CYIStreamedItemGetItem (size_t position)
 
CYIStreamedItemGetFirst ()
 
CYIStreamedItemGetLast ()
 
size_t Count ()
 
void SetRangeWidth (float range)
 
float GetRangeWidth () const
 
void SetMaxStreamedItems (uint32_t maxItemCount)
 
uint32_t GetMaxStreamedItems () const
 
virtual void CenterAt (float position)
 

Protected Attributes

CYIStreamerPriv * m_pPriv
 

Constructor & Destructor Documentation

◆ CYIStreamer()

yi::deprecated::CYIStreamer::CYIStreamer ( )

◆ ~CYIStreamer()

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

Member Function Documentation

◆ AddItem()

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

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

◆ CenterAt()

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

Centers the stream at the given position.

◆ Count()

size_t yi::deprecated::CYIStreamer::Count ( )

Returns the number of items in the stream.

◆ DeleteItem()

void yi::deprecated::CYIStreamer::DeleteItem ( size_t  position)

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

◆ Empty()

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

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

◆ GetFirst()

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

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

◆ GetItem()

CYIStreamedItem* yi::deprecated::CYIStreamer::GetItem ( size_t  position)

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

◆ GetLast()

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

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

◆ GetMaxStreamedItems()

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

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

◆ GetRangeWidth()

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

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

◆ InsertItem()

size_t yi::deprecated::CYIStreamer::InsertItem ( std::unique_ptr< CYIStreamedItem pItem,
size_t  position 
)

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

◆ RemoveItem()

void yi::deprecated::CYIStreamer::RemoveItem ( size_t  position)

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

◆ SetMaxStreamedItems()

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

Sets the maxItemCount 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.

◆ SetRangeWidth()

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

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

◆ m_pPriv

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

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