![]() |
|
This class is used to provide high-level descriptions about scopes of execution that could possibly block, or to provide relevant information about high-level action that would be useful in a crash report. More...
Public Member Functions | |
TF_API | TfScopeDescription (std::string const &description, TfCallContext const &context=TfCallContext()) |
Construct with a description. More... | |
TF_API | TfScopeDescription (std::string &&description, TfCallContext const &context=TfCallContext()) |
Construct with a description. More... | |
TF_API | TfScopeDescription (char const *description, TfCallContext const &context=TfCallContext()) |
Construct with a description. More... | |
TF_API | ~TfScopeDescription () |
Destructor. More... | |
TF_API void | SetDescription (std::string const &description) |
Replace the description stack entry for this scope description. More... | |
TF_API void | SetDescription (std::string &&description) |
Replace the description stack entry for this scope description. More... | |
TF_API void | SetDescription (char const *description) |
Replace the description stack entry for this scope description. More... | |
This class is used to provide high-level descriptions about scopes of execution that could possibly block, or to provide relevant information about high-level action that would be useful in a crash report.
This class is reasonably fast to use, especially if the message strings are not dynamically created, however it should not be used in very highly performance sensitive contexts. The cost to push & pop is essentially a TLS lookup plus a couple of atomic operations.
Definition at line 52 of file scopeDescription.h.
|
explicit |
Construct with a description.
Push description on the stack of descriptions for this thread. Caller guarantees that the string description
lives at least as long as this TfScopeDescription object.
|
explicit |
Construct with a description.
Push description on the stack of descriptions for this thread. This object adopts ownership of the rvalue description
.
|
explicit |
Construct with a description.
Push description on the stack of descriptions for this thread. Caller guarantees that the string description
lives at least as long as this TfScopeDescription object.
TF_API ~TfScopeDescription | ( | ) |
Destructor.
Pop the description stack in this thread.
TF_API void SetDescription | ( | std::string const & | description | ) |
Replace the description stack entry for this scope description.
Caller guarantees that the string description
lives at least as long as this TfScopeDescription object.
TF_API void SetDescription | ( | std::string && | description | ) |
Replace the description stack entry for this scope description.
This object adopts ownership of the rvalue description
.
TF_API void SetDescription | ( | char const * | description | ) |
Replace the description stack entry for this scope description.
Caller guarantees that the string description
lives at least as long as this TfScopeDescription object.