RMVL  2.3.0
Robotic Manipulation and Vision Library
载入中...
搜索中...
未找到
rm::async::Webapp::RoutePattern类 参考

路由模式匹配器 更多...

#include <rmvl/io/netapp.hpp>

rm::async::Webapp::RoutePattern 的协作图:

Public 成员函数

 RoutePattern (std::string_view pattern_str)
 构造路由模式
 
bool match (std::string_view path, std::unordered_map< std::string, std::string > &params) const
 匹配路径,并提取参数
 

详细描述

路由模式匹配器

构造及析构函数说明

◆ RoutePattern()

rm::async::Webapp::RoutePattern::RoutePattern ( std::string_view pattern_str)
explicit

构造路由模式

参数
[in]pattern_str路由模式字符串,如 "/api/:name"

成员函数说明

◆ match()

bool rm::async::Webapp::RoutePattern::match ( std::string_view path,
std::unordered_map< std::string, std::string > & params ) const

匹配路径,并提取参数

参数
[in]path请求路径
[out]params输出参数,提取的路径参数
返回
是否匹配成功

该类的文档由以下文件生成: