Core class that represents a stream.
More...
|
| Stream (StreamOptionFlags streamOptions=StreamOption_None, OpenModeFlags openMode=OpenMode_NotOpen) |
| Constructs a Stream object with options. More...
|
|
virtual void | FlushStream ()=0 |
|
virtual std::size_t | ReadBlock (void *buffer, std::size_t size)=0 |
|
virtual std::size_t | WriteBlock (const void *buffer, std::size_t size)=0 |
|
Core class that represents a stream.
◆ EnableTextMode()
void Nz::Stream::EnableTextMode |
( |
bool |
textMode | ) |
|
|
inline |
Enables the text mode.
- Parameters
-
textMode | Enables the mode or disables |
◆ Flush()
void Nz::Stream::Flush |
( |
| ) |
|
|
inline |
◆ GetDirectory()
String Nz::Stream::GetDirectory |
( |
| ) |
const |
|
virtual |
Gets the directory of the stream.
- Returns
- Empty string (meant to be virtual)
Reimplemented in Nz::File.
◆ GetOpenMode()
Gets the open mode of the stream.
- Returns
- Reading/writing mode for the stream
◆ GetPath()
String Nz::Stream::GetPath |
( |
| ) |
const |
|
virtual |
Gets the path of the stream.
- Returns
- Empty string (meant to be virtual)
Reimplemented in Nz::File.
◆ GetStreamOptions()
Gets the options of the stream.
- Returns
- Options of the stream
◆ IsReadable()
bool Nz::Stream::IsReadable |
( |
| ) |
const |
|
inline |
Checks whether the stream is readable.
- Returns
- true if it is the case
◆ IsSequential()
bool Nz::Stream::IsSequential |
( |
| ) |
const |
|
inline |
Checks whether the stream is sequential.
- Returns
- true if it is the case
◆ IsTextModeEnabled()
bool Nz::Stream::IsTextModeEnabled |
( |
| ) |
const |
|
inline |
Checks whether the stream has text mode enabled.
- Returns
- true if it is the case
◆ IsWritable()
bool Nz::Stream::IsWritable |
( |
| ) |
const |
|
inline |
Checks whether the stream can be written.
- Returns
- true if it is the case
◆ Read()
std::size_t Nz::Stream::Read |
( |
void * |
buffer, |
|
|
std::size_t |
size |
|
) |
| |
|
inline |
Reads the stream and puts the result in a buffer.
- Returns
- Size of the read
- Parameters
-
buffer | Buffer to stock data |
size | Size meant to be read |
◆ ReadLine()
String Nz::Stream::ReadLine |
( |
unsigned int |
lineSize = 0 | ) |
|
|
virtual |
Reads a line from the stream.
Reads the stream until a line separator or the end of the stream is found.
If lineSize does not equal zero, it represents the maximum character count to be read from the stream.
- Parameters
-
lineSize | Maximum number of characters to read, or zero for no limit |
- Returns
- Line containing characters
◆ Write() [1/3]
bool Nz::Stream::Write |
( |
const ByteArray & |
byteArray | ) |
|
Writes a ByteArray into the stream.
- Returns
- true if successful
- Parameters
-
◆ Write() [2/3]
bool Nz::Stream::Write |
( |
const String & |
string | ) |
|
Writes a String into the stream.
- Returns
- true if successful
- Parameters
-
◆ Write() [3/3]
std::size_t Nz::Stream::Write |
( |
const void * |
buffer, |
|
|
std::size_t |
size |
|
) |
| |
|
inline |
Writes in the stream the content of a buffer.
- Returns
- Size of the writing
- Parameters
-
buffer | Buffer to get data from |
size | Size meant to be written |
The documentation for this class was generated from the following files:
- include/Nazara/Core/Stream.hpp
- include/Nazara/Core/Stream.inl
- src/Nazara/Core/Stream.cpp