Public Member Functions | |
| const std::string & | path () const |
| the buffer file's path; what the data-format readers actually open when --data - | |
Private Member Functions | |
| Stdin_Data_File (const Stdin_Data_File &) | |
| the temporary file has one owner | |
| Stdin_Data_File & | operator= (const Stdin_Data_File &) |
| the temporary file has one owner | |
| void | remove_file () |
Private Attributes | |
| std::string | _path |
| path of the temporary file backing the buffered stdin | |
--data -: the dataset arrives on stdin (the upstream half of the Unix-pipe story; the downstream half is the prose-free stdout of the machine output formats). A pipe is not seekable and is consumed once, while the readers need both: the TRN reader seeks back to the data start after the header scan, and the accessor is constructed again for a --compare-config second scenario. The bytes are therefore buffered ONCE into a temporary file that backs every reader and is removed when the run ends. std::filesystem (C++17) keeps this portable, so no second platform branch is introduced - extern_bridge.hpp stays the only platform-sensitive code in FST4.
|
inlineprivate |
must never throw: it also runs from the destructor. std::filesystem::remove's error_code overload is noexcept, but constructing the path argument from _path allocates, so the catch-all is what actually makes this destructor-safe