libjmmcg  release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::LIBJMMCG_VER_NAMESPACE::application Class Reference

Derive from this to assist with signal handling in one's executable. More...

#include <application.hpp>

Inheritance diagram for jmmcg::LIBJMMCG_VER_NAMESPACE::application:
[legend]

Public Types

using element_type = std::sig_atomic_t
 

Public Member Functions

element_type signal_status () const noexcept(true)
 Detect if a signal has been sent to the application. More...
 

Protected Member Functions

 application () noexcept(true)
 
 application (application const &)=delete
 
virtual ~application ()=default
 

Detailed Description

Derive from this to assist with signal handling in one's executable.

Definition at line 50 of file application.hpp.

Member Typedef Documentation

◆ element_type

Definition at line 52 of file application.hpp.

Constructor & Destructor Documentation

◆ application() [1/2]

jmmcg::LIBJMMCG_VER_NAMESPACE::application::application ( )
inlineprotectednoexcept

By default SIGINT & SIGQUIT are trapped.

Definition at line 27 of file application_impl.hpp.

Referenced by isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::v5_0sp2::fix_client::fix_client().

◆ application() [2/2]

jmmcg::LIBJMMCG_VER_NAMESPACE::application::application ( application const &  )
protecteddelete

◆ ~application()

virtual jmmcg::LIBJMMCG_VER_NAMESPACE::application::~application ( )
protectedvirtualdefault

Member Function Documentation

◆ signal_status()

application::element_type jmmcg::LIBJMMCG_VER_NAMESPACE::application::signal_status ( ) const
inlinenoexcept

Detect if a signal has been sent to the application.

For example in a loop one may test this to check if CTRL-C has been pressed and exit the loop thus permitting C++ dtors to run.

Returns
Non-zero if a signal was trapped.

Definition at line 22 of file application_impl.hpp.

Referenced by main().


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