Changeset 2081 for code/branches/questsystem/src
- Timestamp:
- Nov 1, 2008, 11:00:46 AM (16 years ago)
- Location:
- code/branches/questsystem/src/orxonox/objects
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem/src/orxonox/objects/AddQuestHint.cc
r2076 r2081 31 31 32 32 #include "QuestManager.h" 33 #include "QuestItem.h" 33 34 #include "AddQuestHint.h" 34 35 … … 56 57 XMLPortParam(AddQuestHint, "hintId", setHintId, getHintId, xmlelement, mode); 57 58 59 } 60 61 inline void AddQuestHint::setHintId(const std::string & id) 62 { 63 if(!QuestItem::isId(id)) 64 { 65 COUT(2) << "Invalid id. QuestItem id {" << id << "} could not be set." << std::endl; 66 return; 67 } 68 this->hintId_ = id; 58 69 } 59 70 -
code/branches/questsystem/src/orxonox/objects/AddQuestHint.h
r2076 r2081 59 59 inline const std::string & getHintId(void) const 60 60 { return this->hintId_; } 61 inline void setHintId(const std::string & id) 62 { this->hintId_ = id; } 61 void setHintId(const std::string & id); 63 62 64 63 }; -
code/branches/questsystem/src/orxonox/objects/ChangeQuestStatus.cc
r2076 r2081 29 29 #include "core/CoreIncludes.h" 30 30 31 #include "QuestItem.h" 31 32 #include "ChangeQuestStatus.h" 32 33 … … 46 47 } 47 48 49 void ChangeQuestStatus::setQuestId(const std::string & id) 50 { 51 if(!QuestItem::isId(id)) 52 { 53 COUT(2) << "Invalid id. QuestItem id {" << id << "} could not be set." << std::endl; 54 return; 55 } 56 this->questId_ = id; 57 } 58 48 59 void ChangeQuestStatus::XMLPort(Element& xmlelement, XMLPort::Mode mode) 49 60 { -
code/branches/questsystem/src/orxonox/objects/ChangeQuestStatus.h
r2076 r2081 62 62 63 63 private: 64 inline void setQuestId(const std::string & id) 65 { this->questId_ = id; } 64 void setQuestId(const std::string & id); 66 65 67 66 }; -
code/branches/questsystem/src/orxonox/objects/GlobalQuest.cc
r2076 r2081 58 58 SUPER(GlobalQuest, XMLPort, xmlelement, mode); 59 59 60 COUT( 1) << "New GlobalQuest {" << this->getId() << "} created." << std::endl;60 COUT(3) << "New GlobalQuest {" << this->getId() << "} created." << std::endl; 61 61 } 62 62 -
code/branches/questsystem/src/orxonox/objects/LocalQuest.cc
r2076 r2081 54 54 SUPER(LocalQuest, XMLPort, xmlelement, mode); 55 55 56 COUT( 1) << "New LocalQuest {" << this->getId() << "} created." << std::endl;56 COUT(3) << "New LocalQuest {" << this->getId() << "} created." << std::endl; 57 57 } 58 58 -
code/branches/questsystem/src/orxonox/objects/Quest.cc
r2076 r2081 88 88 89 89 this->parentQuest_ = quest; 90 91 COUT(3) << "Parent Quest {" << quest->getId() << "} was added to Quest {" << this->getId() << "}." << std::endl; 90 92 return true; 91 93 } … … 109 111 quest->setParentQuest(this); 110 112 this->subQuests_.push_back(quest); 113 114 COUT(3) << "Sub Quest {" << quest->getId() << "} was added to Quest {" << this->getId() << "}." << std::endl; 111 115 return true; 112 116 } … … 131 135 this->hints_.push_back(hint); 132 136 hint->setQuest(this); 137 138 COUT(3) << "QuestHint {" << hint->getId() << "} was added to Quest {" << this->getId() << "}." << std::endl; 133 139 return true; 134 140 } … … 147 153 148 154 this->failEffects_.push_back(effect); 155 156 COUT(3) << "A FailEffect was added to Quest {" << this->getId() << "}." << std::endl; 149 157 return true; 150 158 } … … 163 171 164 172 this->completeEffects_.push_back(effect); 173 174 COUT(3) << "A CompleteEffect was added to Quest {" << this->getId() << "}." << std::endl; 165 175 return true; 166 176 } -
code/branches/questsystem/src/orxonox/objects/QuestDescription.cc
r2076 r2081 52 52 XMLPortParam(QuestDescription, "description", setDescription, getDescription, xmlelement, mode); 53 53 54 COUT( 1) << "New QuestDescription with title '" << this->getTitle() << "' created." << std::endl;54 COUT(3) << "New QuestDescription with title '" << this->getTitle() << "' created." << std::endl; 55 55 } 56 56 -
code/branches/questsystem/src/orxonox/objects/QuestHint.cc
r2076 r2081 64 64 SUPER(QuestHint, XMLPort, xmlelement, mode); 65 65 66 COUT( 1) << "New QuestHint {" << this->getId() << "} created." << std::endl;66 COUT(3) << "New QuestHint {" << this->getId() << "} created." << std::endl; 67 67 } 68 68 -
code/branches/questsystem/src/orxonox/objects/QuestItem.cc
r2076 r2081 71 71 } 72 72 73 void QuestItem::setId(const std::string & id) 74 { 75 if(!isId(id)) 76 { 77 COUT(2) << "Invalid id. QuestItem id {" << id << "} could not be set." << std::endl; 78 return; 79 } 80 this->id_ = id; 81 } 82 73 83 //const QuestDescription* QuestItem::getDescription(unsigned int index) const //!< Returns the description of the QuestItem. 74 84 //{ -
code/branches/questsystem/src/orxonox/objects/QuestItem.h
r2076 r2081 64 64 65 65 protected: 66 inline void setId(const std::string & id) 67 { id_ = id; } 66 void setId(const std::string & id); 68 67 inline void setDescription(QuestDescription* description) 69 68 { this->description_ = description; }
Note: See TracChangeset
for help on using the changeset viewer.