Changeset 2261 for code/trunk/src/orxonox/objects/quest/QuestItem.cc
- Timestamp:
- Nov 25, 2008, 11:56:40 PM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/questsystem2 (added) merged: 2109,2146,2159,2191,2193-2196,2205-2206,2208-2209,2221,2226,2228,2251,2258
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/objects/quest/QuestItem.cc
- Property svn:mergeinfo changed
/code/branches/questsystem2/src/orxonox/objects/quest/QuestItem.cc (added) merged: 2146,2159,2251 /code/trunk/src/orxonox/objects/quest/QuestItem.cc merged: 1925-2089
r2105 r2261 26 26 * 27 27 */ 28 29 /** 30 @file QuestItem.cc 31 @brief 32 Implementation of the QuestItem class. 33 */ 28 34 29 35 #include "OrxonoxStableHeaders.h" … … 36 42 namespace orxonox { 37 43 44 /** 45 @brief 46 Constructor. Registers and initializes the object. 47 */ 38 48 QuestItem::QuestItem(BaseObject* creator) : BaseObject(creator) 39 49 { 40 50 RegisterObject(QuestItem); 41 51 42 this->i nitialize();52 this->id_ = ""; 43 53 } 44 54 … … 52 62 } 53 63 64 /** 65 @brief 66 Method for creating a QuestItem object through XML. 67 */ 54 68 void QuestItem::XMLPort(Element& xmlelement, XMLPort::Mode mode) 55 69 { … … 57 71 58 72 XMLPortParam(QuestItem, "id", setId, getId, xmlelement, mode); 59 //Doesn't getDescription have to be of type getDescription(unsigned int) ?60 //XMLPortObjectTemplate(QuestItem, QuestDescription, "", setDescription, getDescription, xmlelement, mode, unsigned int);61 73 XMLPortObject(QuestItem, QuestDescription, "", setDescription, getDescription, xmlelement, mode); 62 63 74 } 64 65 75 66 76 /** 67 77 @brief 68 Initializes the object. 69 Should be called first in every constructor of this class. 78 Sets the id of the QuestItem. 79 The id must be of GUID form. See 'http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure' for more information. 80 @param id 81 The id to be set. 70 82 */ 71 void QuestItem::initialize(void)72 {73 RegisterObject(QuestItem);74 75 this->id_ = "";76 }77 78 83 void QuestItem::setId(const std::string & id) 79 84 { 80 if(!isId(id)) 85 if(!isId(id)) //!< Checks whether the id is a valid id. 81 86 { 82 87 COUT(2) << "Invalid id. QuestItem id {" << id << "} could not be set." << std::endl; 83 88 return; 84 89 } 90 85 91 this->id_ = id; 86 92 } 87 88 //const QuestDescription* QuestItem::getDescription(unsigned int index) const //!< Returns the description of the QuestItem.89 //{90 // if(index != 0)91 // return NULL;92 // return this->description_;93 //}94 93 95 94 /** - Property svn:mergeinfo changed
Note: See TracChangeset
for help on using the changeset viewer.