Changeset 897 for code/branches/core2
- Timestamp:
- Mar 17, 2008, 10:12:55 PM (17 years ago)
- Location:
- code/branches/core2/src/orxonox/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core2/src/orxonox/core/Loader.cc
r896 r897 116 116 xmlfile.LoadFile(); 117 117 ticpp::Element rootElement; 118 rootElement.SetAttribute("name", "root Namespace");118 rootElement.SetAttribute("name", "root"); 119 119 120 120 for (ticpp::Iterator<ticpp::Element> child = xmlfile.FirstChildElement(false); child != child.end(); child++) … … 124 124 rootNamespace->setLoaderIndentation(" "); 125 125 rootNamespace->setLevel(level); 126 rootNamespace->setNamespace(rootNamespace); 126 127 rootNamespace->deleteNamespaceNodesAfterDestruction(true); 127 128 rootNamespace->XMLPort(rootElement, true); -
code/branches/core2/src/orxonox/core/Namespace.cc
r896 r897 60 60 void Namespace::XMLPort(Element& xmlelement, bool loading) 61 61 { 62 std::cout << "1_1\n"; 62 63 BaseObject::XMLPort(xmlelement, loading); 64 std::cout << "1_2\n"; 63 65 64 66 std::string name = this->getName(); 67 std::cout << "1_3\n"; 65 68 unsigned int pos = 0; 66 69 while ((pos = name.find(',')) != std::string::npos) … … 72 75 while ((pos = name.find('\t')) != std::string::npos) 73 76 name.replace(pos, 1, " "); 74 SubString tokens(name, " ", '\0', false, '\\', '"', '\0', '\0', '\0'); 77 std::cout << "1_4\n"; 78 SubString tokens(name, " ", "", false, '\\', '"', '\0', '\0', '\0'); 79 std::cout << "1_5\n"; 75 80 for (unsigned int i = 0; i < tokens.size(); i++) 76 81 { 82 std::cout << "1_6\n"; 77 83 for (std::set<NamespaceNode*>::iterator it = this->getNamespace()->representingNamespaces_.begin(); it != this->getNamespace()->representingNamespaces_.end(); ++it) 78 84 { 85 std::cout << "1_7\n"; 79 86 std::set<NamespaceNode*> temp = (*it)->getNodeRelative(tokens[i]); 87 std::cout << "1_8\n"; 80 88 this->representingNamespaces_.insert(temp.begin(), temp.end()); 89 std::cout << "1_9\n"; 81 90 } 82 91 } 92 std::cout << "1_10\n"; 83 93 84 94 XMLPortParam(Namespace, "operator", setOperator, getOperator, xmlelement, loading);
Note: See TracChangeset
for help on using the changeset viewer.