#include <VirtualFile.h>
Inheritance diagram for NSFileSystem::TVirtualFile:
Public Member Functions | |
virtual void | Close (void)=0 |
Close file and destroy object. | |
virtual const TString & | GetName (void) const =0 |
Returns name of this file. | |
virtual const LONG | GetSize (void) const =0 |
Returns size of this file in bytes. | |
virtual BOOL | Eof (void)=0 |
Determine whether file position is after last character. | |
virtual LONG | Tell (void)=0 |
Returns actual position in file (in bytes). | |
virtual BOOL | Seek (const LONG &position)=0 |
Seek to specified position in file. | |
virtual BOOL | SeekToStart (void)=0 |
Seek file to begin. | |
virtual BOOL | SeekToEnd (void)=0 |
Seek file to end. | |
virtual BOOL | SeekRelative (const LONG &offset)=0 |
Seek file relative to actual position. | |
virtual int | GetChar (void)=0 |
Return next character from file or EOF at end of file. | |
virtual DWORD | Read (void *buffer, const DWORD &size)=0 |
Read specified number of bytes into buffer. | |
virtual BOOL | FindChar (int ch)=0 |
Read file until specified character. | |
virtual BOOL | ReadUntil (int ch, TString &res)=0 |
Read file until specified character and store it into string. | |
virtual BOOL | ReadString (TString &text)=0 |
Read next string - "..". | |
Protected Member Functions | |
virtual | ~TVirtualFile (void) |
Destructor. |
You can only read from file.
After required operations with file you destroy object simply with caling Close method, which close file properly.
Definition at line 47 of file VirtualFile.h.
|
Destructor. You cannot call it. Definition at line 53 of file VirtualFile.h. |
|
Close file and destroy object. After calling this method pointer to object is invalid and should be set to null. Implemented in NSFileSystem::TVirtualFileCabinet, and NSFileSystem::TVirtualFileReal. Referenced by NSFileSystem::TFSFileSystem::GetFileData(), NSMeshes::TDeclarationLoader::LoadDeclarationFromFile(), and NSMeshes::TMeshLoader::LoadMeshFromFile(). |
|
Determine whether file position is after last character.
Implemented in NSFileSystem::TVirtualFileCabinet, and NSFileSystem::TVirtualFileReal. Referenced by TCRC::ComputeVirtualFileCRC32(). |
|
Read file until specified character. If character was found then TRUE is returned and file is at position after this character.
Implemented in NSFileSystem::TVirtualFileCabinet, and NSFileSystem::TVirtualFileReal. |
|
Return next character from file or EOF at end of file.
Implemented in NSFileSystem::TVirtualFileCabinet, and NSFileSystem::TVirtualFileReal. |
|
Returns name of this file.
Implemented in NSFileSystem::TVirtualFileCabinet, and NSFileSystem::TVirtualFileReal. |
|
Returns size of this file in bytes.
Implemented in NSFileSystem::TVirtualFileCabinet, and NSFileSystem::TVirtualFileReal. Referenced by NSFileSystem::TFSFileSystem::GetFileData(). |
|
Read specified number of bytes into buffer.
Implemented in NSFileSystem::TVirtualFileCabinet, and NSFileSystem::TVirtualFileReal. Referenced by TCRC::ComputeVirtualFileCRC32(), NSFileSystem::TFSFileSystem::GetFileData(), NSMeshes::TDeclarationLoader::LoadDeclarationFromFile(), and NSMeshes::TMeshLoader::LoadMeshFromFile(). |
|
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.
Implemented in NSFileSystem::TVirtualFileCabinet, and NSFileSystem::TVirtualFileReal. |
|
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).
Implemented in NSFileSystem::TVirtualFileCabinet, and NSFileSystem::TVirtualFileReal. |
|
Seek to specified position in file. If position is outside then EOF is set. Returns TRUE if seeking was successful. Implemented in NSFileSystem::TVirtualFileCabinet, and NSFileSystem::TVirtualFileReal. |
|
Seek file relative to actual position. If result is outside then is set to START or END of file. Returns TRUE if seeking was successful. Implemented in NSFileSystem::TVirtualFileCabinet, and NSFileSystem::TVirtualFileReal. |
|
Seek file to end. Returns TRUE if seeking was successful. Implemented in NSFileSystem::TVirtualFileCabinet, and NSFileSystem::TVirtualFileReal. |
|
Seek file to begin. Returns TRUE if seeking was successful. Implemented in NSFileSystem::TVirtualFileCabinet, and NSFileSystem::TVirtualFileReal. Referenced by TCRC::ComputeVirtualFileCRC32(). |
|
Returns actual position in file (in bytes).
Implemented in NSFileSystem::TVirtualFileCabinet, and NSFileSystem::TVirtualFileReal. |