KiCad PCB EDA Suite
Loading...
Searching...
No Matches
APP_MONITOR::SENTRY Class Reference

This is a singleton class intended to manage sentry. More...

#include <app_monitor.h>

Public Member Functions

 SENTRY (const SENTRY &obj)=delete
 
void Init ()
 
void Cleanup ()
 
bool IsOptedIn ()
 
void AddTag (const wxString &aKey, const wxString &aValue)
 
void SetSentryOptIn (bool aOptIn)
 
const wxString & GetSentryId ()
 
void ResetSentryId ()
 
void LogAssert (const ASSERT_CACHE_KEY &aKey, const wxString &aMsg)
 
void LogException (const wxString &aMsg)
 

Static Public Member Functions

static SENTRYInstance ()
 

Private Member Functions

 SENTRY ()
 
bool isConfiguredOptedIn ()
 
void sentryInit ()
 
wxString sentryCreateUid ()
 
void readOrCreateUid ()
 

Private Attributes

bool m_isOptedIn
 
wxFileName m_sentry_optin_fn
 
wxFileName m_sentry_uid_fn
 
wxString m_sentryUid
 
std::set< ASSERT_CACHE_KEYm_assertCache
 

Static Private Attributes

static SENTRYm_instance = nullptr
 

Detailed Description

This is a singleton class intended to manage sentry.

The inards of the api in this class are meant to be compiled out when KICAD_USE_SENTRY is not defined and become "inert" in order to reduce the need to sprinkle #ifdef checks everywhere.

Definition at line 107 of file app_monitor.h.

Constructor & Destructor Documentation

◆ SENTRY() [1/2]

APP_MONITOR::SENTRY::SENTRY ( const SENTRY obj)
delete

◆ SENTRY() [2/2]

SENTRY::SENTRY ( )
private

Definition at line 43 of file app_monitor.cpp.

Member Function Documentation

◆ AddTag()

void SENTRY::AddTag ( const wxString &  aKey,
const wxString &  aValue 
)

Definition at line 65 of file app_monitor.cpp.

Referenced by PGM_BASE::InitPgm().

◆ Cleanup()

void SENTRY::Cleanup ( )

Definition at line 57 of file app_monitor.cpp.

Referenced by PGM_BASE::Destroy().

◆ GetSentryId()

const wxString & SENTRY::GetSentryId ( )

Definition at line 126 of file app_monitor.cpp.

References m_sentryUid.

◆ Init()

void SENTRY::Init ( )

Definition at line 49 of file app_monitor.cpp.

References sentryInit().

Referenced by PGM_BASE::InitPgm().

◆ Instance()

◆ isConfiguredOptedIn()

bool SENTRY::isConfiguredOptedIn ( )
private

◆ IsOptedIn()

◆ LogAssert()

void SENTRY::LogAssert ( const ASSERT_CACHE_KEY aKey,
const wxString &  aMsg 
)

Definition at line 226 of file app_monitor.cpp.

References Instance(), IsOptedIn(), and m_assertCache.

Referenced by PGM_BASE::HandleAssert().

◆ LogException()

void SENTRY::LogException ( const wxString &  aMsg)

Definition at line 250 of file app_monitor.cpp.

References Instance(), and IsOptedIn().

Referenced by PGM_BASE::HandleException().

◆ readOrCreateUid()

void SENTRY::readOrCreateUid ( )
private

Definition at line 132 of file app_monitor.cpp.

References m_sentry_uid_fn, m_sentryUid, and ResetSentryId().

Referenced by sentryInit(), and SetSentryOptIn().

◆ ResetSentryId()

void SENTRY::ResetSentryId ( )

Definition at line 120 of file app_monitor.cpp.

References m_sentryUid, and sentryCreateUid().

Referenced by PANEL_DATA_COLLECTION::OnResetIdClick(), and readOrCreateUid().

◆ sentryCreateUid()

wxString SENTRY::sentryCreateUid ( )
private

Definition at line 107 of file app_monitor.cpp.

References m_sentry_uid_fn.

Referenced by ResetSentryId().

◆ sentryInit()

◆ SetSentryOptIn()

void SENTRY::SetSentryOptIn ( bool  aOptIn)

Member Data Documentation

◆ m_assertCache

std::set<ASSERT_CACHE_KEY> APP_MONITOR::SENTRY::m_assertCache
private

Definition at line 147 of file app_monitor.h.

Referenced by LogAssert().

◆ m_instance

SENTRY * APP_MONITOR::SENTRY::m_instance = nullptr
staticprivate

Definition at line 140 of file app_monitor.h.

◆ m_isOptedIn

bool APP_MONITOR::SENTRY::m_isOptedIn
private

Definition at line 142 of file app_monitor.h.

Referenced by IsOptedIn(), sentryInit(), and SetSentryOptIn().

◆ m_sentry_optin_fn

wxFileName APP_MONITOR::SENTRY::m_sentry_optin_fn
private

Definition at line 143 of file app_monitor.h.

Referenced by isConfiguredOptedIn(), sentryInit(), and SetSentryOptIn().

◆ m_sentry_uid_fn

wxFileName APP_MONITOR::SENTRY::m_sentry_uid_fn
private

Definition at line 144 of file app_monitor.h.

Referenced by readOrCreateUid(), sentryCreateUid(), and sentryInit().

◆ m_sentryUid

wxString APP_MONITOR::SENTRY::m_sentryUid
private

Definition at line 145 of file app_monitor.h.

Referenced by GetSentryId(), readOrCreateUid(), ResetSentryId(), and sentryInit().


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