COMMS
Template library intended to help with implementation of communication protocols.
|
#include "comms/Assert.h"
Enable new assertion behaviour.
Instantiate object of this class to enable new behaviour of assertion failure.
TAssert | Class derived from Assert that implements new custom behaviour of the assertion failure. |
Public Types | |
using | AssertType = TAssert |
Type of assert object. | |
Public Member Functions | |
template<typename... TParams> | |
EnableAssert (TParams &&... args) | |
Constructor. | |
~EnableAssert () noexcept | |
Destructor. | |
AssertType & | getAssert () |
Provides reference to internal Assert object. | |
comms::EnableAssert< TAssert >::EnableAssert | ( | TParams &&... | args | ) |
Constructor.
Registers new assertion failure behaviour. It forwards all the provided parameters to the constructor of embedded assertion object of type TAssert.
args | Arguments to pass to the assertion class constructor. |
|
noexcept |
Destructor.
Restores the assertion behaviour that was recorded during the instantiation of this object.
AssertType & comms::EnableAssert< TAssert >::getAssert | ( | ) |
Provides reference to internal Assert object.