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
5
namespace
MayaFlux::Reflect::Tool
{
6
7
/** @brief The suffix of a function sidecar: Name.hpp becomes Name.signatures.hpp beside it. */
8
inline
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
}
FunctionRequest.hpp
existing
Cycle Behavior: The for_cycles(N) configuration controls how many times the capture operation execute...
MayaFlux::Reflect::Tool::check_function_sidecars
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.
Definition
FunctionSidecar.cpp:66
MayaFlux::Reflect::Tool::function_sidecar_suffix
constexpr std::string_view function_sidecar_suffix
The suffix of a function sidecar: Name.hpp becomes Name.signatures.hpp beside it.
Definition
FunctionSidecar.hpp:8
MayaFlux::Reflect::Tool::render_function_sidecar
std::string render_function_sidecar(const HeaderFunctions &functions)
Text of the sidecar for one header, one Signature specialization per function, sorted by name.
Definition
FunctionSidecar.cpp:7
MayaFlux::Reflect::Tool::FunctionMap
std::map< std::filesystem::path, HeaderFunctions > FunctionMap
Definition
FunctionRequest.hpp:31
MayaFlux::Reflect::Tool::last_function_line
unsigned last_function_line(const HeaderFunctions &functions)
The line after which the sidecar include may appear: the last marker of the header.
Definition
FunctionSidecar.cpp:57
MayaFlux::Reflect::Tool
Definition
Build.cpp:19
MayaFlux::Reflect::Tool::HeaderFunctions
Every function described by the MF_DESCRIBE_FUNCTION markers of one header.
Definition
FunctionRequest.hpp:26
src
Tools
Reflect
FunctionSidecar.hpp
Generated by
1.15.0