Interface providing write access to a file.
More...
#include <jimcpp/core/engine/IWriteFile.hpp>
|
virtual size_t | write (const void *buffer, size_t sizeToWrite)=0 |
| Writes an amount of bytes to the file.
|
|
virtual bool | seek (long finalPos, bool relativeMovement=false)=0 |
| Changes position in file.
|
|
virtual long | getPos () const =0 |
| Get the current position in the file.
|
|
virtual const path & | getFileName () const =0 |
| Get name of file.
|
|
virtual bool | flush ()=0 |
| Flush the content of the buffer in the file.
|
|
| IReferenceCounted () |
| Constructor.
|
|
virtual | ~IReferenceCounted () |
| Destructor.
|
|
void | grab () const |
| Grabs the object. Increments the reference counter by one.
|
|
bool | drop () const |
| Drops the object. Decrements the reference counter by one.
|
|
s32 | getReferenceCount () const |
| Get the reference count.
|
|
const c8 * | getDebugName () const |
| Returns the debug name of the object.
|
|
|
void | setDebugName (const c8 *newName) |
| Sets the debug name of the object.
|
|
Interface providing write access to a file.
◆ flush()
virtual bool jpp::io::IWriteFile::flush |
( |
| ) |
|
|
pure virtual |
Flush the content of the buffer in the file.
- Returns
- True if successful, otherwise false.
◆ getFileName()
virtual const path & jpp::io::IWriteFile::getFileName |
( |
| ) |
const |
|
pure virtual |
Get name of file.
- Returns
- File name as zero terminated character string.
◆ getPos()
virtual long jpp::io::IWriteFile::getPos |
( |
| ) |
const |
|
pure virtual |
Get the current position in the file.
- Returns
- Current position in the file in bytes on success or -1L on failure
◆ seek()
virtual bool jpp::io::IWriteFile::seek |
( |
long |
finalPos, |
|
|
bool |
relativeMovement = false |
|
) |
| |
|
pure virtual |
Changes position in file.
- Parameters
-
finalPos | Destination position in the file. |
relativeMovement | If set to true, the position in the file is changed relative to current position. Otherwise the position is changed from begin of file. |
- Returns
- True if successful, otherwise false.
◆ write()
virtual size_t jpp::io::IWriteFile::write |
( |
const void * |
buffer, |
|
|
size_t |
sizeToWrite |
|
) |
| |
|
pure virtual |
Writes an amount of bytes to the file.
- Parameters
-
buffer | Pointer to buffer of bytes to write. |
sizeToWrite | Amount of bytes to write to the file. |
- Returns
- How much bytes were written.
The documentation for this class was generated from the following file: