Changeset 145 for osgVisual/include/util


Ignore:
Timestamp:
Nov 1, 2010, 7:23:10 PM (14 years ago)
Author:
Torben Dannhauer
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • osgVisual/include/util/visual_util.h

    r144 r145  
    220220        static bool setTransparentWindowBackground(osgViewer::Viewer* viewer_);
    221221
    222         // Parses for the XML node of the specified module. The caller has to clean up if ret_value!=NULL, otherwise this function cleans up.
    223         // nötige cleanup-Schritte:       xmlFreeDoc(doc); xmlCleanupParser();
     222        /**
     223         * \brief  Parses for the XML node of the specified module.The caller has to clean up the xmlDoc and the parser, beside it returns NULL because the queried modules is not configured.
     224         *
     225         * To clean up, call this two functions:
     226         *  xmlFreeDoc(doc);
     227         *  xmlCleanupParser();
     228         *
     229         * Example to use this function:
     230         *      xmlDoc* tmpDoc;
     231         *  xmlNode* yourNode = util::getModuleXMLConfig( configFilename, "core", tmpDoc );
     232         *  // use yourNode
     233         *  if(tmpDoc)
     234         *  {
     235         *     xmlFreeDoc(tmpDoc); xmlCleanupParser();
     236         *  }
     237         *
     238         * @param configFilename : Config Filename to parse.
     239         * @param moduleName : Module name to search for.
     240         * @param doc : xmlDoc to use. Must be created outside that the caller can clean it up.
     241         * @return : NULL on error, otherwise pointer to the xmlNode of the queried module.
     242         */
    224243        static xmlNode* getModuleXMLConfig(std::string configFilename, std::string moduleName, xmlDoc*& doc);
    225244
    226245private:
     246        /**
     247         * \brief This functions checks a list of nodes and all of its children for the specified module configuration.
     248         *
     249         * This function is used by getModuleXMLConfig() and works recursive
     250         *
     251         * @param node : Node to search in
     252         * @param moduleName :Module name to search for.
     253         * @return : NULL if the module configuration was not found, otherwise pointer to the XML Node with the configuration for the specified module.
     254         */
    227255        static xmlNode* checkXMLNodeChildrenForModule(xmlNode* node, std::string moduleName);
    228256};
Note: See TracChangeset for help on using the changeset viewer.