diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/outputgen.h | 2 | ||||
-rw-r--r-- | src/outputlist.cpp | 35 | ||||
-rw-r--r-- | src/outputlist.h | 5 |
3 files changed, 20 insertions, 22 deletions
diff --git a/src/outputgen.h b/src/outputgen.h index e302f42..322f4b7 100644 --- a/src/outputgen.h +++ b/src/outputgen.h @@ -150,7 +150,7 @@ class BaseOutputDocInterface : public CodeOutputInterface Examples }; - virtual bool parseText(const QCString &s) { return s.isEmpty(); } + virtual void parseText(const QCString &s) {} /*! Start of a bullet list: e.g. \c \<ul\> in html. startItemListItem() is * Used for the bullet items. diff --git a/src/outputlist.cpp b/src/outputlist.cpp index 0306f94..daf3270 100644 --- a/src/outputlist.cpp +++ b/src/outputlist.cpp @@ -128,14 +128,14 @@ void OutputList::popGeneratorState() } } -bool OutputList::generateDoc(const char *fileName,int startLine, +void OutputList::generateDoc(const char *fileName,int startLine, const Definition *ctx,const MemberDef * md, const QCString &docStr,bool indexWords, bool isExample,const char *exampleName, bool singleLine,bool linkFromIndex) { int count=0; - if (docStr.isEmpty()) return TRUE; + if (docStr.isEmpty()) return; QListIterator<OutputGenerator> it(m_outputs); OutputGenerator *og; @@ -143,20 +143,17 @@ bool OutputList::generateDoc(const char *fileName,int startLine, { if (og->isEnabled()) count++; } - if (count==0) return TRUE; // no output formats enabled. + // we want to validate irrespective of the number of output formats + // specified as: + // - when only XML format there should be warnings as well (XML has its own write routines) + // - no formats there should be warnings as well DocRoot *root=0; root = validatingParseDoc(fileName,startLine, ctx,md,docStr,indexWords,isExample,exampleName, singleLine,linkFromIndex); - - writeDoc(root,ctx,md); - - bool isEmpty = root->isEmpty(); - + if (count>0) writeDoc(root,ctx,md); delete root; - - return isEmpty; } void OutputList::writeDoc(DocRoot *root,const Definition *ctx,const MemberDef *md) @@ -172,7 +169,7 @@ void OutputList::writeDoc(DocRoot *root,const Definition *ctx,const MemberDef *m VhdlDocGen::setFlowMember(0); } -bool OutputList::parseText(const QCString &textStr) +void OutputList::parseText(const QCString &textStr) { int count=0; QListIterator<OutputGenerator> it(m_outputs); @@ -181,20 +178,22 @@ bool OutputList::parseText(const QCString &textStr) { if (og->isEnabled()) count++; } - if (count==0) return TRUE; // no output formats enabled. + // we want to validate irrespective of the number of output formats + // specified as: + // - when only XML format there should be warnings as well (XML has its own write routines) + // - no formats there should be warnings as well DocText *root = validatingParseText(textStr); - for (it.toFirst();(og=it.current());++it) + if (count>0) { - if (og->isEnabled()) og->writeDoc(root,0,0); + for (it.toFirst();(og=it.current());++it) + { + if (og->isEnabled()) og->writeDoc(root,0,0); + } } - bool isEmpty = root->isEmpty(); - delete root; - - return isEmpty; } diff --git a/src/outputlist.h b/src/outputlist.h index 35d68a8..2a83020 100644 --- a/src/outputlist.h +++ b/src/outputlist.h @@ -74,13 +74,12 @@ class OutputList : public OutputDocInterface // OutputDocInterface implementation ////////////////////////////////////////////////// - bool generateDoc(const char *fileName,int startLine, + void generateDoc(const char *fileName,int startLine, const Definition *ctx,const MemberDef *md,const QCString &docStr, bool indexWords,bool isExample,const char *exampleName=0, bool singleLine=FALSE,bool linkFromIndex=FALSE); void writeDoc(DocRoot *root,const Definition *ctx,const MemberDef *md); - bool parseText(const QCString &textStr); - + void parseText(const QCString &textStr); void startIndexSection(IndexSections is) { forall(&OutputGenerator::startIndexSection,is); } |