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

Implementation of the Bag interface with a HDF5 file. More...

#include <CollectionHDF5.hpp>

Inheritance diagram for BagHDF5< Item >:
Inheritance graph

Public Member Functions

 BagHDF5 (hid_t datasetId, hid_t typeId, u_int64_t &nbItems, system::ISynchronizer *synchro)
 
void insert (const Item &item)
 
void insert (const std::vector< Item > &items, size_t length=0)
 
void insert (const Item *items, size_t length)
 
void flush ()
 
- 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<class Item>
class gatb::core::tools::storage::impl::BagHDF5< Item >

Implementation of the Bag interface with a HDF5 file.

This implementation writes Item objects in a HDF5 file.

Constructor & Destructor Documentation

BagHDF5 ( hid_t  datasetId,
hid_t  typeId,
u_int64_t &  nbItems,
system::ISynchronizer synchro 
)
inline

Constructor.

Parameters
[in]datasetId: HDF5 identifier of the dataset acting as a Bag.
[in]typeId: HDF5 type identifier for the Item type
[in]nbItems: number of items
[in]synchro: used to serialize concurrent read/write HDF5 operations.

Member Function Documentation

void flush ( )
inlinevirtual

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

Implements Bag< Item >.

void insert ( const Item &  item)
inlinevirtual

Insert an item into the bag.

Parameters
[in]item: the item to be inserted.

Implements Bag< Item >.

void insert ( const std::vector< Item > &  items,
size_t  length = 0 
)
inlinevirtual

Insert items into the bag.

Parameters
[in]items: items to be inserted.
[in]length: the number of items to be inserted. If 0 (default value), all the items of the vector are inserted.

Reimplemented from Bag< Item >.

void insert ( const Item *  items,
size_t  length 
)
inlinevirtual

Insert items into the bag.

Parameters
[in]items: items to be inserted.
[in]length: number of items to be inserted.

Reimplemented from Bag< Item >.


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