void OutputList::parseText(const QCString &textStr) { int count=0; OutputGenerator *og=outputs->first(); while (og) { if (og->isEnabled()) count++; og=outputs->next(); } if (count==0) return; // no output formats enabled. DocNode *root = validatingParseText(textStr); og=outputs->first(); while (og) { if (og->isEnabled()) og->printDoc(root,0); og=outputs->next(); } delete root; }
bool OutputList::parseText(const QCString &textStr) { int count=0; QListIterator<OutputGenerator> it(m_outputs); OutputGenerator *og; for (it.toFirst();(og=it.current());++it) { if (og->isEnabled()) count++; } if (count==0) return TRUE; // no output formats enabled. DocText *root = validatingParseText(textStr); for (it.toFirst();(og=it.current());++it) { if (og->isEnabled()) og->writeDoc(root,0,0); } bool isEmpty = root->isEmpty(); delete root; return isEmpty; }