STORMM Source Documentation
Loading...
Searching...
No Matches
summary_file.h
1// -*-c++-*-
2#ifndef STORMM_SUMMARY_FILE_H
3#define STORMM_SUMMARY_FILE_H
4
5#include <fstream>
6#include <iostream>
7#include <string>
8#include <vector>
9#include "copyright.h"
10#include "FileManagement/file_enumerators.h"
11#include "Parsing/textfile.h"
12#include "reporting_enumerators.h"
13
14namespace stormm {
15namespace review {
16
17using diskutil::PrintSituation;
18
20constexpr int default_output_file_width = 80;
21
26int findFormatWidth(const std::ostream *foutp);
27
38std::string stormmSplash(int width);
39void stormmSplash(std::ofstream *foutp, int width = default_output_file_width);
40void stormmSplash(std::ostream *foutp = &std::cout, int width = default_output_file_width);
42
52std::string stormmWatermark(int width);
53void stormmWatermark(std::ofstream *foutp, int width = default_output_file_width);
54void stormmWatermark(std::ostream *foutp = &std::cout, int width = default_output_file_width);
56
62void summaryHeader(const std::string &description, std::ofstream *foutp, int file_width = -1);
63
75char commentSymbol(OutputSyntax format);
76char commentSymbol(GridFileSyntax format);
78
100std::string indentText(const std::string &text, const std::string &marker, int indent, int width,
101 bool mark_on_all_lines, TextEnds block_ending = TextEnds::AS_IS);
102
103std::string indentText(const std::string &text, int indent, int width,
104 TextEnds block_ending = TextEnds::AS_IS);
106
114std::string protectText(const std::string &text, char protect, int width = -1,
115 TextEnds block_ending = TextEnds::NEWLINE);
116
131void printProtectedText(const std::string &text, char protect, std::ofstream *foutp,
132 int file_width = -1, TextEnds block_ending = TextEnds::NEWLINE);
133
134void printProtectedText(const std::string &text, char protect, const std::string &output_file,
135 int file_width = -1, PrintSituation expectation = PrintSituation::APPEND,
136 TextEnds block_ending = TextEnds::NEWLINE);
138
139} // namespace review
140} // namespace stormm
141
142
143#endif