25 #ifndef PXR_BASE_TRACE_EVENT_DATA_H 26 #define PXR_BASE_TRACE_EVENT_DATA_H 30 #include "pxr/base/trace/api.h" 31 #include "pxr/base/trace/event.h" 33 #include <boost/variant.hpp> 36 PXR_NAMESPACE_OPEN_SCOPE
69 TRACE_API
const int64_t*
GetInt()
const;
72 TRACE_API
const uint64_t*
GetUInt()
const;
75 TRACE_API
const double*
GetFloat()
const;
78 TRACE_API
const bool*
GetBool()
const;
81 TRACE_API
const std::string*
GetString()
const;
91 boost::variant<_NoData, std::string, bool, int64_t, uint64_t, double>;
95 PXR_NAMESPACE_CLOSE_SCOPE
97 #endif // PXR_BASE_TRACE_EVENT_DATA_H TraceEventData(const std::string &s)
Ctor for String type.
TraceEventData(double d)
Ctor for Float type.
TraceEventData()
Ctor for Invalid type.
TraceEventData(uint64_t i)
Ctor for UInt type.
TRACE_API void WriteJson(JsWriter &) const
Writes a json representation of the data.
TRACE_API const std::string * GetString() const
Returns a pointer to the data or nullptr if the type is not String.
TRACE_API const int64_t * GetInt() const
Returns a pointer to the data or nullptr if the type is not Int.
This class holds data that can be stored in TraceEvents.
TRACE_API TraceEvent::DataType GetType() const
Returns the Type of the data stored.
DataType
The different types of data that can be stored in a TraceEvent instance.
TraceEventData(int64_t i)
Ctor for Int type.
TRACE_API const double * GetFloat() const
Returns a pointer to the data or nullptr if the type is not Float.
TraceEventData(bool b)
Ctor for Bool type.
TRACE_API const bool * GetBool() const
Returns a pointer to the data or nullptr if the type is not Bool.
This class provides an interface to writing json values directly to a stream.
TRACE_API const uint64_t * GetUInt() const
Returns a pointer to the data or nullptr if the type is not UInt.