BasicStringFileReader.ixx File
Basic file-to-string reader implementation. More...
Included Headers
#include <format>
#include <fstream>
#include <string>
#include <stdexcept>
#include <helios.engine.util.io.StringFileReader>
Namespaces Index
| namespace | helios |
| namespace | engine |
| namespace | util |
| namespace | io |
Classes Index
| class | BasicStringFileReader |
|
Basic implementation of a string file reader. More... | |
Description
Basic file-to-string reader implementation.
File Listing
The file content with the documentation metadata removed is:
16export namespace helios::engine::util::io {
22 class BasicStringFileReader : public StringFileReader {
29 [[nodiscard]] std::string getContents(const std::string& filename) const override {
32 if (!infile) {
35 throw std::runtime_error(msg);
38 std::string line;
39 std::string fileContents;
41 fileContents += line + "\n";
43 return fileContents;
49 [[nodiscard]] bool readInto( const std::string& filename, std::string& contents) const noexcept override {
52 if (!infile) {
56 std::string line;
57 std::string fileContents;
60 fileContents += line + "\n";
63 contents = fileContents;
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.