Helper class to read a file. More...
Public Member Functions | |
| File (const char *filename) | |
| Create the helper by opening the given file. | |
| ~File () | |
| Free everything we have allocated. | |
| char | GetChar () const |
| Get a single character from the file. | |
| const char * | GetDirname () const |
| Get the directory name of the file. | |
Private Attributes | |
| FILE * | fp |
| The currently opened file. | |
| char * | dirname |
| The directory of the file. | |
| const char * | filename |
| The name of the file. | |
Helper class to read a file.
Definition at line 69 of file depend.cpp.
| File::File | ( | const char * | filename | ) | [inline] |
Create the helper by opening the given file.
| filename | the file to open |
Definition at line 76 of file depend.cpp.
| File::~File | ( | ) | [inline] |
Free everything we have allocated.
Definition at line 93 of file depend.cpp.
| char File::GetChar | ( | ) | const [inline] |
Get a single character from the file.
If we are reading beyond the end of the file '' is returned.
Definition at line 104 of file depend.cpp.
References fp.
Referenced by Lexer::Next().
| const char* File::GetDirname | ( | ) | const [inline] |
Get the directory name of the file.
Definition at line 114 of file depend.cpp.
References dirname.
Referenced by ScanFile().
1.6.1