LibreOffice Module comphelper (master) 1
Public Member Functions | Static Public Member Functions | Private Types | Static Private Attributes | List of all members
CrashZone< Dummy > Class Template Reference

A generic class for detecting if a given crash or a lock-up came from a specific area of code (such as OpenGL). More...

#include <crashzone.hxx>

Public Member Functions

 CrashZone ()
 
 ~CrashZone ()
 

Static Public Member Functions

static bool isInZone ()
 
static const AtomicCounterenterCount ()
 
static void enter ()
 
static void leave ()
 

Private Types

using AtomicCounter = std::atomic< std::make_unsigned_t< std::sig_atomic_t > >
 

Static Private Attributes

static AtomicCounter gnEnterCount = 0
 how many times have we entered a zone More...
 
static AtomicCounter gnLeaveCount = 0
 how many times have we left a new zone More...
 

Detailed Description

template<typename Dummy>
class CrashZone< Dummy >

A generic class for detecting if a given crash or a lock-up came from a specific area of code (such as OpenGL).

Use this helper to track that. The class is a template so that there can be multiple instances of static variables.

Definition at line 32 of file crashzone.hxx.

Member Typedef Documentation

◆ AtomicCounter

template<typename Dummy >
using CrashZone< Dummy >::AtomicCounter = std::atomic<std::make_unsigned_t<std::sig_atomic_t> >
private

Definition at line 42 of file crashzone.hxx.

Constructor & Destructor Documentation

◆ CrashZone()

template<typename Dummy >
CrashZone< Dummy >::CrashZone ( )
inline

Definition at line 54 of file crashzone.hxx.

References CrashZone< Dummy >::enter().

◆ ~CrashZone()

template<typename Dummy >
CrashZone< Dummy >::~CrashZone ( )
inline

Definition at line 55 of file crashzone.hxx.

References CrashZone< Dummy >::leave().

Member Function Documentation

◆ enter()

template<typename Dummy >
static void CrashZone< Dummy >::enter ( )
inlinestatic

Definition at line 59 of file crashzone.hxx.

References CrashZone< Dummy >::gnEnterCount.

Referenced by CrashZone< Dummy >::CrashZone().

◆ enterCount()

template<typename Dummy >
static const AtomicCounter & CrashZone< Dummy >::enterCount ( )
inlinestatic

Definition at line 57 of file crashzone.hxx.

References CrashZone< Dummy >::gnEnterCount.

◆ isInZone()

template<typename Dummy >
static bool CrashZone< Dummy >::isInZone ( )
inlinestatic

◆ leave()

template<typename Dummy >
static void CrashZone< Dummy >::leave ( )
inlinestatic

Definition at line 60 of file crashzone.hxx.

References CrashZone< Dummy >::gnLeaveCount.

Referenced by CrashZone< Dummy >::~CrashZone().

Member Data Documentation

◆ gnEnterCount

template<typename Dummy >
AtomicCounter CrashZone< Dummy >::gnEnterCount = 0
inlinestaticprivate

how many times have we entered a zone

Definition at line 49 of file crashzone.hxx.

Referenced by CrashZone< Dummy >::enter(), CrashZone< Dummy >::enterCount(), and CrashZone< Dummy >::isInZone().

◆ gnLeaveCount

template<typename Dummy >
AtomicCounter CrashZone< Dummy >::gnLeaveCount = 0
inlinestaticprivate

how many times have we left a new zone

Definition at line 51 of file crashzone.hxx.

Referenced by CrashZone< Dummy >::isInZone(), and CrashZone< Dummy >::leave().


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