MCPcopy Create free account
hub / github.com/Norbyte/ositools / CustomEventGuard

Class CustomEventGuard

OsiInterface/CustomFunctions.cpp:243–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241unsigned gCustomEventDepth{ 0 };
242
243struct CustomEventGuard
244{
245 static constexpr unsigned MaxDepth = 10;
246
247 CustomEventGuard() { gCustomEventDepth++; }
248 ~CustomEventGuard() { gCustomEventDepth--; }
249
250 bool CanThrowEvent() const
251 {
252 return gCustomEventDepth < MaxDepth;
253 }
254};
255
256void CustomFunctionInjector::ThrowEvent(FunctionHandle handle, OsiArgumentDesc * args) const
257{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected