MIRA
Public Member Functions | Public Attributes | Protected Attributes | List of all members
StripedStorageBase Class Reference

#include <database/StripedStorage.h>

Inheritance diagram for StripedStorageBase:
Inheritance graph
[legend]

Public Member Functions

 StripedStorageBase ()
 
 StripedStorageBase (std::string baseName, std::string extension, uint32 maxFiles)
 Create a striped storage providing a base file name and the maximum number of files. More...
 
 StripedStorageBase (const Path &directory, std::string baseName, std::string extension, uint32 maxFiles)
 Create a striped storage providing a path, a base file name and the maximum number of files. More...
 
void setFilePath (const Path &path)
 Resolves path and assigns to filePath. More...
 
const PathgetFilePath ()
 
Path generateFilename (uint32 fileNr) const
 Returns the filename (including path) of the file with the specified nr. More...
 
std::list< PathgetFiles () const
 Returns a list of filenames (including paths) for all files that are used for persistent storage. More...
 
void deleteAllFiles ()
 Delete all files that were stored by the persistent storage. More...
 

Public Attributes

std::string fileNameBase
 The base filename. More...
 
std::string extension
 The file name extension. More...
 
uint32 maxFiles
 Maximum number of used files. More...
 

Protected Attributes

Path filePath
 The path where the files are stored. More...
 
uint32 mCurrentFileIdx
 

Constructor & Destructor Documentation

◆ StripedStorageBase() [1/3]

StripedStorageBase ( )
inline

◆ StripedStorageBase() [2/3]

StripedStorageBase ( std::string  baseName,
std::string  extension,
uint32  maxFiles 
)
inline

Create a striped storage providing a base file name and the maximum number of files.

◆ StripedStorageBase() [3/3]

StripedStorageBase ( const Path directory,
std::string  baseName,
std::string  extension,
uint32  maxFiles 
)
inline

Create a striped storage providing a path, a base file name and the maximum number of files.

Member Function Documentation

◆ setFilePath()

void setFilePath ( const Path path)
inline

Resolves path and assigns to filePath.

◆ getFilePath()

const Path& getFilePath ( )
inline

◆ generateFilename()

Path generateFilename ( uint32  fileNr) const
inline

Returns the filename (including path) of the file with the specified nr.

◆ getFiles()

std::list<Path> getFiles ( ) const
inline

Returns a list of filenames (including paths) for all files that are used for persistent storage.

◆ deleteAllFiles()

void deleteAllFiles ( )
inline

Delete all files that were stored by the persistent storage.

Member Data Documentation

◆ fileNameBase

std::string fileNameBase

The base filename.

◆ extension

std::string extension

The file name extension.

◆ maxFiles

uint32 maxFiles

Maximum number of used files.

◆ filePath

Path filePath
protected

The path where the files are stored.

◆ mCurrentFileIdx

uint32 mCurrentFileIdx
protected

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