summaryrefslogtreecommitdiffstats
path: root/addon/doxyapp/doxyapp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'addon/doxyapp/doxyapp.cpp')
-rw-r--r--addon/doxyapp/doxyapp.cpp40
1 files changed, 17 insertions, 23 deletions
diff --git a/addon/doxyapp/doxyapp.cpp b/addon/doxyapp/doxyapp.cpp
index edd39e3..1153ce3 100644
--- a/addon/doxyapp/doxyapp.cpp
+++ b/addon/doxyapp/doxyapp.cpp
@@ -3,8 +3,8 @@
* Copyright (C) 1997-2015 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
@@ -19,7 +19,7 @@
* This example shows how to configure and run doxygen programmatically from
* within an application without generating the usual output.
* The example should work on any Unix like OS (including Linux and Mac OS X).
- *
+ *
* This example shows how to use to code parser to get cross-references information
* and it also shows how to look up symbols in a program parsed by doxygen and
* show some information about them.
@@ -51,7 +51,7 @@ class XRefDummyCodeGenerator : public CodeOutputInterface
void writeCodeLink(const char *,const char *,const char *,const char *,const char *) {}
void writeLineNumber(const char *,const char *,const char *,int) {}
virtual void writeTooltip(const char *,const DocLinkInfo &,
- const char *,const char *,const SourceLinkInfo &,
+ const char *,const char *,const SourceLinkInfo &,
const SourceLinkInfo &) {}
void startCodeLine(bool) {}
void endCodeLine() {}
@@ -64,7 +64,7 @@ class XRefDummyCodeGenerator : public CodeOutputInterface
void addWord(const char *,bool) {}
// here we are presented with the symbols found by the code parser
- void linkableSymbol(int l, const char *sym,Definition *symDef,Definition *context)
+ void linkableSymbol(int l, const char *sym,Definition *symDef,Definition *context)
{
QCString ctx;
if (context) // the context of the symbol is known
@@ -117,7 +117,7 @@ static void findXRefSymbols(FileDef *fd)
// reset the parsers state
intf.resetCodeParserState();
- // create a new backend object
+ // create a new backend object
XRefDummyCodeGenerator *xrefGen = new XRefDummyCodeGenerator(fd);
// parse the source code
@@ -137,7 +137,7 @@ static void listSymbol(Definition *d)
{
if (d!=Doxygen::globalScope && // skip the global namespace symbol
d->name().at(0)!='@' // skip anonymous stuff
- )
+ )
{
printf("%s\n",
d->name().data());
@@ -172,7 +172,7 @@ static void lookupSymbol(Definition *d)
{
if (d!=Doxygen::globalScope && // skip the global namespace symbol
d->name().at(0)!='@' // skip anonymous stuff
- )
+ )
{
printf("Symbol info\n");
printf("-----------\n");
@@ -256,7 +256,7 @@ int main(int argc,char **argv)
exit(1);
}
- // initialize data structures
+ // initialize data structures
initDoxygen();
// setup the non-default configuration options
@@ -264,7 +264,7 @@ int main(int argc,char **argv)
checkConfiguration();
adjustConfiguration();
// we need a place to put intermediate files
- Config_getString(OUTPUT_DIRECTORY)="/tmp/doxygen";
+ Config_getString(OUTPUT_DIRECTORY)="/tmp/doxygen";
// disable html output
Config_getBool(GENERATE_HTML)=FALSE;
// disable latex output
@@ -280,7 +280,7 @@ int main(int argc,char **argv)
Config_getBool(EXTRACT_STATIC)=TRUE;
Config_getBool(EXTRACT_PRIVATE)=TRUE;
Config_getBool(EXTRACT_LOCAL_METHODS)=TRUE;
- // Extract source browse information, needed
+ // Extract source browse information, needed
// to make doxygen gather the cross reference info
Config_getBool(SOURCE_BROWSER)=TRUE;
// In case of a directory take all files on directory and its subdirectories
@@ -294,18 +294,12 @@ int main(int argc,char **argv)
parseInput();
// iterate over the input files
- FileNameListIterator fnli(*Doxygen::inputNameList);
- FileName *fn;
- // foreach file with a certain name
- for (fnli.toFirst();(fn=fnli.current());++fnli)
+ for (const auto &fn : *Doxygen::inputNameLinkedMap)
{
- FileNameIterator fni(*fn);
- FileDef *fd;
- // for each file definition
- for (;(fd=fni.current());++fni)
+ for (const auto &fd : *fn)
{
// get the references (linked and unlinked) found in this file
- findXRefSymbols(fd);
+ findXRefSymbols(fd.get());
}
}
@@ -321,11 +315,11 @@ int main(int argc,char **argv)
fgets(cmd,256,stdin);
QCString s(cmd);
if (s.at(s.length()-1)=='\n') s=s.left(s.length()-1); // strip trailing \n
- if (s==".list")
+ if (s==".list")
listSymbols();
- else if (s==".quit")
+ else if (s==".quit")
exit(0);
- else
+ else
lookupSymbols(s);
}
}