|
Panini 1.4.0
Header-only library for generating C++, written in C++17
|
Writes output to the console. More...
#include <ConsoleWriter.hpp>
Public Member Functions | |
| ConsoleWriter (const ConsoleWriterConfig &config=ConsoleWriterConfig()) | |
| ConsoleWriter (std::ostream &outputStream, const ConsoleWriterConfig &config=ConsoleWriterConfig()) | |
Public Member Functions inherited from panini::ConfiguredWriter< ConsoleWriterConfig > | |
| ConfiguredWriter (const ConsoleWriterConfig &config=ConsoleWriterConfig {}) | |
| virtual | ~ConfiguredWriter ()=default |
| const WriterConfig & | GetConfig () const override |
| BraceBreakingStyle | GetBraceBreakingStyle () const override |
| IncludeStyle | GetIncludeStyle () const override |
| bool | IsOnNewLine () const override |
| Writer & | operator<< (const std::string &chunk) override |
| Writer & | operator<< (const char *chunkString) override |
| Writer & | operator<< (const NextLine &command) override |
| Writer & | operator<< (const IndentPush &command) override |
| Writer & | operator<< (const IndentPop &command) override |
| Writer & | operator<< (Command &&command) override |
| void | SetIsInCommentBlock (bool value) override |
| virtual bool | IsChanged () const override |
| bool | Commit (bool force=false) override |
Public Member Functions inherited from panini::Writer | |
| virtual | ~Writer ()=default |
Protected Member Functions | |
| void | Write (const std::string &chunk) override |
| void | WriteNewLine () override |
| bool | OnCommit (bool force) override |
Protected Member Functions inherited from panini::ConfiguredWriter< ConsoleWriterConfig > | |
| void | WriteNewLine () override |
Protected Attributes | |
| std::ostream & | m_outputStream |
Protected Attributes inherited from panini::ConfiguredWriter< ConsoleWriterConfig > | |
| ConsoleWriterConfig | m_config |
Writes output to the console.
The ConsoleWriter will write to std::cout by default, which is the default output stream for console programs. You can write to a different stream by supplying it as the first argument to the constructor.
|
inlineexplicit |
Write to the default output stream for console programs.
| config | Configuration instance |
|
inlineexplicit |
Configure the output stream to use for the writer.
| outputStream | Stream used for writing |
| config | Configuration instance |
|
inlineoverrideprotectedvirtual |
Checks if the writer should commit its output to the target.
Implements panini::Writer.
|
inlineoverrideprotectedvirtual |
Writes the chunk to the console stream.
Implements panini::Writer.
|
inlineoverrideprotectedvirtual |
Writes a new line chunk to the output.
Implements panini::Writer.
|
protected |