class

CEngine

Inherits FileScanEngine < Analyzer < FileHelper < Reference < Object

Base for the C embedded HTTP server analyzers (Mongoose, CivetWeb, libmicrohttpd): every C/C++ source except the libraries' own vendored sources, one file at a time.

Constants

EXTENSIONS = [".c", ".h", ".cc", ".cpp", ".cxx", ".hpp"] of ::String

C apps embed these libraries from C++ too (CivetWeb ships a C++ wrapper).

TEST_DIR = /\/(?:tests?|unit_?tests?)\//i

A whole test/tests/unittest(s) directory segment: the mock servers a unit test starts on localhost (svr.Get("/accept_ok", ...), a CROW_ROUTE on a throwaway SimpleApp), never routes the application serves.

VENDORED = Set {"mongoose.c", "mongoose.h", "civetweb.c", "civetweb.h", "CivetServer.cpp", "CivetServer.h", "microhttpd.h"}

The libraries' own sources, vendored next to the app as the amalgamated file or as a whole checkout (third_party/civetweb/src/civetweb.c, lib/libmicrohttpd-1.0.1/doc/examples/, its tests).

VENDORED_DIR = /(?:\A|\/)(?:mongoose|civetweb|libmicrohttpd)[\w.\-]*\/(?:src|examples|tutorials|test|unittest|fuzztest|doc)\//

Class methods

test_path?(relative_path : String) : Bool

Takes the scan-base-relative path (Analyzer#base_relative_path, rooted with a leading /), never the absolute one: a tests/ directory above the scan base is not this project's test tree, and -b path/to/tests still reports its routes. Shared with the cpp_* route analyzers, which are plain Analyzers and don't go through scan_accepts?.

Source