Messages Class Reference

For global ARTS verbosity settings. More...

#include <messages.h>

List of all members.

Public Member Functions

bool valid ()
 Check if artsmessages contains valid message levels.
bool sufficient_priority_agenda (Index priority)
 Does the current message have sufficient priority for agenda?
bool sufficient_priority_screen (Index priority)
 Does the current message have sufficient priority for screen?
bool sufficient_priority_file (Index priority)
 Does the current message have sufficient priority for file?
template<class T>
void Print (ostream &os, Index priority, const T &t)
 Print a message to stream and report file.

Public Attributes

Index va
 Verbosity for agenda output. Can be 0-3.
Index vs
 Verbosity for output to screen. Can be 0-3.
Index vf
 Verbosity for output to file. Can be 0-3.


Detailed Description

For global ARTS verbosity settings.

This class controls the ARTS verbosity.

There are four different output streams: out0, out1, out2, and out3. They have different priority, out0 the highest, out3 the lowest.

The verbosity level can be set separately for file and screen output. In both cases the level can range from 0 to 3, where 0 = no output (except error messages), 1 = only out1, 2 = out1+out2, and 3 = all output.

For agenda output, the verbosity level can also be between 0 and 3. The condition for agenda output is evaluated in addition to the screen or file output condition. In other words, output from a sub-agenda will only be shown on the screen, if its priority is high enough for both the agenda verbosity setting, and the screen verbosity setting.

Author:
Stefan Buehler
Date:
2008-07-29

Definition at line 74 of file messages.h.


Member Function Documentation

bool Messages::valid (  ) 

Check if artsmessages contains valid message levels.

Returns:
True if ok.

Definition at line 62 of file messages.cc.

Referenced by set_reporting_level().

bool Messages::sufficient_priority_agenda ( Index  priority  ) 

Does the current message have sufficient priority for agenda?

Parameters:
priority Priority of current message.
Returns:
true if priority is sufficient, otherwise false.

Definition at line 77 of file messages.cc.

References va.

Referenced by Print().

bool Messages::sufficient_priority_screen ( Index  priority  ) 

Does the current message have sufficient priority for screen?

Parameters:
priority Priority of current message.
Returns:
true if priority is sufficient, otherwise false.

Definition at line 88 of file messages.cc.

References vs.

Referenced by Print().

bool Messages::sufficient_priority_file ( Index  priority  ) 

Does the current message have sufficient priority for file?

Parameters:
priority Priority of current message.
Returns:
true if priority is sufficient, otherwise false.

Definition at line 99 of file messages.cc.

References vf.

Referenced by Print().

template<class T>
void Messages::Print ( ostream &  os,
Index  priority,
const T &  t 
) [inline]

Print a message to stream and report file.

The message is printed only if the priority is higher than specified in messages. (Low number means high priority.)

Parameters:
os Stream to print to (cout or cerr).
priority Priority of this message (0-3, 0=highest).
t The stuff to print (can be of any type).
Author:
Stefan Buehler
See also:
Messages

Definition at line 91 of file messages.h.

References in_main_agenda, report_file, sufficient_priority_agenda(), sufficient_priority_file(), and sufficient_priority_screen().

Referenced by operator<<().


Member Data Documentation

Verbosity for agenda output. Can be 0-3.

Definition at line 113 of file messages.h.

Referenced by main(), set_reporting_level(), and sufficient_priority_agenda().

Verbosity for output to screen. Can be 0-3.

Definition at line 115 of file messages.h.

Referenced by main(), set_reporting_level(), and sufficient_priority_screen().

Verbosity for output to file. Can be 0-3.

Definition at line 117 of file messages.h.

Referenced by main(), set_reporting_level(), and sufficient_priority_file().


The documentation for this class was generated from the following files:

Generated on Mon Mar 23 14:07:01 2009 for ARTS by  doxygen 1.5.6