gatb.core-API-0.0.0
CollectionCacheSorted< Item > Class Template Reference

Cache implementation of the Collection interface. More...

#include <CollectionCache.hpp>

Inheritance diagram for CollectionCacheSorted< Item >:
Inheritance graph

Public Member Functions

 CollectionCacheSorted (Collection< Item > &ref, size_t cacheSize, size_t sharedCacheSize, system::ISynchronizer *synchro, system::ISynchronizer *outsynchro, Item *sharedBuffer, size_t *idxShared)
 
virtual ~CollectionCacheSorted ()
 
void remove ()
 
Collection< Item > & getRef ()
 
- Public Member Functions inherited from CollectionAbstract< Item >
 CollectionAbstract (Bag< Item > *bag, Iterable< Item > *iterable)
 
virtual ~CollectionAbstract ()
 
Bag< Item > * bag ()
 
Iterable< Item > * iterable ()
 
dp::Iterator< Item > * iterator ()
 
int64_t getNbItems ()
 
int64_t estimateNbItems ()
 
Item * getItems (Item *&buffer)
 
size_t getItems (Item *&buffer, size_t start, size_t nb)
 
void insert (const Item &item)
 
void insert (const std::vector< Item > &items, size_t length)
 
void insert (const Item *items, size_t length)
 
void flush ()
 
void addProperty (const std::string &key, const std::string value)
 
void addProperty (const std::string &key, const char *format...)
 
std::string getProperty (const std::string &key)
 
- Public Member Functions inherited from Collection< Item >
virtual ~Collection ()
 
virtual void addProperty (const std::string &key, const char *format,...)=0
 
- Public Member Functions inherited from ISmartPointer
virtual ~ISmartPointer ()
 
- Public Member Functions inherited from Iterable< Item >
template<typename Functor >
void iterate (Functor f)
 
- 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<class Item>
class gatb::core::tools::collections::impl::CollectionCacheSorted< Item >

Cache implementation of the Collection interface.

This implementations is like CollectionCache. The difference is that the items are first sorted before inserting them into the delegate Collection instance.

Remark : maybe could be inherited from CollectionCache ?

Constructor & Destructor Documentation

CollectionCacheSorted ( Collection< Item > &  ref,
size_t  cacheSize,
size_t  sharedCacheSize,
system::ISynchronizer synchro,
system::ISynchronizer outsynchro,
Item *  sharedBuffer,
size_t *  idxShared 
)
inline

Constructor.

virtual ~CollectionCacheSorted ( )
inlinevirtual

Destructor.

Member Function Documentation

Collection<Item>& getRef ( )
inline

Accessor to the delegate Collection.

Returns
the delegate Collection instance.
void remove ( )
inlinevirtual

Remove physically the collection.

Implements Collection< Item >.


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