Changeset 804 for code/branches/core/src/orxonox/core/ClassTreeMask.cc
- Timestamp:
- Feb 12, 2008, 3:49:41 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core/src/orxonox/core/ClassTreeMask.cc
r803 r804 237 237 bool ClassTreeMask::isIncluded(ClassTreeMaskNode* node, const Identifier* subclass) const 238 238 { 239 std::cout << "1_0: " << ClassIdentifier<BaseObject>::getIdentifier() << std::endl; 240 std::cout << "1_1: " << subclass->getName() << " (" << subclass << ") / " << node->getClass()->getName() << " (" << node->getClass() << ")" << std::endl; 239 241 // Check if the searched subclass is of the same type as the class in the current node or a derivative 240 242 if (subclass->isA(node->getClass())) 241 243 { 244 std::cout << "1_2\n"; 242 245 // Check for the special case 243 246 if (subclass == node->getClass()) 247 { 248 std::cout << "1_3\n"; 244 249 return node->isIncluded(); 245 250 } 251 252 std::cout << "1_4\n"; 246 253 // Go through the list of subnodes and look for a node containing the searched subclass 247 254 for (std::list<ClassTreeMaskNode*>::iterator it = node->subnodes_.begin(); it != node->subnodes_.end(); ++it) … … 249 256 return isIncluded(*it, subclass); 250 257 258 std::cout << "1_5\n"; 251 259 // There is no subnode containing our class -> the rule of the current node takes in effect 252 260 return node->isIncluded(); … … 254 262 else 255 263 { 264 std::cout << "1_6\n"; 256 265 // The class is not included in the mask: return false 257 266 return false;
Note: See TracChangeset
for help on using the changeset viewer.