BagCacheSorted< Item > Class Template Reference

Bag implementation as a cache to a referred Bag instance. More...

#include <BagCache.hpp>

Inheritance diagram for BagCacheSorted< Item >:
Inheritance graph

Public Member Functions

 BagCacheSorted (Bag< Item > *ref, size_t cacheSize, system::ISynchronizer *synchro=0)
void insert (const Item &item)
void flush ()
- Public Member Functions inherited from BagCache< Item >
 BagCache ()
 BagCache (Bag< Item > *ref, size_t cacheSize, system::ISynchronizer *synchro=0)
virtual ~BagCache ()
- Public Member Functions inherited from Bag< Item >
virtual void insert (const std::vector< Item > &items, size_t length=0)
virtual void insert (const Item *items, size_t length)
- Public Member Functions inherited from ISmartPointer
virtual ~ISmartPointer ()
- Public Member Functions inherited from SmartPointer
void use ()
void forget ()

Additional Inherited Members

- Protected Member Functions inherited from SmartPointer
 SmartPointer ()
virtual ~SmartPointer ()

Detailed Description

template<typename Item>
class gatb::core::tools::collections::impl::BagCacheSorted< Item >

Bag implementation as a cache to a referred Bag instance.

The cache is sorted before sent to the reference

Constructor & Destructor Documentation

BagCacheSorted ( Bag< Item > *  ref,
size_t  cacheSize,
system::ISynchronizer synchro = 0 


Member Function Documentation

void flush ( )

Flush the current content. May be useful for implementation that uses a cache.

Reimplemented from BagCache< Item >.

void insert ( const Item &  item)

Insert an item into the bag.

[in]item: the item to be inserted.

Reimplemented from BagCache< Item >.

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