CTR Pia
4.11.3
Game Communication Engine
|
Caches console output. This class is used for debugging. Do not use it in production versions of code.
.
More...
Public Member Functions | |
void | Clear () |
Clears the string currently being cached. | |
void | Flush () |
Outputs the string currently being cached and then clears it. | |
void | Trace (u64 flag) const |
Prints information useful for debugging. More... | |
Static Public Member Functions | |
static nn::Result | CreateInstance (u32 bufferSize) |
Creates an instance (singleton pattern). More... | |
static void | DestroyInstance () |
Destroys the instance (singleton pattern). More... | |
static CachedPrint * | GetInstance () |
Gets a pointer to the CachedPrint instance (singleton pattern). More... | |
Caches console output. This class is used for debugging. Do not use it in production versions of code.
.
2014-09-18 Changed the specifications so that ResultAlreadyExists
is returned if you call CreateInstance
when an instance already exists.
2012-05-01 Initial version.
|
static |
Creates an instance (singleton pattern).
Call this member function after calling nn::pia::common::BeginSetup
, but before calling nn::pia::common::EndSetup
.
[in] | bufferSize | Specifies the size of the buffer to be cached (in bytes). Specify a value equal to or greater than 512 . |
Result
value that indicates success if the instance is created successfully. You must make sure that the implementation of this function in your application does not return any errors. ResultAlreadyExists
Indicates that an instance has already been created. Programming error. Fix your program so that this error is not returned.
ResultNotInitialized
The common
module has not been initialized. Programming error. Fix your program so that this error is not returned.
ResultInvalidState
Indicates that the function was not called between the BeginSetup
and EndSetup
functions. Programming error. Fix your program so that this error is not returned.
ResultInvalidArgument
Indicates that an argument is invalid. Programming error. Fix your program so that this error is not returned.
|
static |
Destroys the instance (singleton pattern).
This function does nothing and returns if called when an instance has not been created.
|
inlinestatic |
Gets a pointer to the CachedPrint
instance (singleton pattern).
NULL
pointer if the instance cannot be created. void nn::pia::common::CachedPrint::Trace | ( | u64 | flag | ) | const |
Prints information useful for debugging.
[in] | flag | Specifies the bitwise OR of trace flags. For more information, see the TraceFlag type. |