107#define USE_DEFAULT_STREAMS
123#ifdef USE_DEFAULT_STREAMS
126#define mcout std::cout
128#define mcerr std::cerr
132#define OPEN_LOGFILE_EXPLICITLY
136class HelperForMcout {
141 static std::ofstream& get_ofstream(
void) {
142 static std::ofstream prstream_output_file;
143 return prstream_output_file;
146 HelperForMcout(
void) {
147#ifndef OPEN_LOGFILE_EXPLICITLY
149 get_ofstream().open(
"prstream_log.out");
155 ~HelperForMcout(
void) {
157 get_ofstream().flush();
158 get_ofstream().close();
164HelperForMcout __helper_for_mcout;
169#define mcout HelperForMcout::get_ofstream()
170#define mcerr HelperForMcout::get_ofstream()
188 for (
int n = 0; n < ind.
n; n++) file <<
' ';
192std::ostream&
noindent(std::ostream& f);
195#define Ifile file << indn
196#define Imcout mcout << indn
197#define Iprint(file, name) \
198 file << indn << #name << "=" << noindent << name << yesindent;
199#define Iprintf(file, name) \
201 file << indn << #name << "=" << noindent << name << yesindent; \
204#define Iprintn(file, name) \
205 file << indn << #name << "=" << noindent << name << '\n' << yesindent;
206#define Iprintnf(file, name) \
208 file << indn << #name << "=" << noindent << name << '\n' << yesindent; \
211#define Iprintan(file, name, addition) \
212 file << indn << #name << "=" << noindent << name << ' ' << addition << '\n' \
216#define Iprint2(file, name1, name2) \
217 file << indn << #name1 << "=" << noindent << name1 << ", " << #name2 << "=" \
218 << noindent << name2 << yesindent;
219#define Iprint2n(file, name1, name2) \
220 file << indn << #name1 << "=" << noindent << name1 << ", " << #name2 << "=" \
221 << noindent << name2 << '\n' << yesindent;
222#define Iprint2nf(file, name1, name2) \
224 file << indn << #name1 << "=" << noindent << name1 << ", " << #name2 \
225 << "=" << noindent << name2 << '\n' << yesindent; \
228#define Iprint3(file, name1, name2, name3) \
229 file << indn << #name1 << "=" << noindent << name1 << ", " << #name2 << "=" \
230 << noindent << name2 << ", " << #name3 << "=" << noindent << name3 \
232#define Iprint3n(file, name1, name2, name3) \
233 file << indn << #name1 << "=" << noindent << name1 << ", " << #name2 << "=" \
234 << noindent << name2 << ", " << #name3 << "=" << noindent << name3 \
235 << '\n' << yesindent;
236#define Iprint3nf(file, name1, name2, name3) \
238 file << indn << #name1 << "=" << noindent << name1 << ", " << #name2 \
239 << "=" << noindent << name2 << ", " << #name3 << "=" << noindent \
240 << name3 << '\n' << yesindent; \
243#define Iprint4n(file, name1, name2, name3, name4) \
244 file << indn << #name1 << "=" << noindent << name1 << ", " << #name2 << "=" \
245 << noindent << name2 << ", " << #name3 << "=" << noindent << name3 \
246 << ", " << #name4 << "=" << noindent << name4 << '\n' << yesindent;
std::ostream & noindent(std::ostream &f)
std::ostream & operator<<(std::ostream &file, const BGMesh &bgm)
std::ostream & yesindent(std::ostream &f)