Go to the documentation of this file.
50 #ifndef messageStream_H
51 #define messageStream_H
128 const string&
title()
const
154 const string& functionName
161 const char* functionName,
162 const char* sourceFileName,
163 const int sourceFileLineNumber = 0
170 const string& functionName,
171 const char* sourceFileName,
172 const int sourceFileLineNumber = 0
179 const char* functionName,
180 const char* sourceFileName,
181 const int sourceFileLineNumber,
182 const string& ioFileName,
183 const label ioStartLineNumber = -1,
184 const label ioEndLineNumber = -1
191 const char* functionName,
192 const char* sourceFileName,
193 const int sourceFileLineNumber,
201 const char* functionName,
202 const char* sourceFileName,
203 const int sourceFileLineNumber,
235 extern messageStream
Info;
264 #define FUNCTION_NAME __PRETTY_FUNCTION__
266 #define FUNCTION_NAME __func__
272 #define SeriousErrorIn(functionName) \
273 ::Foam::SeriousError((functionName), __FILE__, __LINE__)
277 #define SeriousErrorInFunction SeriousErrorIn(FUNCTION_NAME)
283 #define SeriousIOErrorIn(functionName, ios) \
284 ::Foam::SeriousError((functionName), __FILE__, __LINE__, ios)
289 #define SeriousIOErrorInFunction(ios) SeriousIOErrorIn(FUNCTION_NAME, ios)
294 #define WarningIn(functionName) \
295 ::Foam::Warning((functionName), __FILE__, __LINE__)
299 #define WarningInFunction WarningIn(FUNCTION_NAME)
305 #define IOWarningIn(functionName, ios) \
306 ::Foam::Warning((functionName), __FILE__, __LINE__, (ios))
311 #define IOWarningInFunction(ios) IOWarningIn(FUNCTION_NAME, ios)
316 #define InfoIn(functionName) \
317 ::Foam::Info((functionName), __FILE__, __LINE__)
321 #define InfoInFunction InfoIn(FUNCTION_NAME)
325 #define PoutIn(functionName) \
326 ::Foam::Pout((functionName), __FILE__, __LINE__)
330 #define PoutInFunction PoutIn(FUNCTION_NAME)
334 if (::Foam::infoDetailLevel > 0) Info
344 #define IOInfoIn(functionName, ios) \
345 ::Foam::Info((functionName), __FILE__, __LINE__, (ios))
350 #define IOInfoInFunction(ios) IOInfoIn(FUNCTION_NAME, ios)
361 #define DebugInFunction \
362 if (debug) InfoInFunction
372 #define DebugPoutInFunction \
373 if (debug) PoutInFunction
377 #define DebugVar(var) \
379 ::Foam::string oldPrefix(::Foam::Pout.prefix()); \
380 ::Foam::Pout<< "["<< __FILE__ << ":" << __LINE__ << "] "; \
381 ::Foam::Pout.prefix() = oldPrefix + #var " "; \
382 ::Foam::Pout<< var << ::Foam::endl; \
383 ::Foam::Pout.prefix() = oldPrefix; \
int debug
Static debugging option.
Warning of possible problem.
#define InfoInFunction
Report an information message using Foam::Info.
#define InfoIn(functionName)
Report an information message using Foam::Info.
Class to handle messaging in a simple, consistent stream-based manner.
errorSeverity
Message type, or error severity flags.
OSstream & masterStream(const label communicator)
Convert to OSstream.
static int level
Control the output verbosity of messageStream.
An IOstream is an abstract base class for all input/output systems; be they streams,...
#define SeriousIOErrorIn(functionName, ios)
Report an IO error message using Foam::SeriousError.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A class for handling character strings derived from std::string.
OSstream & operator()()
Explicitly convert to OSstream for << operations.
prefixOSstream Pout
An Ostream wrapper for parallel output to std::cout.
messageStream InfoErr
Information stream (uses stderr - output is on the master only)
#define SeriousErrorIn(functionName)
Report an error message using Foam::SeriousError.
#define PoutIn(functionName)
Report an information message using Foam::Pout.
#define IOWarningIn(functionName, ios)
Report an IO warning using Foam::Warning.
messageStream Info
Information stream (uses stdout - output is on the master only)
#define IOInfoIn(functionName, ios)
Report an IO information message using Foam::Info.
int maxErrors() const
The maximum number of errors before program termination.
Generic output stream using a standard (STL) stream.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
int infoDetailLevel
Global for selective suppression of Info output.
#define PoutInFunction
Report an information message using Foam::Pout.
messageStream SeriousError
A serious problem - eg, data corruption.
const string & title() const
The title of this error type.
#define WarningIn(functionName)
Report a warning using Foam::Warning.
messageStream(const string &title, const errorSeverity severity, const int maxErrors=0)
Construct from components.
General information output.
Information, but on stderr.
#define DebugVar(var)
Report a variable name and value.
const string & prefix() const
Return the stream prefix.