gatb.core-API-1.4.2
StorageFileFactory Class Reference

Factory used for storage of kind STORAGE_FILE. More...

#include <StorageFile.hpp>

Static Public Member Functions

static StoragecreateStorage (const std::string &name, bool deleteIfExist, bool autoRemove)
 
static bool exists (const std::string &name)
 
static GroupcreateGroup (ICell *parent, const std::string &name)
 
template<typename Type >
static Partition< Type > * createPartition (ICell *parent, const std::string &name, size_t nb)
 
template<typename Type >
static CollectionNode< Type > * createCollection (ICell *parent, const std::string &name, system::ISynchronizer *synchro)
 

Detailed Description

Factory used for storage of kind STORAGE_FILE.

Member Function Documentation

static CollectionNode<Type>* createCollection ( ICell parent,
const std::string &  name,
system::ISynchronizer synchro 
)
inlinestatic

Create a Collection instance and attach it to a cell in a storage.

Parameters
[in]parent: parent of the collection to be created
[in]name: name of the collection to be created
[in]synchro: synchronizer instance if needed
Returns
the created Collection instance.
static Group* createGroup ( ICell parent,
const std::string &  name 
)
inlinestatic

Create a Group instance and attach it to a cell in a storage.

Parameters
[in]parent: parent of the group to be created
[in]name: name of the group to be created
Returns
the created Group instance.
static Partition<Type>* createPartition ( ICell parent,
const std::string &  name,
size_t  nb 
)
inlinestatic

Create a Partition instance and attach it to a cell in a storage.

Parameters
[in]parent: parent of the partition to be created
[in]name: name of the partition to be created
[in]nb: number of collections of the partition
Returns
the created Partition instance.
static Storage* createStorage ( const std::string &  name,
bool  deleteIfExist,
bool  autoRemove 
)
inlinestatic

Create a Storage instance.

Parameters
[in]name: name of the instance to be created
[in]deleteIfExist: if the storage exits in file system, delete it if true.
[in]autoRemove: auto delete the storage from file system during Storage destructor.
Returns
the created Storage instance
static bool exists ( const std::string &  name)
inlinestatic

Tells whether or not a Storage exists in file system given a name

Parameters
[in]name: name of the storage to be checked
Returns
true if the storage exists in file system, false otherwise.

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