LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
art::detail::ExitCodePrinter Class Reference

#include "ExitCodePrinter.h"

Public Member Functions

ExitCodePrinteroperator= (int exitcode) noexcept
 
 ~ExitCodePrinter () noexcept
 
int exitcode () const noexcept
 

Private Attributes

int code_ {}
 

Detailed Description

Definition at line 8 of file ExitCodePrinter.h.

Constructor & Destructor Documentation

art::detail::ExitCodePrinter::~ExitCodePrinter ( )
inlinenoexcept

Definition at line 17 of file ExitCodePrinter.h.

References code_, and art::detail::info_success().

18  {
19  if (code_ != info_success()) {
20  std::cout << "Art has completed and will exit with status " << code_
21  << "." << std::endl;
22  }
23  }
constexpr int info_success()
Definition: info_success.h:8

Member Function Documentation

int art::detail::ExitCodePrinter::exitcode ( ) const
inlinenoexcept

Definition at line 26 of file ExitCodePrinter.h.

References code_, and art::detail::info_success().

Referenced by operator=().

27  {
28  return code_ == info_success() ? 0 : code_;
29  }
constexpr int info_success()
Definition: info_success.h:8
ExitCodePrinter& art::detail::ExitCodePrinter::operator= ( int  exitcode)
inlinenoexcept

Definition at line 11 of file ExitCodePrinter.h.

References code_, and exitcode().

12  {
13  code_ = exitcode;
14  return *this;
15  }
int exitcode() const noexcept

Member Data Documentation

int art::detail::ExitCodePrinter::code_ {}
private

Definition at line 32 of file ExitCodePrinter.h.

Referenced by exitcode(), operator=(), and ~ExitCodePrinter().


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