MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
FunctionSidecar.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "FunctionRequest.hpp"
4
6
7/** @brief The suffix of a function sidecar: Name.hpp becomes Name.signatures.hpp beside it. */
8inline constexpr std::string_view function_sidecar_suffix = ".signatures.hpp";
9
10/** @brief Text of the sidecar for one header, one Signature specialization per function, sorted by name. */
11[[nodiscard]] std::string render_function_sidecar(const HeaderFunctions& functions);
12
13/** @brief The line after which the sidecar include may appear: the last marker of the header. */
14[[nodiscard]] unsigned last_function_line(const HeaderFunctions& functions);
15
16/**
17 * @brief Compares the function sidecars on disk with what the generator would write, touching nothing.
18 *
19 * Reports, one message per problem: a header with MF_DESCRIBE_FUNCTION text that produced no
20 * request, a missing sidecar, a sidecar that differs, a missing, repeated or misplaced include,
21 * and a sidecar in @p existing whose header has no request left.
22 *
23 * @param headers Every header the scan covered.
24 * @param existing Sidecars found on disk under the roots, for the orphan check. Empty skips it.
25 * @return No messages when everything is current.
26 */
27[[nodiscard]] std::vector<std::string> check_function_sidecars(
28 const FunctionMap& requests,
29 const std::vector<std::filesystem::path>& headers,
30 const std::vector<std::filesystem::path>& existing);
31
32}
Cycle Behavior: The for_cycles(N) configuration controls how many times the capture operation execute...
std::vector< std::string > check_function_sidecars(const FunctionMap &requests, const std::vector< std::filesystem::path > &headers, const std::vector< std::filesystem::path > &existing)
Compares the function sidecars on disk with what the generator would write, touching nothing.
constexpr std::string_view function_sidecar_suffix
The suffix of a function sidecar: Name.hpp becomes Name.signatures.hpp beside it.
std::string render_function_sidecar(const HeaderFunctions &functions)
Text of the sidecar for one header, one Signature specialization per function, sorted by name.
std::map< std::filesystem::path, HeaderFunctions > FunctionMap
unsigned last_function_line(const HeaderFunctions &functions)
The line after which the sidecar include may appear: the last marker of the header.
Every function described by the MF_DESCRIBE_FUNCTION markers of one header.