#include <nawa/RequestHandler/HandleRequestFunction.h>
Public Member Functions | |
virtual | ~HandleRequestFunctionWrapper () |
HandleRequestFunctionWrapper (HandleRequestFunction handleRequestFunction, void *reference=nullptr, DestructionCallbackFunction destructionCallback=DestructionCallbackFunction()) | |
int | operator() (nawa::Connection &connection) const |
A wrapper structure for a HandleRequestFunction which can store an additional reference pointer and a callback, which will be called on destruction. This allows nawarun to free memory consumed by an app as soon as it is not in use anymore (e.g., after being replaced in a hotswap operation).
Definition at line 40 of file HandleRequestFunction.h.
|
virtual |
|
explicit |
Construct a wrapper for a HandleRequestFunction.
handleRequestFunction | The request handling function. |
reference | An arbitrary reference pointer which can be used as a hint during destruction. |
destructionCallback | A function which will be called on destruction of the wrapper object, the reference pointer is passed to this function as a reference. |
Definition at line 51 of file HandleRequestFunction.cpp.
int nawa::HandleRequestFunctionWrapper::operator() | ( | nawa::Connection & | connection | ) | const |
Convenience operator which just runs the request handling function.
connection | The nawa::Connection object (parameter of the request handling function). |
Definition at line 57 of file HandleRequestFunction.cpp.