本文主要是介绍Crow:基于req.rul查找路由Rule对象及匹配参数,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
Crow::run()会调用Crow::validate(),而后者会调用router_.validate();
void validate()
{//Take all the routes from the registered blueprints and add them to `all_rules_` to be processed.detail::middleware_indices blueprint_mw;validate_bp(blueprints_, blueprint_mw);for (auto& rule : all_rules_){if (rule){auto upgraded = rule->upgrade();if (upgraded)rule = std::move(upgraded);rule->validate();internal_add_rule_object(rule->rule(), rule.get(), INVALID_BP_ID, blueprints_);}}for (auto& per_method : per_methods_){per_method.trie.validate();}
}
1.Crow:黑魔法 添加路由3 绑定lambda-CSDN博客
解释了
这篇关于Crow:基于req.rul查找路由Rule对象及匹配参数的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!