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

Method HandleValidator

tools/mkclass/classcompiler.cpp:1333–1352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1331}
1332
1333void ClassCompiler::HandleValidator(const Validator& validator, const ClassDebugInfo&)
1334{
1335 CodeGenValidatorSubrules(validator.Name, validator.Name, validator.Rules);
1336
1337 for (const auto& it : m_MissingValidators)
1338 CodeGenValidator(it.first.first + it.first.second, it.first.first, validator.Rules, it.second.Name, it.second.Type, ValidatorField);
1339
1340 for (const auto& it : m_MissingValidators) {
1341 m_Impl << "void ObjectImpl<" << it.first.first << ">::Validate" << it.first.second << "(const Lazy<" << it.second.Type.GetRealType() << ">& lvalue, const ValidationUtils& utils)" << std::endl
1342 << "{" << std::endl
1343 << "\t" << "SimpleValidate" << it.first.second << "(lvalue, utils);" << std::endl
1344 << "\t" << "std::vector<String> location;" << std::endl
1345 << "\t" << "location.emplace_back(\"" << it.second.Name << "\");" << std::endl
1346 << "\t" << "TIValidate" << it.first.first << it.first.second << "(this, lvalue(), location, utils);" << std::endl
1347 << "\t" << "location.pop_back();" << std::endl
1348 << "}" << std::endl << std::endl;
1349 }
1350
1351 m_MissingValidators.clear();
1352}
1353
1354void ClassCompiler::HandleMissingValidators()
1355{

Callers

nothing calls this directly

Calls 2

GetRealTypeMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected