MCPcopy Create free account
hub / github.com/Icinga/icinga2 / FunctionCall

Function FunctionCall

lib/base/function-script.cpp:12–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10using namespace icinga;
11
12static Value FunctionCall(const std::vector<Value>& args)
13{
14 if (args.size() < 1)
15 BOOST_THROW_EXCEPTION(std::invalid_argument("Too few arguments for call()"));
16
17 ScriptFrame *vframe = ScriptFrame::GetCurrentFrame();
18 Function::Ptr self = static_cast<Function::Ptr>(vframe->Self);
19 REQUIRE_NOT_NULL(self);
20
21 std::vector<Value> uargs(args.begin() + 1, args.end());
22 return self->InvokeThis(args[0], uargs);
23}
24
25static Value FunctionCallV(const Value& thisArg, const Array::Ptr& args)
26{

Callers 1

DoEvaluateMethod · 0.85

Calls 4

InvokeThisMethod · 0.80
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected