|
Panini 1.4.0
Header-only library for generating C++, written in C++17
|
Command for outputting comment blocks over multiple lines. More...
#include <CommentBlock.hpp>
Public Member Functions | |
| CommentBlock (std::function< void(Writer &)> &&callback) noexcept | |
| void | Visit (Writer &writer) override |
Public Member Functions inherited from panini::Command | |
| virtual | ~Command ()=default |
Command for outputting comment blocks over multiple lines.
A comment block starts with /* and ends with */. Chunks output inside the callback are prefixed with " * " to produce multi-line comments.
You can still use other commands inside the comment block, including indentation. Note that the command adds a new line automatically.
Example:
Output:
|
inlineexplicitnoexcept |
Construct a CommentBlock with a callback that is moved into the instance.
The callback is called when the command is visited by a Writer. Chunks output inside the callback will be prefixed with the C multi- line comment syntax.
|
inlineoverridevirtual |
Accepts a Writer to write chunks to the output.
Implements panini::Command.