Go to the documentation of this file.
50 #ifndef messageStream_H
51 #define messageStream_H
130 const string&
title()
const
157 const char* functionName,
158 const char* sourceFileName,
159 const int sourceFileLineNumber = 0
166 const string& functionName,
167 const char* sourceFileName,
168 const int sourceFileLineNumber = 0
175 const char* functionName,
176 const char* sourceFileName,
177 const int sourceFileLineNumber,
178 const string& ioFileName,
179 const label ioStartLineNumber = -1,
180 const label ioEndLineNumber = -1
187 const char* functionName,
188 const char* sourceFileName,
189 const int sourceFileLineNumber,
197 const char* functionName,
198 const char* sourceFileName,
199 const int sourceFileLineNumber,
231 extern messageStream
Info;
260 #define FUNCTION_NAME __PRETTY_FUNCTION__
262 #define FUNCTION_NAME __func__
268 #define SeriousErrorIn(functionName) \
269 ::Foam::SeriousError((functionName), __FILE__, __LINE__)
273 #define SeriousErrorInFunction SeriousErrorIn(FUNCTION_NAME)
279 #define SeriousIOErrorIn(functionName, ios) \
280 ::Foam::SeriousError((functionName), __FILE__, __LINE__, ios)
285 #define SeriousIOErrorInFunction(ios) SeriousIOErrorIn(FUNCTION_NAME, ios)
290 #define WarningIn(functionName) \
291 ::Foam::Warning((functionName), __FILE__, __LINE__)
295 #define WarningInFunction WarningIn(FUNCTION_NAME)
301 #define IOWarningIn(functionName, ios) \
302 ::Foam::Warning((functionName), __FILE__, __LINE__, (ios))
307 #define IOWarningInFunction(ios) IOWarningIn(FUNCTION_NAME, ios)
312 #define InfoIn(functionName) \
313 ::Foam::Info((functionName), __FILE__, __LINE__)
317 #define InfoInFunction InfoIn(FUNCTION_NAME)
321 #define PoutIn(functionName) \
322 ::Foam::Pout((functionName), __FILE__, __LINE__)
326 #define PoutInFunction PoutIn(FUNCTION_NAME)
330 if (::Foam::infoDetailLevel > 0) Info
340 #define IOInfoIn(functionName, ios) \
341 ::Foam::Info((functionName), __FILE__, __LINE__, (ios))
346 #define IOInfoInFunction(ios) IOInfoIn(FUNCTION_NAME, ios)
357 #define DebugInFunction \
358 if (debug) InfoInFunction
368 #define DebugPoutInFunction \
369 if (debug) PoutInFunction
373 #define DebugVar(var) \
375 ::Foam::string oldPrefix(::Foam::Pout.prefix()); \
376 ::Foam::Pout<< "["<< __FILE__ << ":" << __LINE__ << "] "; \
377 ::Foam::Pout.prefix() = oldPrefix + #var " "; \
378 ::Foam::Pout<< var << ::Foam::endl; \
379 ::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
Controls 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.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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
Return the maximum number of errors before program termination.
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
Return 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.