- Timestamp:
- Oct 30, 2008, 9:52:12 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem/src/orxonox/objects/QuestItem.h
r2021 r2068 32 32 #include <string> 33 33 34 #include "core/BaseObject.h" 35 #include "core/XMLPort.h" 34 36 #include "QuestDescription.h" 35 #include "core/BaseObject.h"36 37 37 38 namespace orxonox { … … 50 51 public: 51 52 QuestItem(); 52 QuestItem(std::string id , std::string title = "", std::string description = "");53 QuestItem(std::string id); 53 54 virtual ~QuestItem(); 54 55 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. 56 59 { 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. 58 61 { 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; } 59 71 60 72 private: 61 73 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. 63 75 64 76 void initialize(void); //!< Initializes the object.
Note: See TracChangeset
for help on using the changeset viewer.