Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 30, 2008, 9:52:12 AM (16 years ago)
Author:
dafrick
Message:

Started with XMLPort…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/questsystem/src/orxonox/objects/QuestItem.h

    r2021 r2068  
    3232#include <string>
    3333
     34#include "core/BaseObject.h"
     35#include "core/XMLPort.h"
    3436#include "QuestDescription.h"
    35 #include "core/BaseObject.h"
    3637
    3738namespace orxonox {
     
    5051        public:
    5152            QuestItem();
    52             QuestItem(std::string id, std::string title = "", std::string description = "");
     53            QuestItem(std::string id);
    5354            virtual ~QuestItem();
    5455           
    55             inline std::string getId(void) const //!< Returns the id of this quest.
     56            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     57           
     58            inline const std::string & getId(void) const //!< Returns the id of this quest.
    5659                { return this->id_; }
    57             inline const QuestDescription & getDescription(void) const //!< Returns the description of the QuestItem.
     60            inline const QuestDescription* getDescription(void) const //!< Returns the description of the QuestItem.
    5861                { return this->description_; }
     62            //const QuestDescription* getDescription(unsigned int index) const; //!< Returns the description of the QuestItem.
     63               
     64            static bool isId(const std::string & id); //!< Checks whether a given id is valid.
     65           
     66        protected:
     67            inline void setId(const std::string & id)
     68                { id_ = id; }
     69            inline void setDescription(QuestDescription* description)
     70                { this->description_ = description; }
    5971           
    6072        private:
    6173            std::string id_; //!< Identifier. Should be of GUID form: http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure
    62             QuestDescription description_; //!< The description of the QuestItem.
     74            QuestDescription* description_; //!< The description of the QuestItem.
    6375           
    6476            void initialize(void); //!< Initializes the object.
Note: See TracChangeset for help on using the changeset viewer.