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

Public Types | |
| enum | mode { CLOSED = 0, READ = 1, WRITE = 2 } |
| Specifies the current state of a resource. More... | |
Public Member Functions | |
| virtual | ~NRandomAccessResource () |
| Destroys this resource. | |
| virtual bool | openRead ()=0 |
| Open the resource in read mode. | |
| virtual bool | openWrite ()=0 |
| Open the resource in write mode. | |
| virtual void | close ()=0 |
| Close the resource. | |
| virtual mode | getOpenMode () const =0 |
| Returns the current state of the resource. | |
| virtual char | getChar ()=0 |
| Reads a character from the current position in the resource and moves on to the next position. | |
| virtual void | putChar (char c)=0 |
| Writes the given character to the resource at the current position and moves on to the next position. | |
| virtual long | getPosition ()=0 |
| Returns the current position in the resource. | |
| virtual void | setPosition (long pos)=0 |
| Moves to the given position in the resource. | |
|
|
Specifies the current state of a resource.
|
|
|
Destroys this resource.
|
|
|
Close the resource. If the resource is already closed, this routine should do nothing. Implemented in regina::NLocalFileResource. |
|
|
Reads a character from the current position in the resource and moves on to the next position.
Implemented in regina::NLocalFileResource. |
|
|
Returns the current state of the resource.
If the resource is open, the mode in which it was opened will be returned (either
Implemented in regina::NLocalFileResource. |
|
|
Returns the current position in the resource.
Implemented in regina::NLocalFileResource. |
|
|
Open the resource in read mode. This routine should fail if the resource does not exist.
Implemented in regina::NLocalFileResource. |
|
|
Open the resource in write mode. If the resource already exists, any existing contents should be deleted.
Implemented in regina::NLocalFileResource. |
|
|
Writes the given character to the resource at the current position and moves on to the next position.
Implemented in regina::NLocalFileResource. |
|
|
Moves to the given position in the resource.
Implemented in regina::NLocalFileResource. |