Helper class to read a file.
More...
|
| File (const char *filename) |
| Create the helper by opening the given file. More...
|
|
| ~File () |
| Free everything we have allocated. More...
|
|
char | GetChar () const |
| Get a single character from the file. More...
|
|
const char * | GetDirname () const |
| Get the directory name of the file. More...
|
|
|
FILE * | fp |
| The currently opened file.
|
|
char * | dirname |
| The directory of the file.
|
|
Helper class to read a file.
Definition at line 156 of file depend.cpp.
◆ File()
File::File |
( |
const char * |
filename | ) |
|
|
inline |
Create the helper by opening the given file.
- Parameters
-
- Postcondition
- the file is open; otherwise the application is killed.
Definition at line 163 of file depend.cpp.
◆ ~File()
Free everything we have allocated.
Definition at line 180 of file depend.cpp.
References free().
◆ GetChar()
char File::GetChar |
( |
| ) |
const |
|
inline |
Get a single character from the file.
If we are reading beyond the end of the file '\0' is returned.
- Returns
- the read character.
Definition at line 191 of file depend.cpp.
◆ GetDirname()
const char* File::GetDirname |
( |
| ) |
const |
|
inline |
Get the directory name of the file.
- Returns
- the directory name.
Definition at line 201 of file depend.cpp.
The documentation for this class was generated from the following file: