- Timestamp:
- Nov 6, 2008, 12:02:05 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem2/src/orxonox/objects/quest/QuestItem.cc
r2105 r2146 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 { … … 42 52 this->initialize(); 43 53 } 44 45 /** 46 @brief 47 Destructor. 48 */ 49 QuestItem::~QuestItem() 50 { 51 52 } 53 54 void QuestItem::XMLPort(Element& xmlelement, XMLPort::Mode mode) 55 { 56 SUPER(QuestItem, XMLPort, xmlelement, mode); 57 58 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 XMLPortObject(QuestItem, QuestDescription, "", setDescription, getDescription, xmlelement, mode); 62 63 } 64 65 54 66 55 /** 67 56 @brief … … 76 65 } 77 66 67 /** 68 @brief 69 Destructor. 70 */ 71 QuestItem::~QuestItem() 72 { 73 74 } 75 76 /** 77 @brief 78 Method for creating a QuestItem object through XML. 79 */ 80 void QuestItem::XMLPort(Element& xmlelement, XMLPort::Mode mode) 81 { 82 SUPER(QuestItem, XMLPort, xmlelement, mode); 83 84 XMLPortParam(QuestItem, "id", setId, getId, xmlelement, mode); 85 XMLPortObject(QuestItem, QuestDescription, "", setDescription, getDescription, xmlelement, mode); 86 } 87 88 /** 89 @brief 90 Sets the id of the QuestItem. 91 The id must be of GUID form. See 'http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure' for more information. 92 @param id 93 The id to be set. 94 */ 78 95 void QuestItem::setId(const std::string & id) 79 96 { 80 if(!isId(id)) 97 if(!isId(id)) //!< Checks whether the id is a valid id. 81 98 { 82 99 COUT(2) << "Invalid id. QuestItem id {" << id << "} could not be set." << std::endl; 83 100 return; 84 101 } 102 85 103 this->id_ = id; 86 104 } 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 105 95 106 /**
Note: See TracChangeset
for help on using the changeset viewer.