Orxonox  0.0.5 Codename: Arcturus
CommandNotification.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  * Damian 'Mozork' Frick
24  * Co-authors:
25  * ...
26  *
27  */
28 
35 #ifndef _CommandNotification_H__
36 #define _CommandNotification_H__
37 
39 
40 #include <string>
42 
43 namespace orxonox {
44 
69  {
70 
71  public:
72  CommandNotification(Context* context);
73  virtual ~CommandNotification();
74 
75  virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
76 
81  const std::string& getCommand(void)
82  { return this->command_; }
88  { return this->preMessage_; }
94  { return this->postMessage_; }
95 
96  protected:
97  virtual const std::string& createNotificationMessage(void);
98 
99  private:
103 
104  void registerVariables(void);
105 
111  { this->command_ = command; }
117  { this->preMessage_ = message; }
123  { this->postMessage_ = message; }
124  };
125 
126 }
127 
128 #endif // _CommandNotification_H__
std::string command_
The name of the command.
Definition: CommandNotification.h:100
void setPostMessage(const std::string &message)
Set the postMessage, the last part of the displayed message.
Definition: CommandNotification.h:122
::std::string string
Definition: gtest-port.h:756
A NotificationDispatcher is an entity that, upon being triggered, dispatches (or sends) a specified N...
Definition: NotificationDispatcher.h:75
Output level, used for messages directed to the user (e.g. "Press any key to continue") ...
Definition: OutputDefinitions.h:89
#define _NotificationsExport
Definition: NotificationsPrereqs.h:60
std::string preMessage_
The first part of the displayed message.
Definition: CommandNotification.h:101
xmlelement
Definition: Super.h:519
This class implements a method of displaying a Notification with information to an input command and ...
Definition: CommandNotification.h:68
Definition of the NotificationDispatcher class.
std::string postMessage_
The last part of the displayed message.
Definition: CommandNotification.h:102
const std::string & getPostMessage(void)
Get the postMessage, the last part of the displayed message.
Definition: CommandNotification.h:93
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION_MULTI() command(const std::string &fragment)
Returns a list of commands and groups and also supports auto-completion of the arguments of these com...
Definition: ArgumentCompletionFunctions.cc:178
Shared library macros, enums, constants and forward declarations for the questsystem module ...
Mode
Definition: CorePrereqs.h:102
void setPreMessage(const std::string &message)
Set the preMessage, the first part of the displayed message.
Definition: CommandNotification.h:116
const std::string & getPreMessage(void)
Get the preMessage, the first part of the displayed message.
Definition: CommandNotification.h:87
void setCommand(const std::string &command)
Set the command, whose key is displayed.
Definition: CommandNotification.h:110
Definition: Context.h:45
const std::string & getCommand(void)
Get the command, whose key is displayed.
Definition: CommandNotification.h:81