![]() |
Nazara Engine
0.4
A fast, complete, cross-platform API designed for game development
|
Constructs a MemoryStream object by default. More...
Public Member Functions | |
| MemoryStream (ByteArray *byteArray, OpenModeFlags openMode=OpenMode_ReadWrite) | |
| Constructs a MemoryStream object with a byte array. More... | |
| MemoryStream (const MemoryStream &)=default | |
| MemoryStream (MemoryStream &&)=default | |
| void | Clear () |
| Clears the content of the stream. | |
| bool | EndOfStream () const override |
| Checks whether the stream reached the end of the stream. More... | |
| ByteArray & | GetBuffer () |
| Gets the internal buffer. More... | |
| const ByteArray & | GetBuffer () const |
| Gets the internal buffer. More... | |
| UInt64 | GetCursorPos () const override |
| Gets the position of the cursor. More... | |
| UInt64 | GetSize () const override |
| Gets the size of the raw memory. More... | |
| void | SetBuffer (ByteArray *byteArray, OpenModeFlags openMode=OpenMode_ReadWrite) |
| Sets the buffer for the memory stream. More... | |
| bool | SetCursorPos (UInt64 offset) override |
| Sets the position of the cursor. More... | |
| MemoryStream & | operator= (const MemoryStream &)=default |
| MemoryStream & | operator= (MemoryStream &&)=default |
Public Member Functions inherited from Nz::Stream | |
| Stream (const Stream &)=default | |
| Stream (Stream &&)=default | |
| virtual | ~Stream () |
| Destructs the object. | |
| void | EnableTextMode (bool textMode) |
| Enables the text mode. More... | |
| void | Flush () |
| Flushes the stream. More... | |
| virtual String | GetDirectory () const |
| Gets the directory of the stream. More... | |
| virtual String | GetPath () const |
| Gets the path of the stream. More... | |
| OpenModeFlags | GetOpenMode () const |
| Gets the open mode of the stream. More... | |
| StreamOptionFlags | GetStreamOptions () const |
| Gets the options of the stream. More... | |
| std::size_t | Read (void *buffer, std::size_t size) |
| Reads the stream and puts the result in a buffer. More... | |
| virtual String | ReadLine (unsigned int lineSize=0) |
| Reads a line from the stream. More... | |
| bool | IsReadable () const |
| Checks whether the stream is readable. More... | |
| bool | IsSequential () const |
| Checks whether the stream is sequential. More... | |
| bool | IsTextModeEnabled () const |
| Checks whether the stream has text mode enabled. More... | |
| bool | IsWritable () const |
| Checks whether the stream can be written. More... | |
| bool | Write (const ByteArray &byteArray) |
| Writes a ByteArray into the stream. More... | |
| bool | Write (const String &string) |
| Writes a String into the stream. More... | |
| std::size_t | Write (const void *buffer, std::size_t size) |
| Writes in the stream the content of a buffer. More... | |
| Stream & | operator= (const Stream &)=default |
| Stream & | operator= (Stream &&)=default |
Additional Inherited Members | |
Protected Member Functions inherited from Nz::Stream | |
| Stream (StreamOptionFlags streamOptions=StreamOption_None, OpenModeFlags openMode=OpenMode_NotOpen) | |
| Constructs a Stream object with options. More... | |
Protected Attributes inherited from Nz::Stream | |
| OpenModeFlags | m_openMode |
| StreamOptionFlags | m_streamOptions |
Constructs a MemoryStream object by default.
Core class that represents a stream of memory.
|
inline |
Constructs a MemoryStream object with a byte array.
| byteArray | Bytes to stream |
| openMode | Reading/writing mode for the stream |
|
overridevirtual |
Checks whether the stream reached the end of the stream.
Implements Nz::Stream.
|
inline |
Gets the internal buffer.
|
inline |
Gets the internal buffer.
|
overridevirtual |
|
overridevirtual |
| void Nz::MemoryStream::SetBuffer | ( | ByteArray * | byteArray, |
| OpenModeFlags | openMode = OpenMode_ReadWrite |
||
| ) |
Sets the buffer for the memory stream.
| byteArray | Bytes to stream |
| openMode | Reading/writing mode for the stream |
|
overridevirtual |
Sets the position of the cursor.
| offset | Offset according to the beginning of the stream |
Implements Nz::Stream.