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 34 of file crashzone.hxx.

Member Typedef Documentation

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

Definition at line 44 of file crashzone.hxx.

Constructor & Destructor Documentation

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

Definition at line 56 of file crashzone.hxx.

References CrashZone< Dummy >::enter().

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

Definition at line 57 of file crashzone.hxx.

References CrashZone< Dummy >::leave().

Member Function Documentation

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

Definition at line 61 of file crashzone.hxx.

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

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

Definition at line 59 of file crashzone.hxx.

References CrashZone< Dummy >::gnEnterCount.

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

Definition at line 58 of file crashzone.hxx.

References CrashZone< Dummy >::gnLeaveCount.

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

Definition at line 62 of file crashzone.hxx.

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

Member Data Documentation

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

how many times have we entered a zone

Definition at line 51 of file crashzone.hxx.

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

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

how many times have we left a new zone

Definition at line 53 of file crashzone.hxx.

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


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