47 #ifndef messageStream_H
48 #define messageStream_H
115 const string&
title()
const
138 const char* sourceFileName,
139 const int sourceFileLineNumber = 0
147 const char* sourceFileName,
148 const int sourceFileLineNumber = 0
156 const char* sourceFileName,
157 const int sourceFileLineNumber,
158 const string& ioFileName,
159 const label ioLineNumber = -1
167 const char* sourceFileName,
168 const int sourceFileLineNumber,
177 const char* sourceFileName,
178 const int sourceFileLineNumber,
198 extern messageStream
Info;
216 #define FUNCTION_NAME __PRETTY_FUNCTION__
218 #define FUNCTION_NAME __func__
224 #define SeriousErrorIn(functionName) \
225 ::Foam::SeriousError((functionName), __FILE__, __LINE__)
229 #define SeriousErrorInFunction SeriousErrorIn(FUNCTION_NAME)
235 #define SeriousIOErrorIn(functionName, ios) \
236 ::Foam::SeriousError((functionName), __FILE__, __LINE__, ios)
241 #define SeriousIOErrorInFunction(ios) SeriousIOErrorIn(FUNCTION_NAME, ios)
246 #define WarningIn(functionName) \
247 ::Foam::Warning((functionName), __FILE__, __LINE__)
251 #define WarningInFunction WarningIn(FUNCTION_NAME)
257 #define IOWarningIn(functionName, ios) \
258 ::Foam::Warning((functionName), __FILE__, __LINE__, (ios))
263 #define IOWarningInFunction(ios) IOWarningIn(FUNCTION_NAME, ios)
268 #define InfoIn(functionName) \
269 ::Foam::Info((functionName), __FILE__, __LINE__)
273 #define InfoInFunction InfoIn(FUNCTION_NAME)
277 if (::Foam::writeInfoHeader) Info
287 #define IOInfoIn(functionName, ios) \
288 ::Foam::Info((functionName), __FILE__, __LINE__, (ios))
293 #define IOInfoInFunction(ios) IOInfoIn(FUNCTION_NAME, ios)
304 #define DebugInFunction \
305 if (debug) InfoInFunction
309 #define DebugVar(var) \
311 ::Foam::string oldPrefix(::Foam::Pout.prefix()); \
312 ::Foam::Pout<< "["<< __FILE__ << ":" << __LINE__ << "] "; \
313 ::Foam::Pout.prefix() = oldPrefix + #var " "; \
314 ::Foam::Pout<< var << ::Foam::endl; \
315 ::Foam::Pout.prefix() = oldPrefix; \
An IOstream is an abstract base class for all input/output systems; be they streams,...
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
A functionName is a word starting with '#'.
Class to handle messaging in a simple, consistent stream-based manner.
errorSeverity
Severity flags.
OSstream & operator()(const char *functionName, const char *sourceFileName, const int sourceFileLineNumber=0)
Convert to OSstream.
int maxErrors() const
Return the maximum number of errors before program termination.
messageStream(const string &title, const errorSeverity, const int maxErrors=0)
Construct from components.
const string & title() const
Return the title of this error type.
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 SeriousError