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

Bag implementation for file. More...

#include <BagFile.hpp>

Inheritance diagram for BagFile< Item >:
Inheritance graph

Public Member Functions

 BagFile (const std::string &filename)
 
 ~BagFile ()
 
const std::string & getName () const
 
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 ()
 
- 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::BagFile< Item >

Bag implementation for file.

Constructor & Destructor Documentation

BagFile ( const std::string &  filename)
inline

Constructor.

~BagFile ( )
inline

Destructor.

Member Function Documentation

void flush ( )
inlinevirtual

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

Implements Bag< Item >.

const std::string& getName ( ) const
inline

Get the name of the file.

Returns
the file name.
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 
)
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: