class
Analyzer::Cpp::Oatpp
- Analyzer::Cpp::Oatpp
- Analyzer
- Reference
- Object
Overview
oat++ (oatpp) — routes are declared inside an ApiController subclass with
code-gen macros:
ENDPOINT("GET", "users/{userId}", getUserById, PATH(Int32, userId)) { ... } ENDPOINT_ASYNC("GET", "room/{roomId}", ChatHTML) { ...Action class... }
The verb and path are the first two macro arguments; the remaining arguments of a sync ENDPOINT are typed parameter declarations (PATH/QUERY/HEADER/BODY_DTO/…). Async endpoints declare their parameters inside the generated coroutine class, so only the path placeholders are mined from those.
Defined in:
analyzer/analyzers/cpp/oatpp.crConstant Summary
-
CPP_EXTENSIONS =
[".cpp", ".cc", ".cxx", ".h", ".hpp", ".hxx"] -
ENDPOINT_ASYNC_REGEX =
/\bENDPOINT_ASYNC\s*\(/ -
ENDPOINT_REGEX =
/\bENDPOINT\s*\(/ -
HTTP_VERBS =
Set {"GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"} -
LIBRARY_EVIDENCE_RE =
Regex.union("oatpp", "ApiController") -
Precompiled unions for analyze_file's two per-file evidence gates, so each costs a single PCRE2 match instead of up to two naive substring scans.
-
MACRO_EVIDENCE_RE =
Regex.union("ENDPOINT(", "ENDPOINT_ASYNC(") -
PATH_PARAM_REGEX =
/\{([^{}\/]+)\}/