Loading...
Searching...
No Matches
TraceDataBuffer Class Reference

This class stores copies of data that are associated with TraceEvent instances. More...

#include <dataBuffer.h>

Public Member Functions

 TraceDataBuffer (size_t allocSize=DefaultAllocSize)
 Constructor.
 
template<typename T >
const T * StoreData (const T &value)
 Makes a copy of value and returns a pointer to it.
 
const char * StoreData (const char *str)
 Makes a copy of str and returns a pointer to it.
 

Static Public Attributes

static constexpr size_t DefaultAllocSize = 1024
 

Detailed Description

This class stores copies of data that are associated with TraceEvent instances.

Data stored in the buffer must be copy constructible and trivially destructible.

Definition at line 51 of file dataBuffer.h.

Constructor & Destructor Documentation

◆ TraceDataBuffer()

TraceDataBuffer ( size_t  allocSize = DefaultAllocSize)
inline

Constructor.

The buffer will make allocations of allocSize.

Definition at line 57 of file dataBuffer.h.

Member Function Documentation

◆ StoreData() [1/2]

const char * StoreData ( const char *  str)
inline

Makes a copy of str and returns a pointer to it.

Specialization for c strings.

Definition at line 73 of file dataBuffer.h.

◆ StoreData() [2/2]

const T * StoreData ( const T &  value)
inline

Makes a copy of value and returns a pointer to it.

Definition at line 62 of file dataBuffer.h.

Member Data Documentation

◆ DefaultAllocSize

constexpr size_t DefaultAllocSize = 1024
staticconstexpr

Definition at line 53 of file dataBuffer.h.


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