MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ insert_include() [1/2]

bool MayaFlux::Reflect::Tool::insert_include ( const HeaderRequests & requests,
bool & inserted,
std::string & error )
nodiscard

Inserts the sidecar include on the line after the last marker when the header has none.

A header that already includes its sidecar anywhere is left untouched, so a misplaced include is reported by check_include and never moved.

Parameters
insertedSet to true when the header was edited.
Returns
false with error set when the header cannot be read or written.

Definition at line 41 of file Sidecar.cpp.

42{
43 unsigned last_marker = 0;
44 for (const RecordRequest& record : requests.records) {
45 last_marker = std::max(last_marker, record.line);
46 }
47 return insert_include(requests.header, last_marker, ".describe.hpp", inserted, error);
48}
bool insert_include(const HeaderRequests &requests, bool &inserted, std::string &error)
Inserts the sidecar include on the line after the last marker when the header has none.
Definition Sidecar.cpp:41
std::pair< std::shared_ptr< Kriya::BufferPipeline >, std::shared_ptr< Buffers::AudioBuffer > > record(const std::shared_ptr< Kakshya::DynamicSoundStream > &stream, uint32_t input_channel, double seconds, std::optional< uint32_t > monitor, uint32_t channel)
Record a live input channel into a stream for a number of seconds.
Definition Rigs.cpp:262
std::vector< RecordRequest > records
Definition Request.hpp:27
One described record: its qualified name and the names of its public data members.
Definition Request.hpp:15

References MayaFlux::Reflect::Tool::HeaderRequests::header, insert_include(), MayaFlux::record(), and MayaFlux::Reflect::Tool::HeaderRequests::records.

Referenced by insert_include(), run_function_build(), and run_reflect_build().

Here is the call graph for this function:
Here is the caller graph for this function: