Orxonox  0.0.5 Codename: Arcturus
Namespaces | Functions
Output.h File Reference

Defines the helper function orxout() and includes all necessary headers to use the output system. More...

#include "UtilPrereqs.h"
#include "output/OutputStream.h"

Go to the source code of this file.

Namespaces

 orxonox
 Die Wagnis Klasse hat die folgenden Aufgaben:
 

Functions

 orxonox::__DEPRECATED__ (OutputStream &COUT(int level))
 
OutputStream & orxonox::COUT (int)
 Writes output to the orxonox console. More...
 
OutputStream & orxonox::orxout (OutputLevel level=level::debug_output, const OutputContextContainer &context=context::undefined())
 This helper function returns a reference to a commonly used instance of OutputStream. More...
 
OutputStream & orxonox::orxout (OutputLevel level, OutputContextFunction context)
 Shortcut for orxout() to allow passing contexts directly as functions without using "()". More...
 

Detailed Description

Defines the helper function orxout() and includes all necessary headers to use the output system.

The output system is used to write output to the console, the logfile, and other instances of orxonox::OutputListener. Each line of output is assigned a level and a context. The level defines the type and importance of a message, e.g. if it's a fatal error or just some internal information. The context defines to which part of the program the output belongs. Levels and contexts are defined in OutputDefinitions.h

Each orxonox::OutputListener can define a mask of desired levels and contexts, to receive only a part of the output. Instances of orxonox::SubcontextOutputListener are even able to filter sub-contexts. A derivative of orxonox::BaseWriter is able to define these levels and contexts through config values.

Attention
A message sent to the output system MUST end with "endl" or the message won't be flushed.
orxout() << "Debug output" << endl;
orxout(user_info) << "Orxonox version 1.2.3" << endl;
orxout(internal_status, context::input) << "Loading joystick" << endl;