Orxonox  0.0.5 Codename: Arcturus
Output.h
Go to the documentation of this file.
1 /*
2  * ORXONOX - the hottest 3D action shooter ever to exist
3  * > www.orxonox.net <
4  *
5  *
6  * License notice:
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  *
22  * Author:
23  * Fabian 'x3n' Landau
24  * Co-authors:
25  * ...
26  *
27  */
28 
63 #ifndef _Output_H__
64 #define _Output_H__
65 
66 #include "UtilPrereqs.h"
67 #include "output/OutputStream.h"
68 
69 namespace orxonox
70 {
71  // Just for convenience
72  using std::endl;
73 
81  inline OutputStream& orxout(OutputLevel level = level::debug_output, const OutputContextContainer& context = context::undefined())
82  {
83  static OutputStream stream;
84  stream.setOutputAttributes(level, context);
85  return stream;
86  }
87 
98  {
99  return orxout(level, context());
100  }
101 
102  // COUT() is deprecated, please use orxout()
103  inline __DEPRECATED__(OutputStream& COUT(int level));
104 
110  inline OutputStream& COUT(int)
111  {
112  return orxout();
113  }
114 }
115 
116 #endif /* _Output_H__ */
Stores all information about a context.
Definition: OutputDefinitions.h:112
void _UtilExport setOutputAttributes(OutputLevel level, const OutputContextContainer &context)
Defines level and context of the following output.
Definition: OutputStream.cc:78
OutputLevel
Output levels define type and importance of an output message.
Definition: OutputDefinitions.h:84
__DEPRECATED__(OutputStream &COUT(int level))
Output level, used for temporary debug output while writing code.
Definition: OutputDefinitions.h:90
OutputStream & orxout(OutputLevel level=level::debug_output, const OutputContextContainer &context=context::undefined())
This helper function returns a reference to a commonly used instance of OutputStream.
Definition: Output.h:81
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Shared library macros, enums, constants and forward declarations for the util library ...
OutputStream & COUT(int)
Writes output to the orxonox console.
Definition: Output.h:110
Declaration of the OutputStream class which is used to send output to orxonox::OutputManager.
const OutputContextContainer &( OutputContextFunction)()
Definition: OutputDefinitions.h:124
This class is used to buffer output and send it to OutputManager whenever std::endl is passed to it...
Definition: OutputStream.h:73