Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
FormattedTextInputStream.h
Go to the documentation of this file.
1#pragma once
2
5
6#include <string>
7#include <istream>
8#include <memory>
9
10namespace ph
11{
12
16{
17public:
18 inline FormattedTextInputStream() = default;
19
23 explicit FormattedTextInputStream(const Path& textFilePath);
24
28 explicit FormattedTextInputStream(std::string textString);
29
31
32 std::string acquireName() const override;
33
39 void readAll(std::string* out_allText);
40
44 void readAllTightly(std::string* out_allText);
45
46 // TODO: readLineTightly()?
47
49
50protected:
54 FormattedTextInputStream(std::unique_ptr<std::istream> stream, std::string streamName);
55
56private:
57 std::string m_streamName;
58};
59
60}// end namespace ph
Read text with basic auto formatting applied.
Definition FormattedTextInputStream.h:16
FormattedTextInputStream(FormattedTextInputStream &&other)=default
void readAll(std::string *out_allText)
Read all remaining text. All contents are preserved. All original input contents are preserved (inclu...
Definition FormattedTextInputStream.cpp:47
void readAllTightly(std::string *out_allText)
Read all remaining text without any whitespaces.
Definition FormattedTextInputStream.cpp:75
FormattedTextInputStream & operator=(FormattedTextInputStream &&rhs)=default
std::string acquireName() const override
Access to the stream's name. This method is not meant to be used in a high performance context,...
Definition FormattedTextInputStream.cpp:42
General path representation. Does not check whether the target actually exists (e....
Definition Path.h:21
Definition StdInputStream.h:15
The root for all renderer implementations.
Definition EEngineProject.h:6