LibreOffice Module comphelper (master) 1
Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Static Private Member Functions | Static Private Attributes | List of all members
comphelper::TraceEvent Class Reference

#include <traceevent.hxx>

Inheritance diagram for comphelper::TraceEvent:

Static Public Member Functions

static void addInstantEvent (const char *sName, const std::map< OUString, OUString > &args=std::map< OUString, OUString >())
static void startRecording ()
static void stopRecording ()
static void setBufferSizeAndCallback (std::size_t bufferSize, void(*bufferFullCallback)())
static std::vector< OUString > getEventVectorAndClear ()
static css::uno::Sequence< OUString > getRecordingAndClear ()

Protected Member Functions

 TraceEvent (OUString sArgs)
 TraceEvent (const std::map< OUString, OUString > &aArgs)

Static Protected Member Functions

static void addRecording (const OUString &sObject)
static long long getNow ()
static OUString createArgsString (const std::map< OUString, OUString > &args)

Protected Attributes

const int m_nPid
const OUString m_sArgs

Static Protected Attributes

static std::atomic< bool > s_bRecording = (getenv("TRACE_EVENT_RECORDING") != nullptr)

Static Private Member Functions

static int getPid ()

Static Private Attributes

static std::size_t s_nBufferSize = 0
static void(* s_pBufferFullCallback )() = nullptr

Detailed Description

Definition at line 33 of file traceevent.hxx.

Constructor & Destructor Documentation

◆ TraceEvent() [1/2]

comphelper::TraceEvent::TraceEvent ( OUString  sArgs)

Definition at line 83 of file traceevent.hxx.

◆ TraceEvent() [2/2]

comphelper::TraceEvent::TraceEvent ( const std::map< OUString, OUString > &  aArgs)

Definition at line 89 of file traceevent.hxx.

Member Function Documentation

◆ addInstantEvent()

void comphelper::TraceEvent::addInstantEvent ( const char *  sName,
const std::map< OUString, OUString > &  args = std::map<OUString, OUString>() 

Definition at line 54 of file traceevent.cxx.

References addRecording(), args, createArgsString(), getNow(), and sName.

◆ addRecording()

void comphelper::TraceEvent::addRecording ( const OUString &  sObject)

◆ createArgsString()

static OUString comphelper::TraceEvent::createArgsString ( const std::map< OUString, OUString > &  args)

Definition at line 61 of file traceevent.hxx.

References args, first, and i.

Referenced by addInstantEvent().

◆ getEventVectorAndClear()

std::vector< OUString > comphelper::TraceEvent::getEventVectorAndClear ( )

Definition at line 92 of file traceevent.cxx.

References s_bRecording, startRecording(), and stopRecording().

Referenced by getRecordingAndClear().

◆ getNow()

static long long comphelper::TraceEvent::getNow ( )

Definition at line 54 of file traceevent.hxx.

Referenced by addInstantEvent().

◆ getPid()

static int comphelper::TraceEvent::getPid ( )

Definition at line 36 of file traceevent.hxx.

◆ getRecordingAndClear()

css::uno::Sequence< OUString > comphelper::TraceEvent::getRecordingAndClear ( )

Definition at line 108 of file traceevent.cxx.

References comphelper::containerToSequence(), and getEventVectorAndClear().

◆ setBufferSizeAndCallback()

void comphelper::TraceEvent::setBufferSizeAndCallback ( std::size_t  bufferSize,
void(*)()  bufferFullCallback 

Definition at line 86 of file traceevent.cxx.

References s_nBufferSize, and s_pBufferFullCallback.

◆ startRecording()

void comphelper::TraceEvent::startRecording ( )

Definition at line 78 of file traceevent.cxx.

References s_bRecording.

Referenced by getEventVectorAndClear().

◆ stopRecording()

void comphelper::TraceEvent::stopRecording ( )

Definition at line 84 of file traceevent.cxx.

References s_bRecording.

Referenced by getEventVectorAndClear().

Member Data Documentation

◆ m_nPid

const int comphelper::TraceEvent::m_nPid

Definition at line 80 of file traceevent.hxx.

◆ m_sArgs

const OUString comphelper::TraceEvent::m_sArgs

Definition at line 81 of file traceevent.hxx.

◆ s_bRecording

std::atomic< bool > comphelper::TraceEvent::s_bRecording = (getenv("TRACE_EVENT_RECORDING") != nullptr)

Definition at line 50 of file traceevent.hxx.

Referenced by getEventVectorAndClear(), startRecording(), and stopRecording().

◆ s_nBufferSize

std::size_t comphelper::TraceEvent::s_nBufferSize = 0

Definition at line 46 of file traceevent.hxx.

Referenced by addRecording(), and setBufferSizeAndCallback().

◆ s_pBufferFullCallback

void(* comphelper::TraceEvent::s_pBufferFullCallback)() = nullptr

Definition at line 47 of file traceevent.hxx.

Referenced by addRecording(), and setBufferSizeAndCallback().

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