#include <VirtualFileCabinet.h>
Inheritance diagram for NSFileSystem::TVirtualFileCabinet:
Public Member Functions | |
virtual void | Close (void) |
Close file and destroy object. | |
virtual const TString & | GetName (void) const |
Returns name of this file (name of file from cabinet). | |
virtual const LONG | GetSize (void) const |
Returns size of this file in bytes. | |
virtual BOOL | Eof (void) |
Determine whether file position is after last character. | |
virtual LONG | Tell (void) |
Returns actual position in file (in bytes). | |
virtual BOOL | Seek (const LONG &position) |
Seek to specified position in file. | |
virtual BOOL | SeekToStart (void) |
Seek file to begin. | |
virtual BOOL | SeekToEnd (void) |
Seek file to end. | |
virtual BOOL | SeekRelative (const LONG &offset) |
Seek file relative to actual position. | |
virtual int | GetChar (void) |
Return next character from file or EOF at end of file. | |
virtual DWORD | Read (void *buffer, const DWORD &size) |
Read specified number of bytes into buffer. | |
virtual BOOL | FindChar (int ch) |
Read file until specified character. | |
virtual BOOL | ReadUntil (int ch, TString &res) |
Read file until specified character and store it into string. | |
virtual BOOL | ReadString (TString &text) |
Read next string - "..". | |
Static Public Member Functions | |
static TVirtualFile * | OpenFile (const TString &cabinetName, const TFSCabinetTableItem &cabinetTableItem, const TString &filename) |
This static method open specified file from specified cabinet. | |
Protected Member Functions | |
virtual | ~TVirtualFileCabinet (void) |
Virtual destructor. |
Thus it is file stored in file.
Definition at line 37 of file VirtualFileCabinet.h.
|
Virtual destructor.
Definition at line 96 of file VirtualFileCabinet.h. |
|
Close file and destroy object. After calling this method pointer to object is invalid and should be set to null. Via this method you destroy object. Implements NSFileSystem::TVirtualFile. Definition at line 114 of file VirtualFileCabinet.h. |
|
Determine whether file position is after last character.
Implements NSFileSystem::TVirtualFile. Definition at line 58 of file VirtualFileCabinet.cpp. |
|
Read file until specified character. If character was found then TRUE is returned and file is at position after this character.
Implements NSFileSystem::TVirtualFile. Definition at line 206 of file VirtualFileCabinet.cpp. References GetChar(). Here is the call graph for this function: ![]() |
|
Return next character from file or EOF at end of file.
Implements NSFileSystem::TVirtualFile. Definition at line 158 of file VirtualFileCabinet.cpp. Referenced by FindChar(), ReadString(), and ReadUntil(). |
|
Returns name of this file (name of file from cabinet).
Implements NSFileSystem::TVirtualFile. Definition at line 121 of file VirtualFileCabinet.h. |
|
Returns size of this file in bytes.
Implements NSFileSystem::TVirtualFile. Definition at line 128 of file VirtualFileCabinet.h. |
|
This static method open specified file from specified cabinet. You must supply information about item in specified cabinet file. This information are stored in cabinet table at begin of cabinet.
Definition at line 27 of file VirtualFileCabinet.cpp. References TString::c_str(), NSFileSystem::TFSCabinetTableItem::GetLength(), and NSFileSystem::TFSCabinetTableItem::GetStart(). Referenced by NSFileSystem::TFSCabinet::GetFile(). Here is the call graph for this function: ![]() |
|
Read specified number of bytes into buffer.
Implements NSFileSystem::TVirtualFile. Definition at line 176 of file VirtualFileCabinet.cpp. |
|
Read next string - "..". Method founds first character '"' and then reads string until next ". Final string doesnt contain begin and end character '"'. String parameter TEXT is always cleared. After returning TRUE position in file is set to first character after end of string (after '"'); Readed string musn't contains symbol '"' - escape characters arent recognized too.
Implements NSFileSystem::TVirtualFile. Definition at line 255 of file VirtualFileCabinet.cpp. References TString::Add(), TString::ClearDeallocOff(), FALSE, and GetChar(). Here is the call graph for this function: ![]() |
|
Read file until specified character and store it into string. Terminal character is not included in result string. String RES is automatically cleared in function. Return TRUE if specified character was found, FALSE otherwise (EOF was reached and terminal character was not found).
Implements NSFileSystem::TVirtualFile. Definition at line 228 of file VirtualFileCabinet.cpp. References TString::Add(), TString::ClearDeallocOff(), and GetChar(). Here is the call graph for this function: ![]() |
|
Seek to specified position in file. If position is outside then EOF is set. Returns TRUE if seeking was successful.
Implements NSFileSystem::TVirtualFile. Definition at line 78 of file VirtualFileCabinet.cpp. |
|
Seek file relative to actual position. After seeking file must be inside his area in cabinet!!!
Implements NSFileSystem::TVirtualFile. Definition at line 130 of file VirtualFileCabinet.cpp. |
|
Seek file to end. Returns TRUE if seeking was successful. Implements NSFileSystem::TVirtualFile. Definition at line 119 of file VirtualFileCabinet.cpp. |
|
Seek file to begin. Returns TRUE if seeking was successful. Implements NSFileSystem::TVirtualFile. Definition at line 109 of file VirtualFileCabinet.cpp. |
|
Returns actual position in file (in bytes).
Implements NSFileSystem::TVirtualFile. Definition at line 66 of file VirtualFileCabinet.cpp. |