Overload  1.1
Game engine with editor
Public Types | Public Member Functions | List of all members
OvMaths::Internal::TransformNotifier Class Reference

#include <TransformNotifier.h>

Public Types

enum  ENotification { ENotification::TRANSFORM_CHANGED, ENotification::TRANSFORM_DESTROYED }
using NotificationHandler = std::function< void(ENotification)>
using NotificationHandlerID = uint64_t

Public Member Functions

NotificationHandlerID AddNotificationHandler (NotificationHandler p_notificationHandler)
void NotifyChildren (ENotification p_notification)
bool RemoveNotificationHandler (const NotificationHandlerID &p_notificationHandlerID)

Detailed Description

The TransformNotifier is a simple notification system used by transform to send notifications to his children

Member Typedef Documentation

◆ NotificationHandler

The NotificationHandler is a function callback that takes a ENotification in parameters

◆ NotificationHandlerID

The ID of a NotificationHandler This value is needed to remove a NotificationHandler from a Notifier

Member Enumeration Documentation

◆ ENotification

Notifications that the transform can send


Member Function Documentation

◆ AddNotificationHandler()

OvMaths::Internal::TransformNotifier::NotificationHandlerID OvMaths::Internal::TransformNotifier::AddNotificationHandler ( NotificationHandler  p_notificationHandler)

Add a NotificationHandler to the Notifier. The NotificationHandler will receive every notifications sent by this Notifier. This method also return a NotificationHandlerID needed to remove the handler later

p_notificationHandler@project: Overload
: Overload Tech. @restrictions: This software may not be resold, redistributed or otherwise conveyed to a third party.

◆ NotifyChildren()

void OvMaths::Internal::TransformNotifier::NotifyChildren ( ENotification  p_notification)

Notify children (NotificationHandler) by sending the given notification


◆ RemoveNotificationHandler()

bool OvMaths::Internal::TransformNotifier::RemoveNotificationHandler ( const NotificationHandlerID p_notificationHandlerID)

Remove a NotificationHandler to the Notifier using the NotificationHandlerID generated by the "AddNotificationHandler" method. This method returns true on success (NotificationHandler removed)


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