Changeset 184 for osgVisual


Ignore:
Timestamp:
Jan 7, 2011, 5:47:56 PM (13 years ago)
Author:
Torben Dannhauer
Message:
 
Location:
osgVisual/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • osgVisual/trunk/include/core/visual_core.h

    r144 r184  
    108108        void parseConfigFile(osg::ArgumentParser& arguments_);
    109109        void checkXMLNode(xmlNode * a_node);
    110         void parseModule(xmlNode * a_node);
    111110        void parseScenery(xmlNode * a_node);
    112111        void config(xmlNode * a_node);
  • osgVisual/trunk/src/core/visual_core.cpp

    r182 r184  
    309309                }
    310310
    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) END
    320 
    321311                if (cur_node->type == XML_ELEMENT_NODE && node_name == "scenery")
    322312                {
     
    329319        }       // IF(scenery) END
    330320    }   // FOR END
    331 }
    332 
    333 void visual_core::parseModule(xmlNode * a_node)
    334 {
    335         OSG_ALWAYS << "parseModule()" << std::endl;
    336 
    337 // Extract infos
    338         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);
    359321}
    360322
Note: See TracChangeset for help on using the changeset viewer.