Changeset 184 for osgVisual/trunk/src
- Timestamp:
- Jan 7, 2011, 5:47:56 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
osgVisual/trunk/src/core/visual_core.cpp
r182 r184 309 309 } 310 310 311 if (cur_node->type == XML_ELEMENT_NODE && node_name == "module")312 {313 OSG_DEBUG << "XML node module found" << std::endl;314 315 parseModule(cur_node);316 317 //OSG_DEBUG << "node type=Element, name:" << cur_node->name << std::endl;318 //OSG_DEBUG << "Processing children at " << cur_node->children << std::endl;319 } // IF(module) END320 321 311 if (cur_node->type == XML_ELEMENT_NODE && node_name == "scenery") 322 312 { … … 329 319 } // IF(scenery) END 330 320 } // FOR END 331 }332 333 void visual_core::parseModule(xmlNode * a_node)334 {335 OSG_ALWAYS << "parseModule()" << std::endl;336 337 // Extract infos338 std::string name = "";339 bool enabled = false;340 341 xmlAttr *attr = a_node->properties;342 while ( attr )343 {344 std::string attr_name=reinterpret_cast<const char*>(attr->name);345 std::string attr_value=reinterpret_cast<const char*>(attr->children->content);346 if( attr_name == "name" )347 name = reinterpret_cast<const char*>(attr->children->content);348 if( attr_name == "enabled" && attr_value== "yes" )349 enabled = true;350 if( attr_name == "enabled" && attr_value== "no" )351 enabled = false;352 353 attr = attr->next;354 }355 OSG_ALWAYS << "Module '" << name << "' found. Enabled = " << enabled << std::endl;356 357 // Pass the nodes to the corresponding modules...358 if(name == "core") this->config(a_node);359 321 } 360 322
Note: See TracChangeset
for help on using the changeset viewer.