TKeyListIterator CCategory::VariableList( CCategoryKeyParser& aKey, TKeyList& aKeys )const { TKeyListIterator ret( aKeys.end() ); std::string categoryName; if( !aKey.NextCategory( categoryName ) ) { aKey.Variable( categoryName ); } if( categoryName.size() ) { TCategorySeq::const_iterator i( _categories.find( categoryName ) ); if( i != _categories.end() ) { if( aKey.IsCategoryValid() ) { ret = i->second.second->VariableList( aKey, aKeys ); } else { ret = i->second.second->VariableList( aKeys ); } } } else { ret = VariableList( aKeys ); } return ret; }
void Problem::SetProblemXML(DOMElement* applicationXML) { // save the problem XML applicationXML_ = applicationXML; variables_ = VariableList(applicationXML_); DOMNodeList* nodeList; DOMNode* tmpNode; DOMElement* appXML; // if the function is from an external application, // create a launcher and set the problem to use an Application // Optimizer if((nodeList = applicationXML_->getElementsByTagName(XMLString::transcode("Application")))->getLength() > 0) { tmpNode = nodeList->item(0); appXML = (DOMElement *)tmpNode; launcher_ = AppLauncher(appXML, variables_, true); useApplicationOptimizer_ = true; } }