Go to the documentation of this file.
50 #ifndef messageStream_H
51 #define messageStream_H
133 const string&
title()
const
159 const string& functionName
166 const char* functionName,
167 const char* sourceFileName,
168 const int sourceFileLineNumber = 0
175 const string& functionName,
176 const char* sourceFileName,
177 const int sourceFileLineNumber = 0
184 const char* functionName,
185 const char* sourceFileName,
186 const int sourceFileLineNumber,
187 const string& ioFileName,
188 const label ioStartLineNumber = -1,
189 const label ioEndLineNumber = -1
196 const char* functionName,
197 const char* sourceFileName,
198 const int sourceFileLineNumber,
206 const char* functionName,
207 const char* sourceFileName,
208 const int sourceFileLineNumber,
240 extern messageStream
Info;
269 #define FUNCTION_NAME __PRETTY_FUNCTION__
271 #define FUNCTION_NAME __func__
277 #define SeriousErrorIn(functionName) \
278 ::Foam::SeriousError((functionName), __FILE__, __LINE__)
282 #define SeriousErrorInFunction SeriousErrorIn(FUNCTION_NAME)
288 #define SeriousIOErrorIn(functionName, ios) \
289 ::Foam::SeriousError((functionName), __FILE__, __LINE__, ios)
294 #define SeriousIOErrorInFunction(ios) SeriousIOErrorIn(FUNCTION_NAME, ios)
299 #define WarningIn(functionName) \
300 ::Foam::Warning((functionName), __FILE__, __LINE__)
304 #define WarningInFunction WarningIn(FUNCTION_NAME)
310 #define IOWarningIn(functionName, ios) \
311 ::Foam::Warning((functionName), __FILE__, __LINE__, (ios))
316 #define IOWarningInFunction(ios) IOWarningIn(FUNCTION_NAME, ios)
321 #define InfoIn(functionName) \
322 ::Foam::Info((functionName), __FILE__, __LINE__)
326 #define InfoInFunction InfoIn(FUNCTION_NAME)
330 #define PoutIn(functionName) \
331 ::Foam::Pout((functionName), __FILE__, __LINE__)
335 #define PoutInFunction PoutIn(FUNCTION_NAME)
339 if (::Foam::infoDetailLevel > 0) Info
349 #define IOInfoIn(functionName, ios) \
350 ::Foam::Info((functionName), __FILE__, __LINE__, (ios))
355 #define IOInfoInFunction(ios) IOInfoIn(FUNCTION_NAME, ios)
366 #define DebugInFunction \
367 if (debug) InfoInFunction
377 #define DebugPoutInFunction \
378 if (debug) PoutInFunction
382 #define DebugVar(var) \
384 ::Foam::string oldPrefix(::Foam::Pout.prefix()); \
385 ::Foam::Pout<< "["<< __FILE__ << ":" << __LINE__ << "] "; \
386 ::Foam::Pout.prefix() = oldPrefix + #var " "; \
387 ::Foam::Pout<< var << ::Foam::endl; \
388 ::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
The output level (verbosity) of messages.
static int redirect
The output redirection of messages.
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
OSstream wrapped stdout (std::cout) with parallel prefix.
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.