lean cpp library
A lean C++ library providing efficient utility classes for high-performance C++ applications.
|
Terminates the application on destruction, if not disarmed. More...
#include <terminate_guard.h>
Inherits nonassignable.
Public Member Functions | |
LEAN_INLINE | terminate_guard () |
Constructs an armed terminate guard. | |
LEAN_INLINE | terminate_guard (bool arm) |
Constructs a terminate guard (optionally disarmed). | |
LEAN_INLINE | terminate_guard (const terminate_guard &right) |
Copies AND DISARMS the given terminate guard. | |
LEAN_INLINE | ~terminate_guard () throw () |
Terminates the application, if not disarmed. | |
LEAN_INLINE void | armed (bool arm) const |
Sets whether the scope guard is currently armed. | |
LEAN_INLINE bool | armed () const |
Gets whether the scope guard is currently armed. | |
LEAN_INLINE void | disarm () const |
Disarms this scope guard. | |
LEAN_INLINE void | arm () const |
Re-arms this scope guard. |
Terminates the application on destruction, if not disarmed.