version 3.3

VRS::LRUList< T > Class Template Reference

Class for managing objects in a least recently usage manner. More...

#include <vrs/container/lrulist.h>

Inheritance diagram for VRS::LRUList< T >:

VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

UINT size () const
 Returns the number of objects in the list.
bool isEmpty () const
 Returns if the list is empty.
bool contains (const T &obj) const
 Returns if the given object is contained in the list.
const T & front () const
const T & back () const
void pushFront (const T &obj)
void popBack ()
void clear ()
 Removes all elements from the list.
void erase (const T &obj)
 Removes the given element from the list (if it is contained).
 VRS_TYPEINFO (LRUList, VRS::SharedObj)


Detailed Description

template<typename T>
class VRS::LRUList< T >

Class for managing objects in a least recently usage manner.

Member Function Documentation

template<typename T>
UINT VRS::LRUList< T >::size (  )  const

Returns the number of objects in the list.

template<typename T>
bool VRS::LRUList< T >::isEmpty (  )  const

Returns if the list is empty.

template<typename T>
bool VRS::LRUList< T >::contains ( const T &  obj  )  const

Returns if the given object is contained in the list.

template<typename T>
const T& VRS::LRUList< T >::front (  )  const

Returns the first element in the list (the element that has been used most recently).

template<typename T>
const T& VRS::LRUList< T >::back (  )  const

Returns the last element in the list (the element that has not been used for the longest time of all elements in the lru list).

template<typename T>
void VRS::LRUList< T >::pushFront ( const T &  obj  ) 

Pushes the given element to the front of the list; adding it to the list if the list does not contain it (meaning using the element).

template<typename T>
void VRS::LRUList< T >::popBack (  ) 

Removes the element from the list that has not been used for the longest time of all contained elements.

template<typename T>
void VRS::LRUList< T >::clear (  ) 

Removes all elements from the list.

template<typename T>
void VRS::LRUList< T >::erase ( const T &  obj  ) 

Removes the given element from the list (if it is contained).

template<typename T>
VRS::LRUList< T >::VRS_TYPEINFO ( LRUList< T >  ,
VRS::SharedObj   
)


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

Generated on Mon May 21 06:00:16 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact