libquentier  0.4.0
The library for rich desktop clients of Evernote service
Public Member Functions | List of all members
quentier::LimitedStack< T > Class Template Reference

The LimitedStack template class implements a stack which may have a limitation for its size; when the size becomes too much according to the limit, the bottom element of the stack gets erased from it. Only limits greater than zero are considered. More...

#include <LimitedStack.h>

Inheritance diagram for quentier::LimitedStack< T >:
Inheritance graph
[legend]
Collaboration diagram for quentier::LimitedStack< T >:
Collaboration graph
[legend]

Public Member Functions

 LimitedStack (void(*deleter)(T &)=Q_NULLPTR)
 
 LimitedStack (const LimitedStack< T > &other)
 
 LimitedStack (LimitedStack< T > &&other)
 
LimitedStack< T > & operator= (const LimitedStack< T > &other)
 
LimitedStack< T > & operator= (LimitedStack< T > &&other)
 
void swap (const LimitedStack< T > &other)
 
int limit () const
 
void setLimit (const int limit)
 
void push (const T &t)
 

Detailed Description

template<class T>
class quentier::LimitedStack< T >

The LimitedStack template class implements a stack which may have a limitation for its size; when the size becomes too much according to the limit, the bottom element of the stack gets erased from it. Only limits greater than zero are considered.