Loading...
Searching...
No Matches
TraceAuto Class Reference

A class which records a begin event when it is constructed, and a matching end event when it is destructed. More...

#include <trace.h>

Public Member Functions

 TraceAuto (const char *funcName, const char *prettyFuncName, const std::string &name)
 Constructor taking function name, pretty function name and a scope name.
 
 TraceAuto (const TfToken &key)
 Constructor taking a TfToken key.
 
 TraceAuto (const std::string &key)
 Constructor taking a string key.
 
 TraceAuto (const TraceAuto &)=delete
 
TraceAutooperator= (const TraceAuto &)=delete
 
 TraceAuto (TraceAuto &&)=delete
 
TraceAutooperator= (TraceAuto &&)=delete
 
 ~TraceAuto ()
 Destructor.
 

Detailed Description

A class which records a begin event when it is constructed, and a matching end event when it is destructed.

It is intended to help ensure begin-end pairing correctness when the begin-end pairing can be expressed by automatic variable lifetime.

The TRACE_FUNCTION() macro may be even more convenient in some circumstances.

Definition at line 255 of file trace.h.

Constructor & Destructor Documentation

◆ TraceAuto() [1/3]

TraceAuto ( const char *  funcName,
const char *  prettyFuncName,
const std::string &  name 
)
inline

Constructor taking function name, pretty function name and a scope name.

Definition at line 258 of file trace.h.

◆ TraceAuto() [2/3]

TraceAuto ( const TfToken key)
inlineexplicit

Constructor taking a TfToken key.

Definition at line 269 of file trace.h.

◆ TraceAuto() [3/3]

TraceAuto ( const std::string &  key)
inlineexplicit

Constructor taking a string key.

Definition at line 279 of file trace.h.

◆ ~TraceAuto()

~TraceAuto ( )
inline

Destructor.

Definition at line 294 of file trace.h.


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