Orxonox  0.0.5 Codename: Arcturus
MetaPickup.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 _MetaPickup_H__
36 #define _MetaPickup_H__
37 
38 #include "pickup/PickupPrereqs.h"
39 
40 #include "pickup/Pickup.h"
41 
42 namespace orxonox {
43 
50  enum class PickupMetaType
51  {
52  none,
53  use,
54  drop,
55  destroy,
57  };
58 
85  {
86 
87  public:
88  MetaPickup(Context* context);
89  virtual ~MetaPickup();
90 
91  virtual void XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode);
92 
93  virtual void changedUsed(void);
94 
99  inline PickupMetaType getMetaType(void) const
100  { return this->metaType_; }
101  const std::string& getMetaTypeAsString(void) const;
102 
103  protected:
108  inline void setMetaType(PickupMetaType type)
109  { this->metaType_ = type; }
110  void setMetaTypeAsString(const std::string& type);
111 
112  private:
113  void initialize(void);
114 
116 
123 
124  };
125 
126 }
127 
128 #endif // _TestPickup_H__
#define _PickupExport
Definition: PickupPrereqs.h:60
Declaration of the Pickup class.
PickupMetaType getMetaType(void) const
Returns the meta type of the MetaPickup.
Definition: MetaPickup.h:99
The MetaPickup uses all the PickupCarriers&#39; Pickupables.
void setMetaType(PickupMetaType type)
Set the meta type of the MetaPickup.
Definition: MetaPickup.h:108
static const std::string metaTypeUse_s
Definition: MetaPickup.h:119
::std::string string
Definition: gtest-port.h:756
static const std::string metaTypeDrop_s
Definition: MetaPickup.h:120
The MetaPickup drops all the PickupCarriers&#39; Pickupables.
The MetaPickup destroys all the PickupCarriers&#39; Pickupables.
The MetaPickup is a Pickupable that can, depending on the parameter metaTye, do different things...
Definition: MetaPickup.h:84
xmlelement
Definition: Super.h:519
static const std::string metaTypeNone_s
Static strings for the meta types.
Definition: MetaPickup.h:118
static const std::string metaTypeDestroyCarrier_s
Definition: MetaPickup.h:122
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Mode
Definition: CorePrereqs.h:102
Definition: Context.h:45
The Pickup class offers (useful) base functionality for a wide range of pickups.
Definition: Pickup.h:92
PickupMetaType
The meta type, specifying what the MetaPickup does exactly.
Definition: MetaPickup.h:50
static const std::string metaTypeDestroy_s
Definition: MetaPickup.h:121
The MetaPickup destroys the PickupCarrier.
PickupMetaType metaType_
The meta type of the MetaPickup, determines which actions are taken.
Definition: MetaPickup.h:115
Shared library macros, enums, constants and forward declarations for the questsystem module ...