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

Class that add some features to the Collection interface. More...

#include <Storage.hpp>

Inheritance diagram for CollectionNode< Item >:
Inheritance graph

Public Member Functions

 CollectionNode (StorageFactory *factory, ICell *parent, const std::string &id, collections::Collection< Item > *ref)
 
virtual ~CollectionNode ()
 
void remove ()
 
void addProperty (const std::string &key, const std::string value)
 
std::string getProperty (const std::string &key)
 
collections::Collection< Item > * getRef ()
 
- Public Member Functions inherited from Cell
 Cell (ICell *parent, const std::string &id)
 
 ~Cell ()
 
ICellgetParent () const
 
const std::string & getId () const
 
std::string getFullId (char sep='.') const
 
void setCompressLevel (int level)
 
int getCompressLevel () const
 
- Public Member Functions inherited from ICell
virtual ~ICell ()
 
- Public Member Functions inherited from ISmartPointer
virtual ~ISmartPointer ()
 
- Public Member Functions inherited from SmartPointer
void use ()
 
void forget ()
 
- 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 char *format...)
 
- 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 Iterable< Item >
template<typename Functor >
void iterate (Functor f)
 

Additional Inherited Members

- Static Public Member Functions inherited from ICell
static ICellgetRoot (ICell *cell)
 
- Protected Member Functions inherited from SmartPointer
 SmartPointer ()
 
virtual ~SmartPointer ()
 

Detailed Description

template<class Item>
class gatb::core::tools::storage::impl::CollectionNode< Item >

Class that add some features to the Collection interface.

The CollectionNode has two aspects:

  • this is a Collection
  • this is a Node

The idea was not to have a Collection interface extending the INode interface => we introduce the CollectionNode for this.

Constructor & Destructor Documentation

CollectionNode ( StorageFactory factory,
ICell parent,
const std::string &  id,
collections::Collection< Item > *  ref 
)

Constructor. The idea is to use a referred collection for:

  • its bag part
  • its iterable part
  • its remove part
    Parameters
    [in]factory: factory to be used
    [in]parent: parent node
    [in]id: identifier of the collection to be created
    [in]ref: referred collection.
virtual ~CollectionNode ( )
virtual

Destructor.

Member Function Documentation

void addProperty ( const std::string &  key,
const std::string  value 
)
virtual

Reimplemented from CollectionAbstract< Item >.

std::string getProperty ( const std::string &  key)
virtual

Reimplemented from CollectionAbstract< Item >.

collections::Collection<Item>* getRef ( )

Get a pointer to the delegate Collection instance

Returns
the delegate instance.
void remove ( )
virtual

Physically remove the node.

Implements Collection< Item >.


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