Template used to describe storage of items. Mainly used for "undo" and "redo" operation. You may see example in TextArea and TextInput built-in controls of the framework.

If LimitCount is set to zero it means there is no limit by item count. If LimitSize is set to zero it means there is no limit by total items size.

You can find more information in comments below.

template<class Type>
class CHistory
    size_t getCount() const; // Stored item count 
    Type getItem(const size_t index); // Get item by index 
    size_t getLimitCount() const; // Get stored item count limit 
    size_t getLimitSize() const; // Get memory usage limit 
    size_t getPosition() const; // Return index of active item 
    size_t getSize() const; // Return stored items total size 

    bool setLimitCount(const size_t value); // Set stored item count limit(0 - unlimited) 
    bool setLimitSize(const size_t value); // Set memory usage limit(0 - unlimited) 
    bool setPosition(const size_t value); // Set active item index 


    bool Store(const Type item, const size_t size); // Add new item 
    void Clear(); // Clear all items 
Namespace: nitisa
Include: Nitisa/Core/History.h