nlib
|
The class for creating an input stream that makes use of memory. More...
#include "nn/nlib/MemoryInputStream.h"
Public Member Functions | |
template<class T , size_t N> | |
errno_t | Init (const T(&buf)[N]) noexcept |
Initializes MemoryInputStream and makes it available for use. More... | |
errno_t | Init (const void *buf, size_t n) noexcept |
Initializes MemoryInputStream and makes it available for use. More... | |
Basic Member Functions | |
constexpr | MemoryInputStream () noexcept |
Instantiates the object with default parameters (default constructor). You must call the Init function before using this function. | |
virtual | ~MemoryInputStream () noexcept override |
Destructor. | |
template<class T , size_t N> | |
constexpr | MemoryInputStream (const T(&buf)[N]) noexcept |
Constructs and initializes MemoryInputStream . More... | |
constexpr | MemoryInputStream (const void *buf, size_t n) noexcept |
Constructs and initializes MemoryInputStream . More... | |
![]() | |
errno_t | GetErrorValue () const noexcept |
Gets the error value. More... | |
size_t | Pos () const noexcept |
Returns the current position in the stream. More... | |
uint64_t | Pos64 () const noexcept |
Returns the current position in the stream as a 64-bit value. More... | |
bool | IsEos () noexcept |
Returns true if the stream is finished being read through to the end. If the stream has not been read through to the end, or if an error occurs, the function returns false . More... | |
int | Read () noexcept |
Reads one byte of data from the stream. More... | |
int | Peek () noexcept |
Reads the next byte without consuming the stream. More... | |
size_t | Skip (size_t nbytes) noexcept |
Skips over the number of bytes specified by nbytes. More... | |
size_t | Read (void *ptr, size_t nbytes) noexcept |
Reads the number of bytes of data specified by nbytes into the memory region specified by ptr. More... | |
bool | Close () noexcept |
Closes the stream. Returns true if successful. More... | |
operator bool () const | |
Returns true if no internal error has occurred. | |
constexpr | InputStream () noexcept |
Instantiates the object. This function is called from the derived class. | |
virtual | ~InputStream () noexcept |
Destructor. This function is called from the derived class. | |
Additional Inherited Members | |
![]() | |
void | ResetBuffer (void *p, size_t nbytes) noexcept |
Sets the buffer held by InputStream . More... | |
void | SetError (errno_t e) const noexcept |
Sets an error to InputStream . More... | |
The class for creating an input stream that makes use of memory.
MemoryInputStream
. Definition at line 23 of file MemoryInputStream.h.
|
inlineexplicitnoexcept |
Constructs and initializes MemoryInputStream
.
[in] | buf | The array that is referenced from the stream. |
Definition at line 28 of file MemoryInputStream.h.
|
inlinenoexcept |
Constructs and initializes MemoryInputStream
.
[in] | buf | A pointer to a memory region. |
[in] | n | The size of the memory region. |
Definition at line 33 of file MemoryInputStream.h.
|
inlinenoexcept |
Initializes MemoryInputStream
and makes it available for use.
[in] | buf | The array that is referenced from the stream. |
0
on success.MemoryInputStream
, specifying an array. Definition at line 36 of file MemoryInputStream.h.
|
inlinenoexcept |
Initializes MemoryInputStream
and makes it available for use.
[in] | buf | A pointer to a memory region. |
[in] | n | The size of the memory region. |
0
on success.MemoryInputStream
with a pointer to a memory region and its size specified. Definition at line 40 of file MemoryInputStream.h.
© 2012-2017 Nintendo Co., Ltd. All rights reserved.