Orxonox  0.0.5 Codename: Arcturus
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
OutputDefinitions.h File Reference

Defines output levels and output contexts. More...

#include "util/UtilPrereqs.h"
#include <string>

Go to the source code of this file.

Classes

struct  orxonox::OutputContextContainer
 Stores all information about a context. More...
 

Namespaces

 orxonox
 Die Wagnis Klasse hat die folgenden Aufgaben:
 
 orxonox::context
 
 orxonox::context::misc
 
 orxonox::level
 

Macros

#define REGISTER_OUTPUT_CONTEXT(name)   inline const OutputContextContainer& name() { static OutputContextContainer context = registerContext(#name); return context; }
 Defines a context function with a given name. More...
 
#define REGISTER_OUTPUT_SUBCONTEXT(name, subname)   inline const OutputContextContainer& subname() { static const OutputContextContainer context = registerContext(#name, #subname); return context; }
 Defines a sub-context. More...
 

Typedefs

typedef const OutputContextContainer &( orxonox::OutputContextFunction) ()
 
typedef uint64_t orxonox::OutputContextMask
 Used to store the context masks. Each bit defines a context. More...
 
typedef uint16_t orxonox::OutputContextSubID
 Used to store the IDs of sub-contexts. Each number except context::no_subcontext defines a sub-context. More...
 

Enumerations

enum  orxonox::level::OutputLevel {
  orxonox::level::all = 0xFFFF, orxonox::level::none = 0x0000, orxonox::level::message = 0x0001, orxonox::level::debug_output = 0x0002,
  orxonox::level::user_error = 0x0004, orxonox::level::user_warning = 0x0008, orxonox::level::user_status = 0x0010, orxonox::level::user_info = 0x0020,
  orxonox::level::internal_error = 0x0040, orxonox::level::internal_warning = 0x0080, orxonox::level::internal_status = 0x0100, orxonox::level::internal_info = 0x0200,
  orxonox::level::verbose = 0x0400, orxonox::level::verbose_more = 0x0800, orxonox::level::verbose_ultra = 0x1000
}
 Output levels define type and importance of an output message. More...
 

Functions

_UtilExport const OutputContextContainer & orxonox::registerContext (const std::string &name, const std::string &subname="")
 Registers a context. More...
 

Variables

static constexpr OutputContextMask orxonox::context::all = 0xFFFFFFFFFFFFFFFFull
 Context mask, all bits set to 1. More...
 
static constexpr OutputContextSubID orxonox::context::no_subcontext = 0
 Used as ID for contexts which are not sub-contexts. More...
 
static constexpr OutputContextMask orxonox::context::none = 0x0000000000000000ull
 Context mask, all bits set to 0. More...
 

Detailed Description

Defines output levels and output contexts.

Macro Definition Documentation

#define REGISTER_OUTPUT_CONTEXT (   name)    inline const OutputContextContainer& name() { static OutputContextContainer context = registerContext(#name); return context; }

Defines a context function with a given name.

Parameters
nameName of the context

Context functions return a reference to a OutputContextContainer. Context functions (or the containers they return) can be passed to orxout() as context argument.

#define REGISTER_OUTPUT_SUBCONTEXT (   name,
  subname 
)    inline const OutputContextContainer& subname() { static const OutputContextContainer context = registerContext(#name, #subname); return context; }

Defines a sub-context.

Parameters
nameName of the main-context
subnameName of the sub-context

Sub-contexts act like normal contexts, except that multiple sub-contexts share the context mask of their main-context. This allows contexts with more descriptive names (e.g. input::keyboard) and they can be filtered individually by derivatives of orxonox::SubcontextOutputListener.