CTR Pia
4.11.3
Game Communication Engine
|
This class is the trace class. More...
Public Member Functions | |
void | ClearFlag (u64 flags) |
Disables the specified trace flags. More... | |
void | ClearFlag (void) |
Clears all trace flags, except for TRACE_FLAG_ALWAYS . | |
bool | IsFlagSet (u64 flag) const |
Indicates whether the specified flags are set. More... | |
bool | IsPrintTime () const |
Gets whether time display is enabled or disabled. More... | |
void | ResetBaseTime () |
Resets the base time for the time display to the current time. | |
void | SetFlag (u64 flags) |
Enables trace flags. More... | |
void | SetPrintTime (bool isPrint) |
Enables and disables the time display. When enabled, it displays the time passed from the base time in units of milliseconds, such as "[Pia:12345]...". More... | |
Static Public Member Functions | |
static nn::Result | CreateInstance (void) |
Creates the Trace class instance (singleton pattern). More... | |
static void | DestroyInstance (void) |
Destroys the Trace class instance (singleton pattern). More... | |
static Trace * | GetInstance (void) |
Gets the Trace class instance (singleton pattern). More... | |
This class is the trace class.
Trace code is disabled in release builds.
2014-09-18 Changed the specifications so that ResultAlreadyExists
is returned if you call CreateInstance()
when an instance already exists.
2013-11-21 Reorganized the trace flags. The bit positions of the flags are now different from what they were before.
2013-07-18 Changed the operations of IsFlagSet
. The function now returns true
if multiple flags are specified and any of the flags are raised.
2012-06-07 TraceFlag
and its value were changed from enumerated to u64
constants.
2012-05-30 Times can now also be printed.
2012-04-19 Initial version.
|
inline |
Disables the specified trace flags.
Disables the specified trace flags. However, TRACE_FLAG_ALWAYS
is excluded.
[in] | flags | Specifies the bitwise OR of the TraceFlag values to disable. |
|
static |
Creates the Trace
class instance (singleton pattern).
Call this member function after calling nn::pia::common::BeginSetup
, but before calling nn::pia::common::EndSetup
.
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.
|
static |
|
inlinestatic |
Gets the Trace
class instance (singleton pattern).
Returns a NULL
pointer if the instance has not yet been created using the CreateInstance()
function.
Trace
instance.
|
inline |
Indicates whether the specified flags are set.
The result of IsFlagSet(TRACE_NEVER)
is true
. Returns true
if any of the specified flags are raised when multiple flags have been specified by argument.
true
if the particular flag is set, and false
if not.[in] | flag | Specifies the trace flags to query. |
|
inline |
Gets whether time display is enabled or disabled.
true
if times are printed.
|
inline |
Enables trace flags.
Use this method to enable additional trace flags.
[in] | flags | Specifies the bitwise OR of the TraceFlag values to enable. |
|
inline |
Enables and disables the time display. When enabled, it displays the time passed from the base time in units of milliseconds, such as "[Pia:12345]...".
[in] | isPrint | Specify true to display the time. |