HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TfScopeDescription Class Reference

#include <scopeDescription.h>

Public Member Functions

TF_API TfScopeDescription (std::string const &description, TfCallContext const &context=TfCallContext())
 
TF_API TfScopeDescription (std::string &&description, TfCallContext const &context=TfCallContext())
 
TF_API TfScopeDescription (char const *description, TfCallContext const &context=TfCallContext())
 
TF_API ~TfScopeDescription ()
 
TF_API void SetDescription (std::string const &description)
 
TF_API void SetDescription (std::string &&description)
 
TF_API void SetDescription (char const *description)
 

Friends

TfScopeDescriptionTf_GetPreviousScopeDescription (TfScopeDescription *d)
 
char constTf_GetScopeDescriptionText (TfScopeDescription *d)
 
TfCallContext constTf_GetScopeDescriptionContext (TfScopeDescription *d)
 

Detailed Description

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 51 of file scopeDescription.h.

Constructor & Destructor Documentation

TF_API TfScopeDescription::TfScopeDescription ( std::string const description,
TfCallContext const context = TfCallContext() 
)
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::TfScopeDescription ( std::string &&  description,
TfCallContext const context = TfCallContext() 
)
explicit

Construct with a description. Push description on the stack of descriptions for this thread. This object adopts ownership of the rvalue description.

TF_API TfScopeDescription::TfScopeDescription ( char const description,
TfCallContext const context = TfCallContext() 
)
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::~TfScopeDescription ( )

Destructor. Pop the description stack in this thread.

Member Function Documentation

TF_API void TfScopeDescription::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 TfScopeDescription::SetDescription ( std::string &&  description)

Replace the description stack entry for this scope description. This object adopts ownership of the rvalue description.

TF_API void TfScopeDescription::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.

Friends And Related Function Documentation

TfScopeDescription* Tf_GetPreviousScopeDescription ( TfScopeDescription d)
friend

Definition at line 98 of file scopeDescription.h.

TfCallContext const& Tf_GetScopeDescriptionContext ( TfScopeDescription d)
friend

Definition at line 106 of file scopeDescription.h.

char const* Tf_GetScopeDescriptionText ( TfScopeDescription d)
friend

Definition at line 102 of file scopeDescription.h.


The documentation for this class was generated from the following file: