Dataflow Runtime API  4.0.1.0
Classes | Public Types | Static Public Member Functions | List of all members
imt::base::core::diagnostics::AssertActionManager Class Referencefinal

The AssertActionManager defines some events called AssertActionEvents for which functions can be registered. More...

#include <Imt.Base.Core.Diagnostics/AssertActionManager.h>

Inheritance diagram for imt::base::core::diagnostics::AssertActionManager:
imt::base::core::platform::Nonmovable

Classes

struct  AssertEventLimits
 Limits for AssertEvent enum. More...
 

Public Types

enum class  AssertEvent : uint32_t { ASSERT_EX_EVENT = 0U , ASSERT_DEBUG_EVENT }
 Defines different assert action events. More...
 
typedef void(* AssertActionHandler) (AssertEvent const actionEvent, char_t const *const pMessage)
 Define the prototype of a function which can handle an action event. More...
 

Static Public Member Functions

static void initActionManager ()
 Initialize the AssertActionManager. More...
 
static AssertActionHandler registerActionHandler (AssertActionHandler const handler, AssertEvent const actionEvent)
 Register a new handler for a specific event. More...
 
static void fireAssert (AssertEvent const actionEvent, char_t const *const pMessage)
 Fire the assertion. More...
 

Additional Inherited Members

- Public Member Functions inherited from imt::base::core::platform::Nonmovable
 Nonmovable ()=default
 
 Nonmovable (Nonmovable const &other)=delete
 
 Nonmovable (Nonmovable &&other) noexcept=delete
 
virtual ~Nonmovable ()=default
 
Nonmovableoperator= (Nonmovable const &other)=delete
 
Nonmovableoperator= (Nonmovable &&other) noexcept=delete
 

Detailed Description

The AssertActionManager defines some events called AssertActionEvents for which functions can be registered.

When the corresponding event occurs the registered function will be called. The AssertActionManager will be used from the assertion macros in Diagnostics.h and DiagnosticsConfigApp.h The later is application dependent.

Member Typedef Documentation

◆ AssertActionHandler

typedef void(* imt::base::core::diagnostics::AssertActionManager::AssertActionHandler) (AssertEvent const actionEvent, char_t const *const pMessage)

Define the prototype of a function which can handle an action event.

Such a function can be registered for a particular AssertActionEvent. When such a AssertActionEvent occurs the function will be called

Parameters
actionEventThe event that has occurred. A function may handles multiple events.
pMessageOptional message

Member Enumeration Documentation

◆ AssertEvent

Defines different assert action events.

Enumerator
ASSERT_EX_EVENT 

Something unexpected happened (it's not safe to continue program execution!)

ASSERT_DEBUG_EVENT 

Inform developer that something happened (it's ok to continue, not included in release build)

Member Function Documentation

◆ fireAssert()

static void imt::base::core::diagnostics::AssertActionManager::fireAssert ( AssertEvent const  actionEvent,
char_t const *const  pMessage 
)
static

Fire the assertion.

Parameters
actionEventAssertEvent
pMessageOptional message which contains further information for the event

◆ initActionManager()

static void imt::base::core::diagnostics::AssertActionManager::initActionManager ( )
static

Initialize the AssertActionManager.

◆ registerActionHandler()

static AssertActionHandler imt::base::core::diagnostics::AssertActionManager::registerActionHandler ( AssertActionHandler const  handler,
AssertEvent const  actionEvent 
)
static

Register a new handler for a specific event.

Parameters
handlerHandler to be registered. Must not be nullptr
actionEventEvent for which the handler will be registered
Returns
The former AssertActionHandler
See also
LogEvent

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