Generic callback interface

The callback interface is a helper interface that can be used for generic callbacks inside applications. It can be used to decouple components. One component can do callbacks without having to include the header file of the other component.

File information

Filecommon/interface/callback.h

Classes ICallback
UCallback

Classes

ICallback

class ICallback {
public:
    virtual ~ICallback() {};
};

Overview

Components that want to do callbacks should use ICallback as a base class.

UCallback

class UCallback {
public:
    virtual void Callback(class ICallback * source) {};
};

Overview

Base class for components that want to receive generic callbacks.

Public functions

Callback
The actual callback function.

Parameters

class ICallback * source The component doing the callback. The UCallback component can use this pointer to distinguish between different sources.