Changeset 128 for osgVisual


Ignore:
Timestamp:
Sep 5, 2010, 9:09:35 PM (14 years ago)
Author:
Torben Dannhauer
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • osgVisual/src/core/visual_core.cpp

    r127 r128  
    332332void visual_core::parseModule(xmlNode * a_node)
    333333{
    334 OSG_ALWAYS << "parseModule()" << std::endl;
     334        OSG_ALWAYS << "parseModule()" << std::endl;
     335
     336// Extract infos
     337        std::string name = "";
     338        bool enabled = false;
     339
     340        xmlAttr  *attr = a_node->properties;
     341        while ( attr )
     342        {
     343                std::string attr_name=reinterpret_cast<const char*>(attr->name);
     344                std::string attr_value=reinterpret_cast<const char*>(attr->children->content);
     345                if( attr_name == "name" )
     346                        name = reinterpret_cast<const char*>(attr->children->content);
     347                if( attr_name == "enabled" && attr_value== "yes" )
     348                        enabled = true;
     349                if( attr_name == "enabled" && attr_value== "no" )
     350                        enabled = false;
     351
     352
     353                std::cout << "Attribute name: " << attr->name << " value: " << attr_value << std::endl;
     354                attr = attr->next;
     355        }
     356
     357
    335358}
    336359
    337360void visual_core::parseScenery(xmlNode * a_node)
    338361{
    339 OSG_ALWAYS << "parseScenery()" << std::endl;
     362        OSG_ALWAYS << "parseScenery()" << std::endl;
    340363}
    341364
Note: See TracChangeset for help on using the changeset viewer.