snaplock: snaplock::snaplock_debug_info Class Reference

snaplock::snaplock_debug_info Class Reference

Handle the SIGUSR2 Unix signal. More...

#include <snaplock.h>

Inheritance diagram for snaplock::snaplock_debug_info:
Collaboration diagram for snaplock::snaplock_debug_info:
Public Types typedef std::shared_ptr< snaplock_debug_infopointer_t   Public Member Functions  snaplock_debug_info (snaplock *sl)  The snaplock info initialization. More...
   snaplock_debug_info (snaplock_debug_info const &rhs)=delete   virtual ~snaplock_debug_info () override   snaplock_debug_info const & operator= (snaplock_debug_info const &rhs)=delete   virtual void process_signal () override  Call the info function of the snaplock object. More...
  Private Attributes snaplockf_snaplock = nullptr   Detailed Description

This class is an implementation of the signalfd() specifically listening for the SIGUSR2 signal.

The signal is used to ask snaplock to do some debugging tasks. This is used by developers as they test the tool and it is not actually used in non-debug versions.

Definition at line 132 of file snaplock.h.

Member Typedef Documentation
typedef std::shared_ptr<snaplock_debug_info> snaplock::snaplock_debug_info::pointer_t

Definition at line 136 of file snaplock.h.

Constructor & Destructor Documentation
snaplock::snaplock_debug_info::snaplock_debug_info ( snaplocksl)

The snaplock information object uses the signalfd() function to obtain a way to listen on incoming Unix signals.

Specifically, it listens on the SIGUSR1 signal. This is used to request snaplock to print out its current state. This is mainly for debug purposes.

[in]slThe snaplock we are listening for.

Definition at line 77 of file snaplock_debug_info.cpp.

snaplock::snaplock_debug_info::snaplock_debug_info ( snaplock_debug_info const &  rhs) delete
virtual snaplock::snaplock_debug_info::~snaplock_debug_info ( ) inlineoverridevirtual

Definition at line 140 of file snaplock.h.

Member Function Documentation
snaplock_debug_info const& snaplock::snaplock_debug_info::operator= ( snaplock_debug_info const &  rhs) delete
void snaplock::snaplock_debug_info::process_signal ( ) overridevirtual

When this function is called, the debug_info() function of snaplock gets called and it can process whatever the programmer wants to debug at the time.

Definition at line 92 of file snaplock_debug_info.cpp.

References snaplock::snaplock::debug_info(), and f_snaplock.

Member Data Documentation
snaplock* snaplock::snaplock_debug_info::f_snaplock = nullptr private

Definition at line 148 of file snaplock.h.

Referenced by process_signal().

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

This document is part of the Snap! Websites Project.

Copyright by Made to Order Software Corp.

Syndicate content

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly