gatb.core-API-0.0.0
|
Define a set of Collection instances having the same type. More...
#include <Storage.hpp>
Public Member Functions | |
Partition (StorageFactory *factory, ICell *parent, const std::string &id, size_t nbCollections) | |
~Partition () | |
size_t | size () const |
collections::Collection< Type > & | operator[] (size_t idx) |
dp::Iterator< Type > * | iterator () |
int64_t | getNbItems () |
int64_t | estimateNbItems () |
u_int64_t | getSizeItems () |
void | flush () |
void | remove () |
Public Member Functions inherited from Group | |
Group (StorageFactory *factory, ICell *parent, const std::string &name) | |
~Group () | |
Group & | getGroup (const std::string &name) |
template<class Type > | |
Partition< Type > & | getPartition (const std::string &name, size_t nb=0) |
template<class Type > | |
CollectionNode< Type > & | getCollection (const std::string &name) |
virtual void | addProperty (const std::string &key, const std::string value) |
virtual std::string | getProperty (const std::string &key) |
Public Member Functions inherited from Cell | |
Cell (ICell *parent, const std::string &id) | |
~Cell () | |
ICell * | getParent () 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 Iterable< Type > | |
void | iterate (Functor f) |
virtual Type * | getItems (Type *&buffer) |
virtual size_t | getItems (Type *&buffer, size_t start, size_t nb) |
Additional Inherited Members | |
Static Public Member Functions inherited from ICell | |
static ICell * | getRoot (ICell *cell) |
Protected Member Functions inherited from SmartPointer | |
SmartPointer () | |
virtual | ~SmartPointer () |
Define a set of Collection instances having the same type.
The Partition class groups several Collections that share the same kind of items.
It is defined as a subclass of Group.
Partition | ( | StorageFactory * | factory, |
ICell * | parent, | ||
const std::string & | id, | ||
size_t | nbCollections | ||
) |
Constructor.
[in] | factory | : factory to be used |
[in] | parent | : the parent node |
[in] | id | : the identifier of the instance to be created |
[in] | nbCollections | : number of collections for this partition |
~Partition | ( | ) |
Destructor.
|
virtual |
Return the (approximate) number of items. If a specific implementation doesn't know the value, it should return -1 by convention.
Implements Iterable< Type >.
void flush | ( | ) |
Flush the whole partition (ie flush each collection).
|
virtual |
Return the number of items. If a specific implementation doesn't know the value, it should return -1 by convention.
Implements Iterable< Type >.
u_int64_t getSizeItems | ( | ) |
Return the sum of the items size.
|
virtual |
Create an iterator for the given Iterable instance.
Implements Iterable< Type >.
collections::Collection<Type>& operator[] | ( | size_t | idx | ) |
Get the ith collection
[in] | idx | : index of the collection to be retrieved |
|
virtual |
Remove physically the partition (ie. remove each collection).
Reimplemented from Group.
size_t size | ( | ) | const |
Return the number of collections for this partition.