Orxonox  0.0.5 Codename: Arcturus
MunitionContainer.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  * Fabien Vultier
24  * Co-authors:
25  * ...
26  *
27  */
28 
35 #ifndef _MunitionContainer_H__
36 #define _MunitionContainer_H__
37 
38 #include "pickup/PickupPrereqs.h"
39 
40 #include <string>
41 
42 #include "pickup/Pickup.h"
44 #include "weaponsystem/Munition.h"
45 
46 namespace orxonox
47 {
49  {
50  public:
51 
52  MunitionContainer(Context* context);
53  virtual ~MunitionContainer();
54 
55  virtual void XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode) override;
56 
57  inline const std::string& getMunitionName() const
58  { return this->munitionName_; }
59  inline int getMunitionAmount() const
60  { return this->munitionAmount_; }
61  inline int getMagazinesAmount() const
62  { return this->magazinesAmount_; }
64  { return munitionType_; }
65 
66  protected:
67  void setMunitionName(const std::string& munitionName);
68  void setMunitionAmount(int munitionAmount);
69  void setMagazinesAmount(int magazinesAmount_);
70 
71  private:
76 
77  };
78 }
79 
80 #endif // _MunitionContainer_H__
The BaseObject is the parent of all classes representing an instance in the game. ...
Definition: BaseObject.h:63
Definition of SubclassIdentifier.
#define _PickupExport
Definition: PickupPrereqs.h:60
Declaration of the Pickup class.
::std::string string
Definition: gtest-port.h:756
Definition: MunitionContainer.h:48
int getMunitionAmount() const
Definition: MunitionContainer.h:59
SubclassIdentifier< Munition > getMunitionType() const
Definition: MunitionContainer.h:63
const std::string & getMunitionName() const
Definition: MunitionContainer.h:57
xmlelement
Definition: Super.h:519
int munitionAmount_
The amount of singe bullets added.
Definition: MunitionContainer.h:74
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
std::string munitionName_
String containing the class name of the munition type (e.g. "LaserMunition")
Definition: MunitionContainer.h:73
Mode
Definition: CorePrereqs.h:102
Definition: Context.h:45
int getMagazinesAmount() const
Definition: MunitionContainer.h:61
SubclassIdentifier< Munition > munitionType_
Indentifier of the munition type.
Definition: MunitionContainer.h:72
Shared library macros, enums, constants and forward declarations for the questsystem module ...
The SubclassIdentifier acts almost like an Identifier, but has some prerequisites.
Definition: SubclassIdentifier.h:90
int magazinesAmount_
The amount of full magazines added.
Definition: MunitionContainer.h:75