Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/pch/src/orxonox/objects/infos/GametypeInfo.h @ 3178

Last change on this file since 3178 was 3178, checked in by rgrieder, 15 years ago

Build fix for Visual Studio 2005: Removed const qualifiers in GametypeInfo.
The problem is a compiler bug with template type deduction and const member functions.
I have made a post in the forum: https://forum.orxonox.net/viewtopic.php?f=6&t=352

  • Property svn:eol-style set to native
File size: 2.5 KB
Line 
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
29#ifndef _GametypeInfo_H__
30#define _GametypeInfo_H__
31
32#include "OrxonoxPrereqs.h"
33
34#include "Info.h"
35
36namespace orxonox
37{
38    class _OrxonoxExport GametypeInfo : public Info
39    {
40        friend class Gametype;
41
42        public:
43            GametypeInfo(BaseObject* creator);
44            virtual ~GametypeInfo();
45
46            void registerVariables();
47
48            inline bool hasStarted() const
49                { return this->bStarted_; }
50            inline bool hasEnded() const
51                { return this->bEnded_; }
52
53            inline bool isStartCountdownRunning() const
54                { return this->bStartCountdownRunning_; }
55            inline float getStartCountdown() const
56                { return this->startCountdown_; }
57
58            inline const std::string& getHUDTemplate() const
59                { return this->hudtemplate_; }
60
61            void sendAnnounceMessage(const std::string& message);
62            void sendAnnounceMessage(const std::string& message, unsigned int clientID);
63            void sendKillMessage(const std::string& message, unsigned int clientID);
64            void sendDeathMessage(const std::string& message, unsigned int clientID);
65
66            void dispatchAnnounceMessage(const std::string& message);
67            void dispatchKillMessage(const std::string& message);
68            void dispatchDeathMessage(const std::string& message);
69
70        private:
71            bool bStarted_;
72            bool bEnded_;
73            bool bStartCountdownRunning_;
74            float startCountdown_;
75            std::string hudtemplate_;
76    };
77}
78
79#endif /* _GametypeInfo_H__ */
Note: See TracBrowser for help on using the repository browser.