class

Analyzer::Cpp::Oatpp

Inherits Analyzer < FileHelper < Reference < Object

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.

Constants

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 = /\{([^{}\/]+)\}/

Class methods

tech_name
Source

Instance methods

analyze
Source
tech

Instance-side view of the same declaration. The per-file rescues live on this base class, which has no way to name the analyzer that is running inside them, so a skipped file could not be attributed to a tech. Deriving it from analyzer_for keeps the name written exactly once.

Source