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 | common/interface/callback.h |
Classes |
ICallback UCallback |
class ICallback {
public:
virtual ~ICallback() {};
};
class UCallback {
public:
virtual void Callback(class ICallback * source) {};
};
class ICallback * source | The component doing the callback. The UCallback component can use this pointer to distinguish between different sources. |