messageStream.H File Reference
Include dependency graph for messageStream.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  messageStream
 Class to handle messaging in a simple, consistent stream-based manner. More...
 

Namespaces

 Foam
 Namespace for OpenFOAM.
 

Macros

#define FUNCTION_NAME   __func__
 
#define SeriousErrorIn(functionName)   ::Foam::SeriousError((functionName), __FILE__, __LINE__)
 Report an error message using Foam::SeriousError. More...
 
#define SeriousErrorInFunction   SeriousErrorIn(FUNCTION_NAME)
 Report an error message using Foam::SeriousError. More...
 
#define SeriousIOErrorIn(functionName, ios)   ::Foam::SeriousError((functionName), __FILE__, __LINE__, ios)
 Report an IO error message using Foam::SeriousError. More...
 
#define SeriousIOErrorInFunction(ios)   SeriousIOErrorIn(FUNCTION_NAME, ios)
 Report an IO error message using Foam::SeriousError. More...
 
#define WarningIn(functionName)   ::Foam::Warning((functionName), __FILE__, __LINE__)
 Report a warning using Foam::Warning. More...
 
#define WarningInFunction   WarningIn(FUNCTION_NAME)
 Report a warning using Foam::Warning. More...
 
#define IOWarningIn(functionName, ios)   ::Foam::Warning((functionName), __FILE__, __LINE__, (ios))
 Report an IO warning using Foam::Warning. More...
 
#define IOWarningInFunction(ios)   IOWarningIn(FUNCTION_NAME, ios)
 Report an IO warning using Foam::Warning. More...
 
#define InfoIn(functionName)   ::Foam::Info((functionName), __FILE__, __LINE__)
 Report an information message using Foam::Info. More...
 
#define InfoInFunction   InfoIn(FUNCTION_NAME)
 Report an information message using Foam::Info. More...
 
#define PoutIn(functionName)   ::Foam::Pout((functionName), __FILE__, __LINE__)
 Report an information message using Foam::Pout. More...
 
#define PoutInFunction   PoutIn(FUNCTION_NAME)
 Report an information message using Foam::Pout. More...
 
#define DetailInfo   if (::Foam::infoDetailLevel > 0) Info
 Write to Foam::Info if the Foam::infoDetailLevel is +ve non-zero (default) More...
 
#define Log   if (log) Info
 Report write to Foam::Info if the local log switch is true. More...
 
#define IOInfoIn(functionName, ios)   ::Foam::Info((functionName), __FILE__, __LINE__, (ios))
 Report an IO information message using Foam::Info. More...
 
#define IOInfoInFunction(ios)   IOInfoIn(FUNCTION_NAME, ios)
 Report an IO information message using Foam::Info. More...
 
#define DebugInfo   if (debug) Info
 Report an information message using Foam::Info. More...
 
#define DebugInFunction   if (debug) InfoInFunction
 Report an information message using Foam::Info. More...
 
#define DebugPout   if (debug) Pout
 Report an information message using Foam::Pout. More...
 
#define DebugPoutInFunction   if (debug) PoutInFunction
 Report an information message using Foam::Pout. More...
 
#define DebugVar(var)
 Report a variable name and value. More...
 

Variables

int infoDetailLevel
 Global for selective suppression of Info output. More...
 
messageStream Info
 Information stream (uses stdout - output is on the master only) More...
 
messageStream InfoErr
 Information stream (uses stderr - output is on the master only) More...
 
messageStream Warning
 
messageStream SeriousError
 

Detailed Description

Original source file messageStream.H

Definition in file messageStream.H.

Macro Definition Documentation

◆ FUNCTION_NAME

#define FUNCTION_NAME   __func__

Definition at line 270 of file messageStream.H.

◆ SeriousErrorIn

#define SeriousErrorIn (   functionName)    ::Foam::SeriousError((functionName), __FILE__, __LINE__)

Report an error message using Foam::SeriousError.

for functionName in file __FILE__ at line __LINE__

Definition at line 276 of file messageStream.H.

◆ SeriousErrorInFunction

#define SeriousErrorInFunction   SeriousErrorIn(FUNCTION_NAME)

Report an error message using Foam::SeriousError.

for FUNCTION_NAME in file __FILE__ at line __LINE__

Definition at line 281 of file messageStream.H.

◆ SeriousIOErrorIn

#define SeriousIOErrorIn (   functionName,
  ios 
)    ::Foam::SeriousError((functionName), __FILE__, __LINE__, ios)

Report an IO error message using Foam::SeriousError.

for functionName in file __FILE__ at line __LINE__ for a particular IOstream

Definition at line 287 of file messageStream.H.

◆ SeriousIOErrorInFunction

#define SeriousIOErrorInFunction (   ios)    SeriousIOErrorIn(FUNCTION_NAME, ios)

Report an IO error message using Foam::SeriousError.

