#include <LightApp_Driver.h>
Public Types | |
typedef std::vector< std::string > | ListOfFiles |
Public Member Functions | |
LightApp_Driver () | |
virtual | ~LightApp_Driver () |
virtual bool | SaveDatasInFile (const char *theFileName, bool isMultiFile) |
virtual bool | ReadDatasFromFile (const char *theFileName, bool isMultiFile) |
virtual std::string | GetTmpDir (const char *theURL, const bool isMultiFile) |
ListOfFiles | GetListOfFiles (const char *theModuleName) |
virtual void | SetListOfFiles (const char *theModuleName, const ListOfFiles theListOfFiles) |
virtual void | RemoveTemporaryFiles (const char *theModuleName, const bool IsDirDeleted) |
void | RemoveFiles (const ListOfFiles &theFiles, const bool IsDirDeleted) |
virtual void | ClearDriverContents () |
Protected Types | |
typedef std::map< std::string, ListOfFiles > | MapOfListOfFiles |
Protected Member Functions | |
void | PutFilesToStream (const std::string &theModuleName, unsigned char *&theBuffer, long &theBufferSize, bool theNamesOnly=false) |
ListOfFiles | PutStreamToFiles (const unsigned char *theBuffer, const long theBufferSize, bool theNamesOnly=false) |
std::string | GetTmpDir () |
std::string | GetDirFromPath (const std::string &thePath) |
void | SetIsTemporary (bool theFlag) |
bool | IsTemporary () const |
Protected Attributes | |
MapOfListOfFiles | myMap |
std::string | myTmpDir |
Private Attributes | |
bool | myIsTemp |
Description : Driver can save to file and read from file list of files for light modules
typedef std::vector<std::string> LightApp_Driver::ListOfFiles |
|
protected |
LightApp_Driver::LightApp_Driver | ( | ) |
Constructor.
|
virtual |
Destructor.
|
virtual |
Clears map of list files
References IsTemporary(), myMap, RemoveTemporaryFiles(), and SetIsTemporary().
|
protected |
LightApp_Driver::ListOfFiles LightApp_Driver::GetListOfFiles | ( | const char * | theModuleName | ) |
References myMap.
References GetDirFromPath(), and GetTmpDir().
|
protected |
References myTmpDir.
|
inlineprotected |
|
protected |
Converts files which was created from module <theModuleName> into a byte sequence unsigned char
References myMap.
|
protected |
Converts a byte sequence <theBuffer> to files and return list of them
References GetTmpDir(), and SetIsTemporary().
|
virtual |
Filling current driver from file 'theFileName'
Reimplemented in LightApp_HDFDriver.
References myTmpDir, PutStreamToFiles(), and SetListOfFiles().
void LightApp_Driver::RemoveFiles | ( | const ListOfFiles & | theFiles, |
const bool | IsDirDeleted | ||
) |
Remove files. First item in <theFiles> is a directory with slash at the end. Other items are names of files. If <IsDirDeleted> is true, then the directory is also deleted.
|
virtual |
Removes files which was created from module theModuleName if <IsDirDeleted> is true tmp directory is also deleted if it is empty
References myMap, and RemoveFiles().
|
virtual |
Save in file 'theFileName' datas from this driver
Reimplemented in LightApp_HDFDriver.
References myMap, myTmpDir, and PutFilesToStream().
|
inlineprotected |
|
virtual |
Sets list of files for module with name 'theModuleName'
References myMap.
|
private |
|
protected |
|
protected |