Nazara Engine
0.4
A fast, complete, cross-platform API designed for game development
|
Core class that represents a view of the memory behaving like a stream. More...
Public Member Functions | |
MemoryView (void *ptr, UInt64 size) | |
Constructs a MemoryView object with a raw memory and a size. More... | |
MemoryView (const void *ptr, UInt64 size) | |
Constructs a MemoryView object with a raw memory and a size. More... | |
MemoryView (const MemoryView &)=delete | |
MemoryView (MemoryView &&)=delete | |
~MemoryView ()=default | |
TODO. | |
bool | EndOfStream () const override |
Checks whether the stream reached the end of the stream. More... | |
UInt64 | GetCursorPos () const override |
Gets the position of the cursor. More... | |
UInt64 | GetSize () const override |
Gets the size of the raw memory. More... | |
bool | SetCursorPos (UInt64 offset) override |
Sets the position of the cursor. More... | |
MemoryView & | operator= (const MemoryView &)=delete |
MemoryView & | operator= (MemoryView &&)=delete |
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 |
Core class that represents a view of the memory behaving like a stream.
Nz::MemoryView::MemoryView | ( | void * | ptr, |
UInt64 | size | ||
) |
Constructs a MemoryView object with a raw memory and a size.
ptr | Pointer to raw memory |
size | Size that can be read |
Nz::MemoryView::MemoryView | ( | const void * | ptr, |
UInt64 | size | ||
) |
Constructs a MemoryView object with a raw memory and a size.
ptr | Constant pointer to raw memory |
size | Size that can be read |
|
overridevirtual |
Checks whether the stream reached the end of the stream.
Implements Nz::Stream.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Sets the position of the cursor.
offset | Offset according to the beginning of the stream |
Implements Nz::Stream.