Orxonox  0.0.5 Codename: Arcturus
SubcontextOutputListener.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 
35 #ifndef _SubcontextOutputListener_H__
36 #define _SubcontextOutputListener_H__
37 
38 #include "util/UtilPrereqs.h"
39 
40 #include <set>
41 
42 #include "OutputListener.h"
43 
44 namespace orxonox
45 {
70  {
71  public:
72  SubcontextOutputListener(bool bRegister = true);
73  virtual ~SubcontextOutputListener();
74 
75  virtual void setAdditionalContextsMask(OutputContextMask mask) override;
76  void setAdditionalSubcontexts(const std::set<const OutputContextContainer*>& subcontexts);
77 
78  virtual bool acceptsOutput(OutputLevel level, const OutputContextContainer& context) const override;
79 
80  inline const std::set<OutputContextSubID>& getSubcontexts() const
81  { return this->subcontexts_; }
82 
83  private:
86  std::set<OutputContextSubID> subcontexts_;
87  };
88 }
89 
90 #endif /* _SubcontextOutputListener_H__ */
This class extends the basic OutputListener interface and adds the ability to filter sub-contexts...
Definition: SubcontextOutputListener.h:69
#define _UtilExport
Definition: UtilPrereqs.h:60
Stores all information about a context.
Definition: OutputDefinitions.h:112
OutputLevel
Output levels define type and importance of an output message.
Definition: OutputDefinitions.h:84
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Shared library macros, enums, constants and forward declarations for the util library ...
OutputContextMask subcontextsNoCheckMask_
All contexts defined by this mask don&#39;t need to be checked since we accept all sub-contexts.
Definition: SubcontextOutputListener.h:85
OutputListener is an interface which is used to receive output of a certain level and context from Ou...
Definition: OutputListener.h:51
Declaration of the OutputListener interface which receives output from orxonox::OutputManager.
const std::set< OutputContextSubID > & getSubcontexts() const
Definition: SubcontextOutputListener.h:80
std::set< OutputContextSubID > subcontexts_
The set of accepted sub-contexts.
Definition: SubcontextOutputListener.h:86
OutputContextMask subcontextsCheckMask_
All contexts defined by this mask need to be checked whether they are accepted by the set of sub-cont...
Definition: SubcontextOutputListener.h:84
uint64_t OutputContextMask
Used to store the context masks. Each bit defines a context.
Definition: OutputDefinitions.h:108