Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/sound2/src/orxonox/objects/quest/QuestItem.h @ 3050

Last change on this file since 3050 was 3013, checked in by bknecht, 16 years ago

merged sound changes into sound2 use sound2 from now on

  • Property svn:eol-style set to native
  • Property svn:mergeinfo set to (toggle deleted branches)
    /code/branches/lodfinal/src/orxonox/objects/quest/QuestItem.hmergedeligible
    /code/branches/pickups2/src/orxonox/objects/quest/QuestItem.hmergedeligible
    /code/branches/sound/src/orxonox/objects/quest/QuestItem.hmergedeligible
    /code/trunk/src/orxonox/objects/quest/QuestItem.hmergedeligible
    /code/branches/buildsystem2/src/orxonox/objects/quest/QuestItem.h2506-2658
    /code/branches/buildsystem3/src/orxonox/objects/quest/QuestItem.h2662-2708
    /code/branches/gui/src/orxonox/objects/quest/QuestItem.h2795-2894
    /code/branches/miniprojects/src/orxonox/objects/quest/QuestItem.h2754-2824
    /code/branches/network/src/orxonox/objects/quest/QuestItem.h2356
    /code/branches/network64/src/orxonox/objects/quest/QuestItem.h2210-2355
    /code/branches/objecthierarchy2/src/orxonox/objects/quest/QuestItem.h2171-2479
    /code/branches/overlay/src/orxonox/objects/quest/QuestItem.h2117-2385
    /code/branches/physics/src/orxonox/objects/quest/QuestItem.h2107-2439
    /code/branches/physics_merge/src/orxonox/objects/quest/QuestItem.h2436-2457
    /code/branches/presentation/src/orxonox/objects/quest/QuestItem.h2369-2652,​2654-2660
    /code/branches/questsystem2/src/orxonox/objects/quest/QuestItem.h2107-2259
    /code/branches/questsystem5/src/orxonox/objects/quest/QuestItem.h2776-2905
    /code/branches/weapon2/src/orxonox/objects/quest/QuestItem.h2107-2488
    /code/branches/weaponsystem/src/orxonox/objects/quest/QuestItem.h2742-2890
File size: 3.0 KB
RevLine 
[1992]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 */
[2261]28 
29/**
[2911]30    @file QuestItem.h
[2662]31    @brief Definition of the QuestItem class.
32        The QuestItem is the parent class of Quest and QuestHint.
[2261]33*/
[2092]34
[2261]35
[1992]36#ifndef _QuestItem_H__
37#define _QuestItem_H__
38
[2095]39#include "OrxonoxPrereqs.h"
40
[1992]41#include <string>
42
[2068]43#include "core/BaseObject.h"
44#include "core/XMLPort.h"
[1992]45
[2662]46namespace orxonox
47{
[1992]48    /**
49    @brief
[2261]50        Functions as a base class for quest classes such as Quest or QuestHint.
[2093]51        Has a unique identifier and a description.
[1992]52    @author
[2093]53        Damian 'Mozork' Frick
[1992]54    */
[2095]55    class _OrxonoxExport QuestItem : public BaseObject
[1992]56    {
[2092]57
[2093]58        public:
[2092]59            QuestItem(BaseObject* creator);
[2093]60            virtual ~QuestItem();
[2092]61
[2261]62            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestItem object through XML.
[2092]63
[2261]64            /**
65            @brief Returns the id of this QuestItem.
[2662]66            @return Returns the id of the QuestItem.
[2261]67            */
68            inline const std::string & getId(void) const
[1992]69                { return this->id_; }
[2662]70           
71            /**
72            @brief Returns the QuestDescription of the QuestItem.
73            @return Returns a pointer to the QuestDescription object of the QuestItem.
74            */
[2261]75            inline const QuestDescription* getDescription(void) const
[1992]76                { return this->description_; }
[2092]77
[2093]78            static bool isId(const std::string & id); //!< Checks whether a given id is valid.
[2092]79
[2093]80        protected:
[2261]81            void setId(const std::string & id); //!< Sets the id of the QuestItem.
82           
83            /**
84            @brief Sets the description of the QuestItem.
85            @param description The QuestDescription to be set.
86            */
[2093]87            inline void setDescription(QuestDescription* description)
[2068]88                { this->description_ = description; }
[2092]89
[2093]90        private:
91            std::string id_; //!< Identifier. Should be of GUID form: http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure
[2261]92            QuestDescription* description_; //!< The QuestDescription of the QuestItem.
[2092]93
[1992]94    };
95
96}
97
98#endif /* _QuestItem_H__ */
Note: See TracBrowser for help on using the repository browser.