for FUNCTION_NAME in file __FILE__ at line __LINE__ for a particular IOstream

Definition at line 293 of file messageStream.H.

◆ WarningIn

#define WarningIn (   functionName)    ::Foam::Warning((functionName), __FILE__, __LINE__)

Report a warning using Foam::Warning.

for functionName in file __FILE__ at line __LINE__

Definition at line 298 of file messageStream.H.

◆ WarningInFunction

#define WarningInFunction   WarningIn(FUNCTION_NAME)

Report a warning using Foam::Warning.

for FUNCTION_NAME in file __FILE__ at line __LINE__

Definition at line 303 of file messageStream.H.

◆ IOWarningIn

#define IOWarningIn (   functionName,
  ios 
)    ::Foam::Warning((functionName), __FILE__, __LINE__, (ios))

Report an IO warning using Foam::Warning.

for functionName in file __FILE__ at line __LINE__ for a particular IOstream

Definition at line 309 of file messageStream.H.

◆ IOWarningInFunction

#define IOWarningInFunction (   ios)    IOWarningIn(FUNCTION_NAME, ios)

Report an IO warning using Foam::Warning.

for FUNCTION_NAME in file __FILE__ at line __LINE__ for a particular IOstream

Definition at line 315 of file messageStream.H.

◆ InfoIn

#define InfoIn (   functionName)    ::Foam::Info((functionName), __FILE__, __LINE__)

Report an information message using Foam::Info.

for functionName in file __FILE__ at line __LINE__

Definition at line 320 of file messageStream.H.

◆ InfoInFunction

#define InfoInFunction   InfoIn(FUNCTION_NAME)

Report an information message using Foam::Info.

for FUNCTION_NAME in file __FILE__ at line __LINE__

Definition at line 325 of file messageStream.H.

◆ PoutIn

#define PoutIn (   functionName)    ::Foam::Pout((functionName), __FILE__, __LINE__)

Report an information message using Foam::Pout.

for functionName in file __FILE__ at line __LINE__

Definition at line 329 of file messageStream.H.

◆ PoutInFunction

#define PoutInFunction   PoutIn(FUNCTION_NAME)

Report an information message using Foam::Pout.

for FUNCTION_NAME in file __FILE__ at line __LINE__

Definition at line 334 of file messageStream.H.

◆ DetailInfo

#define DetailInfo   if (::Foam::infoDetailLevel > 0) Info

Write to Foam::Info if the Foam::infoDetailLevel is +ve non-zero (default)

Definition at line 337 of file messageStream.H.

◆ Log

#define Log   if (log) Info

Report write to Foam::Info if the local log switch is true.

Definition at line 341 of file messageStream.H.

◆ IOInfoIn

#define IOInfoIn (   functionName,
  ios 
)    ::Foam::Info((functionName), __FILE__, __LINE__, (ios))

Report an IO information message using Foam::Info.

for functionName in file __FILE__ at line __LINE__ for a particular IOstream

Definition at line 348 of file messageStream.H.

◆ IOInfoInFunction

#define IOInfoInFunction (   ios)    IOInfoIn(FUNCTION_NAME, ios)

Report an IO information message using Foam::Info.

for FUNCTION_NAME in file __FILE__ at line __LINE__ for a particular IOstream

Definition at line 354 of file messageStream.H.

◆ DebugInfo

#define DebugInfo   if (debug) Info

Report an information message using Foam::Info.

if the local debug switch is true

Definition at line 359 of file messageStream.H.

◆ DebugInFunction

#define DebugInFunction   if (debug) InfoInFunction

Report an information message using Foam::Info.

for FUNCTION_NAME in file __FILE__ at line __LINE__ if the local debug switch is true

Definition at line 365 of file messageStream.H.

◆ DebugPout

#define DebugPout   if (debug) Pout

Report an information message using Foam::Pout.

if the local debug switch is true

Definition at line 370 of file messageStream.H.

◆ DebugPoutInFunction

#define DebugPoutInFunction   if (debug) PoutInFunction

Report an information message using Foam::Pout.

for FUNCTION_NAME in file __FILE__ at line __LINE__ if the local debug switch is true

Definition at line 376 of file messageStream.H.

◆ DebugVar

#define DebugVar (   var)
Value:
{ \
::Foam::string oldPrefix(::Foam::Pout.prefix()); \
::Foam::Pout<< "["<< __FILE__ << ":" << __LINE__ << "] "; \
::Foam::Pout.prefix() = oldPrefix + #var " "; \
::Foam::Pout.prefix() = oldPrefix; \
}

Report a variable name and value.

using Foam::Pout in file __FILE__ at line __LINE__

Definition at line 381 of file messageStream.H.

Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:350
Foam::string
A class for handling character strings derived from std::string.
Definition: string.H:73
Foam::Pout
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
Foam::prefixOSstream::prefix
const string & prefix() const
Return the stream prefix.
Definition: prefixOSstream.H:101