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

Method ValidateArgs

OsiInterface/CustomFunctions.cpp:11–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9namespace osidbg {
10
11bool CustomFunction::ValidateArgs(OsiArgumentDesc const & params) const
12{
13 if (params.Count() != params_.size()) {
14 OsiError("Function " << name_ << "/" << params_.size() << ": Argument count mismatch");
15 return false;
16 }
17
18 for (auto i = 0; i < params_.size(); i++) {
19 auto const & value = params.Get(i);
20 auto const & param = params_[i];
21 if (!ValidateParam(param, value)) {
22 return false;
23 }
24 }
25
26 return true;
27}
28
29bool CustomFunction::ValidateParam(CustomFunctionParam const & param, OsiArgumentValue const & value) const
30{

Callers

nothing calls this directly

Calls 2

CountMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected