|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
Turns each MF_DESCRIBE_FUNCTION variable in the scanned translation unit into a FunctionRequest. More...
#include <FunctionCollector.hpp>
Public Member Functions | |
| void | attach (clang::ast_matchers::MatchFinder &finder) |
Registers the matcher for the marker variables on finder. | |
| const std::vector< std::string > & | errors () const noexcept |
| std::size_t | matched () const noexcept |
| Marker variables the matcher reached, before any filtering. | |
| const FunctionMap & | requests () const noexcept |
| void | run (const clang::ast_matchers::MatchFinder::MatchResult &result) override |
Private Attributes | |
| std::vector< std::string > | m_errors |
| std::size_t | m_matched {} |
| FunctionMap | m_requests |
Turns each MF_DESCRIBE_FUNCTION variable in the scanned translation unit into a FunctionRequest.
Attach it to a MatchFinder, run the finder, then read requests() and errors(). Requests are grouped by the header holding the marker. A function that is a member, still a template, or has a parameter without a name is an error, since a parameter name is what a caller refers to.
The scan switches sidecars off, so a header that holds requests must not use what its own sidecar generates. Keep the described functions in a header of their own.
Definition at line 18 of file FunctionCollector.hpp.