#include <nresources.h>
Inheritance diagram for regina::NLocalFileResource:

Public Member Functions | |
| NLocalFileResource (const char *newFileName) | |
| Creates a new resource referring to the given file. | |
| virtual | ~NLocalFileResource () |
| Destroys this resource reference, closing the corresponding file if necessary. | |
| virtual bool | openRead () |
| Open the resource in read mode. | |
| virtual bool | openWrite () |
| Open the resource in write mode. | |
| virtual void | close () |
| Close the resource. | |
| virtual mode | getOpenMode () const |
| Returns the current state of the resource. | |
| virtual char | getChar () |
| Reads a character from the current position in the resource and moves on to the next position. | |
| virtual void | putChar (char c) |
| Writes the given character to the resource at the current position and moves on to the next position. | |
| virtual long | getPosition () |
| Returns the current position in the resource. | |
| virtual void | setPosition (long pos) |
| Moves to the given position in the resource. | |
Static Public Member Functions | |
| static std::ios::openmode | sysModeRead () |
| Returns the system file mode for opening a binary file for reading. | |
| static std::ios::openmode | sysModeWrite () |
| Returns the system file mode for opening a binary file for writing. | |
|
|
Creates a new resource referring to the given file.
The file will not be accessed until one of the
|
|
|
Destroys this resource reference, closing the corresponding file if necessary.
|
|
|
Close the resource. If the resource is already closed, this routine should do nothing. Implements regina::NRandomAccessResource. |
|
|
Reads a character from the current position in the resource and moves on to the next position.
Implements regina::NRandomAccessResource. |
|
|
Returns the current state of the resource.
If the resource is open, the mode in which it was opened will be returned (either
Implements regina::NRandomAccessResource. |
|
|
Returns the current position in the resource.
Implements regina::NRandomAccessResource. |
|
|
Open the resource in read mode. This routine should fail if the resource does not exist.
Implements regina::NRandomAccessResource. |
|
|
Open the resource in write mode. If the resource already exists, any existing contents should be deleted.
Implements regina::NRandomAccessResource. |
|
|
Writes the given character to the resource at the current position and moves on to the next position.
Implements regina::NRandomAccessResource. |
|
|
Moves to the given position in the resource.
Implements regina::NRandomAccessResource. |
|
|
Returns the system file mode for opening a binary file for reading.
|
|
|
Returns the system file mode for opening a binary file for writing.
|