Changeset 2093 for code/trunk/src/orxonox/objects/quest/QuestItem.h
- Timestamp:
- Nov 1, 2008, 9:03:51 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/objects/quest/QuestItem.h
r2092 r2093 41 41 /** 42 42 @brief 43 44 43 Functions as a base class for Quest classes such as Quest or QuestHint. 44 Has a unique identifier and a description. 45 45 @author 46 46 Damian 'Mozork' Frick 47 47 */ 48 48 class QuestItem : public BaseObject 49 49 { 50 50 51 51 public: 52 52 QuestItem(BaseObject* creator); 53 53 virtual ~QuestItem(); 54 54 55 55 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 56 56 57 57 inline const std::string & getId(void) const //!< Returns the id of this quest. 58 58 { return this->id_; } 59 59 inline const QuestDescription* getDescription(void) const //!< Returns the description of the QuestItem. 60 60 { return this->description_; } 61 61 //const QuestDescription* getDescription(unsigned int index) const; //!< Returns the description of the QuestItem. 62 62 63 63 static bool isId(const std::string & id); //!< Checks whether a given id is valid. 64 64 65 66 67 65 protected: 66 void setId(const std::string & id); 67 inline void setDescription(QuestDescription* description) 68 68 { this->description_ = description; } 69 69 70 71 72 70 private: 71 std::string id_; //!< Identifier. Should be of GUID form: http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure 72 QuestDescription* description_; //!< The description of the QuestItem. 73 73 74 74 void initialize(void); //!< Initializes the object. 75 75 76 76 };
Note: See TracChangeset
for help on using the changeset viewer.