A function set holding testing functions. More...
Public Member Functions | |
FunctionSet () noexcept | |
~FunctionSet () | |
std::function< void()> | registerFunction (const char *name, std::function< void()> func) |
TestFunction * | getTestFunction (unsigned int index) const |
nkMemory::BufferCast< TestFunction * > | getTestFunctions (nkMemory::StringView filter="") const |
unsigned int | getSetSize () const |
A function set holding testing functions.
Mainly used internally to keep track of registered functions.
|
noexcept |
Default constructor.
nkDebug::FunctionSet::~FunctionSet | ( | ) |
Destructor.
std::function<void ()> nkDebug::FunctionSet::registerFunction | ( | const char * | name, |
std::function< void()> | func | ||
) |
Register a new function into the set.
name | The function name to attach. |
func | The function to call. |
TestFunction* nkDebug::FunctionSet::getTestFunction | ( | unsigned int | index | ) | const |
index | The index of the function to retrieve. |
nkMemory::BufferCast<TestFunction*> nkDebug::FunctionSet::getTestFunctions | ( | nkMemory::StringView | filter = "" | ) | const |
Allows to retrieve a subset of the registered functions depending on a filter on their names.
filter | The filter to apply, in an ECMA script compatible regex format. |
unsigned int nkDebug::FunctionSet::getSetSize | ( | ) | const |