diff options
161 files changed, 3243 insertions, 2196 deletions
@@ -1,7 +1,7 @@ -DOXYGEN Version 1.8.2-20120930 +DOXYGEN Version 1.8.2-20121118 Please read the installation section of the manual (http://www.doxygen.org/install.html) for instructions. -------- -Dimitri van Heesch (30 September 2012) +Dimitri van Heesch (18 November 2012) @@ -1,4 +1,4 @@ -DOXYGEN Version 1.8.2_20120930 +DOXYGEN Version 1.8.2_20121118 Please read INSTALL for compilation instructions. @@ -26,4 +26,4 @@ forum. Enjoy, -Dimitri van Heesch (dimitri@stack.nl) (30 September 2012) +Dimitri van Heesch (dimitri@stack.nl) (18 November 2012) @@ -20,7 +20,7 @@ doxygen_version_minor=8 doxygen_version_revision=2 #NOTE: Setting version_mmn to "NO" will omit mmn info from the package. -doxygen_version_mmn=20120930 +doxygen_version_mmn=20121118 bin_dirs=`echo $PATH | sed -e "s/:/ /g"` @@ -144,7 +144,7 @@ Options: --enable-langs list Include support for output languages listed in list. [default: $f_langs] --with-doxywizard Build the GUI frontend for doxygen. This - requires Qt 3.3.x + requires Qt version 4. --with-doxyapp Example showing how to embed doxygen in an application. EOF diff --git a/doc/commands.doc b/doc/commands.doc index d922efe..b19e38f 100644 --- a/doc/commands.doc +++ b/doc/commands.doc @@ -180,6 +180,7 @@ documentation: \refitem cmdverbatim \\verbatim \refitem cmdverbinclude \\verbinclude \refitem cmdversion \\version +\refitem cmdvhdlflow \\vhdlflow \refitem cmdwarning \\warning \refitem cmdweakgroup \\weakgroup \refitem cmdxmlonly \\xmlonly @@ -973,6 +974,15 @@ Structural indicators \sa section \ref cmdfn "\\fn", \ref cmdproperty "\\property", and \ref cmdtypedef "\\typedef". <hr> +\section cmdvhdlflow \\vhdlflow [(title for the flow chart)] + + \addindex \\vhdlflow + This is a VHDL specific command, which can be put in the documentation of a process to + produce a flow chart of the logic in the process. + Optionally a title for the flow chart can be given. + \note Currently the flow chart will only appear in the HTML output. + +<hr> \section cmdweakgroup \\weakgroup <name> [(title)] \addindex \\addtogroup Can be used exactly like \ref cmdaddtogroup "\\addtogroup", but has @@ -1061,7 +1071,7 @@ Section indicators for an example. <hr> -\section cmdcond \\cond [<section-label>] +\section cmdcond \\cond [(section-label)] \addindex \\cond Starts a conditional section that ends with a corresponding @@ -1073,7 +1083,8 @@ Section indicators The section between \\cond and \\endcond commands can be included by adding its section label to the \ref cfg_enabled_sections "ENABLED_SECTIONS" configuration option. If the section label is omitted, the section will - be excluded from processing unconditionally. + be excluded from processing unconditionally. The section label can be a logical expression + build of section names, round brackets, && (AND), || (OR) and ! (NOT). For conditional sections within a comment block one should use a \ref cmdif "\\if" ... \ref cmdendif "\\endif" block. @@ -1129,7 +1140,7 @@ contains \c TEST, or \c DEV \sa section \ref cmdcondnot "\\condnot" and section \ref cmdendcond "\\endcond". <hr> -\section cmdcondnot \\condnot <section-label> +\section cmdcondnot \\condnot [(section-label)] \addindex \\condnot Starts a conditional section that ends with a corresponding @@ -1140,7 +1151,8 @@ contains \c TEST, or \c DEV The section between \\condnot and \\endcond commands can be excluded by adding its section label to the \ref cfg_enabled_sections "ENABLED_SECTIONS" - configuration option. + configuration option. The section label can be a logical expression + build of section names, round brackets, && (AND), || (OR) and ! (NOT). For conditional sections within a comment block one should use a \ref cmdif "\\if" ... \ref cmdendif "\\endif" block. @@ -1202,15 +1214,16 @@ contains \c TEST, or \c DEV \ref cmdendif "\\endif." <hr> -\section cmdelseif \\elseif <section-label> +\section cmdelseif \\elseif (section-label) \addindex \\elseif Starts a conditional documentation section if the previous section was not enabled. A conditional section is disabled by default. To enable it you must put the section-label after the \ref cfg_enabled_sections "ENABLED_SECTIONS" - tag in the configuration - file. Conditional blocks can be nested. A nested section is + tag in the configuration file. The section label can be a logical expression + build of section names, round brackets, && (AND), || (OR) and ! (NOT). + Conditional blocks can be nested. A nested section is only enabled if all enclosing sections are enabled as well. \sa sections \ref cmdendif "\\endif", \ref cmdifnot "\\ifnot", @@ -1249,15 +1262,16 @@ contains \c TEST, or \c DEV example. <hr> -\section cmdif \\if <section-label> +\section cmdif \\if (section-label) \addindex \\if Starts a conditional documentation section. The section ends with a matching \c \\endif command. A conditional section is disabled by default. To enable it you must put the section-label after the \ref cfg_enabled_sections "ENABLED_SECTIONS" - tag in the configuration - file. Conditional blocks can be nested. A nested section is + tag in the configuration file. The section label can be a logical expression + build of section names, round brackets, && (AND), || (OR) and ! (NOT). + Conditional blocks can be nested. A nested section is only enabled if all enclosing sections are enabled as well. \par Example: @@ -1309,15 +1323,15 @@ ALIASES = "english=\if english" \ \ref cmdelse "\\else", and \ref cmdelseif "\\elseif". <hr> -\section cmdifnot \\ifnot <section-label> +\section cmdifnot \\ifnot (section-label) \addindex \\ifnot Starts a conditional documentation section. The section ends with a matching \c \\endif command. This conditional section is enabled by default. To disable it you must put the section-label after the \ref cfg_enabled_sections "ENABLED_SECTIONS" - tag in the configuration - file. + tag in the configuration file. The section label can be a logical expression + build of section names, round brackets, && (AND), || (OR) and ! (NOT). \sa sections \ref cmdendif "\\endif", \ref cmdif "\\if", \ref cmdelse "\\else", and \ref cmdelseif "\\elseif". diff --git a/doc/config.doc b/doc/config.doc index 8dfb199..64456c7 100644 --- a/doc/config.doc +++ b/doc/config.doc @@ -208,6 +208,7 @@ followed by the descriptions of the tags grouped by category. \refitem cfg_man_output MAN_OUTPUT \refitem cfg_markdown_support MARKDOWN_SUPPORT \refitem cfg_mathjax_extensions MATHJAX_EXTENSIONS +\refitem cfg_mathjax_format MATHJAX_FORMAT \refitem cfg_mathjax_relpath MATHJAX_RELPATH \refitem cfg_max_dot_graph_depth MAX_DOT_GRAPH_DEPTH \refitem cfg_max_initializer_lines MAX_INITIALIZER_LINES @@ -281,6 +282,7 @@ followed by the descriptions of the tags grouped by category. \refitem cfg_uml_look UML_LOOK \refitem cfg_use_htags USE_HTAGS \refitem cfg_use_mathjax USE_MATHJAX +\refitem cfg_use_mdfile_as_mainpage USE_MDFILE_AS_MAINPAGE \refitem cfg_use_pdflatex USE_PDFLATEX \refitem cfg_verbatim_headers VERBATIM_HEADERS \refitem cfg_warn_format WARN_FORMAT @@ -1204,6 +1206,14 @@ AClass::ANamespace, ANamespace::*Test using `*.ext=` (so without naming a filter). This option only has effect when \c FILTER_SOURCE_FILES is enabled. +\anchor cfg_use_mdfile_as_mainpage +<dt>\c USE_MDFILE_AS_MAINPAGE <dd> + \addindex USE_MDFILE_AS_MAINPAGE +If the \c USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that +is part of the input, its contents will be placed on the main page (index.html). +This can be useful if you have a project on for instance GitHub and want reuse +the introduction page also for the doxygen output. + </dl> \section sourcebrowser_index Source browsing related options @@ -1867,6 +1877,16 @@ and does not have live searching capabilities. configure the path to it using the \ref cfg_mathjax_relpath "MATHJAX_RELPATH" option. +\anchor cfg_mathjax_format +<dt>\c MATHJAX_FORMAT <dd> + \addindex MATHJAX_FORMAT + When MathJax is enabled you can set the default output format to be used for + the MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and + SVG. The default value is HTML-CSS, which is slower, but has the best + compatibility. See +<a href="http://docs.mathjax.org/en/latest/output.html">the MathJax site</a> +for more details. + \anchor cfg_mathjax_relpath <dt>\c MATHJAX_RELPATH <dd> \addindex MATHJAX_RELPATH diff --git a/doc/htmlcmds.doc b/doc/htmlcmds.doc index d4af0f9..db3c6f3 100644 --- a/doc/htmlcmds.doc +++ b/doc/htmlcmds.doc @@ -112,7 +112,7 @@ The special HTML character entities that are recognized by Doxygen: <ul> <li><tt>\©</tt> the copyright symbol -<li><tt>\&tm;</tt> the trade mark symbol +<li><tt>\™</tt> the trade mark symbol <li><tt>\®</tt> the registered trade mark symbol <li><tt>\<</tt> less-than symbol <li><tt>\></tt> greater-than symbol diff --git a/doc/language.doc b/doc/language.doc index 6052537..b1cdf4e 100644 --- a/doc/language.doc +++ b/doc/language.doc @@ -23,7 +23,7 @@ text fragments, generated by doxygen, can be produced in languages other than English (the default). The output language is chosen through the configuration file (with default name and known as Doxyfile). -Currently (version 1.8.2), 39 languages +Currently (version 1.8.1.2), 39 languages are supported (sorted alphabetically): Afrikaans, Arabic, Armenian, Brazilian Portuguese, Catalan, Chinese, Chinese Traditional, Croatian, Czech, Danish, Dutch, English, @@ -146,7 +146,7 @@ when the translator was updated. <td>German</td> <td>Peter Grotrian<br/>Jens Seidel</td> <td>Peter dot Grotrian at pdv-FS dot de<br/>jensseidel at users dot sf dot net</td> - <td>1.8.2</td> + <td>up-to-date</td> </tr> <tr bgcolor="#ffffff"> <td>Greek</td> @@ -351,7 +351,7 @@ when the translator was updated. French & David Martinet & {\tt\tiny contact at e-concept-applications dot fr} & 1.8.0 \\ ~ & Xavier Outhier & {\tt\tiny xouthier at yahoo dot fr} & ~ \\ \hline - German & Peter Grotrian & {\tt\tiny Peter dot Grotrian at pdv-FS dot de} & 1.8.2 \\ + German & Peter Grotrian & {\tt\tiny Peter dot Grotrian at pdv-FS dot de} & up-to-date \\ ~ & Jens Seidel & {\tt\tiny jensseidel at users dot sf dot net} & ~ \\ \hline Greek & Paul Gessos & {\tt\tiny gessos dot paul at yahoo dot gr} & up-to-date \\ diff --git a/doc/markdown.doc b/doc/markdown.doc index d0243dd..3799fbc 100644 --- a/doc/markdown.doc +++ b/doc/markdown.doc @@ -556,15 +556,16 @@ Example: 2. Item2 of list 2 With Markdown the actual numbers you use to mark the list have no -effect on the HTML output Markdown produces. I.e. it treats the -following as a list with 3 numbered items: +effect on the HTML output Markdown produces. I.e. standard Markdown treats the +following as one list with 3 numbered items: 1. Item1 1. Item2 1. Item3 Doxygen however requires that the numbers used as marks are in -strictly ascending order; an item with a equal or lower number than +strictly ascending order, so the above example would produce 3 lists +with one item. An item with a equal or lower number than the preceding item, will start a new list. For example: 1. Item1 of list 1 diff --git a/doc/translator_report.txt b/doc/translator_report.txt index a50ef27..b364de4 100644 --- a/doc/translator_report.txt +++ b/doc/translator_report.txt @@ -1,4 +1,4 @@ -(1.8.2) +(1.8.1.2) Doxygen supports the following 39 languages (sorted alphabetically): @@ -10,7 +10,7 @@ Norwegian, Persian, Polish, Portuguese, Romanian, Russian, Serbian, SerbianCyrilic, Slovak, Slovene, Spanish, Swedish, Turkish, Ukrainian, and Vietnamese. -Of them, 7 translators are up-to-date, 32 translators are based on +Of them, 8 translators are up-to-date, 31 translators are based on some adapter class, and 2 are English based. ---------------------------------------------------------------------- @@ -23,6 +23,7 @@ still may be some details listed even for them: TranslatorDutch TranslatorEnglish TranslatorEsperanto + TranslatorGerman TranslatorGreek TranslatorSlovak TranslatorSpanish @@ -38,7 +39,6 @@ must be implemented to become up-to-date: Note: Change the base class to TranslatorAdapter_1_8_2. TranslatorItalian 1.8.2 7 methods to implement (2 %) - TranslatorGerman 1.8.2 7 methods to implement (2 %) TranslatorCroatian 1.8.2 7 methods to implement (2 %) TranslatorChinese 1.8.2 7 methods to implement (2 %) TranslatorPortuguese 1.8.0 14 methods to implement (5 %) @@ -440,22 +440,6 @@ TranslatorFrench (TranslatorAdapter_1_8_0) 14 methods to implement (5 %) virtual QCString trInstanceMethods() -TranslatorGerman (TranslatorAdapter_1_8_2) 7 methods to implement (2 %) ----------------- - - Implements 235 of the required methods (97 %). - - Missing methods (should be implemented): - - virtual QCString trClassMethods() - virtual QCString trProvidedByCategory() - virtual QCString trDesignOverview() - virtual QCString trMethodDocumentation() - virtual QCString trPanelSynchronisationTooltip(bool enable) - virtual QCString trExtendsClass() - virtual QCString trInstanceMethods() - - TranslatorHungarian (TranslatorAdapter_1_4_6) 50 methods to implement (20 %) ------------------- diff --git a/qtools/Doxyfile b/qtools/Doxyfile index 8d3aff7..23d4e31 100644 --- a/qtools/Doxyfile +++ b/qtools/Doxyfile @@ -117,7 +117,7 @@ FILTER_SOURCE_PATTERNS = #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- -SOURCE_BROWSER = YES +SOURCE_BROWSER = NO INLINE_SOURCES = NO STRIP_CODE_COMMENTS = YES REFERENCED_BY_RELATION = YES @@ -217,7 +217,7 @@ MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- -GENERATE_XML = NO +GENERATE_XML = YES XML_OUTPUT = xml XML_SCHEMA = XML_DTD = @@ -256,10 +256,10 @@ PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES +CLASS_DIAGRAMS = NO MSCGEN_PATH = HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = YES +HAVE_DOT = NO DOT_NUM_THREADS = 0 DOT_FONTNAME = DOT_FONTSIZE = 10 diff --git a/src/arguments.h b/src/arguments.h index 42fd7bc..09f5b63 100644 --- a/src/arguments.h +++ b/src/arguments.h @@ -16,8 +16,8 @@ #ifndef ARGUMENTS_H #define ARGUMENTS_H -#include "qtbc.h" #include <qlist.h> +#include <qcstring.h> class StorageIntf; diff --git a/src/bufstr.h b/src/bufstr.h index 2945b5b..2e704f5 100644 --- a/src/bufstr.h +++ b/src/bufstr.h @@ -18,10 +18,6 @@ #ifndef _BUFSTR_H #define _BUFSTR_H -#include "qtbc.h" -#include <stdio.h> -#include <stdlib.h> - /*! @brief Buffer used to store strings * * This buffer is used append characters and strings. It will automatically diff --git a/src/cite.cpp b/src/cite.cpp index 5612eb4..91dd1e1 100644 --- a/src/cite.cpp +++ b/src/cite.cpp @@ -204,7 +204,7 @@ void CiteDict::generatePage() const } } - QCString oldDir = convertToQCString(QDir::currentDirPath()); + QCString oldDir = QDir::currentDirPath().utf8(); QDir::setCurrent(outputDir); // 5. run bib2xhtml perl script on the generated file which will insert the @@ -292,13 +292,13 @@ void CiteDict::generatePage() const } // 9. Remove temporary files - //thisDir.remove(citeListFile); - //thisDir.remove(doxygenBstFile); - //thisDir.remove(bib2xhtmlFile); - //while (!tempFiles.isEmpty()) - //{ - // QCString *s=tempFiles.take(); - // thisDir.remove(*s); - //} + thisDir.remove(citeListFile); + thisDir.remove(doxygenBstFile); + thisDir.remove(bib2xhtmlFile); + while (!tempFiles.isEmpty()) + { + QCString *s=tempFiles.take(); + thisDir.remove(*s); + } } @@ -19,9 +19,7 @@ #ifndef CITEDB_H #define CITEDB_H -#include "qtbc.h" #include <qdict.h> -#include <qlist.h> class FTextStream; diff --git a/src/classdef.cpp b/src/classdef.cpp index 3dd562e..4349d3f 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -39,6 +39,11 @@ #include "vhdldocgen.h" #include "layout.h" #include "arguments.h" +#include "memberlist.h" +#include "groupdef.h" +#include "filedef.h" +#include "namespacedef.h" +#include "membergroup.h" //----------------------------------------------------------------------------- @@ -370,7 +375,7 @@ void ClassDef::addMembersToMemberGroup() MemberList *ml; for (mli.toFirst();(ml=mli.current());++mli) { - if ((ml->listType()&MemberList::detailedLists)==0) + if ((ml->listType()&MemberListType_detailedLists)==0) { ::addMembersToMemberGroup(ml,&m_impl->memberGroupSDict,this); } @@ -420,40 +425,40 @@ void ClassDef::internalInsertMember(MemberDef *md, /********************************************/ if (md->isRelated() && protectionLevelVisible(prot)) { - addMemberToList(MemberList::related,md,TRUE); + addMemberToList(MemberListType_related,md,TRUE); } else if (md->isFriend()) { - addMemberToList(MemberList::friends,md,TRUE); + addMemberToList(MemberListType_friends,md,TRUE); } else { switch (md->memberType()) { - case MemberDef::Signal: // Qt specific - addMemberToList(MemberList::signals,md,TRUE); + case MemberType_Signal: // Qt specific + addMemberToList(MemberListType_signals,md,TRUE); break; - case MemberDef::DCOP: // KDE2 specific - addMemberToList(MemberList::dcopMethods,md,TRUE); + case MemberType_DCOP: // KDE2 specific + addMemberToList(MemberListType_dcopMethods,md,TRUE); break; - case MemberDef::Property: - addMemberToList(MemberList::properties,md,TRUE); + case MemberType_Property: + addMemberToList(MemberListType_properties,md,TRUE); break; - case MemberDef::Event: - addMemberToList(MemberList::events,md,TRUE); + case MemberType_Event: + addMemberToList(MemberListType_events,md,TRUE); break; - case MemberDef::Slot: // Qt specific + case MemberType_Slot: // Qt specific switch (prot) { case Protected: case Package: // slots in packages are not possible! - addMemberToList(MemberList::proSlots,md,TRUE); + addMemberToList(MemberListType_proSlots,md,TRUE); break; case Public: - addMemberToList(MemberList::pubSlots,md,TRUE); + addMemberToList(MemberListType_pubSlots,md,TRUE); break; case Private: - addMemberToList(MemberList::priSlots,md,TRUE); + addMemberToList(MemberListType_priSlots,md,TRUE); break; } break; @@ -465,16 +470,16 @@ void ClassDef::internalInsertMember(MemberDef *md, switch (prot) { case Protected: - addMemberToList(MemberList::proStaticAttribs,md,TRUE); + addMemberToList(MemberListType_proStaticAttribs,md,TRUE); break; case Package: - addMemberToList(MemberList::pacStaticAttribs,md,TRUE); + addMemberToList(MemberListType_pacStaticAttribs,md,TRUE); break; case Public: - addMemberToList(MemberList::pubStaticAttribs,md,TRUE); + addMemberToList(MemberListType_pubStaticAttribs,md,TRUE); break; case Private: - addMemberToList(MemberList::priStaticAttribs,md,TRUE); + addMemberToList(MemberListType_priStaticAttribs,md,TRUE); break; } } @@ -483,16 +488,16 @@ void ClassDef::internalInsertMember(MemberDef *md, switch (prot) { case Protected: - addMemberToList(MemberList::proStaticMethods,md,TRUE); + addMemberToList(MemberListType_proStaticMethods,md,TRUE); break; case Package: - addMemberToList(MemberList::pacStaticMethods,md,TRUE); + addMemberToList(MemberListType_pacStaticMethods,md,TRUE); break; case Public: - addMemberToList(MemberList::pubStaticMethods,md,TRUE); + addMemberToList(MemberListType_pubStaticMethods,md,TRUE); break; case Private: - addMemberToList(MemberList::priStaticMethods,md,TRUE); + addMemberToList(MemberListType_priStaticMethods,md,TRUE); break; } } @@ -504,17 +509,17 @@ void ClassDef::internalInsertMember(MemberDef *md, switch (prot) { case Protected: - addMemberToList(MemberList::proAttribs,md,TRUE); + addMemberToList(MemberListType_proAttribs,md,TRUE); break; case Package: - addMemberToList(MemberList::pacAttribs,md,TRUE); + addMemberToList(MemberListType_pacAttribs,md,TRUE); break; case Public: - addMemberToList(MemberList::pubAttribs,md,TRUE); + addMemberToList(MemberListType_pubAttribs,md,TRUE); isSimple=!md->isFunctionPtr(); break; case Private: - addMemberToList(MemberList::priAttribs,md,TRUE); + addMemberToList(MemberListType_priAttribs,md,TRUE); break; } } @@ -523,16 +528,16 @@ void ClassDef::internalInsertMember(MemberDef *md, switch (prot) { case Protected: - addMemberToList(MemberList::proTypes,md,TRUE); + addMemberToList(MemberListType_proTypes,md,TRUE); break; case Package: - addMemberToList(MemberList::pacTypes,md,TRUE); + addMemberToList(MemberListType_pacTypes,md,TRUE); break; case Public: - addMemberToList(MemberList::pubTypes,md,TRUE); + addMemberToList(MemberListType_pubTypes,md,TRUE); break; case Private: - addMemberToList(MemberList::priTypes,md,TRUE); + addMemberToList(MemberListType_priTypes,md,TRUE); break; } } @@ -541,16 +546,16 @@ void ClassDef::internalInsertMember(MemberDef *md, switch (prot) { case Protected: - addMemberToList(MemberList::proMethods,md,TRUE); + addMemberToList(MemberListType_proMethods,md,TRUE); break; case Package: - addMemberToList(MemberList::pacMethods,md,TRUE); + addMemberToList(MemberListType_pacMethods,md,TRUE); break; case Public: - addMemberToList(MemberList::pubMethods,md,TRUE); + addMemberToList(MemberListType_pubMethods,md,TRUE); break; case Private: - addMemberToList(MemberList::priMethods,md,TRUE); + addMemberToList(MemberListType_priMethods,md,TRUE); break; } } @@ -569,26 +574,26 @@ void ClassDef::internalInsertMember(MemberDef *md, /*******************************************************/ if ((md->isRelated() && protectionLevelVisible(prot)) || md->isFriend()) { - addMemberToList(MemberList::relatedMembers,md,FALSE); + addMemberToList(MemberListType_relatedMembers,md,FALSE); } else { switch (md->memberType()) { - case MemberDef::Property: - addMemberToList(MemberList::propertyMembers,md,FALSE); + case MemberType_Property: + addMemberToList(MemberListType_propertyMembers,md,FALSE); break; - case MemberDef::Event: - addMemberToList(MemberList::eventMembers,md,FALSE); + case MemberType_Event: + addMemberToList(MemberListType_eventMembers,md,FALSE); break; - case MemberDef::Signal: // fall through - case MemberDef::DCOP: - addMemberToList(MemberList::functionMembers,md,FALSE); + case MemberType_Signal: // fall through + case MemberType_DCOP: + addMemberToList(MemberListType_functionMembers,md,FALSE); break; - case MemberDef::Slot: + case MemberType_Slot: if (protectionLevelVisible(prot)) { - addMemberToList(MemberList::functionMembers,md,FALSE); + addMemberToList(MemberListType_functionMembers,md,FALSE); } break; default: // any of the other members @@ -596,28 +601,28 @@ void ClassDef::internalInsertMember(MemberDef *md, { switch (md->memberType()) { - case MemberDef::Typedef: - addMemberToList(MemberList::typedefMembers,md,FALSE); + case MemberType_Typedef: + addMemberToList(MemberListType_typedefMembers,md,FALSE); break; - case MemberDef::Enumeration: - addMemberToList(MemberList::enumMembers,md,FALSE); + case MemberType_Enumeration: + addMemberToList(MemberListType_enumMembers,md,FALSE); break; - case MemberDef::EnumValue: - addMemberToList(MemberList::enumValMembers,md,FALSE); + case MemberType_EnumValue: + addMemberToList(MemberListType_enumValMembers,md,FALSE); break; - case MemberDef::Function: + case MemberType_Function: if (md->isConstructor() || md->isDestructor()) { - MemberList *ml = createMemberList(MemberList::constructors); + MemberList *ml = createMemberList(MemberListType_constructors); ml->append(md); } else { - addMemberToList(MemberList::functionMembers,md,FALSE); + addMemberToList(MemberListType_functionMembers,md,FALSE); } break; - case MemberDef::Variable: - addMemberToList(MemberList::variableMembers,md,FALSE); + case MemberType_Variable: + addMemberToList(MemberListType_variableMembers,md,FALSE); break; default: err("Unexpected member type %d found!\n",md->memberType()); @@ -684,16 +689,16 @@ void ClassDef::insertMember(MemberDef *md) // compute the anchors for all members void ClassDef::computeAnchors() { - ClassDef *context = Config_getBool("INLINE_INHERITED_MEMB") ? this : 0; - const char *letters = "abcdefghijklmnopqrstuvwxyz0123456789"; + //ClassDef *context = Config_getBool("INLINE_INHERITED_MEMB") ? this : 0; + //const char *letters = "abcdefghijklmnopqrstuvwxyz0123456789"; QListIterator<MemberList> mli(m_impl->memberLists); MemberList *ml; - int index = 0; + //int index = 0; for (mli.toFirst();(ml=mli.current());++mli) { - if ((ml->listType()&MemberList::detailedLists)==0) + if ((ml->listType()&MemberListType_detailedLists)==0) { - setAnchors(context,letters[index++],ml); + setAnchors(ml); } } @@ -703,7 +708,7 @@ void ClassDef::computeAnchors() MemberGroup *mg; for (;(mg=mgli.current());++mgli) { - mg->setAnchors(context); + mg->setAnchors(); } } } @@ -737,7 +742,7 @@ void ClassDef::findSectionsInDocumentation() MemberList *ml; for (mli.toFirst();(ml=mli.current());++mli) { - if ((ml->listType()&MemberList::detailedLists)==0) + if ((ml->listType()&MemberListType_detailedLists)==0) { ml->findSectionsInDocumentation(); } @@ -1784,7 +1789,7 @@ void ClassDef::writeDeclarationLink(OutputList &ol,bool &found,const char *heade ol.endMemberItem(); // add the brief description if available - if (!briefDescription().isEmpty()) + if (!briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { ol.startMemberDescription(anchor()); ol.parseDoc(briefFile(),briefLine(),this,0, @@ -1833,7 +1838,7 @@ void ClassDef::writeDocumentationContents(OutputList &ol,const QCString & /*page writeTagFileMarker(); - Doxygen::indexList.addIndexItem(this,0); + Doxygen::indexList->addIndexItem(this,0); if (Doxygen::searchIndex) { @@ -2019,7 +2024,7 @@ void ClassDef::writeMemberPages(OutputList &ol) MemberList *ml; for (mli.toFirst();(ml=mli.current());++mli) { - if (ml->listType()&MemberList::detailedLists) + if (ml->listType()&MemberListType_detailedLists) { ml->writeDocumentationPage(ol,displayName(),this); } @@ -3716,7 +3721,7 @@ void ClassDef::addListReferences() MemberList *ml; for (mli.toFirst();(ml=mli.current());++mli) { - if (ml->listType()&MemberList::detailedLists) + if (ml->listType()&MemberListType_detailedLists) { ml->addListReferences(this); } @@ -3758,7 +3763,7 @@ bool ClassDef::isAccessibleMember(MemberDef *md) return md->getClassDef() && isBaseClass(md->getClassDef(),TRUE); } -MemberList *ClassDef::createMemberList(MemberList::ListType lt) +MemberList *ClassDef::createMemberList(MemberListType lt) { m_impl->memberLists.setAutoDelete(TRUE); QListIterator<MemberList> mli(m_impl->memberLists); @@ -3776,7 +3781,7 @@ MemberList *ClassDef::createMemberList(MemberList::ListType lt) return ml; } -MemberList *ClassDef::getMemberList(MemberList::ListType lt) +MemberList *ClassDef::getMemberList(MemberListType lt) { MemberList *ml = m_impl->memberLists.first(); while (ml) @@ -3790,7 +3795,7 @@ MemberList *ClassDef::getMemberList(MemberList::ListType lt) return 0; } -void ClassDef::addMemberToList(MemberList::ListType lt,MemberDef *md,bool isBrief) +void ClassDef::addMemberToList(MemberListType lt,MemberDef *md,bool isBrief) { static bool sortBriefDocs = Config_getBool("SORT_BRIEF_DOCS"); static bool sortMemberDocs = Config_getBool("SORT_MEMBER_DOCS"); @@ -3799,7 +3804,7 @@ void ClassDef::addMemberToList(MemberList::ListType lt,MemberDef *md,bool isBrie ml->append(md); // for members in the declaration lists we set the section, needed for member grouping - if ((ml->listType()&MemberList::detailedLists)==0) md->setSectionList(this,ml); + if ((ml->listType()&MemberListType_detailedLists)==0) md->setSectionList(this,ml); } void ClassDef::sortMemberLists() @@ -3813,7 +3818,7 @@ void ClassDef::sortMemberLists() } static void convertProtectionLevel( - MemberList::ListType inListType, + MemberListType inListType, Protection inProt, int *outListType1, int *outListType2 @@ -3828,12 +3833,12 @@ static void convertProtectionLevel( // the private section of the base class should not // be visible { - case MemberList::priMethods: - case MemberList::priStaticMethods: - case MemberList::priSlots: - case MemberList::priAttribs: - case MemberList::priStaticAttribs: - case MemberList::priTypes: + case MemberListType_priMethods: + case MemberListType_priStaticMethods: + case MemberListType_priSlots: + case MemberListType_priAttribs: + case MemberListType_priStaticAttribs: + case MemberListType_priTypes: *outListType1=-1; *outListType2=-1; break; @@ -3847,45 +3852,45 @@ static void convertProtectionLevel( // both the public and protected members are shown // as protected { - case MemberList::pubMethods: - case MemberList::pubStaticMethods: - case MemberList::pubSlots: - case MemberList::pubAttribs: - case MemberList::pubStaticAttribs: - case MemberList::pubTypes: - case MemberList::priMethods: - case MemberList::priStaticMethods: - case MemberList::priSlots: - case MemberList::priAttribs: - case MemberList::priStaticAttribs: - case MemberList::priTypes: + case MemberListType_pubMethods: + case MemberListType_pubStaticMethods: + case MemberListType_pubSlots: + case MemberListType_pubAttribs: + case MemberListType_pubStaticAttribs: + case MemberListType_pubTypes: + case MemberListType_priMethods: + case MemberListType_priStaticMethods: + case MemberListType_priSlots: + case MemberListType_priAttribs: + case MemberListType_priStaticAttribs: + case MemberListType_priTypes: *outListType1=-1; *outListType2=-1; break; - case MemberList::proMethods: - *outListType1=MemberList::pubMethods; - *outListType2=MemberList::proMethods; + case MemberListType_proMethods: + *outListType1=MemberListType_pubMethods; + *outListType2=MemberListType_proMethods; break; - case MemberList::proStaticMethods: - *outListType1=MemberList::pubStaticMethods; - *outListType2=MemberList::proStaticMethods; + case MemberListType_proStaticMethods: + *outListType1=MemberListType_pubStaticMethods; + *outListType2=MemberListType_proStaticMethods; break; - case MemberList::proSlots: - *outListType1=MemberList::pubSlots; - *outListType1=MemberList::proSlots; + case MemberListType_proSlots: + *outListType1=MemberListType_pubSlots; + *outListType1=MemberListType_proSlots; break; - case MemberList::proAttribs: - *outListType1=MemberList::pubAttribs; - *outListType2=MemberList::proAttribs; + case MemberListType_proAttribs: + *outListType1=MemberListType_pubAttribs; + *outListType2=MemberListType_proAttribs; break; - case MemberList::proStaticAttribs: - *outListType1=MemberList::pubStaticAttribs; - *outListType2=MemberList::proStaticAttribs; + case MemberListType_proStaticAttribs: + *outListType1=MemberListType_pubStaticAttribs; + *outListType2=MemberListType_proStaticAttribs; break; - case MemberList::proTypes: - *outListType1=MemberList::pubTypes; - *outListType2=MemberList::proTypes; + case MemberListType_proTypes: + *outListType1=MemberListType_pubTypes; + *outListType2=MemberListType_proTypes; break; default: break; @@ -3897,45 +3902,45 @@ static void convertProtectionLevel( // both the public and protected members are shown // as private { - case MemberList::pubMethods: - case MemberList::pubStaticMethods: - case MemberList::pubSlots: - case MemberList::pubAttribs: - case MemberList::pubStaticAttribs: - case MemberList::pubTypes: - case MemberList::proMethods: - case MemberList::proStaticMethods: - case MemberList::proSlots: - case MemberList::proAttribs: - case MemberList::proStaticAttribs: - case MemberList::proTypes: + case MemberListType_pubMethods: + case MemberListType_pubStaticMethods: + case MemberListType_pubSlots: + case MemberListType_pubAttribs: + case MemberListType_pubStaticAttribs: + case MemberListType_pubTypes: + case MemberListType_proMethods: + case MemberListType_proStaticMethods: + case MemberListType_proSlots: + case MemberListType_proAttribs: + case MemberListType_proStaticAttribs: + case MemberListType_proTypes: *outListType1=-1; *outListType2=-1; break; - case MemberList::priMethods: - *outListType1=MemberList::pubMethods; - *outListType2=MemberList::proMethods; + case MemberListType_priMethods: + *outListType1=MemberListType_pubMethods; + *outListType2=MemberListType_proMethods; break; - case MemberList::priStaticMethods: - *outListType1=MemberList::pubStaticMethods; - *outListType2=MemberList::proStaticMethods; + case MemberListType_priStaticMethods: + *outListType1=MemberListType_pubStaticMethods; + *outListType2=MemberListType_proStaticMethods; break; - case MemberList::priSlots: - *outListType1=MemberList::pubSlots; - *outListType1=MemberList::proSlots; + case MemberListType_priSlots: + *outListType1=MemberListType_pubSlots; + *outListType1=MemberListType_proSlots; break; - case MemberList::priAttribs: - *outListType1=MemberList::pubAttribs; - *outListType2=MemberList::proAttribs; + case MemberListType_priAttribs: + *outListType1=MemberListType_pubAttribs; + *outListType2=MemberListType_proAttribs; break; - case MemberList::priStaticAttribs: - *outListType1=MemberList::pubStaticAttribs; - *outListType2=MemberList::proStaticAttribs; + case MemberListType_priStaticAttribs: + *outListType1=MemberListType_pubStaticAttribs; + *outListType2=MemberListType_proStaticAttribs; break; - case MemberList::priTypes: - *outListType1=MemberList::pubTypes; - *outListType2=MemberList::proTypes; + case MemberListType_priTypes: + *outListType1=MemberListType_pubTypes; + *outListType2=MemberListType_proTypes; break; default: break; @@ -3945,7 +3950,7 @@ static void convertProtectionLevel( // inListType,inProt,*outListType1,*outListType2); } -int ClassDef::countInheritedDecMembersRec(MemberList::ListType lt, +int ClassDef::countInheritedDecMembersRec(MemberListType lt, ClassDef *inheritedFrom) { //printf("> %s::countedInheritedDecMembersRec(%d)\n",name().data(),lt); @@ -3963,23 +3968,23 @@ int ClassDef::countInheritedDecMembersRec(MemberList::ListType lt, // in the bass class (e.g. for protected inheritance, the protected // member comes from protected and public methods in the base class) convertProtectionLevel(lt,ibcd->prot,<1,<2); - MemberList *ml1 = icd->getMemberList((MemberList::ListType)lt1); - MemberList *ml2 = icd->getMemberList((MemberList::ListType)lt2); + MemberList *ml1 = icd->getMemberList((MemberListType)lt1); + MemberList *ml2 = icd->getMemberList((MemberListType)lt2); if (ml1) { - count+=icd->countMembersIncludingGrouped((MemberList::ListType)lt1,inheritedFrom,TRUE); + count+=icd->countMembersIncludingGrouped((MemberListType)lt1,inheritedFrom,TRUE); } if (ml2) { - count+=icd->countMembersIncludingGrouped((MemberList::ListType)lt2,inheritedFrom,TRUE); + count+=icd->countMembersIncludingGrouped((MemberListType)lt2,inheritedFrom,TRUE); } if (lt1!=-1) { - count+=icd->countInheritedDecMembersRec((MemberList::ListType)lt1,inheritedFrom); + count+=icd->countInheritedDecMembersRec((MemberListType)lt1,inheritedFrom); } if (lt2!=-1) { - count+=icd->countInheritedDecMembersRec((MemberList::ListType)lt2,inheritedFrom); + count+=icd->countInheritedDecMembersRec((MemberListType)lt2,inheritedFrom); } } } @@ -3987,7 +3992,7 @@ int ClassDef::countInheritedDecMembersRec(MemberList::ListType lt, return count; } -int ClassDef::countInheritedDecMembers(MemberList::ListType lt) +int ClassDef::countInheritedDecMembers(MemberListType lt) { int count=0; MemberList *ml = getMemberList(lt); @@ -4019,7 +4024,7 @@ int ClassDef::countAdditionalInheritedMembers() if (lde->kind()==LayoutDocEntry::MemberDecl) { LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde; - if (lmd->type!=MemberList::friends) // friendship is not inherited + if (lmd->type!=MemberListType_friends) // friendship is not inherited { totalCount+=countInheritedDecMembers(lmd->type); } @@ -4050,7 +4055,7 @@ void ClassDef::writeAdditionalInheritedMembers(OutputList &ol) } } -int ClassDef::countMembersIncludingGrouped(MemberList::ListType lt, +int ClassDef::countMembersIncludingGrouped(MemberListType lt, ClassDef *inheritedFrom,bool additional) { int count=0; @@ -4080,7 +4085,7 @@ int ClassDef::countMembersIncludingGrouped(MemberList::ListType lt, } void ClassDef::writeInheritedMemberDeclarations(OutputList &ol, - MemberList::ListType lt,const QCString &title, + MemberListType lt,const QCString &title, ClassDef *inheritedFrom,bool invert, QPtrDict<void> *visitedClasses) { @@ -4108,7 +4113,7 @@ void ClassDef::writeInheritedMemberDeclarations(OutputList &ol, visitedClasses->insert(icd,icd); if (lt1!=-1) { - icd->writeMemberDeclarations(ol,(MemberList::ListType)lt1, + icd->writeMemberDeclarations(ol,(MemberListType)lt1, title,QCString(),FALSE,inheritedFrom,lt2,invert,visitedClasses); } } @@ -4117,7 +4122,7 @@ void ClassDef::writeInheritedMemberDeclarations(OutputList &ol, ol.popGeneratorState(); } -void ClassDef::writeMemberDeclarations(OutputList &ol,MemberList::ListType lt,const QCString &title, +void ClassDef::writeMemberDeclarations(OutputList &ol,MemberListType lt,const QCString &title, const char *subTitle,bool showInline,ClassDef *inheritedFrom,int lt2,bool invert,QPtrDict<void> *visitedClasses) { //printf("%s: ClassDef::writeMemberDeclarations for %s\n",name().data(),ml->listTypeAsString().data()); @@ -4138,7 +4143,7 @@ void ClassDef::writeMemberDeclarations(OutputList &ol,MemberList::ListType lt,co ml->writeDeclarations(ol,this,0,0,0,title,subTitle,FALSE,showInline,inheritedFrom); if (lt2!=-1) { - MemberList * ml2 = getMemberList((MemberList::ListType)lt2); + MemberList * ml2 = getMemberList((MemberListType)lt2); if (ml2) { ml2->writeDeclarations(ol,this,0,0,0,0,0,FALSE,showInline,inheritedFrom); @@ -4156,7 +4161,7 @@ void ClassDef::writeMemberDeclarations(OutputList &ol,MemberList::ListType lt,co } } -void ClassDef::addGroupedInheritedMembers(OutputList &ol,MemberList::ListType lt, +void ClassDef::addGroupedInheritedMembers(OutputList &ol,MemberListType lt, ClassDef *inheritedFrom,const QCString &inheritId) { //printf("** %s::addGroupedInheritedMembers(%p) inheritId=%s\n",name().data(),m_impl->memberGroupSDict,inheritId.data()); @@ -4174,14 +4179,14 @@ void ClassDef::addGroupedInheritedMembers(OutputList &ol,MemberList::ListType lt } } -void ClassDef::writeMemberDocumentation(OutputList &ol,MemberList::ListType lt,const QCString &title,bool showInline) +void ClassDef::writeMemberDocumentation(OutputList &ol,MemberListType lt,const QCString &title,bool showInline) { //printf("%s: ClassDef::writeMemberDocumentation()\n",name().data()); MemberList * ml = getMemberList(lt); if (ml) ml->writeDocumentation(ol,displayName(),this,title,FALSE,showInline); } -void ClassDef::writeSimpleMemberDocumentation(OutputList &ol,MemberList::ListType lt) +void ClassDef::writeSimpleMemberDocumentation(OutputList &ol,MemberListType lt) { //printf("%s: ClassDef::writeSimpleMemberDocumentation()\n",name().data()); MemberList * ml = getMemberList(lt); @@ -4189,7 +4194,7 @@ void ClassDef::writeSimpleMemberDocumentation(OutputList &ol,MemberList::ListTyp } void ClassDef::writePlainMemberDeclaration(OutputList &ol, - MemberList::ListType lt,bool inGroup, + MemberListType lt,bool inGroup, ClassDef *inheritedFrom,const char *inheritId) { //printf("%s: ClassDef::writePlainMemberDeclaration()\n",name().data()); @@ -4396,7 +4401,7 @@ MemberDef *ClassDef::isSmartPointer() const return m_impl->arrowOperator; } -void ClassDef::reclassifyMember(MemberDef *md,MemberDef::MemberType t) +void ClassDef::reclassifyMember(MemberDef *md,MemberType t) { md->setMemberType(t); MemberList *ml = m_impl->memberLists.first(); diff --git a/src/classdef.h b/src/classdef.h index 5c18728..1525dfd 100644 --- a/src/classdef.h +++ b/src/classdef.h @@ -18,17 +18,14 @@ #ifndef CLASSDEF_H #define CLASSDEF_H -#include "qtbc.h" #include <qlist.h> #include <qdict.h> #include <qptrdict.h> -#include <qstrlist.h> -#include "util.h" -#include "memberlist.h" #include "definition.h" -#include "sortdict.h" +class MemberDef; +class MemberList; class MemberDict; class ClassList; class ClassSDict; @@ -47,8 +44,9 @@ class GroupDef; class StringDict; struct IncludeInfo; class ClassDefImpl; +class ArgumentList; -/** A model of a compound symbol. +/** A class representing of a compound symbol. * * A compound can be a class, struct, union, interface, or exception. * \note This class should be renamed to CompoundDef @@ -57,13 +55,13 @@ class ClassDef : public Definition { public: /** The various compound types */ - enum CompoundType { Class, //=Entry::CLASS_SEC, - Struct, //=Entry::STRUCT_SEC, - Union, //=Entry::UNION_SEC, + enum CompoundType { Class, //=Entry::CLASS_SEC, + Struct, //=Entry::STRUCT_SEC, + Union, //=Entry::UNION_SEC, Interface, //=Entry::INTERFACE_SEC, - Protocol, //=Entry::PROTOCOL_SEC, - Category, //=Entry::CATEGORY_SEC, - Exception //=Entry::EXCEPTION_SEC + Protocol, //=Entry::PROTOCOL_SEC, + Category, //=Entry::CATEGORY_SEC, + Exception //=Entry::EXCEPTION_SEC }; /** Creates a new compound definition. @@ -262,7 +260,7 @@ class ClassDef : public Definition QCString className() const; /** Returns the members in the list identified by \a lt */ - MemberList *getMemberList(MemberList::ListType lt); + MemberList *getMemberList(MemberListType lt); /** Returns the list containing the list of members sorted per type */ const QList<MemberList> &getMemberLists() const; @@ -347,14 +345,14 @@ class ClassDef : public Definition ClassDef *inheritedFrom,const char *inheritId); void writeQuickMemberLinks(OutputList &ol,MemberDef *md) const; void writeSummaryLinks(OutputList &ol); - void reclassifyMember(MemberDef *md,MemberDef::MemberType t); + void reclassifyMember(MemberDef *md,MemberType t); void writeInlineDocumentation(OutputList &ol); void writeDeclarationLink(OutputList &ol,bool &found, const char *header,bool localNames); void removeMemberFromLists(MemberDef *md); - void addGroupedInheritedMembers(OutputList &ol,MemberList::ListType lt, + void addGroupedInheritedMembers(OutputList &ol,MemberListType lt, ClassDef *inheritedFrom,const QCString &inheritId); - int countMembersIncludingGrouped(MemberList::ListType lt,ClassDef *inheritedFrom,bool additional); + int countMembersIncludingGrouped(MemberListType lt,ClassDef *inheritedFrom,bool additional); bool visited; @@ -369,14 +367,14 @@ class ClassDef : public Definition void writeDocumentationContents(OutputList &ol,const QCString &pageTitle); void internalInsertMember(MemberDef *md,Protection prot,bool addToAllList); QCString getMemberListFileName() const; - void addMemberToList(MemberList::ListType lt,MemberDef *md,bool isBrief); - MemberList *createMemberList(MemberList::ListType lt); - void writeInheritedMemberDeclarations(OutputList &ol,MemberList::ListType lt,const QCString &title,ClassDef *inheritedFrom,bool invert,QPtrDict<void> *visitedClasses); - void writeMemberDeclarations(OutputList &ol,MemberList::ListType lt,const QCString &title, + void addMemberToList(MemberListType lt,MemberDef *md,bool isBrief); + MemberList *createMemberList(MemberListType lt); + void writeInheritedMemberDeclarations(OutputList &ol,MemberListType lt,const QCString &title,ClassDef *inheritedFrom,bool invert,QPtrDict<void> *visitedClasses); + void writeMemberDeclarations(OutputList &ol,MemberListType lt,const QCString &title, const char *subTitle=0,bool showInline=FALSE,ClassDef *inheritedFrom=0,int lt2=-1,bool invert=FALSE,QPtrDict<void> *visitedClasses=0); - void writeMemberDocumentation(OutputList &ol,MemberList::ListType lt,const QCString &title,bool showInline=FALSE); - void writeSimpleMemberDocumentation(OutputList &ol,MemberList::ListType lt); - void writePlainMemberDeclaration(OutputList &ol,MemberList::ListType lt,bool inGroup,ClassDef *inheritedFrom,const char *inheritId); + void writeMemberDocumentation(OutputList &ol,MemberListType lt,const QCString &title,bool showInline=FALSE); + void writeSimpleMemberDocumentation(OutputList &ol,MemberListType lt); + void writePlainMemberDeclaration(OutputList &ol,MemberListType lt,bool inGroup,ClassDef *inheritedFrom,const char *inheritId); void writeBriefDescription(OutputList &ol,bool exampleFlag); void writeDetailedDescription(OutputList &ol,const QCString &pageType,bool exampleFlag, const QCString &title,const QCString &anchor=QCString()); @@ -395,8 +393,8 @@ class ClassDef : public Definition void writeMoreLink(OutputList &ol,const QCString &anchor); void writeDetailedDocumentationBody(OutputList &ol); - int countInheritedDecMembersRec(MemberList::ListType lt,ClassDef *inheritedFrom); - int countInheritedDecMembers(MemberList::ListType lt); + int countInheritedDecMembersRec(MemberListType lt,ClassDef *inheritedFrom); + int countInheritedDecMembers(MemberListType lt); int countAdditionalInheritedMembers(); void writeAdditionalInheritedMembers(OutputList &ol); void addClassAttributes(OutputList &ol); @@ -496,7 +494,7 @@ class BaseClassList : public QList<BaseClassDef> { public: ~BaseClassList() {} - int compareItems(GCI item1,GCI item2) + int compareItems(QCollection::Item item1,QCollection::Item item2) { ClassDef *c1=((BaseClassDef *)item1)->classDef; ClassDef *c2=((BaseClassDef *)item2)->classDef; diff --git a/src/classlist.cpp b/src/classlist.cpp index 11f36b6..fec1cb8 100644 --- a/src/classlist.cpp +++ b/src/classlist.cpp @@ -51,12 +51,12 @@ static int compItems(void *item1,void *item2) } } -int ClassList::compareItems(GCI item1, GCI item2) +int ClassList::compareItems(QCollection::Item item1, QCollection::Item item2) { return compItems(item1,item2); } -int ClassSDict::compareItems(GCI item1, GCI item2) +int ClassSDict::compareItems(QCollection::Item item1, QCollection::Item item2) { return compItems(item1,item2); } diff --git a/src/classlist.h b/src/classlist.h index 830c3cd..abe7064 100644 --- a/src/classlist.h +++ b/src/classlist.h @@ -33,7 +33,7 @@ class ClassList : public QList<ClassDef> ClassList(); ~ClassList(); - int compareItems(GCI item1,GCI item2); + int compareItems(QCollection::Item item1,QCollection::Item item2); }; /** An iterator for ClassDef objects in a ClassList. */ @@ -57,7 +57,7 @@ class ClassSDict : public SDict<ClassDef> public: ClassSDict(int size=17) : SDict<ClassDef>(size) {} ~ClassSDict() {} - int compareItems(GCI item1,GCI item2); + int compareItems(QCollection::Item item1,QCollection::Item item2); void writeDeclaration(OutputList &ol,const ClassDef::CompoundType *filter=0, const char *header=0,bool localNames=FALSE); void writeDocumentation(OutputList &ol,Definition *container=0); diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp index b13fc37..767978c 100644 --- a/src/cmdmapper.cpp +++ b/src/cmdmapper.cpp @@ -128,6 +128,7 @@ CommandMap cmdMap[] = { "mscfile", CMD_MSCFILE }, { "rtfonly", CMD_RTFONLY }, { "endrtfonly", CMD_ENDRTFONLY }, + { "vhdlflow", CMD_VHDLFLOW }, { 0, 0 }, }; diff --git a/src/cmdmapper.h b/src/cmdmapper.h index 06778c5..968b017 100644 --- a/src/cmdmapper.h +++ b/src/cmdmapper.h @@ -117,7 +117,8 @@ enum CommandType CMD_SNIPPET = 87, CMD_RTFONLY = 88, CMD_ENDRTFONLY = 89, - CMD_PIPE = 90 + CMD_PIPE = 90, + CMD_VHDLFLOW = 91 }; enum HtmlTagType @@ -18,9 +18,6 @@ #ifndef CODE_H #define CODE_H -#include "qtbc.h" -#include <stdio.h> - class CodeOutputInterface; class FileDef; class MemberDef; @@ -26,7 +26,6 @@ #include <qregexp.h> #include <qdir.h> -#include "qtbc.h" #include "entry.h" #include "doxygen.h" #include "message.h" @@ -35,6 +34,12 @@ #include "membername.h" #include "searchindex.h" #include "arguments.h" +#include "config.h" +#include "groupdef.h" +#include "classlist.h" +#include "filedef.h" +#include "filename.h" +#include "namespacedef.h" #define YY_NEVER_INTERACTIVE 1 @@ -2003,7 +2008,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" if (ambig) // multiple input files match the name { //printf("===== yes %s is ambiguous\n",yytext); - QCString name = convertToQCString(QDir::cleanDirPath(yytext)); + QCString name = QDir::cleanDirPath(yytext).utf8(); if (!name.isEmpty() && g_sourceFileDef) { FileName *fn = Doxygen::inputNameDict->find(name); diff --git a/src/commentcnv.l b/src/commentcnv.l index e9fc74b..88d9ce3 100644 --- a/src/commentcnv.l +++ b/src/commentcnv.l @@ -18,6 +18,7 @@ %{ #define YY_NEVER_INTERACTIVE 1 + #include <stdio.h> #include <stdlib.h> @@ -33,6 +34,7 @@ #include "config.h" #include "doxygen.h" #include "util.h" +#include "condparser.h" #include <assert.h> @@ -178,30 +180,22 @@ static inline void copyToOutput(const char *s,int len) static void startCondSection(const char *sectId) { + CondParser prs; + bool expResult = prs.parse(g_fileName,g_lineNr,sectId); g_condStack.push(new CondCtx(g_lineNr,sectId,g_skip)); if (guardType == Guard_Cond) { - if (Config_getList("ENABLED_SECTIONS").find(sectId)!=-1) - { - //printf("*** Section is enabled!\n"); - } - else + if (expResult) { - //printf("*** Section is disabled!\n"); g_skip=TRUE; } } else if (guardType == Guard_CondNot) { - if (Config_getList("ENABLED_SECTIONS").find(sectId)!=-1) + if (!expResult) { - //printf("*** Section is disabled!\n"); g_skip=TRUE; } - else - { - //printf("*** Section is enabled!\n"); - } } } @@ -276,7 +270,7 @@ void replaceComment(int offset); BEGIN(CComment); } } -<Scan>"!>" { +<Scan>"!>"|"!<"|"!!" { if (g_lang!=SrcLangExt_Fortran) { REJECT; @@ -360,7 +354,7 @@ void replaceComment(int offset); BEGIN(CComment); } } -<Scan>"!>" { +<Scan>"!>"|"!<"|"!!" { if (g_lang!=SrcLangExt_Fortran) { REJECT; @@ -709,7 +703,7 @@ void replaceComment(int offset); } } } -<CondLine>[a-z_A-Z][a-z_A-Z0-9.\-]* { +<CondLine>[!()&| \ta-z_A-Z0-9.\-]+ { bool oldSkip=g_skip; startCondSection(yytext); if (g_condCtx==CComment && !oldSkip && g_skip) diff --git a/src/commentscan.h b/src/commentscan.h index 41cf766..9f90663 100644 --- a/src/commentscan.h +++ b/src/commentscan.h @@ -16,9 +16,9 @@ #ifndef COMMENTSCAN_H #define COMMENTSCAN_H -#include "qtbc.h" -#include "entry.h" +#include "types.h" +class Entry; class ParserInterface; /** @file diff --git a/src/commentscan.l b/src/commentscan.l index 21f6f1c..375b0f9 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -23,7 +23,6 @@ #include <assert.h> #include <ctype.h> -#include "qtbc.h" #include <qarray.h> #include <qstack.h> #include <qregexp.h> @@ -46,6 +45,8 @@ #include "parserintf.h" #include "cite.h" #include "markdown.h" +#include "condparser.h" +#include "formula.h" #define YY_NO_INPUT 1 @@ -580,7 +581,7 @@ static void addXRefItem(const char *listName,const char *itemTitle, SectionInfo *si=new SectionInfo(listName,anchorLabel, g_sectionTitle,SectionInfo::Anchor, g_sectionLevel); - Doxygen::sectionDict.append(anchorLabel,si); + Doxygen::sectionDict->append(anchorLabel,si); docEntry->anchors->append(si); } outputXRef.resize(0); @@ -595,13 +596,13 @@ static QCString addFormula() QCString formLabel; QCString fText=formulaText.simplifyWhiteSpace(); Formula *f=0; - if ((f=Doxygen::formulaDict[fText])==0) + if ((f=Doxygen::formulaDict->find(fText))==0) { f = new Formula(fText); - Doxygen::formulaList.append(f); - Doxygen::formulaDict.insert(fText,f); + Doxygen::formulaList->append(f); + Doxygen::formulaDict->insert(fText,f); formLabel.sprintf("\\form#%d",f->getId()); - Doxygen::formulaNameDict.insert(formLabel,f); + Doxygen::formulaNameDict->insert(formLabel,f); } else { @@ -637,7 +638,7 @@ static void addSection() current->anchors->append(si); // add section to the global dictionary - Doxygen::sectionDict.append(g_sectionLabel,si); + Doxygen::sectionDict->append(g_sectionLabel,si); } @@ -1661,7 +1662,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" <AnchorLabel>{LABELID} { // found argument SectionInfo *si = new SectionInfo(yyFileName,yytext,0,SectionInfo::Anchor,0); - Doxygen::sectionDict.append(yytext,si); + Doxygen::sectionDict->append(yytext,si); current->anchors->append(si); addOutput(yytext); BEGIN( Comment ); @@ -1684,7 +1685,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" /* ----- handle arguments of the preformatted block commands ------- */ -<FormatBlock>{CMD}("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode"|"endmsc")/{NW} { // possible ends +<FormatBlock>{CMD}("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode"|"endmsc"|"endvhdlflow")/{NW} { // possible ends addOutput(yytext); if (&yytext[4]==blockName) // found end of the block { @@ -1724,8 +1725,9 @@ RCSTAG "$"{ID}":"[^\n$]+"$" /* ----- handle arguments of if/ifnot commands ------- */ -<GuardParam>{LABELID} { // parameter of if/ifnot guard - bool sectionEnabled = Config_getList("ENABLED_SECTIONS").find(yytext)!=-1; +<GuardParam>[!()&| \ta-z_A-Z0-9.\-]+ {// parameter of if/ifnot guard + CondParser prs; + bool sectionEnabled=prs.parse(yyFileName,yyLineNr,yytext); bool parentEnabled = TRUE; if (!guards.isEmpty()) parentEnabled = guards.top()->isEnabled(); if (parentEnabled) diff --git a/src/condparser.cpp b/src/condparser.cpp new file mode 100644 index 0000000..4920ade --- /dev/null +++ b/src/condparser.cpp @@ -0,0 +1,306 @@ +/** + * Copyright (C) 1997-2012 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 + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + * C++ Expression parser for ENABLED_SECTIONS in Doxygen + * + * Features used: + * Operators: + * && AND operator + * || OR operator + * ! NOT operator + */ + +#include "condparser.h" +#include "config.h" +#include "message.h" + +// declarations + +/** + * parses and evaluates the given expression. + * @returns + * - On error, an error message is returned. + * - On success, the result of the expression is either "1" or "0". + */ +bool CondParser::parse(const char *fileName,int lineNr,const char *expr) +{ + m_expr = expr; + m_tokenType = NOTHING; + + // initialize all variables + m_e = m_expr.data(); // let m_e point to the start of the expression + + getToken(); + if (m_tokenType==DELIMITER && m_token.isEmpty()) + { + return "Empty expression"; + } + bool answer=FALSE; + if (m_err.isEmpty()) + { + answer = parseLevel1(); + + // check for garbage at the end of the expression + // an expression ends with a character '\0' and token_type = delimeter + if (m_tokenType!=DELIMITER || !m_token.isEmpty()) + { + if (m_tokenType == DELIMITER) + { + if (m_token=="(" || m_token==")") + { + m_err=QCString("Unexpected parenthesis ")+m_token+"'"; + } + else + { + // user entered a not existing operator like "//" + m_err=QCString("Unexpected operator ")+m_token+"'"; + } + } + else + { + m_err=QCString("Unexpected part '")+m_token+"'"; + } + } + } + if (m_err) + { + warn(fileName,lineNr,"Warning: problem evaluating expression '%s': %s", + expr,m_err.data()); + } + return answer; +} + + +/** + * checks if the given char c is a delimeter + * minus is checked apart, can be unary minus + */ +static bool isDelimiter(const char c) +{ + return c=='&' || c=='|' || c=='!'; +} + +/** + * checks if the given char c is a letter or underscore + */ +static bool isAlpha(const char c) +{ + return (c>='A' && c<='Z') || (c>='a' && c<='z') || c=='_'; +} + +static bool isAlphaNum(const char c) +{ + return isAlpha(c) || (c>='0' && c<='9'); +} + +/** + * returns the id of the given operator + * returns -1 if the operator is not recognized + */ +int CondParser::getOperatorId(const QCString &opName) +{ + // level 2 + if (opName=="&&") { return AND; } + if (opName=="||") { return OR; } + + // not operator + if (opName=="!") { return NOT; } + + return UNKNOWN_OP; +} + +/** + * Get next token in the current string expr. + * Uses the data in m_expr pointed to by m_e to + * produce m_tokenType and m_token, set m_err in case of an error + */ +void CondParser::getToken() +{ + m_tokenType = NOTHING; + m_token.resize(0); + + //printf("\tgetToken e:{%c}, ascii=%i, col=%i\n", *e, *e, e-expr); + + // skip over whitespaces + while (*m_e == ' ' || *m_e == '\t') // space or tab + { + m_e++; + } + + // check for end of expression + if (*m_e=='\0') + { + // token is still empty + m_tokenType = DELIMITER; + return; + } + + // check for parentheses + if (*m_e == '(' || *m_e == ')') + { + m_tokenType = DELIMITER; + m_token += *m_e++; + return; + } + + // check for operators (delimeters) + if (isDelimiter(*m_e)) + { + m_tokenType = DELIMITER; + while (isDelimiter(*m_e)) + { + m_token += *m_e++; + } + return; + } + + // check for variables + if (isAlpha(*m_e)) + { + m_tokenType = VARIABLE; + while (isAlphaNum(*m_e)) + { + m_token += *m_e++; + } + return; + } + + // something unknown is found, wrong characters -> a syntax error + m_tokenType = UNKNOWN; + while (*m_e) + { + m_token += *m_e++; + } + m_err = QCString("Syntax error in part '")+m_token+"'"; + return; +} + + +/** + * conditional operators AND and OR + */ +bool CondParser::parseLevel1() +{ + bool ans = parseLevel2(); + int opId = getOperatorId(m_token); + + while (opId==AND || opId==OR) + { + getToken(); + ans = evalOperator(opId, ans, parseLevel2()); + opId = getOperatorId(m_token); + } + + return ans; +} + +/** + * NOT + */ +bool CondParser::parseLevel2() +{ + bool ans; + int opId = getOperatorId(m_token); + if (opId == NOT) + { + getToken(); + ans = !parseLevel3(); + } + else + { + ans = parseLevel3(); + } + + return ans; +} + + +/** + * parenthesized expression or variable + */ +bool CondParser::parseLevel3() +{ + // check if it is a parenthesized expression + if (m_tokenType == DELIMITER) + { + if (m_token=="(") + { + getToken(); + int ans = parseLevel1(); + if (m_tokenType!=DELIMITER || m_token!=")") + { + m_err="Parenthesis ) missing"; + return FALSE; + } + getToken(); + return ans; + } + } + + // if not parenthesized then the expression is a variable + return parseVar(); +} + + +bool CondParser::parseVar() +{ + bool ans = 0; + switch (m_tokenType) + { + case VARIABLE: + // this is a variable + ans = evalVariable(m_token); + getToken(); + break; + + default: + // syntax error or unexpected end of expression + if (m_token.isEmpty()) + { + m_err="Unexpected end of expression"; + return FALSE; + } + else + { + m_err="Value expected"; + return FALSE; + } + break; + } + return ans; +} + +/** + * evaluate an operator for given valuess + */ +bool CondParser::evalOperator(int opId, bool lhs, bool rhs) +{ + switch (opId) + { + // level 2 + case AND: return lhs && rhs; + case OR: return lhs || rhs; + } + + m_err = "Internal error unknown operator: id="+QCString().setNum(opId); + return FALSE; +} + +/** + * evaluate a variable + */ +bool CondParser::evalVariable(const char *varName) +{ + if (Config_getList("ENABLED_SECTIONS").find(varName)==-1) return FALSE; + return TRUE; +} + diff --git a/src/condparser.h b/src/condparser.h new file mode 100644 index 0000000..74a05cf --- /dev/null +++ b/src/condparser.h @@ -0,0 +1,75 @@ +#ifndef CONDPARSER_H +#define CONDPARSER_H + +/** + * Copyright (C) 1997-2012 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 + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + * C++ Expression parser for EXTABLED_SETIONS in Doxygen + * + * Features used: + * Operators: + * && AND operator + * || OR operator + * ! NOT operator + */ + +#include <qcstring.h> + +class CondParser +{ + // public functions + public: + bool parse(const char *fileName,int lineNr,const char *expr); + + // enumerations + private: + enum TOKENTYPE + { + NOTHING = -1, + DELIMITER, + VARIABLE, + UNKNOWN + }; + enum OPERATOR_ID + { + UNKNOWN_OP = -1, + AND = 1, + OR, + NOT + }; + + // data + private: + + QCString m_err; //!< error state + QCString m_expr; //!< holds the expression + const char *m_e; //!< points to a character in expr + + QCString m_token; //!< holds the token + TOKENTYPE m_tokenType; //!< type of the token + + // private functions + private: + void getToken(); + + bool parseLevel1(); + bool parseLevel2(); + bool parseLevel3(); + bool parseVar(); + + bool evalOperator(const int opId, bool lhs, bool rhs); + bool evalVariable(const char *varName); + int getOperatorId(const QCString &opName); +}; + +#endif + diff --git a/src/config.h b/src/config.h index d18e87d..5ed8bc4 100644 --- a/src/config.h +++ b/src/config.h @@ -19,9 +19,7 @@ #ifndef CONFIG_H #define CONFIG_H -#include "qtbc.h" #include <qstrlist.h> -#include <qfile.h> #include <qdict.h> #include <qlist.h> #include "ftextstream.h" diff --git a/src/config.l b/src/config.l index 3b2c426..7c37dea 100644 --- a/src/config.l +++ b/src/config.l @@ -1451,6 +1451,13 @@ void Config::check() gamma=240; } + QCString mathJaxFormat = Config_getEnum("MATHJAX_FORMAT"); + if (!mathJaxFormat.isEmpty() && mathJaxFormat!="HTML-CSS" && + mathJaxFormat!="NativeMML" && mathJaxFormat!="SVG") + { + config_err("error: Unsupported value for MATHJAX_FORMAT: Should be one of HTML-CSS, NativeMML, or SVG\n"); + Config_getEnum("MATHJAX_FORMAT")="HTML-CSS"; + } // add default words if needed QStrList &annotationFromBrief = Config_getList("ABBREVIATE_BRIEF"); diff --git a/src/config.xml b/src/config.xml index 410f732..3ca3313 100644 --- a/src/config.xml +++ b/src/config.xml @@ -510,7 +510,8 @@ disable (NO) the deprecated list. This list is created by putting ' defval='1'/> <option type='list' id='ENABLED_SECTIONS' format='string' docs=' The ENABLED_SECTIONS tag can be used to enable conditional -documentation sections, marked by \if sectionname ... \endif. +documentation sections, marked by \if section-label ... \endif +and \cond section-label ... \endcond blocks. '> </option> <option type='int' id='MAX_INITIALIZER_LINES' docs=' @@ -757,6 +758,12 @@ and it is also possible to disable source filtering for a specific pattern using *.ext= (so without naming a filter). This option only has effect when FILTER_SOURCE_FILES is enabled. ' depends='FILTER_SOURCE_FILES'/> + <option type='string' id='USE_MDFILE_AS_MAINPAGE' format='string' docs=' +If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that +is part of the input, its contents will be placed on the main page (index.html). +This can be useful if you have a project on for instance GitHub and want reuse +the introduction page also for the doxygen output. +' defval=''/> </group> <group name='Source Browser' docs='configuration options related to source browsing'> <option type='bool' id='SOURCE_BROWSER' docs=' @@ -1105,6 +1112,16 @@ have LaTeX installed or if you want to formulas look prettier in the HTML output. When enabled you may also need to install MathJax separately and configure the path to it using the MATHJAX_RELPATH option. ' defval='0'/> + <option type='enum' id='MATHJAX_FORMAT' defval='HTML-CSS' docs=' +When MathJax is enabled you can set the default output format to be used for +thA MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and +SVG. The default value is HTML-CSS, which is slower, but has the best +compatibility. +'> + <value name="HTML-CSS"/> + <value name="NativeMML"/> + <value name="SVG"/> + </option> <option type='string' id='MATHJAX_RELPATH' docs=' When MathJax is enabled you need to specify the location relative to the HTML output directory using the MATHJAX_RELPATH option. The destination diff --git a/src/configoptions.cpp b/src/configoptions.cpp index 99e4798..229cd13 100644 --- a/src/configoptions.cpp +++ b/src/configoptions.cpp @@ -735,7 +735,8 @@ void addConfigOptions(Config *cfg) cl = cfg->addList( "ENABLED_SECTIONS", "The ENABLED_SECTIONS tag can be used to enable conditional\n" - "documentation sections, marked by \\if sectionname ... \\endif." + "documentation sections, marked by \\if section-label ... \\endif\n" + "and \\cond section-label ... \\endcond blocks." ); //---- ci = cfg->addInt( @@ -1065,6 +1066,14 @@ void addConfigOptions(Config *cfg) "FILTER_SOURCE_FILES is enabled." ); cl->addDependency("FILTER_SOURCE_FILES"); + //---- + cs = cfg->addString( + "USE_MDFILE_AS_MAINPAGE", + "If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that\n" + "is part of the input, its contents will be placed on the main page (index.html).\n" + "This can be useful if you have a project on for instance GitHub and want reuse\n" + "the introduction page also for the doxygen output." + ); //--------------------------------------------------------------------------- cfg->addInfo("Source Browser","configuration options related to source browsing"); //--------------------------------------------------------------------------- @@ -1622,6 +1631,18 @@ void addConfigOptions(Config *cfg) FALSE ); //---- + ce = cfg->addEnum( + "MATHJAX_FORMAT", + "When MathJax is enabled you can set the default output format to be used for\n" + "thA MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and\n" + "SVG. The default value is HTML-CSS, which is slower, but has the best\n" + "compatibility.", + "HTML-CSS" + ); + ce->addValue("HTML-CSS"); + ce->addValue("NativeMML"); + ce->addValue("SVG"); + //---- cs = cfg->addString( "MATHJAX_RELPATH", "When MathJax is enabled you need to specify the location relative to the\n" diff --git a/src/constexp.h b/src/constexp.h index 8fedc34..767ea66 100644 --- a/src/constexp.h +++ b/src/constexp.h @@ -19,8 +19,8 @@ #ifndef _CONSTEXP_H #define _CONSTEXP_H -#include "qtbc.h" #include "cppvalue.h" +#include <qcstring.h> extern bool parseCppExpression(const char *fileName,int line,const QCString &s); extern int cppExpYYparse(); diff --git a/src/debug.cpp b/src/debug.cpp index 8757be2..da1233b 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -20,7 +20,6 @@ #include <qdict.h> -#include "qtbc.h" #include "debug.h" //------------------------------------------------------------------------ diff --git a/src/declinfo.h b/src/declinfo.h index a91f5bb..9486bad 100644 --- a/src/declinfo.h +++ b/src/declinfo.h @@ -18,8 +18,8 @@ #ifndef DECLINFO_H #define DECLINFO_H -#include "qtbc.h" #include <stdio.h> +#include <qcstring.h> extern void parseFuncDecl(const QCString &decl, bool objC, diff --git a/src/defargs.h b/src/defargs.h index b2bc198..9c6f209 100644 --- a/src/defargs.h +++ b/src/defargs.h @@ -18,10 +18,8 @@ #ifndef DEFARGS_H #define DEFARGS_H -#include "qtbc.h" -#include <stdio.h> - class ArgumentList; +class QCString; extern void stringToArgumentList(const char *argsString,ArgumentList* argList, QCString *extraTypeChars=0); diff --git a/src/defargs.l b/src/defargs.l index 26ab91a..ce870d9 100644 --- a/src/defargs.l +++ b/src/defargs.l @@ -45,7 +45,6 @@ /* * includes */ -#include "qtbc.h" #include <stdio.h> //#include <iostream.h> #include <assert.h> diff --git a/src/defgen.cpp b/src/defgen.cpp index 6f31851..fedb4a0 100644 --- a/src/defgen.cpp +++ b/src/defgen.cpp @@ -18,7 +18,6 @@ #include <stdlib.h> -#include "qtbc.h" #include "defgen.h" #include "doxygen.h" #include "message.h" @@ -29,6 +28,10 @@ #include "outputgen.h" #include "dot.h" #include "arguments.h" +#include "memberlist.h" +#include "namespacedef.h" +#include "filedef.h" +#include "filename.h" #include <qdir.h> #include <qfile.h> @@ -69,7 +72,7 @@ void generateDEFForMember(MemberDef *md, // - source referenced by // - include code - if (md->memberType()==MemberDef::EnumValue) return; + if (md->memberType()==MemberType_EnumValue) return; QCString scopeName; if (md->getClassDef()) @@ -86,18 +89,18 @@ void generateDEFForMember(MemberDef *md, bool isFunc=FALSE; switch (md->memberType()) { - case MemberDef::Define: memType="define"; break; - case MemberDef::EnumValue: ASSERT(0); break; - case MemberDef::Property: memType="property"; break; - case MemberDef::Event: memType="event"; break; - case MemberDef::Variable: memType="variable"; break; - case MemberDef::Typedef: memType="typedef"; break; - case MemberDef::Enumeration: memType="enum"; break; - case MemberDef::Function: memType="function"; isFunc=TRUE; break; - case MemberDef::Signal: memType="signal"; isFunc=TRUE; break; - case MemberDef::Friend: memType="friend"; isFunc=TRUE; break; - case MemberDef::DCOP: memType="dcop"; isFunc=TRUE; break; - case MemberDef::Slot: memType="slot"; isFunc=TRUE; break; + case MemberType_Define: memType="define"; break; + case MemberType_EnumValue: ASSERT(0); break; + case MemberType_Property: memType="property"; break; + case MemberType_Event: memType="event"; break; + case MemberType_Variable: memType="variable"; break; + case MemberType_Typedef: memType="typedef"; break; + case MemberType_Enumeration: memType="enum"; break; + case MemberType_Function: memType="function"; isFunc=TRUE; break; + case MemberType_Signal: memType="signal"; isFunc=TRUE; break; + case MemberType_Friend: memType="friend"; isFunc=TRUE; break; + case MemberType_DCOP: memType="dcop"; isFunc=TRUE; break; + case MemberType_Slot: memType="slot"; isFunc=TRUE; break; } t << memPrefix << "kind = '" << memType << "';" << endl; @@ -123,8 +126,8 @@ void generateDEFForMember(MemberDef *md, case Package: t << "package;" << endl; break; } - if (md->memberType()!=MemberDef::Define && - md->memberType()!=MemberDef::Enumeration + if (md->memberType()!=MemberType_Define && + md->memberType()!=MemberType_Enumeration ) { QCString typeStr = replaceAnonymousScopes(md->typeString()); @@ -190,7 +193,7 @@ void generateDEFForMember(MemberDef *md, } delete declAl; } - else if ( md->memberType()==MemberDef::Define + else if ( md->memberType()==MemberType_Define && md->argsString()!=0) { ArgumentListIterator ali(*md->argumentList()); @@ -211,7 +214,7 @@ void generateDEFForMember(MemberDef *md, << md->initializer() << endl << "_EnD_oF_dEf_TeXt_;" << endl; } // TODO: exceptions, const volatile - if (md->memberType()==MemberDef::Enumeration) // enum + if (md->memberType()==MemberType_Enumeration) // enum { LockingPtr<MemberList> enumList = md->enumFieldList(); if (enumList!=0) @@ -417,36 +420,36 @@ void generateDEFForClass(ClassDef *cd,FTextStream &t) MemberList *ml; for (mli.toFirst();(ml=mli.current());++mli) { - if ((ml->listType()&MemberList::detailedLists)==0) + if ((ml->listType()&MemberListType_detailedLists)==0) { numMembers+=ml->count(); } } if (numMembers>0) { - generateDEFClassSection(cd,t,cd->getMemberList(MemberList::pubTypes),"public-type"); - generateDEFClassSection(cd,t,cd->getMemberList(MemberList::pubMethods),"public-func"); - generateDEFClassSection(cd,t,cd->getMemberList(MemberList::pubAttribs),"public-attrib"); - generateDEFClassSection(cd,t,cd->getMemberList(MemberList::pubSlots),"public-slot"); - generateDEFClassSection(cd,t,cd->getMemberList(MemberList::signals),"signal"); - generateDEFClassSection(cd,t,cd->getMemberList(MemberList::dcopMethods),"dcop-func"); - generateDEFClassSection(cd,t,cd->getMemberList(MemberList::properties),"property"); - generateDEFClassSection(cd,t,cd->getMemberList(MemberList::pubStaticMethods),"public-static-func"); - generateDEFClassSection(cd,t,cd->getMemberList(MemberList::pubStaticAttribs),"public-static-attrib"); - generateDEFClassSection(cd,t,cd->getMemberList(MemberList::proTypes),"protected-type"); - generateDEFClassSection(cd,t,cd->getMemberList(MemberList::proMethods),"protected-func"); - generateDEFClassSection(cd,t,cd->getMemberList(MemberList::proAttribs),"protected-attrib"); - generateDEFClassSection(cd,t,cd->getMemberList(MemberList::proSlots),"protected-slot"); - generateDEFClassSection(cd,t,cd->getMemberList(MemberList::proStaticMethods),"protected-static-func"); - generateDEFClassSection(cd,t,cd->getMemberList(MemberList::proStaticAttribs),"protected-static-attrib"); - generateDEFClassSection(cd,t,cd->getMemberList(MemberList::priTypes),"private-type"); - generateDEFClassSection(cd,t,cd->getMemberList(MemberList::priMethods),"private-func"); - generateDEFClassSection(cd,t,cd->getMemberList(MemberList::priAttribs),"private-attrib"); - generateDEFClassSection(cd,t,cd->getMemberList(MemberList::priSlots),"private-slot"); - generateDEFClassSection(cd,t,cd->getMemberList(MemberList::priStaticMethods),"private-static-func"); - generateDEFClassSection(cd,t,cd->getMemberList(MemberList::priStaticAttribs),"private-static-attrib"); - generateDEFClassSection(cd,t,cd->getMemberList(MemberList::friends),"signal"); - generateDEFClassSection(cd,t,cd->getMemberList(MemberList::related),"related"); + generateDEFClassSection(cd,t,cd->getMemberList(MemberListType_pubTypes),"public-type"); + generateDEFClassSection(cd,t,cd->getMemberList(MemberListType_pubMethods),"public-func"); + generateDEFClassSection(cd,t,cd->getMemberList(MemberListType_pubAttribs),"public-attrib"); + generateDEFClassSection(cd,t,cd->getMemberList(MemberListType_pubSlots),"public-slot"); + generateDEFClassSection(cd,t,cd->getMemberList(MemberListType_signals),"signal"); + generateDEFClassSection(cd,t,cd->getMemberList(MemberListType_dcopMethods),"dcop-func"); + generateDEFClassSection(cd,t,cd->getMemberList(MemberListType_properties),"property"); + generateDEFClassSection(cd,t,cd->getMemberList(MemberListType_pubStaticMethods),"public-static-func"); + generateDEFClassSection(cd,t,cd->getMemberList(MemberListType_pubStaticAttribs),"public-static-attrib"); + generateDEFClassSection(cd,t,cd->getMemberList(MemberListType_proTypes),"protected-type"); + generateDEFClassSection(cd,t,cd->getMemberList(MemberListType_proMethods),"protected-func"); + generateDEFClassSection(cd,t,cd->getMemberList(MemberListType_proAttribs),"protected-attrib"); + generateDEFClassSection(cd,t,cd->getMemberList(MemberListType_proSlots),"protected-slot"); + generateDEFClassSection(cd,t,cd->getMemberList(MemberListType_proStaticMethods),"protected-static-func"); + generateDEFClassSection(cd,t,cd->getMemberList(MemberListType_proStaticAttribs),"protected-static-attrib"); + generateDEFClassSection(cd,t,cd->getMemberList(MemberListType_priTypes),"private-type"); + generateDEFClassSection(cd,t,cd->getMemberList(MemberListType_priMethods),"private-func"); + generateDEFClassSection(cd,t,cd->getMemberList(MemberListType_priAttribs),"private-attrib"); + generateDEFClassSection(cd,t,cd->getMemberList(MemberListType_priSlots),"private-slot"); + generateDEFClassSection(cd,t,cd->getMemberList(MemberListType_priStaticMethods),"private-static-func"); + generateDEFClassSection(cd,t,cd->getMemberList(MemberListType_priStaticAttribs),"private-static-attrib"); + generateDEFClassSection(cd,t,cd->getMemberList(MemberListType_friends),"signal"); + generateDEFClassSection(cd,t,cd->getMemberList(MemberListType_related),"related"); } t << " cp-filename = '" << cd->getDefFileName() << "';" << endl; @@ -501,12 +504,12 @@ void generateDEFForNamespace(NamespaceDef *nd,FTextStream &t) writeDEFString(t,nd->name()); t << ';' << endl; - generateDEFSection(nd,t,nd->getMemberList(MemberList::decDefineMembers),"define"); - generateDEFSection(nd,t,nd->getMemberList(MemberList::decProtoMembers),"prototype"); - generateDEFSection(nd,t,nd->getMemberList(MemberList::decTypedefMembers),"typedef"); - generateDEFSection(nd,t,nd->getMemberList(MemberList::decEnumMembers),"enum"); - generateDEFSection(nd,t,nd->getMemberList(MemberList::decFuncMembers),"func"); - generateDEFSection(nd,t,nd->getMemberList(MemberList::decVarMembers),"var"); + generateDEFSection(nd,t,nd->getMemberList(MemberListType_decDefineMembers),"define"); + generateDEFSection(nd,t,nd->getMemberList(MemberListType_decProtoMembers),"prototype"); + generateDEFSection(nd,t,nd->getMemberList(MemberListType_decTypedefMembers),"typedef"); + generateDEFSection(nd,t,nd->getMemberList(MemberListType_decEnumMembers),"enum"); + generateDEFSection(nd,t,nd->getMemberList(MemberListType_decFuncMembers),"func"); + generateDEFSection(nd,t,nd->getMemberList(MemberListType_decVarMembers),"var"); t << " ns-filename = '" << nd->getDefFileName() << "';" << endl; t << " ns-fileline = '" << nd->getDefLine() << "';" << endl; @@ -528,12 +531,12 @@ void generateDEFForFile(FileDef *fd,FTextStream &t) writeDEFString(t,fd->name()); t << ';' << endl; - generateDEFSection(fd,t,fd->getMemberList(MemberList::decDefineMembers),"define"); - generateDEFSection(fd,t,fd->getMemberList(MemberList::decProtoMembers),"prototype"); - generateDEFSection(fd,t,fd->getMemberList(MemberList::decTypedefMembers),"typedef"); - generateDEFSection(fd,t,fd->getMemberList(MemberList::decEnumMembers),"enum"); - generateDEFSection(fd,t,fd->getMemberList(MemberList::decFuncMembers),"func"); - generateDEFSection(fd,t,fd->getMemberList(MemberList::decVarMembers),"var"); + generateDEFSection(fd,t,fd->getMemberList(MemberListType_decDefineMembers),"define"); + generateDEFSection(fd,t,fd->getMemberList(MemberListType_decProtoMembers),"prototype"); + generateDEFSection(fd,t,fd->getMemberList(MemberListType_decTypedefMembers),"typedef"); + generateDEFSection(fd,t,fd->getMemberList(MemberListType_decEnumMembers),"enum"); + generateDEFSection(fd,t,fd->getMemberList(MemberListType_decFuncMembers),"func"); + generateDEFSection(fd,t,fd->getMemberList(MemberListType_decVarMembers),"var"); t << " file-full-name = '" << fd->getDefFileName() << "';" << endl; t << " file-first-line = '" << fd->getDefLine() << "';" << endl; diff --git a/src/define.h b/src/define.h index 6579403..c5b5274 100644 --- a/src/define.h +++ b/src/define.h @@ -18,7 +18,6 @@ #ifndef DEFINE_H #define DEFINE_H -#include "qtbc.h" #include <qdict.h> #include <qlist.h> @@ -54,7 +53,7 @@ class DefineList : public QList<Define> public: DefineList() : QList<Define>() {} ~DefineList() {} - int compareItems(GCI i1,GCI i2) + int compareItems(QCollection::Item i1,QCollection::Item i2) { return stricmp(((Define *)i1)->name,((Define *)i2)->name); } @@ -67,7 +66,7 @@ class DefineName : public QList<Define> DefineName(const char *n) : QList<Define>() { name=n; } ~DefineName() {} const char *nameString() const { return name; } - int compareItems(GCI i1,GCI i2) + int compareItems(QCollection::Item i1,QCollection::Item i2) { return stricmp(((Define *)i1)->name,((Define *)i2)->name); } @@ -82,7 +81,7 @@ class DefineNameList : public QList<DefineName> public: DefineNameList() : QList<DefineName>() {} ~DefineNameList() {} - int compareItems(GCI i1,GCI i2) + int compareItems(QCollection::Item i1,QCollection::Item i2) { return stricmp(((DefineName *)i1)->nameString(), ((DefineName *)i2)->nameString()); diff --git a/src/definition.cpp b/src/definition.cpp index 1e60730..adaf74a 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -15,7 +15,6 @@ * */ -#include "qtbc.h" #include <ctype.h> #include <qregexp.h> #include "md5.h" @@ -38,6 +37,10 @@ #include "marshal.h" #include "debug.h" #include "vhdldocgen.h" +#include "memberlist.h" +#include "namespacedef.h" +#include "filedef.h" +#include "dirdef.h" #define START_MARKER 0x4445465B // DEF[ #define END_MARKER 0x4445465D // DEF] @@ -400,12 +403,12 @@ void Definition::addSectionsToDefinition(QList<SectionInfo> *anchorList) { //printf("Add section `%s' to definition `%s'\n", // si->label.data(),name().data()); - SectionInfo *gsi=Doxygen::sectionDict.find(si->label); + SectionInfo *gsi=Doxygen::sectionDict->find(si->label); //printf("===== label=%s gsi=%p\n",si->label.data(),gsi); if (gsi==0) { gsi = new SectionInfo(*si); - Doxygen::sectionDict.append(si->label,gsi); + Doxygen::sectionDict->append(si->label,gsi); } if (m_impl->sectionDict==0) { @@ -463,19 +466,19 @@ void Definition::addSectionsToIndex() { for (i=level;i<nextLevel;i++) { - Doxygen::indexList.incContentsDepth(); + Doxygen::indexList->incContentsDepth(); } } else if (nextLevel<level) { for (i=nextLevel;i<level;i++) { - Doxygen::indexList.decContentsDepth(); + Doxygen::indexList->decContentsDepth(); } } QCString title = si->title; if (title.isEmpty()) title = si->label; - Doxygen::indexList.addContentsItem(TRUE,title, + Doxygen::indexList->addContentsItem(TRUE,title, getReference(), getOutputFileBase(), si->label, @@ -486,7 +489,7 @@ void Definition::addSectionsToIndex() } while (level>1) { - Doxygen::indexList.decContentsDepth(); + Doxygen::indexList->decContentsDepth(); level--; } } @@ -1870,17 +1873,18 @@ void Definition::setLanguage(SrcLangExt lang) m_impl->lang=lang; } -void Definition::makeResident() const -{ -} - -//--------------- void Definition::_setSymbolName(const QCString &name) { m_symbolName=name; } +//--------------- + +void Definition::makeResident() const +{ +} + void Definition::flushToDisk() const { //printf("%p: Definition::flushToDisk()\n",this); diff --git a/src/definition.h b/src/definition.h index ed447fe..9d80431 100644 --- a/src/definition.h +++ b/src/definition.h @@ -18,13 +18,11 @@ #ifndef DEFINITION_H #define DEFINITION_H -#include "qtbc.h" #include <qlist.h> #include <qdict.h> -#include <sys/types.h> +#include "types.h" #include "lockingptr.h" -#include "util.h" class FileDef; class OutputList; @@ -37,8 +35,6 @@ struct ListItemInfo; struct SectionInfo; class Definition; class DefinitionImpl; - - /** Data associated with a detailed description. */ struct DocInfo @@ -366,7 +362,7 @@ class DefinitionList : public QList<Definition>, public DefinitionIntf public: ~DefinitionList() {} DefType definitionType() const { return TypeSymbolList; } - int compareItems(GCI item1,GCI item2) + int compareItems(QCollection::Item item1,QCollection::Item item2) { return stricmp(((Definition *)item1)->name(), ((Definition *)item2)->name() diff --git a/src/diagram.cpp b/src/diagram.cpp index 67f63a0..78b9364 100644 --- a/src/diagram.cpp +++ b/src/diagram.cpp @@ -16,7 +16,6 @@ * */ -#include "qtbc.h" #include <stdio.h> #include <stdlib.h> #include <qlist.h> @@ -33,6 +32,7 @@ #include "doxygen.h" #include "portable.h" #include "index.h" +#include "classlist.h" //----------------------------------------------------------------------------- @@ -1122,7 +1122,7 @@ void ClassDiagram::writeFigure(FTextStream &output,const char *path, f1.setName(epsName.data()); if (!f1.open(IO_WriteOnly)) { - err("Could not open file %s for writing\n",convertToQCString(f1.name()).data()); + err("Could not open file %s for writing\n",f1.name().data()); exit(1); } FTextStream t(&f1); @@ -1401,7 +1401,7 @@ void ClassDiagram::writeImage(FTextStream &t,const char *path, #define IMAGE_EXT ".png" image.save((QCString)path+"/"+fileName+IMAGE_EXT); - Doxygen::indexList.addImageFile(QCString(fileName)+IMAGE_EXT); + Doxygen::indexList->addImageFile(QCString(fileName)+IMAGE_EXT); if (generateMap) t << "</map>" << endl; } diff --git a/src/diagram.h b/src/diagram.h index e26f16c..63481cd 100644 --- a/src/diagram.h +++ b/src/diagram.h @@ -19,9 +19,6 @@ #ifndef DIAGRAM_H #define DIAGRAM_H -#include "qtbc.h" -#include "types.h" - class ClassDef; class TreeDiagram; class FTextStream; diff --git a/src/dirdef.cpp b/src/dirdef.cpp index e45aff9..6565393 100644 --- a/src/dirdef.cpp +++ b/src/dirdef.cpp @@ -10,6 +10,7 @@ #include "dot.h" #include "layout.h" #include "ftextstream.h" +#include "config.h" //---------------------------------------------------------------------- // method implementation @@ -574,7 +575,7 @@ bool DirDef::depGraphIsTrivial() const //---------------------------------------------------------------------- -int FilePairDict::compareItems(GCI item1,GCI item2) +int FilePairDict::compareItems(QCollection::Item item1,QCollection::Item item2) { FilePair *left = (FilePair*)item1; FilePair *right = (FilePair*)item2; diff --git a/src/dirdef.h b/src/dirdef.h index 9a5346c..a94f979 100644 --- a/src/dirdef.h +++ b/src/dirdef.h @@ -18,7 +18,6 @@ #ifndef DIRDEF_H #define DIRDEF_H -#include "qtbc.h" #include "sortdict.h" #include "definition.h" @@ -38,7 +37,7 @@ class DirDef; class DirList : public QList<DirDef> { public: - int compareItems(GCI item1,GCI item2); + int compareItems(QCollection::Item item1,QCollection::Item item2); }; /** A model of a directory symbol. */ @@ -122,7 +121,7 @@ class FilePairDict : public SDict<FilePair> { public: FilePairDict(int size) : SDict<FilePair>(size) {} - int compareItems(GCI item1,GCI item2); + int compareItems(QCollection::Item item1,QCollection::Item item2); }; /** Usage information of a directory. */ @@ -160,7 +159,7 @@ class DirRelation UsedDir *m_dst; }; -inline int DirList::compareItems(GCI item1,GCI item2) +inline int DirList::compareItems(QCollection::Item item1,QCollection::Item item2) { return stricmp(((DirDef *)item1)->shortName(),((DirDef *)item2)->shortName()); } @@ -170,7 +169,7 @@ class DirSDict : public SDict<DirDef> { public: DirSDict(int size) : SDict<DirDef>(size) {} - int compareItems(GCI item1,GCI item2) + int compareItems(QCollection::Item item1,QCollection::Item item2) { return stricmp(((DirDef *)item1)->shortName(),((DirDef *)item2)->shortName()); } diff --git a/src/docparser.cpp b/src/docparser.cpp index 02153f6..c4f42f3 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -31,7 +31,6 @@ #include "debug.h" #include "util.h" #include "pagedef.h" - #include "docparser.h" #include "doctokenizer.h" #include "cmdmapper.h" @@ -44,6 +43,14 @@ #include "cite.h" #include "arguments.h" #include "vhdldocgen.h" +#include "groupdef.h" +#include "classlist.h" +#include "filedef.h" +#include "memberdef.h" +#include "namespacedef.h" +#include "reflist.h" +#include "formula.h" +#include "config.h" // debug off #define DBG(x) do {} while(0) @@ -271,7 +278,7 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type) outImage.writeBlock(buffer,inImage.size()); outImage.flush(); delete[] buffer; - if (type==DocImage::Html) Doxygen::indexList.addImageFile(result); + if (type==DocImage::Html) Doxygen::indexList->addImageFile(result); } else { @@ -1789,7 +1796,7 @@ DocAnchor::DocAnchor(DocNode *parent,const QCString &id,bool newAnchor) } else // found \anchor label { - SectionInfo *sec = Doxygen::sectionDict[id]; + SectionInfo *sec = Doxygen::sectionDict->find(id); if (sec) { //printf("Found anchor %s\n",id.data()); @@ -2134,7 +2141,7 @@ DocFormula::DocFormula(DocNode *parent,int id) : m_parent = parent; QCString formCmd; formCmd.sprintf("\\form#%d",id); - Formula *formula=Doxygen::formulaNameDict[formCmd]; + Formula *formula=Doxygen::formulaNameDict->find(formCmd); if (formula) { m_id = formula->getId(); @@ -2206,7 +2213,7 @@ void DocSecRefItem::parse() SectionInfo *sec=0; if (!m_target.isEmpty()) { - sec=Doxygen::sectionDict[m_target]; + sec=Doxygen::sectionDict->find(m_target); if (sec) { m_file = sec->fileName; @@ -2360,7 +2367,7 @@ DocRef::DocRef(DocNode *parent,const QCString &target,const QCString &context) : //printf("DocRef::DocRef(target=%s,context=%s)\n",target.data(),context.data()); ASSERT(!target.isEmpty()); m_relPath = g_relPath; - SectionInfo *sec = Doxygen::sectionDict[target]; + SectionInfo *sec = Doxygen::sectionDict->find(target); if (sec) // ref to section or anchor { PageDef *pd = 0; @@ -2827,6 +2834,52 @@ void DocMscFile::parse() ASSERT(n==this); } +//--------------------------------------------------------------------------- + +DocVhdlFlow::DocVhdlFlow(DocNode *parent) +{ + m_parent = parent; +} + +void DocVhdlFlow::parse() +{ + g_nodeStack.push(this); + DBG(("DocVhdlFlow::parse() start\n")); + + doctokenizerYYsetStateTitle(); + int tok; + while ((tok=doctokenizerYYlex())) + { + if (!defaultHandleToken(this,tok,m_children)) + { + switch (tok) + { + case TK_COMMAND: + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Illegal command %s as part of a \\mscfile", + qPrint(g_token->name)); + break; + case TK_SYMBOL: + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unsupported symbol %s found", + qPrint(g_token->name)); + break; + default: + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected token %s", + tokToString(tok)); + break; + } + } + } + tok=doctokenizerYYlex(); + + doctokenizerYYsetStatePara(); + handlePendingStyleCommands(this,m_children); + + DBG(("DocVhdlFlow::parse() end\n")); + DocNode *n=g_nodeStack.pop(); + ASSERT(n==this); + + VhdlDocGen::createFlowChart(g_memberDef); +} //--------------------------------------------------------------------------- @@ -4986,6 +5039,13 @@ void DocPara::handleMscFile(const QCString &cmdName) df->parse(); } +void DocPara::handleVhdlFlow() +{ + DocVhdlFlow *vf = new DocVhdlFlow(this); + m_children.append(vf); + vf->parse(); +} + void DocPara::handleLink(const QCString &cmdName,bool isJavaLink) { int tok=doctokenizerYYlex(); @@ -5527,6 +5587,9 @@ int DocPara::handleCommand(const QCString &cmdName) case CMD_DOTFILE: handleDotFile(cmdName); break; + case CMD_VHDLFLOW: + handleVhdlFlow(); + break; case CMD_MSCFILE: handleMscFile(cmdName); break; @@ -6515,7 +6578,7 @@ int DocSection::parse() SectionInfo *sec; if (!m_id.isEmpty()) { - sec=Doxygen::sectionDict[m_id]; + sec=Doxygen::sectionDict->find(m_id); if (sec) { m_file = sec->fileName; @@ -6773,7 +6836,7 @@ void DocRoot::parse() // then parse any number of level1 sections while (retval==RetVal_Section) { - SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId]; + SectionInfo *sec=Doxygen::sectionDict->find(g_token->sectionId); if (sec) { DocSection *s=new DocSection(this, diff --git a/src/docparser.h b/src/docparser.h index 2fe68af..cd51522 100644 --- a/src/docparser.h +++ b/src/docparser.h @@ -129,7 +129,8 @@ class DocNode Kind_Copy = 46, Kind_Text = 47, Kind_MscFile = 48, - Kind_HtmlBlockQuote = 49 + Kind_HtmlBlockQuote = 49, + Kind_VhdlFlow = 50 }; /*! Creates a new node */ DocNode() : m_parent(0), m_insidePre(FALSE) {} @@ -686,6 +687,17 @@ class DocMscFile : public CompAccept<DocMscFile>, public DocNode QCString m_context; }; +/** Node representing a VHDL flow chart */ +class DocVhdlFlow : public CompAccept<DocVhdlFlow>, public DocNode +{ + public: + DocVhdlFlow(DocNode *parent); + void parse(); + Kind kind() const { return Kind_VhdlFlow; } + bool hasCaption() { return !m_children.isEmpty(); } + void accept(DocVisitor *v) { CompAccept<DocVhdlFlow>::accept(this,v); } + private: +}; /** Node representing a link to some item */ class DocLink : public CompAccept<DocLink>, public DocNode @@ -1021,6 +1033,7 @@ class DocPara : public CompAccept<DocPara>, public DocNode void handleRef(const QCString &cmdName); void handleSection(const QCString &cmdName); void handleInheritDoc(); + void handleVhdlFlow(); int handleStartCode(); int handleHtmlHeader(const HtmlAttribList &tagHtmlAttribs,int level); diff --git a/src/docsets.cpp b/src/docsets.cpp index 2f0770b..dc483d3 100644 --- a/src/docsets.cpp +++ b/src/docsets.cpp @@ -18,6 +18,12 @@ #include "config.h" #include "message.h" #include "doxygen.h" +#include "groupdef.h" +#include "classdef.h" +#include "filedef.h" +#include "memberdef.h" +#include "namespacedef.h" +#include "util.h" DocSets::DocSets() : m_nodes(17), m_scopes(17) { @@ -338,9 +344,9 @@ void DocSets::addIndexItem(Definition *context,MemberDef *md, switch (md->memberType()) { - case MemberDef::Define: + case MemberType_Define: type="macro"; break; - case MemberDef::Function: + case MemberType_Function: if (cd && (cd->compoundType()==ClassDef::Interface || cd->compoundType()==ClassDef::Class)) { @@ -359,31 +365,31 @@ void DocSets::addIndexItem(Definition *context,MemberDef *md, else type="func"; break; - case MemberDef::Variable: + case MemberType_Variable: type="data"; break; - case MemberDef::Typedef: + case MemberType_Typedef: type="tdef"; break; - case MemberDef::Enumeration: + case MemberType_Enumeration: type="enum"; break; - case MemberDef::EnumValue: + case MemberType_EnumValue: type="econst"; break; //case MemberDef::Prototype: // type="prototype"; break; - case MemberDef::Signal: + case MemberType_Signal: type="signal"; break; - case MemberDef::Slot: + case MemberType_Slot: type="slot"; break; - case MemberDef::Friend: + case MemberType_Friend: type="ffunc"; break; - case MemberDef::DCOP: + case MemberType_DCOP: type="dcop"; break; - case MemberDef::Property: + case MemberType_Property: if (cd && cd->compoundType()==ClassDef::Protocol) type="intfp"; // interface property else type="instp"; // instance property break; - case MemberDef::Event: + case MemberType_Event: type="event"; break; } cd = md->getClassDef(); diff --git a/src/docsets.h b/src/docsets.h index 8cf1d3d..2fa0125 100644 --- a/src/docsets.h +++ b/src/docsets.h @@ -16,8 +16,6 @@ #ifndef DOCSETS_H #define DOCSETS_H -#include "qtbc.h" -#include <qstrlist.h> #include "sortdict.h" #include "ftextstream.h" #include "index.h" diff --git a/src/doctokenizer.l b/src/doctokenizer.l index a030f80..6dd5f56 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -19,6 +19,8 @@ %{ +#include <ctype.h> + #include <qfile.h> #include <qstring.h> #include <qstack.h> @@ -159,7 +161,7 @@ static void processSection() warn(g_fileName,yylineno,"Found section/anchor %s without context\n",g_secLabel.data()); } SectionInfo *si=0; - if ((si=Doxygen::sectionDict.find(g_secLabel))) + if ((si=Doxygen::sectionDict->find(g_secLabel))) { si->fileName = file; //si = new SectionInfo(file,g_secLabel,g_secTitle,g_secType); @@ -331,7 +333,8 @@ LISTITEM {BLANK}*[-]("#")?{WS} MLISTITEM {BLANK}*[+*]{WS} OLISTITEM {BLANK}*[1-9][0-9]*"."{BLANK} ENDLIST {BLANK}*"."{BLANK}*\n -ATTRIB {ID}{WS}*("="{WS}*(("\""[^\"]*"\"")|("'"[^\']*"'")|[^ \t\r\n'"><]+))? +ATTRNAME [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF\-]* +ATTRIB {ATTRNAME}{WS}*("="{WS}*(("\""[^\"]*"\"")|("'"[^\']*"'")|[^ \t\r\n'"><]+))? URLCHAR [a-z_A-Z0-9\!\~\,\:\;\'\$\?\@\&\%\#\.\-\+\/\=] URLMASK ({URLCHAR}+([({]{URLCHAR}*[)}])?)+ FILESCHAR [a-z_A-Z0-9\\:\\\/\-\+] @@ -344,7 +347,7 @@ SPCMD1 {CMD}([a-z_A-Z][a-z_A-Z0-9]*|{VERBATIM}) SPCMD2 {CMD}[\\@<>&$#%~".|] SPCMD3 {CMD}form#[0-9]+ SPCMD4 {CMD}"::" -INOUT "in"|"out"|("in"{BLANK}*","{BLANK}*"out")|("out"{BLANK}*","{BLANK}*"in") +INOUT "inout"|"in"|"out"|("in"{BLANK}*","{BLANK}*"out")|("out"{BLANK}*","{BLANK}*"in") PARAMIO {CMD}param{BLANK}*"["{BLANK}*{INOUT}{BLANK}*"]" TEMPCHAR [a-z_A-Z0-9,: \t\*\&] FUNCCHAR [a-z_A-Z0-9,:\<\> \t\*\&\[\]] @@ -793,7 +796,7 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3} <St_Dot>. { /* dot text */ g_token->verb+=yytext; } -<St_Msc>{CMD}"endmsc" { +<St_Msc>{CMD}("endmsc"|"endvhdlflow") { return RetVal_OK; } <St_Msc>[^\\@\n]+ | diff --git a/src/docvisitor.h b/src/docvisitor.h index c9acf64..104dce0 100644 --- a/src/docvisitor.h +++ b/src/docvisitor.h @@ -80,6 +80,7 @@ class DocCopy; // TODO: no longer generated => remove class DocText; class DocSimpleSectSep; class DocHtmlBlockQuote; +class DocVhdlFlow; /*! @brief Abstract visitor that participates in the visitor pattern. */ @@ -185,6 +186,8 @@ class DocVisitor virtual void visitPost(DocText *) = 0; virtual void visitPre(DocHtmlBlockQuote *) = 0; virtual void visitPost(DocHtmlBlockQuote *) = 0; + virtual void visitPre(DocVhdlFlow *) = 0; + virtual void visitPost(DocVhdlFlow *) = 0; /*! @} */ }; diff --git a/src/dot.cpp b/src/dot.cpp index adad589..0866768 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -23,6 +23,13 @@ #include <stdlib.h> +#include <qdir.h> +#include <qfile.h> +#include <qqueue.h> +#include <qthread.h> +#include <qmutex.h> +#include <qwaitcondition.h> + #include "dot.h" #include "doxygen.h" #include "message.h" @@ -36,15 +43,15 @@ #include "portable.h" #include "dirdef.h" #include "vhdldocgen.h" -#include <qdir.h> -#include <qfile.h> #include "ftextstream.h" #include "md5.h" -#include <qqueue.h> - -#include <qthread.h> -#include <qmutex.h> -#include <qwaitcondition.h> +#include "memberlist.h" +#include "groupdef.h" +#include "classlist.h" +#include "filename.h" +#include "namespacedef.h" +#include "memberdef.h" +#include "membergroup.h" #define MAP_CMD "cmapx" @@ -762,7 +769,7 @@ class DotNodeList : public QList<DotNode> public: DotNodeList() : QList<DotNode>() {} ~DotNodeList() {} - int compareItems(GCI item1,GCI item2) + int compareItems(QCollection::Item item1,QCollection::Item item2) { return stricmp(((DotNode *)item1)->m_label,((DotNode *)item2)->m_label); } @@ -1740,32 +1747,32 @@ void DotNode::writeBox(FTextStream &t, static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE"); t << "{" << convertLabel(m_label); t << "\\n|"; - writeBoxMemberList(t,'+',m_classDef->getMemberList(MemberList::pubAttribs),m_classDef,FALSE,&arrowNames); - writeBoxMemberList(t,'+',m_classDef->getMemberList(MemberList::pubStaticAttribs),m_classDef,TRUE,&arrowNames); - writeBoxMemberList(t,'+',m_classDef->getMemberList(MemberList::properties),m_classDef,FALSE,&arrowNames); - writeBoxMemberList(t,'~',m_classDef->getMemberList(MemberList::pacAttribs),m_classDef,FALSE,&arrowNames); - writeBoxMemberList(t,'~',m_classDef->getMemberList(MemberList::pacStaticAttribs),m_classDef,TRUE,&arrowNames); - writeBoxMemberList(t,'#',m_classDef->getMemberList(MemberList::proAttribs),m_classDef,FALSE,&arrowNames); - writeBoxMemberList(t,'#',m_classDef->getMemberList(MemberList::proStaticAttribs),m_classDef,TRUE,&arrowNames); + writeBoxMemberList(t,'+',m_classDef->getMemberList(MemberListType_pubAttribs),m_classDef,FALSE,&arrowNames); + writeBoxMemberList(t,'+',m_classDef->getMemberList(MemberListType_pubStaticAttribs),m_classDef,TRUE,&arrowNames); + writeBoxMemberList(t,'+',m_classDef->getMemberList(MemberListType_properties),m_classDef,FALSE,&arrowNames); + writeBoxMemberList(t,'~',m_classDef->getMemberList(MemberListType_pacAttribs),m_classDef,FALSE,&arrowNames); + writeBoxMemberList(t,'~',m_classDef->getMemberList(MemberListType_pacStaticAttribs),m_classDef,TRUE,&arrowNames); + writeBoxMemberList(t,'#',m_classDef->getMemberList(MemberListType_proAttribs),m_classDef,FALSE,&arrowNames); + writeBoxMemberList(t,'#',m_classDef->getMemberList(MemberListType_proStaticAttribs),m_classDef,TRUE,&arrowNames); if (extractPrivate) { - writeBoxMemberList(t,'-',m_classDef->getMemberList(MemberList::priAttribs),m_classDef,FALSE,&arrowNames); - writeBoxMemberList(t,'-',m_classDef->getMemberList(MemberList::priStaticAttribs),m_classDef,TRUE,&arrowNames); + writeBoxMemberList(t,'-',m_classDef->getMemberList(MemberListType_priAttribs),m_classDef,FALSE,&arrowNames); + writeBoxMemberList(t,'-',m_classDef->getMemberList(MemberListType_priStaticAttribs),m_classDef,TRUE,&arrowNames); } t << "|"; - writeBoxMemberList(t,'+',m_classDef->getMemberList(MemberList::pubMethods),m_classDef); - writeBoxMemberList(t,'+',m_classDef->getMemberList(MemberList::pubStaticMethods),m_classDef,TRUE); - writeBoxMemberList(t,'+',m_classDef->getMemberList(MemberList::pubSlots),m_classDef); - writeBoxMemberList(t,'~',m_classDef->getMemberList(MemberList::pacMethods),m_classDef); - writeBoxMemberList(t,'~',m_classDef->getMemberList(MemberList::pacStaticMethods),m_classDef,TRUE); - writeBoxMemberList(t,'#',m_classDef->getMemberList(MemberList::proMethods),m_classDef); - writeBoxMemberList(t,'#',m_classDef->getMemberList(MemberList::proStaticMethods),m_classDef,TRUE); - writeBoxMemberList(t,'#',m_classDef->getMemberList(MemberList::proSlots),m_classDef); + writeBoxMemberList(t,'+',m_classDef->getMemberList(MemberListType_pubMethods),m_classDef); + writeBoxMemberList(t,'+',m_classDef->getMemberList(MemberListType_pubStaticMethods),m_classDef,TRUE); + writeBoxMemberList(t,'+',m_classDef->getMemberList(MemberListType_pubSlots),m_classDef); + writeBoxMemberList(t,'~',m_classDef->getMemberList(MemberListType_pacMethods),m_classDef); + writeBoxMemberList(t,'~',m_classDef->getMemberList(MemberListType_pacStaticMethods),m_classDef,TRUE); + writeBoxMemberList(t,'#',m_classDef->getMemberList(MemberListType_proMethods),m_classDef); + writeBoxMemberList(t,'#',m_classDef->getMemberList(MemberListType_proStaticMethods),m_classDef,TRUE); + writeBoxMemberList(t,'#',m_classDef->getMemberList(MemberListType_proSlots),m_classDef); if (extractPrivate) { - writeBoxMemberList(t,'-',m_classDef->getMemberList(MemberList::priMethods),m_classDef); - writeBoxMemberList(t,'-',m_classDef->getMemberList(MemberList::priStaticMethods),m_classDef,TRUE); - writeBoxMemberList(t,'-',m_classDef->getMemberList(MemberList::priSlots),m_classDef); + writeBoxMemberList(t,'-',m_classDef->getMemberList(MemberListType_priMethods),m_classDef); + writeBoxMemberList(t,'-',m_classDef->getMemberList(MemberListType_priStaticMethods),m_classDef,TRUE); + writeBoxMemberList(t,'-',m_classDef->getMemberList(MemberListType_priSlots),m_classDef); } if (m_classDef->getLanguage()!=SrcLangExt_Fortran && m_classDef->getMemberGroupSDict()) @@ -2274,7 +2281,7 @@ void DotGfxHierarchyTable::writeGraph(FTextStream &out, { removeDotGraph(absBaseName+".dot"); } - Doxygen::indexList.addImageFile(imgName); + Doxygen::indexList->addImageFile(imgName); // write image and map in a table row QCString mapLabel = escapeCharsInString(n->m_label,FALSE); out << "<tr><td>"; @@ -3088,7 +3095,7 @@ QCString DotClassGraph::writeGraph(FTextStream &out, DotManager::instance()->addRun(dotRun); } } - Doxygen::indexList.addImageFile(baseName+"."+imgExt); + Doxygen::indexList->addImageFile(baseName+"."+imgExt); if (format==BITMAP && generateImageMap) // produce HTML to include the image { @@ -3408,7 +3415,7 @@ QCString DotInclDepGraph::writeGraph(FTextStream &out, } } - Doxygen::indexList.addImageFile(baseName+"."+imgExt); + Doxygen::indexList->addImageFile(baseName+"."+imgExt); if (format==BITMAP && generateImageMap) { @@ -3700,7 +3707,7 @@ QCString DotCallGraph::writeGraph(FTextStream &out, GraphOutputFormat format, } } - Doxygen::indexList.addImageFile(baseName+"."+imgExt); + Doxygen::indexList->addImageFile(baseName+"."+imgExt); if (format==BITMAP && generateImageMap) { @@ -3845,7 +3852,7 @@ QCString DotDirDeps::writeGraph(FTextStream &out, DotManager::instance()->addRun(dotRun); } } - Doxygen::indexList.addImageFile(baseName+"."+imgExt); + Doxygen::indexList->addImageFile(baseName+"."+imgExt); if (format==BITMAP && generateImageMap) { @@ -3945,8 +3952,7 @@ void generateGraphLegend(const char *path) QFile dotFile(absDotName); if (!dotFile.open(IO_WriteOnly)) { - err("Could not open file %s for writing\n", - convertToQCString(dotFile.name()).data()); + err("Could not open file %s for writing\n",dotFile.name().data()); return; } @@ -3964,7 +3970,7 @@ void generateGraphLegend(const char *path) { removeDotGraph(absDotName); } - Doxygen::indexList.addImageFile(imgName); + Doxygen::indexList->addImageFile(imgName); if (imgExt=="svg") { @@ -4013,7 +4019,7 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir, if (format==BITMAP) checkDotResult(absImgName); - Doxygen::indexList.addImageFile(imgName); + Doxygen::indexList->addImageFile(imgName); } @@ -4150,7 +4156,7 @@ void DotGroupCollaboration::buildGraph(GroupDef* gd) // Write collaboration // Add members - addMemberList( gd->getMemberList(MemberList::allMembersList) ); + addMemberList( gd->getMemberList(MemberListType_allMembersList) ); // Add classes if ( gd->getClasses() && gd->getClasses()->count() ) @@ -19,7 +19,6 @@ #ifndef _DOT_H #define _DOT_H -#include "qtbc.h" #include <qlist.h> #include <qdict.h> #include <qwaitcondition.h> diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 4397e77..482d9fc 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -13,7 +13,8 @@ * */ -#include "qtbc.h" +#include <locale.h> + #include <qfileinfo.h> #include <qfile.h> #include <qdir.h> @@ -27,6 +28,7 @@ #include <unistd.h> #include <errno.h> #include <qptrdict.h> +#include <qtextstream.h> #include "version.h" #include "doxygen.h" @@ -82,8 +84,16 @@ #include "filestorage.h" #include "markdown.h" #include "arguments.h" - +#include "memberlist.h" #include "layout.h" +#include "groupdef.h" +#include "classlist.h" +#include "namespacedef.h" +#include "filename.h" +#include "membername.h" +#include "membergroup.h" +#include "docsets.h" +#include "formula.h" #define RECURSE_ENTRYTREE(func,var) \ do { if (var->children()) { \ @@ -106,12 +116,12 @@ MemberNameSDict *Doxygen::functionNameSDict = 0; FileNameList *Doxygen::inputNameList = 0; // all input files FileNameDict *Doxygen::inputNameDict = 0; GroupSDict *Doxygen::groupSDict = 0; -FormulaList Doxygen::formulaList; // all formulas -FormulaDict Doxygen::formulaDict(1009); // all formulas -FormulaDict Doxygen::formulaNameDict(1009); // the label name of all formulas +FormulaList *Doxygen::formulaList = 0; // all formulas +FormulaDict *Doxygen::formulaDict = 0; // all formulas +FormulaDict *Doxygen::formulaNameDict = 0; // the label name of all formulas PageSDict *Doxygen::pageSDict = 0; PageSDict *Doxygen::exampleSDict = 0; -SectionDict Doxygen::sectionDict(257); // all page sections +SectionDict *Doxygen::sectionDict = 0; // all page sections CiteDict *Doxygen::citeDict=0; // database of bibliographic references StringDict Doxygen::aliasDict(257); // aliases FileNameDict *Doxygen::includeNameDict = 0; // include names @@ -145,13 +155,13 @@ Store *Doxygen::symbolStorage; QCString Doxygen::objDBFileName; QCString Doxygen::entryDBFileName; bool Doxygen::gatherDefines = TRUE; -IndexList Doxygen::indexList; +IndexList *Doxygen::indexList; int Doxygen::subpageNestingLevel = 0; bool Doxygen::userComments = FALSE; QCString Doxygen::spaces; bool Doxygen::generatingXmlOutput = FALSE; bool Doxygen::markdownSupport = TRUE; -GenericsSDict Doxygen::genericsDict; +GenericsSDict *Doxygen::genericsDict; // locally accessible globals static QDict<EntryNav> g_classEntries(1009); @@ -175,16 +185,16 @@ void clearAll() Doxygen::pageSDict->clear(); Doxygen::exampleSDict->clear(); Doxygen::inputNameList->clear(); - Doxygen::formulaList.clear(); - Doxygen::sectionDict.clear(); + Doxygen::formulaList->clear(); + Doxygen::sectionDict->clear(); Doxygen::inputNameDict->clear(); Doxygen::includeNameDict->clear(); Doxygen::exampleNameDict->clear(); Doxygen::imageNameDict->clear(); Doxygen::dotFileNameDict->clear(); Doxygen::mscFileNameDict->clear(); - Doxygen::formulaDict.clear(); - Doxygen::formulaNameDict.clear(); + Doxygen::formulaDict->clear(); + Doxygen::formulaNameDict->clear(); Doxygen::tagDestinationDict.clear(); delete Doxygen::citeDict; delete Doxygen::mainPage; Doxygen::mainPage=0; @@ -212,9 +222,9 @@ void statistics() fprintf(stderr,"--- namespaceAliasDict stats ----\n"); Doxygen::namespaceAliasDict.statistics(); fprintf(stderr,"--- formulaDict stats ----\n"); - Doxygen::formulaDict.statistics(); + Doxygen::formulaDict->statistics(); fprintf(stderr,"--- formulaNameDict stats ----\n"); - Doxygen::formulaNameDict.statistics(); + Doxygen::formulaNameDict->statistics(); fprintf(stderr,"--- tagDestinationDict stats ----\n"); Doxygen::tagDestinationDict.statistics(); fprintf(stderr,"--- g_compoundKeywordDict stats ----\n"); @@ -1245,7 +1255,7 @@ static void addClassToContext(EntryNav *rootNav) if (cd->isGeneric()) // generics are also stored in a separate dictionary for fast lookup of instantions { - Doxygen::genericsDict.insert(fullName,cd); + Doxygen::genericsDict->insert(fullName,cd); } } @@ -1440,7 +1450,7 @@ static ClassDef *createTagLessInstance(ClassDef *rootCd,ClassDef *templ,const QC //printf("** adding class %s based on %s\n",fullName.data(),templ->name().data()); Doxygen::classSDict->append(fullName,cd); - MemberList *ml = templ->getMemberList(MemberList::pubAttribs); + MemberList *ml = templ->getMemberList(MemberListType_pubAttribs); if (ml) { MemberListIterator li(*ml); @@ -1487,7 +1497,7 @@ static void processTagLessClasses(ClassDef *rootCd, //printf("checking members for %s\n",cd->name().data()); if (cd->getClassSDict()) { - MemberList *ml = cd->getMemberList(MemberList::pubAttribs); + MemberList *ml = cd->getMemberList(MemberListType_pubAttribs); if (ml) { MemberListIterator li(*ml); @@ -1522,7 +1532,7 @@ static void processTagLessClasses(ClassDef *rootCd, // recursive calls cd is the original tag-less struct (of which // there is only one instance) and tagParentCd is the newly // generated tagged struct of which there can be multiple instances! - MemberList *pml = tagParentCd->getMemberList(MemberList::pubAttribs); + MemberList *pml = tagParentCd->getMemberList(MemberListType_pubAttribs); if (pml) { MemberListIterator pli(*pml); @@ -2107,7 +2117,7 @@ static void findIncludedUsingDirectives() static MemberDef *addVariableToClass( EntryNav *rootNav, ClassDef *cd, - MemberDef::MemberType mtype, + MemberType mtype, const QCString &name, bool fromAnnScope, MemberDef *fromAnnMemb, @@ -2139,7 +2149,7 @@ static MemberDef *addVariableToClass( QCString def; if (!root->type.isEmpty()) { - if (related || mtype==MemberDef::Friend || Config_getBool("HIDE_SCOPE_NAMES")) + if (related || mtype==MemberType_Friend || Config_getBool("HIDE_SCOPE_NAMES")) { if (root->spec&Entry::Alias) // turn 'typedef B A' into 'using A = B' { @@ -2194,11 +2204,11 @@ static MemberDef *addVariableToClass( if (root->lang==SrcLangExt_ObjC && root->mtype==Property && - md->memberType()==MemberDef::Variable) + md->memberType()==MemberType_Variable) { // Objective-C 2.0 property // turn variable into a property md->setProtection(root->protection); - cd->reclassifyMember(md,MemberDef::Property); + cd->reclassifyMember(md,MemberType_Property); } addMemberDocs(rootNav,md,def,0,FALSE); //printf(" Member already found!\n"); @@ -2276,7 +2286,7 @@ static MemberDef *addVariableToClass( static MemberDef *addVariableToFile( EntryNav *rootNav, - MemberDef::MemberType mtype, + MemberType mtype, const QCString &scope, const QCString &name, bool fromAnnScope, @@ -2299,7 +2309,7 @@ static MemberDef *addVariableToFile( FileDef *fd = rootNav->fileDef(); // see if we have a typedef that should hide a struct or union - if (mtype==MemberDef::Typedef && Config_getBool("TYPEDEF_HIDES_STRUCT")) + if (mtype==MemberType_Typedef && Config_getBool("TYPEDEF_HIDES_STRUCT")) { QCString type = root->type; type.stripPrefix("typedef "); @@ -2735,7 +2745,7 @@ static void addVariable(EntryNav *rootNav,int isFuncPtr=-1) p=p->parent(); } - MemberDef::MemberType mtype; + MemberType mtype; QCString type=root->type.stripWhiteSpace(); ClassDef *cd=0; bool isRelated=FALSE; @@ -2755,7 +2765,7 @@ static void addVariable(EntryNav *rootNav,int isFuncPtr=-1) { addVariableToClass(rootNav, // entry cd, // class to add member to - MemberDef::Friend, // type of member + MemberType_Friend, // type of member name, // name of the member FALSE, // from Anonymous scope 0, // anonymous member @@ -2774,17 +2784,17 @@ static void addVariable(EntryNav *rootNav,int isFuncPtr=-1) } if (type=="@") - mtype=MemberDef::EnumValue; + mtype=MemberType_EnumValue; else if (type.left(8)=="typedef ") - mtype=MemberDef::Typedef; + mtype=MemberType_Typedef; else if (type.left(7)=="friend ") - mtype=MemberDef::Friend; + mtype=MemberType_Friend; else if (root->mtype==Property) - mtype=MemberDef::Property; + mtype=MemberType_Property; else if (root->mtype==Event) - mtype=MemberDef::Event; + mtype=MemberType_Event; else - mtype=MemberDef::Variable; + mtype=MemberType_Variable; if (!root->relates.isEmpty()) // related variable { @@ -2838,7 +2848,7 @@ static void addVariable(EntryNav *rootNav,int isFuncPtr=-1) } else // anonymous scope inside namespace or file => put variable in the global scope { - if (mtype==MemberDef::Variable) + if (mtype==MemberType_Variable) { md=addVariableToFile(rootNav,mtype,pScope,name,TRUE,0); } @@ -2964,12 +2974,12 @@ static void addMethodToClass(EntryNav *rootNav,ClassDef *cd, QCString name=removeRedundantWhiteSpace(rname); if (name.left(2)=="::") name=name.right(name.length()-2); - MemberDef::MemberType mtype; - if (isFriend) mtype=MemberDef::Friend; - else if (root->mtype==Signal) mtype=MemberDef::Signal; - else if (root->mtype==Slot) mtype=MemberDef::Slot; - else if (root->mtype==DCOP) mtype=MemberDef::DCOP; - else mtype=MemberDef::Function; + MemberType mtype; + if (isFriend) mtype=MemberType_Friend; + else if (root->mtype==Signal) mtype=MemberType_Signal; + else if (root->mtype==Slot) mtype=MemberType_Slot; + else if (root->mtype==DCOP) mtype=MemberType_DCOP; + else mtype=MemberType_Function; // strip redundant template specifier for constructors if ((fd==0 || fd->getLanguage()==SrcLangExt_Cpp) && @@ -3373,7 +3383,7 @@ static void buildFunctionList(EntryNav *rootNav) root->fileName,root->startLine, root->type,name,root->args,root->exception, root->protection,root->virt,root->stat,Member, - MemberDef::Function,tArgList,root->argList); + MemberType_Function,tArgList,root->argList); md->setTagInfo(rootNav->tagInfo()); md->setLanguage(root->lang); @@ -3841,7 +3851,7 @@ static ClassDef *findClassWithinClassContext(Definition *context,ClassDef *cd,co } if (result==0 && cd && cd->getLanguage()==SrcLangExt_CSharp && name.find('<')!=-1) { - result = Doxygen::genericsDict.find(name); + result = Doxygen::genericsDict->find(name); } //printf("** Trying to find %s within context %s class %s result=%s lookup=%p\n", // name.data(), @@ -3897,7 +3907,7 @@ static void findUsedClassesForClass(EntryNav *rootNav, if (md->isVariable() || md->isObjCProperty()) // for each member variable in this class { //printf(" Found variable %s in class %s\n",md->name().data(),masterCd->name().data()); - QCString type=removeRedundantWhiteSpace(md->typeString()); + QCString type = normalizeNonTemplateArgumentsInString(md->typeString(),masterCd,formalArgs); QCString typedefValue = resolveTypeDef(masterCd,type); if (!typedefValue.isEmpty()) { @@ -4378,7 +4388,7 @@ static bool findClassRelation( { if (root->lang == SrcLangExt_CSharp) { - baseClass = Doxygen::genericsDict.find(baseClassName); + baseClass = Doxygen::genericsDict->find(baseClassName); } else { @@ -4542,7 +4552,7 @@ static bool findClassRelation( { baseClass=new ClassDef(root->fileName,root->startLine, baseClassName,ClassDef::Class); - //Doxygen::classSDict->append(baseClassName,baseClass); + Doxygen::classSDict->append(baseClassName,baseClass); if (isArtificial) baseClass->setArtificial(TRUE); baseClass->setLanguage(root->lang); int si = baseClassName.findRev("::"); @@ -4810,7 +4820,7 @@ static void computeTemplateClassRelations() if (!findClassRelation(rootNav,cd,tcd,&tbi,actualTemplateNames,DocumentedOnly,FALSE)) { // no documented base class -> try to find an undocumented one - findClassRelation(rootNav,cd,tcd,&tbi,actualTemplateNames,Undocumented,FALSE); + findClassRelation(rootNav,cd,tcd,&tbi,actualTemplateNames,Undocumented,TRUE); } delete actualTemplateNames; } @@ -6019,7 +6029,7 @@ static void findMember(EntryNav *rootNav, break; } } - MemberDef::MemberType mtype=MemberDef::Function; + MemberType mtype=MemberType_Function; ArgumentList *tArgList = new ArgumentList; // getTemplateArgumentsFromName(cd->name()+"::"+funcName,root->tArgLists); md=new MemberDef( @@ -6078,11 +6088,11 @@ static void findMember(EntryNav *rootNav, } if (unique) { - MemberDef::MemberType mtype; - if (root->mtype==Signal) mtype=MemberDef::Signal; - else if (root->mtype==Slot) mtype=MemberDef::Slot; - else if (root->mtype==DCOP) mtype=MemberDef::DCOP; - else mtype=MemberDef::Function; + MemberType mtype; + if (root->mtype==Signal) mtype=MemberType_Signal; + else if (root->mtype==Slot) mtype=MemberType_Slot; + else if (root->mtype==DCOP) mtype=MemberType_DCOP; + else mtype=MemberType_Function; // new overloaded member function ArgumentList *tArgList = @@ -6189,17 +6199,17 @@ static void findMember(EntryNav *rootNav, if (newMember) // need to create a new member { - MemberDef::MemberType mtype; + MemberType mtype; if (isDefine) - mtype=MemberDef::Define; + mtype=MemberType_Define; else if (root->mtype==Signal) - mtype=MemberDef::Signal; + mtype=MemberType_Signal; else if (root->mtype==Slot) - mtype=MemberDef::Slot; + mtype=MemberType_Slot; else if (root->mtype==DCOP) - mtype=MemberDef::DCOP; + mtype=MemberType_DCOP; else - mtype=MemberDef::Function; + mtype=MemberType_Function; if (isDefine && mdDefine) { @@ -6362,7 +6372,7 @@ localObjCMethod: root->fileName,root->startLine, funcType,funcName,funcArgs,exceptions, root->protection,root->virt,root->stat,Member, - MemberDef::Function,0,root->argList); + MemberType_Function,0,root->argList); md->setTagInfo(rootNav->tagInfo()); md->setLanguage(root->lang); md->makeImplementationDetail(); @@ -6690,7 +6700,7 @@ static void findEnums(EntryNav *rootNav) 0,name,0,0, root->protection,Normal,FALSE, isMemberOf ? Foreign : isRelated ? Related : Member, - MemberDef::Enumeration, + MemberType_Enumeration, 0,0); md->setTagInfo(rootNav->tagInfo()); md->setLanguage(root->lang); @@ -6954,22 +6964,23 @@ static void addEnumValuesToEnums(EntryNav *rootNav) ) { // Unlike classic C/C++ enums, for C++11, C# & Java enum - // values are only inside the enum scope, so we must create + // values are only visible inside the enum scope, so we must create // them here and only add them to the enum e->loadEntry(g_storage); Entry *root = e->entry(); //printf("md->qualifiedName()=%s rootNav->name()=%s\n", // md->qualifiedName().data(),rootNav->name().data()); - if (md->qualifiedName()==substitute(rootNav->name(),"::",".")) // enum value scope matches that of the enum + if (substitute(md->qualifiedName(),"::",".")== // TODO: add function to get canonical representation + substitute(rootNav->name(),"::",".")) // enum value scope matches that of the enum { MemberDef *fmd=new MemberDef( root->fileName,root->startLine, root->type,root->name,root->args,0, Public, Normal,root->stat,Member, - MemberDef::EnumValue,0,0); - if (md->getClassDef()) fmd->setMemberClass(md->getClassDef()); + MemberType_EnumValue,0,0); + if (md->getClassDef()) fmd->setMemberClass(md->getClassDef()); else if (md->getNamespaceDef()) fmd->setNamespace(md->getNamespaceDef()); - else if (md->getFileDef()) fmd->setFileDef(md->getFileDef()); + else if (md->getFileDef()) fmd->setFileDef(md->getFileDef()); fmd->setOuterScope(md->getOuterScope()); fmd->setTagInfo(e->tagInfo()); fmd->setLanguage(root->lang); @@ -6981,11 +6992,9 @@ static void addEnumValuesToEnums(EntryNav *rootNav) fmd->setMemberGroupId(root->mGrpId); fmd->setExplicitExternal(root->explicitExternal); fmd->setRefItems(root->sli); - if (fmd) - { - md->insertEnumField(fmd); - fmd->setEnumScope(md); - } + fmd->setAnchor(); + md->insertEnumField(fmd); + fmd->setEnumScope(md); } e->releaseEntry(); } @@ -7314,9 +7323,15 @@ static void computeMemberRelations() // mcd->name().data(),md->name().data(),md, // bmcd->name().data(),bmd->name().data(),bmd // ); - if (md!=bmd && bmd->virtualness()!=Normal && md->isFunction() && - bmcd && mcd && mcd->isLinkable() && bmcd->isLinkable() && - bmcd!=mcd && mcd->isBaseClass(bmcd,TRUE)) + if (md!=bmd && bmcd && mcd && bmcd!=mcd && + (bmd->virtualness()!=Normal || + bmcd->compoundType()==ClassDef::Interface || + bmcd->compoundType()==ClassDef::Protocol + ) && + md->isFunction() && + mcd->isLinkable() && + bmcd->isLinkable() && + mcd->isBaseClass(bmcd,TRUE)) { //printf(" derived scope\n"); LockingPtr<ArgumentList> bmdAl = bmd->argumentList(); @@ -7967,7 +7982,7 @@ static void findDefineDocumentation(EntryNav *rootNav) { MemberDef *md=new MemberDef("<tagfile>",1, "#define",root->name,root->args,0, - Public,Normal,FALSE,Member,MemberDef::Define,0,0); + Public,Normal,FALSE,Member,MemberType_Define,0,0); md->setTagInfo(rootNav->tagInfo()); md->setLanguage(root->lang); //printf("Searching for `%s' fd=%p\n",filePathName.data(),fd); @@ -7992,7 +8007,7 @@ static void findDefineDocumentation(EntryNav *rootNav) MemberDef *md=mn->first(); while (md) { - if (md->memberType()==MemberDef::Define) count++; + if (md->memberType()==MemberType_Define) count++; md=mn->next(); } if (count==1) @@ -8000,7 +8015,7 @@ static void findDefineDocumentation(EntryNav *rootNav) md=mn->first(); while (md) { - if (md->memberType()==MemberDef::Define) + if (md->memberType()==MemberType_Define) { md->setDocumentation(root->doc,root->docFile,root->docLine); md->setDocsForDefinition(!root->proto); @@ -8032,7 +8047,7 @@ static void findDefineDocumentation(EntryNav *rootNav) md=mn->first(); while (md) { - if (md->memberType()==MemberDef::Define) + if (md->memberType()==MemberType_Define) { FileDef *fd=md->getFileDef(); if (fd && fd->absFilePath()==root->fileName) @@ -8230,7 +8245,7 @@ static void findMainPage(EntryNav *rootNav) Doxygen::mainPage->title(), SectionInfo::Page, 0); // level 0 - Doxygen::sectionDict.append(indexName,si); + Doxygen::sectionDict->append(indexName,si); Doxygen::mainPage->addSectionsToDefinition(root->anchors); } else @@ -8306,7 +8321,7 @@ static void checkPageRelations() static void resolveUserReferences() { - SDict<SectionInfo>::Iterator sdi(Doxygen::sectionDict); + SDict<SectionInfo>::Iterator sdi(*Doxygen::sectionDict); SectionInfo *si; for (;(si=sdi.current());++sdi) { @@ -8744,7 +8759,7 @@ static void copyLogo() { QCString destFileName = Config_getString("HTML_OUTPUT")+"/"+fi.fileName().data(); copyFile(projectLogo,destFileName); - Doxygen::indexList.addImageFile(fi.fileName().data()); + Doxygen::indexList->addImageFile(fi.fileName().data()); } } } @@ -8767,7 +8782,7 @@ static void copyExtraFiles() else { QCString destFileName = Config_getString("HTML_OUTPUT")+"/"+fi.fileName().data(); - Doxygen::indexList.addImageFile(fi.fileName().data()); + Doxygen::indexList->addImageFile(fi.fileName().data()); copyFile(fileName, destFileName); } } @@ -8954,7 +8969,7 @@ int readDir(QFileInfo *fi, ) { totalSize+=cfi->size()+cfi->absFilePath().length()+4; - QCString name=convertToQCString(cfi->fileName()); + QCString name=cfi->fileName().utf8(); //printf("New file %s\n",name.data()); if (fnDict) { @@ -9046,7 +9061,7 @@ int readFileOrDirectory(const char *s, { totalSize+=fi.size()+fi.absFilePath().length()+4; //readFile(&fi,fiList,input); //fiList->inSort(new FileInfo(fi)); - QCString name=convertToQCString(fi.fileName()); + QCString name=fi.fileName().utf8(); //printf("New file %s\n",name.data()); if (fnDict) { @@ -9111,9 +9126,10 @@ void readFormulaRepository() QCString formName = line.left(se); QCString formText = line.right(line.length()-se-1); Formula *f=new Formula(formText); - Doxygen::formulaList.append(f); - Doxygen::formulaDict.insert(formText,f); - Doxygen::formulaNameDict.insert(formName,f); + Doxygen::formulaList->setAutoDelete(TRUE); + Doxygen::formulaList->append(f); + Doxygen::formulaDict->insert(formText,f); + Doxygen::formulaNameDict->insert(formName,f); } } } @@ -9372,17 +9388,30 @@ void initDoxygen() Doxygen::exampleNameDict = new FileNameDict(1009); Doxygen::exampleNameDict->setAutoDelete(TRUE); Doxygen::imageNameDict = new FileNameDict(257); + Doxygen::imageNameDict->setAutoDelete(TRUE); Doxygen::dotFileNameDict = new FileNameDict(257); Doxygen::mscFileNameDict = new FileNameDict(257); - Doxygen::sectionDict.setAutoDelete(TRUE); Doxygen::memGrpInfoDict.setAutoDelete(TRUE); Doxygen::tagDestinationDict.setAutoDelete(TRUE); Doxygen::dirRelations.setAutoDelete(TRUE); Doxygen::citeDict = new CiteDict(257); + Doxygen::genericsDict = new GenericsSDict; + Doxygen::indexList = new IndexList; + Doxygen::formulaList = new FormulaList; + Doxygen::formulaDict = new FormulaDict(1009); + Doxygen::formulaNameDict = new FormulaDict(1009); + Doxygen::sectionDict = new SectionDict(257); + Doxygen::sectionDict->setAutoDelete(TRUE); } void cleanUpDoxygen() { + delete Doxygen::sectionDict; + delete Doxygen::formulaNameDict; + delete Doxygen::formulaDict; + delete Doxygen::formulaList; + delete Doxygen::indexList; + delete Doxygen::genericsDict; delete Doxygen::inputNameDict; delete Doxygen::includeNameDict; delete Doxygen::exampleNameDict; @@ -10324,7 +10353,8 @@ void parseInput() msg("Computing nesting relations for classes...\n"); resolveClassNestingRelations(); - distributeClassGroupRelations(); + // 1.8.2-20121111: no longer add nested classes to the group as well + //distributeClassGroupRelations(); // calling buildClassList may result in cached relations that // become invalid after resolveClassNestingRelations(), that's why @@ -10546,12 +10576,12 @@ void generateOutput() bool generateQhp = Config_getBool("GENERATE_QHP"); bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); bool generateDocSet = Config_getBool("GENERATE_DOCSET"); - if (generateEclipseHelp) Doxygen::indexList.addIndex(new EclipseHelp); - if (generateHtmlHelp) Doxygen::indexList.addIndex(new HtmlHelp); - if (generateQhp) Doxygen::indexList.addIndex(new Qhp); - if (generateTreeView) Doxygen::indexList.addIndex(new FTVHelp(TRUE)); - if (generateDocSet) Doxygen::indexList.addIndex(new DocSets); - Doxygen::indexList.initialize(); + if (generateEclipseHelp) Doxygen::indexList->addIndex(new EclipseHelp); + if (generateHtmlHelp) Doxygen::indexList->addIndex(new HtmlHelp); + if (generateQhp) Doxygen::indexList->addIndex(new Qhp); + if (generateTreeView) Doxygen::indexList->addIndex(new FTVHelp(TRUE)); + if (generateDocSet) Doxygen::indexList->addIndex(new DocSets); + Doxygen::indexList->initialize(); HtmlGenerator::writeTabData(); // copy static stuff @@ -10685,11 +10715,11 @@ void generateOutput() msg("Generating directory documentation...\n"); generateDirDocs(*g_outputList); - if (Doxygen::formulaList.count()>0 && generateHtml + if (Doxygen::formulaList->count()>0 && generateHtml && !Config_getBool("USE_MATHJAX")) { msg("Generating bitmaps for formulas in HTML...\n"); - Doxygen::formulaList.generateBitmaps(Config_getString("HTML_OUTPUT")); + Doxygen::formulaList->generateBitmaps(Config_getString("HTML_OUTPUT")); } writeMainPageTagFileData(); @@ -10700,7 +10730,7 @@ void generateOutput() } msg("finalizing index lists...\n"); - Doxygen::indexList.finalize(); + Doxygen::indexList->finalize(); if (!generateTagFile.isEmpty()) { @@ -10799,15 +10829,18 @@ void generateOutput() } int cacheParam; - msg("symbol cache used %d/%d hits=%d misses=%d\n", - Doxygen::symbolCache->count(), - Doxygen::symbolCache->size(), - Doxygen::symbolCache->hits(), - Doxygen::symbolCache->misses()); - cacheParam = computeIdealCacheParam(Doxygen::symbolCache->misses()); - if (cacheParam>Config_getInt("SYMBOL_CACHE_SIZE")) - { - msg("Note: based on cache misses the ideal setting for SYMBOL_CACHE_SIZE is %d at the cost of higher memory usage.\n",cacheParam); + if (Doxygen::symbolCache) + { + msg("symbol cache used %d/%d hits=%d misses=%d\n", + Doxygen::symbolCache->count(), + Doxygen::symbolCache->size(), + Doxygen::symbolCache->hits(), + Doxygen::symbolCache->misses()); + cacheParam = computeIdealCacheParam(Doxygen::symbolCache->misses()); + if (cacheParam>Config_getInt("SYMBOL_CACHE_SIZE")) + { + msg("Note: based on cache misses the ideal setting for SYMBOL_CACHE_SIZE is %d at the cost of higher memory usage.\n",cacheParam); + } } msg("lookup cache used %d/%d hits=%d misses=%d\n", Doxygen::lookupCache->count(), diff --git a/src/doxygen.h b/src/doxygen.h index b863e5e..9ead4c1 100644 --- a/src/doxygen.h +++ b/src/doxygen.h @@ -19,26 +19,19 @@ #ifndef DOXYGEN_H #define DOXYGEN_H -#include "qtbc.h" #include <qdatetime.h> #include <qcache.h> +#include <qstrlist.h> +#include <qdict.h> +#include <qintdict.h> + #include "ftextstream.h" -#include "groupdef.h" -#include "filedef.h" -#include "classdef.h" -#include "memberdef.h" -#include "classlist.h" -#include "membername.h" -#include "filename.h" -#include "namespacedef.h" -#include "formula.h" -#include "section.h" +#include "sortdict.h" #include "membergroup.h" -#include "reflist.h" #include "dirdef.h" -#include "index.h" -#include "docsets.h" +#include "memberlist.h" +class RefList; class PageSList; class PageSDict; class PageDef; @@ -49,10 +42,31 @@ class Store; class QFileInfo; class BufStr; class CiteDict; +class MemberDef; +class GroupDef; +class GroupSDict; +class FileDef; +class ClassDef; +class ClassSDict; +class GenericsSDict; +class MemberNameSDict; +class FileNameDict; +class FileNameList; +class NamespaceSDict; +class NamespaceDef; +class DefinitionIntf; +class DirSDict; +class DirRelation; +class IndexList; +class FormulaList; +class FormulaDict; +class FormulaNameDict; +class SectionDict; +struct MemberGroupInfo; typedef QList<QCString> StringList; -typedef QDict<FileDef> FileDict; -typedef QDict<GroupDef> GroupDict; +//typedef QDict<FileDef> FileDict; +//typedef QDict<GroupDef> GroupDict; class StringDict : public QDict<QCString> { @@ -98,13 +112,13 @@ class Doxygen static MemberNameSDict *memberNameSDict; static MemberNameSDict *functionNameSDict; static FTextStream tagFile; - static SectionDict sectionDict; + static SectionDict *sectionDict; static StringDict namespaceAliasDict; static GroupSDict *groupSDict; static NamespaceSDict *namespaceSDict; - static FormulaList formulaList; - static FormulaDict formulaDict; - static FormulaDict formulaNameDict; + static FormulaList *formulaList; + static FormulaDict *formulaDict; + static FormulaDict *formulaNameDict; static StringDict tagDestinationDict; static StringDict aliasDict; static QIntDict<MemberGroupInfo> memGrpInfoDict; @@ -130,12 +144,12 @@ class Doxygen static CiteDict *citeDict; static bool gatherDefines; static bool userComments; - static IndexList indexList; + static IndexList *indexList; static int subpageNestingLevel; static QCString spaces; static bool generatingXmlOutput; static bool markdownSupport; - static GenericsSDict genericsDict; + static GenericsSDict *genericsDict; }; void initDoxygen(); @@ -173,6 +187,4 @@ int readDir(QFileInfo *fi, ); void copyAndFilterFile(const char *fileName,BufStr &dest); -#define NEWMATCH - #endif diff --git a/src/eclipsehelp.cpp b/src/eclipsehelp.cpp index 7a4052d..da9f13b 100644 --- a/src/eclipsehelp.cpp +++ b/src/eclipsehelp.cpp @@ -17,6 +17,7 @@ #include "config.h" #include "message.h" #include "doxygen.h" +#include <qfile.h> EclipseHelp::EclipseHelp() : m_depth(0), m_endtag(FALSE), m_tocfile(0) { diff --git a/src/eclipsehelp.h b/src/eclipsehelp.h index 489aa98..841dc81 100644 --- a/src/eclipsehelp.h +++ b/src/eclipsehelp.h @@ -24,7 +24,6 @@ #ifndef ECLIPSEHELP_H #define ECLIPSEHELP_H -#include "qtbc.h" #include "index.h" #include "ftextstream.h" diff --git a/src/entry.h b/src/entry.h index 8598564..60ba372 100644 --- a/src/entry.h +++ b/src/entry.h @@ -18,10 +18,9 @@ #ifndef ENTRY_H #define ENTRY_H -#include "qtbc.h" -#include <qlist.h> #include "types.h" +#include <qlist.h> #include <qgstring.h> struct SectionInfo; diff --git a/src/example.h b/src/example.h index 2ee1429..4bcaeb9 100644 --- a/src/example.h +++ b/src/example.h @@ -18,8 +18,8 @@ #ifndef EXAMPLE_H #define EXAMPLE_H -#include "qtbc.h" -#include <qdict.h> +#include <qcstring.h> +#include "sortdict.h" class ClassDef; class MemberName; @@ -38,7 +38,7 @@ class ExampleSDict : public SDict<Example> public: ExampleSDict(int size=17) : SDict<Example>(size) {} ~ExampleSDict() {} - int compareItems(GCI item1,GCI item2) + int compareItems(QCollection::Item item1,QCollection::Item item2) { return stricmp(((Example *)item1)->name,((Example *)item2)->name); } diff --git a/src/filedef.cpp b/src/filedef.cpp index a2040ca..58e3c23 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -15,7 +15,6 @@ * */ -#include "qtbc.h" #include "memberlist.h" #include "classlist.h" #include "filedef.h" @@ -37,6 +36,11 @@ #include "debug.h" #include "layout.h" #include "entry.h" +#include "groupdef.h" +#include "filename.h" +#include "membergroup.h" +#include "dirdef.h" +#include "config.h" //--------------------------------------------------------------------------- @@ -122,8 +126,8 @@ FileDef::~FileDef() /*! Compute the HTML anchor names for all members in the class */ void FileDef::computeAnchors() { - MemberList *ml = getMemberList(MemberList::allMembersList); - if (ml) setAnchors(0,'a',ml); + MemberList *ml = getMemberList(MemberListType_allMembersList); + if (ml) setAnchors(ml); } void FileDef::distributeMemberGroupDocumentation() @@ -157,7 +161,7 @@ void FileDef::findSectionsInDocumentation() MemberList *ml; for (mli.toFirst();(ml=mli.current());++mli) { - if (ml->listType()&MemberList::declarationLists) + if (ml->listType()&MemberListType_declarationLists) { ml->findSectionsInDocumentation(); } @@ -718,7 +722,7 @@ void FileDef::writeDocumentation(OutputList &ol) if (Config_getBool("SEPARATE_MEMBER_PAGES")) { - MemberList *ml = getMemberList(MemberList::allMembersList); + MemberList *ml = getMemberList(MemberListType_allMembersList); if (ml) ml->sort(); writeMemberPages(ol); } @@ -733,7 +737,7 @@ void FileDef::writeMemberPages(OutputList &ol) MemberList *ml; for (mli.toFirst();(ml=mli.current());++mli) { - if (ml->listType()&MemberList::documentationLists) + if (ml->listType()&MemberListType_documentationLists) { ml->writeDocumentationPage(ol,name(),this); } @@ -749,7 +753,7 @@ void FileDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const ol.writeString(" <div class=\"navtab\">\n"); ol.writeString(" <table>\n"); - MemberList *allMemberList = getMemberList(MemberList::allMembersList); + MemberList *allMemberList = getMemberList(MemberListType_allMembersList); if (allMemberList) { MemberListIterator mli(*allMemberList); @@ -869,7 +873,7 @@ void FileDef::addMembersToMemberGroup() MemberList *ml; for (mli.toFirst();(ml=mli.current());++mli) { - if (ml->listType()&MemberList::declarationLists) + if (ml->listType()&MemberListType_declarationLists) { ::addMembersToMemberGroup(ml,&memberGroupSDict,this); } @@ -897,7 +901,7 @@ void FileDef::insertMember(MemberDef *md) if (md->isHidden()) return; //printf("%s:FileDef::insertMember(%s (=%p) list has %d elements)\n", // name().data(),md->name().data(),md,allMemberList.count()); - MemberList *allMemberList = getMemberList(MemberList::allMembersList); + MemberList *allMemberList = getMemberList(MemberListType_allMembersList); if (allMemberList && allMemberList->findRef(md)!=-1) // TODO optimize the findRef! { return; @@ -905,35 +909,35 @@ void FileDef::insertMember(MemberDef *md) if (allMemberList==0) { - allMemberList = new MemberList(MemberList::allMembersList);; + allMemberList = new MemberList(MemberListType_allMembersList); m_memberLists.append(allMemberList); } allMemberList->append(md); //::addFileMemberNameToIndex(md); switch (md->memberType()) { - case MemberDef::Variable: - case MemberDef::Property: - addMemberToList(MemberList::decVarMembers,md); - addMemberToList(MemberList::docVarMembers,md); + case MemberType_Variable: + case MemberType_Property: + addMemberToList(MemberListType_decVarMembers,md); + addMemberToList(MemberListType_docVarMembers,md); break; - case MemberDef::Function: - addMemberToList(MemberList::decFuncMembers,md); - addMemberToList(MemberList::docFuncMembers,md); + case MemberType_Function: + addMemberToList(MemberListType_decFuncMembers,md); + addMemberToList(MemberListType_docFuncMembers,md); break; - case MemberDef::Typedef: - addMemberToList(MemberList::decTypedefMembers,md); - addMemberToList(MemberList::docTypedefMembers,md); + case MemberType_Typedef: + addMemberToList(MemberListType_decTypedefMembers,md); + addMemberToList(MemberListType_docTypedefMembers,md); break; - case MemberDef::Enumeration: - addMemberToList(MemberList::decEnumMembers,md); - addMemberToList(MemberList::docEnumMembers,md); + case MemberType_Enumeration: + addMemberToList(MemberListType_decEnumMembers,md); + addMemberToList(MemberListType_docEnumMembers,md); break; - case MemberDef::EnumValue: // enum values are shown inside their enums + case MemberType_EnumValue: // enum values are shown inside their enums break; - case MemberDef::Define: - addMemberToList(MemberList::decDefineMembers,md); - addMemberToList(MemberList::docDefineMembers,md); + case MemberType_Define: + addMemberToList(MemberListType_decDefineMembers,md); + addMemberToList(MemberListType_docDefineMembers,md); break; default: err("FileDef::insertMembers(): " @@ -977,6 +981,14 @@ void FileDef::insertNamespace(NamespaceDef *nd) } } +QCString FileDef::name() const +{ + if (Config_getBool("FULL_PATH_NAMES")) + return filename; + else + return Definition::name(); +} + void FileDef::addSourceRef(int line,Definition *d,MemberDef *md) { //printf("FileDef::addSourceDef(%d,%p,%p)\n",line,d,md); @@ -1209,7 +1221,7 @@ void FileDef::addListReferences() MemberList *ml; for (mli.toFirst();(ml=mli.current());++mli) { - if (ml->listType()&MemberList::documentationLists) + if (ml->listType()&MemberListType_documentationLists) { ml->addListReferences(this); } @@ -1567,7 +1579,7 @@ QCString FileDef::includeName() const } } -MemberList *FileDef::createMemberList(MemberList::ListType lt) +MemberList *FileDef::createMemberList(MemberListType lt) { m_memberLists.setAutoDelete(TRUE); QListIterator<MemberList> mli(m_memberLists); @@ -1585,14 +1597,14 @@ MemberList *FileDef::createMemberList(MemberList::ListType lt) return ml; } -void FileDef::addMemberToList(MemberList::ListType lt,MemberDef *md) +void FileDef::addMemberToList(MemberListType lt,MemberDef *md) { static bool sortBriefDocs = Config_getBool("SORT_BRIEF_DOCS"); static bool sortMemberDocs = Config_getBool("SORT_MEMBER_DOCS"); MemberList *ml = createMemberList(lt); ml->setNeedsSorting( - ((ml->listType()&MemberList::declarationLists) && sortBriefDocs) || - ((ml->listType()&MemberList::documentationLists) && sortMemberDocs)); + ((ml->listType()&MemberListType_declarationLists) && sortBriefDocs) || + ((ml->listType()&MemberListType_documentationLists) && sortMemberDocs)); ml->append(md); #if 0 if (ml->needsSorting()) @@ -1600,11 +1612,11 @@ void FileDef::addMemberToList(MemberList::ListType lt,MemberDef *md) else ml->append(md); #endif - if (lt&MemberList::documentationLists) + if (lt&MemberListType_documentationLists) { ml->setInFile(TRUE); } - if (ml->listType()&MemberList::declarationLists) md->setSectionList(this,ml); + if (ml->listType()&MemberListType_declarationLists) md->setSectionList(this,ml); } void FileDef::sortMemberLists() @@ -1617,7 +1629,7 @@ void FileDef::sortMemberLists() } } -MemberList *FileDef::getMemberList(MemberList::ListType lt) const +MemberList *FileDef::getMemberList(MemberListType lt) const { FileDef *that = (FileDef*)this; MemberList *ml = that->m_memberLists.first(); @@ -1632,7 +1644,7 @@ MemberList *FileDef::getMemberList(MemberList::ListType lt) const return 0; } -void FileDef::writeMemberDeclarations(OutputList &ol,MemberList::ListType lt,const QCString &title) +void FileDef::writeMemberDeclarations(OutputList &ol,MemberListType lt,const QCString &title) { static bool optVhdl = Config_getBool("OPTIMIZE_OUTPUT_VHDL"); MemberList * ml = getMemberList(lt); @@ -1650,7 +1662,7 @@ void FileDef::writeMemberDeclarations(OutputList &ol,MemberList::ListType lt,con } } -void FileDef::writeMemberDocumentation(OutputList &ol,MemberList::ListType lt,const QCString &title) +void FileDef::writeMemberDocumentation(OutputList &ol,MemberListType lt,const QCString &title) { MemberList * ml = getMemberList(lt); if (ml) ml->writeDocumentation(ol,name(),this,title); diff --git a/src/filedef.h b/src/filedef.h index 2368b36..adf0f49 100644 --- a/src/filedef.h +++ b/src/filedef.h @@ -22,11 +22,11 @@ #include <qlist.h> #include <qintdict.h> #include <qdict.h> -#include "config.h" #include "definition.h" +#include "sortdict.h" #include "memberlist.h" -#include "util.h" +class MemberList; class FileDef; class FileList; class ClassSDict; @@ -72,13 +72,7 @@ class FileDef : public Definition DefType definitionType() const { return TypeFile; } /*! Returns the unique file name (this may include part of the path). */ - QCString name() const - { - if (Config_getBool("FULL_PATH_NAMES")) - return filename; - else - return Definition::name(); - } + QCString name() const; QCString displayName(bool=TRUE) const { return name(); } QCString fileName() const { return filename; } @@ -169,7 +163,7 @@ class FileDef : public Definition //bool includes(FileDef *incFile,QDict<FileDef> *includedFiles) const; //bool includesByName(const QCString &name) const; - MemberList *getMemberList(MemberList::ListType lt) const; + MemberList *getMemberList(MemberListType lt) const; const QList<MemberList> &getMemberLists() const { return m_memberLists; } /* user defined member groups */ @@ -186,10 +180,10 @@ class FileDef : public Definition void acquireFileVersion(); private: - MemberList *createMemberList(MemberList::ListType lt); - void addMemberToList(MemberList::ListType lt,MemberDef *md); - void writeMemberDeclarations(OutputList &ol,MemberList::ListType lt,const QCString &title); - void writeMemberDocumentation(OutputList &ol,MemberList::ListType lt,const QCString &title); + MemberList *createMemberList(MemberListType lt); + void addMemberToList(MemberListType lt,MemberDef *md); + void writeMemberDeclarations(OutputList &ol,MemberListType lt,const QCString &title); + void writeMemberDocumentation(OutputList &ol,MemberListType lt,const QCString &title); void writeIncludeFiles(OutputList &ol); void writeIncludeGraph(OutputList &ol); void writeIncludedByGraph(OutputList &ol); @@ -238,7 +232,7 @@ class FileList : public QList<FileDef> FileList(const char *path) : QList<FileDef>(), m_pathName(path) {} ~FileList() {} QCString path() const { return m_pathName; } - int compareItems(GCI item1,GCI item2) + int compareItems(QCollection::Item item1,QCollection::Item item2) { FileDef *md1 = (FileDef *)item1; FileDef *md2 = (FileDef *)item2; @@ -253,7 +247,7 @@ class OutputNameList : public QList<FileList> public: OutputNameList() : QList<FileList>() {} ~OutputNameList() {} - int compareItems(GCI item1,GCI item2) + int compareItems(QCollection::Item item1,QCollection::Item item2) { FileList *fl1 = (FileList *)item1; FileList *fl2 = (FileList *)item2; diff --git a/src/filename.cpp b/src/filename.cpp index dddeeca..2b0dffe 100644 --- a/src/filename.cpp +++ b/src/filename.cpp @@ -17,6 +17,7 @@ #include "filename.h" #include "util.h" +#include "config.h" FileName::FileName(const char *fn,const char *n) : FileList() { @@ -97,7 +98,7 @@ void FileName::generateDiskNames() } } -int FileName::compareItems(GCI item1, GCI item2) +int FileName::compareItems(QCollection::Item item1, QCollection::Item item2) { FileName *f1=(FileName *)item1; FileName *f2=(FileName *)item2; @@ -127,7 +128,7 @@ void FileNameList::generateDiskNames() } } -int FileNameList::compareItems(GCI item1, GCI item2) +int FileNameList::compareItems(QCollection::Item item1, QCollection::Item item2) { FileName *f1=(FileName *)item1; FileName *f2=(FileName *)item2; @@ -142,3 +143,14 @@ FileNameListIterator::FileNameListIterator(const FileNameList &fnlist) : QListIterator<FileName>(fnlist) { } + +static bool getCaseSenseNames() +{ + static bool caseSenseNames = Config_getBool("CASE_SENSE_NAMES"); + return caseSenseNames; +} + +FileNameDict::FileNameDict(uint size) : QDict<FileName>(size,getCaseSenseNames()) +{ +} + diff --git a/src/filename.h b/src/filename.h index e305e0e..e038659 100644 --- a/src/filename.h +++ b/src/filename.h @@ -18,8 +18,8 @@ #ifndef FILENAME_H #define FILENAME_H -#include "qtbc.h" #include <qdict.h> +#include <qlist.h> #include "filedef.h" /** Class representing all files with a certain base name */ @@ -31,7 +31,7 @@ class FileName : public FileList const char *fileName() const { return name; } const char *fullName() const { return fName; } void generateDiskNames(); - int compareItems(GCI item1,GCI item2); + int compareItems(QCollection::Item item1,QCollection::Item item2); private: QCString name; @@ -52,7 +52,7 @@ class FileNameList : public QList<FileName> FileNameList(); ~FileNameList(); void generateDiskNames(); - int compareItems(GCI item1,GCI item2); + int compareItems(QCollection::Item item1,QCollection::Item item2); }; /** Iterator for FileName objects in a FileNameList. */ @@ -66,8 +66,7 @@ class FileNameListIterator : public QListIterator<FileName> class FileNameDict : public QDict<FileName> { public: - FileNameDict(uint size) : - QDict<FileName>(size,Config_getBool("CASE_SENSE_NAMES")) {} + FileNameDict(uint size); ~FileNameDict() {} }; diff --git a/src/formula.cpp b/src/formula.cpp index 9407d8a..a1f2328 100644 --- a/src/formula.cpp +++ b/src/formula.cpp @@ -17,7 +17,6 @@ #include <stdlib.h> #include <unistd.h> -#include "qtbc.h" #include <qfile.h> #include <qfileinfo.h> #include <qtextstream.h> @@ -55,7 +54,7 @@ void FormulaList::generateBitmaps(const char *path) QDir d(path); // store the original directory if (!d.exists()) { err("error: Output dir %s does not exist!\n",path); exit(1); } - QCString oldDir = convertToQCString(QDir::currentDirPath()); + QCString oldDir = QDir::currentDirPath().utf8(); // go to the html output directory (i.e. path) QDir::setCurrent(d.absPath()); QDir thisDir; @@ -94,7 +93,7 @@ void FormulaList::generateBitmaps(const char *path) t << formula->getFormulaText() << endl << "\\pagebreak\n\n"; pagesToGenerate.append(new int(page)); } - Doxygen::indexList.addImageFile(resultName); + Doxygen::indexList->addImageFile(resultName); page++; } t << "\\end{document}" << endl; diff --git a/src/formula.h b/src/formula.h index a912b76..553ee77 100644 --- a/src/formula.h +++ b/src/formula.h @@ -18,7 +18,6 @@ #ifndef FORMULA_H #define FORMULA_H -#include "qtbc.h" #include <qlist.h> #include <qdict.h> diff --git a/src/fortrancode.h b/src/fortrancode.h index fb91804..45b3333 100644 --- a/src/fortrancode.h +++ b/src/fortrancode.h @@ -18,9 +18,6 @@ #ifndef CODE_H #define CODE_H -#include "qtbc.h" -#include <stdio.h> - class CodeOutputInterface; class FileDef; class MemberDef; diff --git a/src/fortrancode.l b/src/fortrancode.l index ed891c0..b598b73 100644 --- a/src/fortrancode.l +++ b/src/fortrancode.l @@ -29,7 +29,6 @@ /* * includes */ -#include "qtbc.h" #include <stdio.h> #include <assert.h> #include <ctype.h> @@ -44,6 +43,12 @@ #include "membername.h" #include "searchindex.h" #include "defargs.h" +#include "memberlist.h" +#include "config.h" +#include "groupdef.h" +#include "classlist.h" +#include "filedef.h" +#include "namespacedef.h" #define YY_NEVER_INTERACTIVE 1 #define YY_NO_TOP_STATE 1 diff --git a/src/fortranscanner.l b/src/fortranscanner.l index 938d182..3a7a8c1 100644 --- a/src/fortranscanner.l +++ b/src/fortranscanner.l @@ -45,7 +45,6 @@ #include <assert.h> #include <ctype.h> -#include "qtbc.h" #include <qarray.h> #include <qstack.h> #include <qregexp.h> diff --git a/src/ftextstream.h b/src/ftextstream.h index 63ef244..9167ae9 100644 --- a/src/ftextstream.h +++ b/src/ftextstream.h @@ -1,12 +1,12 @@ #ifndef FTEXTSTREAM_H #define FTEXTSTREAM_H -#include "qtbc.h" -#include "qiodevice.h" -#include "qstring.h" -#include "qgstring.h" #include <stdio.h> +#include <qiodevice.h> +#include <qstring.h> +#include <qgstring.h> + /** @brief Simplified and optimized version of QTextStream */ class FTextStream { diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp index c41ab07..5727647 100644 --- a/src/ftvhelp.cpp +++ b/src/ftvhelp.cpp @@ -34,6 +34,8 @@ #include "pagedef.h" #include "docparser.h" #include "htmldocvisitor.h" +#include "filedef.h" +#include "util.h" #define MAX_INDENT 1024 @@ -1025,7 +1027,7 @@ class NavIndexEntryList : public QList<NavIndexEntry> public: NavIndexEntryList() : QList<NavIndexEntry>() { setAutoDelete(TRUE); } ~NavIndexEntryList() {} - int compareItems(GCI item1,GCI item2) + int compareItems(QCollection::Item item1,QCollection::Item item2) { // sort list based on url return qstrcmp(((NavIndexEntry*)item1)->url,((NavIndexEntry*)item2)->url); diff --git a/src/ftvhelp.h b/src/ftvhelp.h index be60a60..d3ba3b9 100644 --- a/src/ftvhelp.h +++ b/src/ftvhelp.h @@ -24,8 +24,6 @@ #ifndef FTVHELP_H #define FTVHELP_H -#include "qtbc.h" -#include <qtextstream.h> #include <qlist.h> #include "index.h" diff --git a/src/groupdef.cpp b/src/groupdef.cpp index da35641..c0a6abb 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -17,7 +17,6 @@ #include <ctype.h> #include <qregexp.h> -#include "qtbc.h" #include "groupdef.h" #include "classdef.h" #include "filedef.h" @@ -38,6 +37,9 @@ #include "layout.h" #include "arguments.h" #include "entry.h" +#include "membername.h" +#include "dirdef.h" +#include "config.h" //--------------------------------------------------------------------------- @@ -52,6 +54,7 @@ GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t, exampleDict = new PageSDict(17); dirList = new DirList; allMemberNameInfoSDict = new MemberNameInfoSDict(17); + allMemberNameInfoSDict->setAutoDelete(TRUE); if (refFileName) { fileName=stripExtension(refFileName); @@ -64,7 +67,7 @@ GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t, memberGroupSDict = new MemberGroupSDict; memberGroupSDict->setAutoDelete(TRUE); - allMemberList = new MemberList(MemberList::allMembersList); + allMemberList = new MemberList(MemberListType_allMembersList); visited = 0; groupScope = 0; @@ -124,7 +127,7 @@ void GroupDef::findSectionsInDocumentation() MemberList *ml; for (mli.toFirst();(ml=mli.current());++mli) { - if (ml->listType()&MemberList::declarationLists) + if (ml->listType()&MemberListType_declarationLists) { ml->findSectionsInDocumentation(); } @@ -236,7 +239,7 @@ void GroupDef::addMembersToMemberGroup() MemberList *ml; for (mli.toFirst();(ml=mli.current());++mli) { - if (ml->listType()&MemberList::declarationLists) + if (ml->listType()&MemberListType_declarationLists) { ::addMembersToMemberGroup(ml,&memberGroupSDict,this); } @@ -311,101 +314,101 @@ bool GroupDef::insertMember(MemberDef *md,bool docOnly) allMemberList->append(md); switch(md->memberType()) { - case MemberDef::Variable: + case MemberType_Variable: if (!docOnly) { - addMemberToList(MemberList::decVarMembers,md); + addMemberToList(MemberListType_decVarMembers,md); } - addMemberToList(MemberList::docVarMembers,md); + addMemberToList(MemberListType_docVarMembers,md); break; - case MemberDef::Function: + case MemberType_Function: if (!docOnly) { - addMemberToList(MemberList::decFuncMembers,md); + addMemberToList(MemberListType_decFuncMembers,md); } - addMemberToList(MemberList::docFuncMembers,md); + addMemberToList(MemberListType_docFuncMembers,md); break; - case MemberDef::Typedef: + case MemberType_Typedef: if (!docOnly) { - addMemberToList(MemberList::decTypedefMembers,md); + addMemberToList(MemberListType_decTypedefMembers,md); } - addMemberToList(MemberList::docTypedefMembers,md); + addMemberToList(MemberListType_docTypedefMembers,md); break; - case MemberDef::Enumeration: + case MemberType_Enumeration: if (!docOnly) { - addMemberToList(MemberList::decEnumMembers,md); + addMemberToList(MemberListType_decEnumMembers,md); } - addMemberToList(MemberList::docEnumMembers,md); + addMemberToList(MemberListType_docEnumMembers,md); break; - case MemberDef::EnumValue: + case MemberType_EnumValue: if (!docOnly) { - addMemberToList(MemberList::decEnumValMembers,md); + addMemberToList(MemberListType_decEnumValMembers,md); } - addMemberToList(MemberList::docEnumValMembers,md); + addMemberToList(MemberListType_docEnumValMembers,md); break; - case MemberDef::Define: + case MemberType_Define: if (!docOnly) { - addMemberToList(MemberList::decDefineMembers,md); + addMemberToList(MemberListType_decDefineMembers,md); } - addMemberToList(MemberList::docDefineMembers,md); + addMemberToList(MemberListType_docDefineMembers,md); break; - case MemberDef::Signal: + case MemberType_Signal: if (!docOnly) { - addMemberToList(MemberList::decSignalMembers,md); + addMemberToList(MemberListType_decSignalMembers,md); } - addMemberToList(MemberList::docSignalMembers,md); + addMemberToList(MemberListType_docSignalMembers,md); break; - case MemberDef::Slot: + case MemberType_Slot: if (md->protection()==Public) { if (!docOnly) { - addMemberToList(MemberList::decPubSlotMembers,md); + addMemberToList(MemberListType_decPubSlotMembers,md); } - addMemberToList(MemberList::docPubSlotMembers,md); + addMemberToList(MemberListType_docPubSlotMembers,md); } else if (md->protection()==Protected) { if (!docOnly) { - addMemberToList(MemberList::decProSlotMembers,md); + addMemberToList(MemberListType_decProSlotMembers,md); } - addMemberToList(MemberList::docProSlotMembers,md); + addMemberToList(MemberListType_docProSlotMembers,md); } else { if (!docOnly) { - addMemberToList(MemberList::decPriSlotMembers,md); + addMemberToList(MemberListType_decPriSlotMembers,md); } - addMemberToList(MemberList::docPriSlotMembers,md); + addMemberToList(MemberListType_docPriSlotMembers,md); } break; - case MemberDef::Event: + case MemberType_Event: if (!docOnly) { - addMemberToList(MemberList::decEventMembers,md); + addMemberToList(MemberListType_decEventMembers,md); } - addMemberToList(MemberList::docEventMembers,md); + addMemberToList(MemberListType_docEventMembers,md); break; - case MemberDef::Property: + case MemberType_Property: if (!docOnly) { - addMemberToList(MemberList::decPropMembers,md); + addMemberToList(MemberListType_decPropMembers,md); } - addMemberToList(MemberList::docPropMembers,md); + addMemberToList(MemberListType_docPropMembers,md); break; - case MemberDef::Friend: + case MemberType_Friend: if (!docOnly) { - addMemberToList(MemberList::decFriendMembers,md); + addMemberToList(MemberListType_decFriendMembers,md); } - addMemberToList(MemberList::docFriendMembers,md); + addMemberToList(MemberListType_docFriendMembers,md); break; default: err("GroupDef::insertMembers(): " @@ -439,65 +442,65 @@ void GroupDef::removeMember(MemberDef *md) delete mni; } - removeMemberFromList(MemberList::allMembersList,md); + removeMemberFromList(MemberListType_allMembersList,md); switch(md->memberType()) { - case MemberDef::Variable: - removeMemberFromList(MemberList::decVarMembers,md); - removeMemberFromList(MemberList::docVarMembers,md); + case MemberType_Variable: + removeMemberFromList(MemberListType_decVarMembers,md); + removeMemberFromList(MemberListType_docVarMembers,md); break; - case MemberDef::Function: - removeMemberFromList(MemberList::decFuncMembers,md); - removeMemberFromList(MemberList::docFuncMembers,md); + case MemberType_Function: + removeMemberFromList(MemberListType_decFuncMembers,md); + removeMemberFromList(MemberListType_docFuncMembers,md); break; - case MemberDef::Typedef: - removeMemberFromList(MemberList::decTypedefMembers,md); - removeMemberFromList(MemberList::docTypedefMembers,md); + case MemberType_Typedef: + removeMemberFromList(MemberListType_decTypedefMembers,md); + removeMemberFromList(MemberListType_docTypedefMembers,md); break; - case MemberDef::Enumeration: - removeMemberFromList(MemberList::decEnumMembers,md); - removeMemberFromList(MemberList::docEnumMembers,md); + case MemberType_Enumeration: + removeMemberFromList(MemberListType_decEnumMembers,md); + removeMemberFromList(MemberListType_docEnumMembers,md); break; - case MemberDef::EnumValue: - removeMemberFromList(MemberList::decEnumValMembers,md); - removeMemberFromList(MemberList::docEnumValMembers,md); + case MemberType_EnumValue: + removeMemberFromList(MemberListType_decEnumValMembers,md); + removeMemberFromList(MemberListType_docEnumValMembers,md); break; - case MemberDef::Define: - removeMemberFromList(MemberList::decDefineMembers,md); - removeMemberFromList(MemberList::docDefineMembers,md); + case MemberType_Define: + removeMemberFromList(MemberListType_decDefineMembers,md); + removeMemberFromList(MemberListType_docDefineMembers,md); break; - case MemberDef::Signal: - removeMemberFromList(MemberList::decSignalMembers,md); - removeMemberFromList(MemberList::docSignalMembers,md); + case MemberType_Signal: + removeMemberFromList(MemberListType_decSignalMembers,md); + removeMemberFromList(MemberListType_docSignalMembers,md); break; - case MemberDef::Slot: + case MemberType_Slot: if (md->protection()==Public) { - removeMemberFromList(MemberList::decPubSlotMembers,md); - removeMemberFromList(MemberList::docPubSlotMembers,md); + removeMemberFromList(MemberListType_decPubSlotMembers,md); + removeMemberFromList(MemberListType_docPubSlotMembers,md); } else if (md->protection()==Protected) { - removeMemberFromList(MemberList::decProSlotMembers,md); - removeMemberFromList(MemberList::docProSlotMembers,md); + removeMemberFromList(MemberListType_decProSlotMembers,md); + removeMemberFromList(MemberListType_docProSlotMembers,md); } else { - removeMemberFromList(MemberList::decPriSlotMembers,md); - removeMemberFromList(MemberList::docPriSlotMembers,md); + removeMemberFromList(MemberListType_decPriSlotMembers,md); + removeMemberFromList(MemberListType_docPriSlotMembers,md); } break; - case MemberDef::Event: - removeMemberFromList(MemberList::decEventMembers,md); - removeMemberFromList(MemberList::docEventMembers,md); + case MemberType_Event: + removeMemberFromList(MemberListType_decEventMembers,md); + removeMemberFromList(MemberListType_docEventMembers,md); break; - case MemberDef::Property: - removeMemberFromList(MemberList::decPropMembers,md); - removeMemberFromList(MemberList::docPropMembers,md); + case MemberType_Property: + removeMemberFromList(MemberListType_decPropMembers,md); + removeMemberFromList(MemberListType_docPropMembers,md); break; - case MemberDef::Friend: - removeMemberFromList(MemberList::decFriendMembers,md); - removeMemberFromList(MemberList::docFriendMembers,md); + case MemberType_Friend: + removeMemberFromList(MemberListType_decFriendMembers,md); + removeMemberFromList(MemberListType_docFriendMembers,md); break; default: err("GroupDef::removeMember(): unexpected member remove in file!\n"); @@ -540,7 +543,7 @@ int GroupDef::countMembers() const void GroupDef::computeAnchors() { //printf("GroupDef::computeAnchors()\n"); - setAnchors(0,'a',allMemberList); + setAnchors(allMemberList); } void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title) @@ -801,7 +804,7 @@ void GroupDef::writePageDocumentation(OutputList &ol) SectionInfo *si=0; if (!pd->title().isEmpty() && !pd->name().isEmpty() && - (si=Doxygen::sectionDict[pd->name()])!=0) + (si=Doxygen::sectionDict->find(pd->name()))!=0) { ol.startSection(si->label,si->title,SectionInfo::Subsection); ol.docify(si->title); @@ -948,7 +951,7 @@ void GroupDef::writeDocumentation(OutputList &ol) } } - Doxygen::indexList.addIndexItem(this,0,0,title); + Doxygen::indexList->addIndexItem(this,0,0,title); if (!Config_getString("GENERATE_TAGFILE").isEmpty()) { @@ -1104,7 +1107,7 @@ void GroupDef::writeMemberPages(OutputList &ol) MemberList *ml; for (mli.toFirst();(ml=mli.current());++mli) { - if (ml->listType()&MemberList::documentationLists) + if (ml->listType()&MemberListType_documentationLists) { ml->writeDocumentationPage(ol,name(),this); } @@ -1388,14 +1391,14 @@ void GroupDef::addListReferences() MemberList *ml; for (mli.toFirst();(ml=mli.current());++mli) { - if (ml->listType()&MemberList::documentationLists) + if (ml->listType()&MemberListType_documentationLists) { ml->addListReferences(this); } } } -MemberList *GroupDef::createMemberList(MemberList::ListType lt) +MemberList *GroupDef::createMemberList(MemberListType lt) { m_memberLists.setAutoDelete(TRUE); QListIterator<MemberList> mli(m_memberLists); @@ -1414,14 +1417,14 @@ MemberList *GroupDef::createMemberList(MemberList::ListType lt) return ml; } -void GroupDef::addMemberToList(MemberList::ListType lt,MemberDef *md) +void GroupDef::addMemberToList(MemberListType lt,MemberDef *md) { static bool sortBriefDocs = Config_getBool("SORT_BRIEF_DOCS"); static bool sortMemberDocs = Config_getBool("SORT_MEMBER_DOCS"); MemberList *ml = createMemberList(lt); ml->setNeedsSorting( - ((ml->listType()&MemberList::declarationLists) && sortBriefDocs) || - ((ml->listType()&MemberList::documentationLists) && sortMemberDocs)); + ((ml->listType()&MemberListType_declarationLists) && sortBriefDocs) || + ((ml->listType()&MemberListType_documentationLists) && sortMemberDocs)); ml->append(md); } @@ -1436,7 +1439,7 @@ void GroupDef::sortMemberLists() } -MemberList *GroupDef::getMemberList(MemberList::ListType lt) const +MemberList *GroupDef::getMemberList(MemberListType lt) const { GroupDef *that = (GroupDef*)this; MemberList *ml = that->m_memberLists.first(); @@ -1451,7 +1454,7 @@ MemberList *GroupDef::getMemberList(MemberList::ListType lt) const return 0; } -void GroupDef::writeMemberDeclarations(OutputList &ol,MemberList::ListType lt,const QCString &title) +void GroupDef::writeMemberDeclarations(OutputList &ol,MemberListType lt,const QCString &title) { static bool optimizeVhdl = Config_getBool("OPTIMIZE_OUTPUT_VHDL"); @@ -1467,13 +1470,13 @@ void GroupDef::writeMemberDeclarations(OutputList &ol,MemberList::ListType lt,co } } -void GroupDef::writeMemberDocumentation(OutputList &ol,MemberList::ListType lt,const QCString &title) +void GroupDef::writeMemberDocumentation(OutputList &ol,MemberListType lt,const QCString &title) { MemberList * ml = getMemberList(lt); if (ml) ml->writeDocumentation(ol,name(),this,title); } -void GroupDef::removeMemberFromList(MemberList::ListType lt,MemberDef *md) +void GroupDef::removeMemberFromList(MemberListType lt,MemberDef *md) { MemberList *ml = getMemberList(lt); if (ml) ml->remove(md); diff --git a/src/groupdef.h b/src/groupdef.h index 5f9752b..3978397 100644 --- a/src/groupdef.h +++ b/src/groupdef.h @@ -18,13 +18,10 @@ #ifndef GROUPDEF_H #define GROUPDEF_H -#include "qtbc.h" #include "sortdict.h" #include "definition.h" -#include "memberlist.h" -#include "memberdef.h" -#include "htmlhelp.h" +class MemberList; class FileList; class ClassSDict; class FileDef; @@ -41,6 +38,7 @@ class DirDef; class DirList; class FTVHelp; class Entry; +class MemberDef; /** A model of a group of symbols. */ class GroupDef : public Definition @@ -90,7 +88,7 @@ class GroupDef : public Definition void setGroupScope(Definition *d) { groupScope = d; } Definition *getGroupScope() const { return groupScope; } - MemberList *getMemberList(MemberList::ListType lt) const; + MemberList *getMemberList(MemberListType lt) const; const QList<MemberList> &getMemberLists() const { return m_memberLists; } /* user defined member groups */ @@ -110,11 +108,11 @@ class GroupDef : public Definition void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const); private: - MemberList *createMemberList(MemberList::ListType lt); - void addMemberToList(MemberList::ListType lt,MemberDef *md); - void writeMemberDeclarations(OutputList &ol,MemberList::ListType lt,const QCString &title); - void writeMemberDocumentation(OutputList &ol,MemberList::ListType lt,const QCString &title); - void removeMemberFromList(MemberList::ListType lt,MemberDef *md); + MemberList *createMemberList(MemberListType lt); + void addMemberToList(MemberListType lt,MemberDef *md); + void writeMemberDeclarations(OutputList &ol,MemberListType lt,const QCString &title); + void writeMemberDocumentation(OutputList &ol,MemberListType lt,const QCString &title); + void removeMemberFromList(MemberListType lt,MemberDef *md); void writeGroupGraph(OutputList &ol); void writeFiles(OutputList &ol,const QCString &title); void writeNamespaces(OutputList &ol,const QCString &title); @@ -161,7 +159,7 @@ class GroupSDict : public SDict<GroupDef> public: GroupSDict(uint size) : SDict<GroupDef>(size) {} virtual ~GroupSDict() {} - int compareItems(GCI item1,GCI item2) + int compareItems(QCollection::Item item1,QCollection::Item item2) { return strcmp(((GroupDef*)item1)->groupTitle(),((GroupDef*)item2)->groupTitle()); } @@ -171,7 +169,7 @@ class GroupSDict : public SDict<GroupDef> class GroupList : public QList<GroupDef> { public: - int compareItems(GCI item1,GCI item2) + int compareItems(QCollection::Item item1,QCollection::Item item2) { return strcmp(((GroupDef*)item1)->groupTitle(),((GroupDef*)item2)->groupTitle()); } diff --git a/src/htags.cpp b/src/htags.cpp index caa4535..2acceb8 100644 --- a/src/htags.cpp +++ b/src/htags.cpp @@ -18,7 +18,6 @@ #include <qdir.h> #include <qdict.h> -#include "qtbc.h" #include "htags.h" #include "util.h" #include "message.h" @@ -44,7 +43,7 @@ bool Htags::execute(const QCString &htmldir) static QCString projectName = Config_getString("PROJECT_NAME"); static QCString projectNumber = Config_getString("PROJECT_NUMBER"); - QCString cwd = convertToQCString(QDir::currentDirPath()); + QCString cwd = QDir::currentDirPath().utf8(); if (inputSource.isEmpty()) { g_inputDir.setPath(cwd); @@ -87,7 +86,7 @@ bool Htags::execute(const QCString &htmldir) commandLine += "\" "; } commandLine += " \"" + htmldir + "\""; - QCString oldDir = convertToQCString(QDir::currentDirPath()); + QCString oldDir = QDir::currentDirPath().utf8(); QDir::setCurrent(g_inputDir.absPath()); //printf("CommandLine=[%s]\n",commandLine.data()); portable_sysTimerStart(); @@ -159,7 +158,7 @@ bool Htags::loadFilemap(const QCString &htmlDir) QCString Htags::path2URL(const QCString &path) { QCString url,symName=path; - QCString dir = convertToQCString(g_inputDir.absPath()); + QCString dir = g_inputDir.absPath().utf8(); int dl=dir.length(); if ((int)symName.length()>dl+1) { diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index 63cda59..3c06837 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -30,6 +30,8 @@ #include "msc.h" #include "util.h" #include "vhdldocgen.h" +#include "filedef.h" +#include "memberdef.h" static const int NUM_HTML_LIST_TYPES = 4; static const char types[][NUM_HTML_LIST_TYPES] = {"1", "a", "i", "A"}; @@ -325,10 +327,12 @@ void HtmlDocVisitor::visit(DocLineBreak *) m_t << "<br/>\n"; } -void HtmlDocVisitor::visit(DocHorRuler *) +void HtmlDocVisitor::visit(DocHorRuler *hr) { if (m_hide) return; + forceEndParagraph(hr); m_t << "<hr/>\n"; + forceStartParagraph(hr); } void HtmlDocVisitor::visit(DocStyleChange *s) @@ -474,33 +478,34 @@ void HtmlDocVisitor::visit(DocVerbatim *s) if (Config_getBool("DOT_CLEANUP")) file.remove(); } break; - case DocVerbatim::Msc: - { - forceEndParagraph(s); - -#if 0 // TODO: this should get its own command and not hijack the \msc - // command. This should also work for Latex and RTF output (or at - // least produce valid output there. - static bool optimizeForVhdl = Config_getBool("OPTIMIZE_OUTPUT_VHDL"); - if (optimizeForVhdl) - { +#if 0 + case DocVerbatim::Vhdf: if (VhdlDocGen::getFlowMember()) // use VHDL flow chart creator { QCString fname=FlowNode::convertNameToFileName(); - m_t << "<div align=\"left\">" << endl; + // fprintf(stderr,"\n create flow mem %s \n",fname.data()); + //m_t << "<div align=\"left\">" << endl; // TODO: use CSS m_t << "<p>"; - m_t << "flowchart:" ; + m_t << "flowchart: " ; // TODO: translate me m_t << "<a href=\""; m_t << fname.data(); m_t << ".svg\">"; m_t << VhdlDocGen::getFlowMember()->name().data(); - m_t << "</a><br><br>"; - m_t << s->text().data(); + m_t << "</a>"; + if (!s->text().isEmpty()) + { + m_t << "<br/>"; + m_t << s->text().data(); + } m_t << "</p>"; VhdlDocGen::setFlowMember(NULL); } - } + break; #endif + case DocVerbatim::Msc: + { + forceEndParagraph(s); + static int mscindex = 1; QCString baseName(4096); @@ -726,7 +731,7 @@ void HtmlDocVisitor::visit(DocIndexEntry *e) // e->scope() ? e->scope()->name().data() : "<null>", // e->member() ? e->member()->name().data() : "<null>" // ); - Doxygen::indexList.addIndexItem(e->scope(),e->member(),anchor,e->entry()); + Doxygen::indexList->addIndexItem(e->scope(),e->member(),anchor,e->entry()); } void HtmlDocVisitor::visit(DocSimpleSectSep *) @@ -1785,6 +1790,37 @@ void HtmlDocVisitor::visitPost(DocHtmlBlockQuote *b) forceStartParagraph(b); } +void HtmlDocVisitor::visitPre(DocVhdlFlow *vf) +{ + if (m_hide) return; + if (VhdlDocGen::getFlowMember()) // use VHDL flow chart creator + { + forceEndParagraph(vf); + QCString fname=FlowNode::convertNameToFileName(); + m_t << "<p>"; + m_t << "flowchart: " ; // TODO: translate me + m_t << "<a href=\""; + m_t << fname.data(); + m_t << ".svg\">"; + m_t << VhdlDocGen::getFlowMember()->name().data(); + m_t << "</a>"; + if (vf->hasCaption()) + { + m_t << "<br/>"; + } + } +} + +void HtmlDocVisitor::visitPost(DocVhdlFlow *vf) +{ + if (m_hide) return; + if (VhdlDocGen::getFlowMember()) // use VHDL flow chart creator + { + m_t << "</p>"; + forceStartParagraph(vf); + } +} + void HtmlDocVisitor::filter(const char *str) { if (str==0) return; diff --git a/src/htmldocvisitor.h b/src/htmldocvisitor.h index dbf5e21..150493b 100644 --- a/src/htmldocvisitor.h +++ b/src/htmldocvisitor.h @@ -130,6 +130,8 @@ class HtmlDocVisitor : public DocVisitor void visitPost(DocText *); void visitPre(DocHtmlBlockQuote *); void visitPost(DocHtmlBlockQuote *); + void visitPre(DocVhdlFlow *); + void visitPost(DocVhdlFlow *); private: diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 1c612ac..288673b 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -17,7 +17,6 @@ #include <stdlib.h> -#include "qtbc.h" #include <qdir.h> #include <qregexp.h> #include "message.h" @@ -808,7 +807,7 @@ static void writeImgData(const char *dir,img_data_item *data) { fprintf(stderr,"Warning: Cannot open file %s for writing\n",data->name); } - Doxygen::indexList.addImageFile(QCString("/search/")+data->name); + Doxygen::indexList->addImageFile(QCString("/search/")+data->name); data++; } } @@ -1011,22 +1010,25 @@ static QCString removeEmptyLines(const QCString &s) { BufStr out(s.length()+1); char *p=s.data(); - char c; - while ((c=*p++)) + if (p) { - if (c=='\n') + char c; + while ((c=*p++)) { - char *e = p; - while (*e==' ' || *e=='\t') e++; - if (*e=='\n') + if (c=='\n') { - p=e; + char *e = p; + while (*e==' ' || *e=='\t') e++; + if (*e=='\n') + { + p=e; + } + else out.addChar(c); + } + else + { + out.addChar(c); } - else out.addChar(c); - } - else - { - out.addChar(c); } } out.addChar('\0'); @@ -1055,6 +1057,7 @@ static QCString substituteHtmlKeywords(const QCString &s, static bool searchEngine = Config_getBool("SEARCHENGINE"); static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH"); static bool mathJax = Config_getBool("USE_MATHJAX"); + static QCString mathJaxFormat = Config_getEnum("MATHJAX_FORMAT"); static bool disableIndex = Config_getBool("DISABLE_INDEX"); static bool hasProjectName = !projectName.isEmpty(); static bool hasProjectNumber = !Config_getString("PROJECT_NUMBER").isEmpty(); @@ -1099,6 +1102,7 @@ static QCString substituteHtmlKeywords(const QCString &s, "<script type=\"text/javascript\" src=\"$relpath$navtree.js\"></script>\n" "<script type=\"text/javascript\">\n" " $(document).ready(initResizable);\n" + " $(window).load(resizeHeight);\n" "</script>"; } @@ -1153,8 +1157,12 @@ static QCString substituteHtmlKeywords(const QCString &s, mathJaxJs+= ", \""+QCString(s)+".js\""; s = mathJaxExtensions.next(); } + if (mathJaxFormat.isEmpty()) + { + mathJaxFormat = "HTML-CSS"; + } mathJaxJs += "],\n" - " jax: [\"input/TeX\",\"output/HTML-CSS\"],\n" + " jax: [\"input/TeX\",\"output/"+mathJaxFormat+"\"],\n" "});\n" "</script>"; mathJaxJs += "<script src=\"" + path + "MathJax.js\"></script>\n"; @@ -1478,7 +1486,7 @@ void HtmlGenerator::init() /// Additional initialization after indices have been created void HtmlGenerator::writeTabData() { - Doxygen::indexList.addStyleSheetFile("tabs.css"); + Doxygen::indexList->addStyleSheetFile("tabs.css"); QCString dname=Config_getString("HTML_OUTPUT"); writeColoredImgData(dname,colored_tab_data); @@ -1508,7 +1516,7 @@ void HtmlGenerator::writeSearchData(const char *dir) } t << searchCss; } - Doxygen::indexList.addStyleSheetFile("search/search.css"); + Doxygen::indexList->addStyleSheetFile("search/search.css"); } void HtmlGenerator::writeStyleSheetFile(QFile &file) @@ -1548,7 +1556,7 @@ void HtmlGenerator::startFile(const char *name,const char *, startPlainFile(fileName); m_codeGen.setTextStream(t); m_codeGen.setRelativePath(relPath); - Doxygen::indexList.addIndexFile(fileName); + Doxygen::indexList->addIndexFile(fileName); lastFile = fileName; t << substituteHtmlKeywords(g_header,convertToHtml(title),relPath); @@ -1670,7 +1678,7 @@ void HtmlGenerator::writeStyleInfo(int part) t << replaceColorMarkers(substitute(defaultStyleSheet,"$doxygenversion",versionString)); endPlainFile(); - Doxygen::indexList.addStyleSheetFile("doxygen.css"); + Doxygen::indexList->addStyleSheetFile("doxygen.css"); } else // write user defined style sheet { @@ -1689,7 +1697,7 @@ void HtmlGenerator::writeStyleInfo(int part) t << fileStr; endPlainFile(); } - Doxygen::indexList.addStyleSheetFile(cssfi.fileName().utf8()); + Doxygen::indexList->addStyleSheetFile(cssfi.fileName().utf8()); } } } diff --git a/src/htmlgen.h b/src/htmlgen.h index b520c9e..78a4d0c 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -18,7 +18,6 @@ #ifndef HTMLGEN_H #define HTMLGEN_H -#include "qtbc.h" #include "outputgen.h" #include "ftextstream.h" diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp index 3df3774..2fccdd6 100644 --- a/src/htmlhelp.cpp +++ b/src/htmlhelp.cpp @@ -22,15 +22,19 @@ #include <qlist.h> #include <qdict.h> #include <qregexp.h> +#include <qfile.h> + #include "qtextcodec.h" #include "sortdict.h" - #include "htmlhelp.h" #include "config.h" #include "message.h" #include "doxygen.h" #include "language.h" #include "portable.h" +#include "groupdef.h" +#include "memberdef.h" +#include "filedef.h" //---------------------------------------------------------------------------- @@ -50,7 +54,7 @@ class IndexFieldSDict : public SDict<IndexField> public: IndexFieldSDict() : SDict<IndexField>(17) {} ~IndexFieldSDict() {} - int compareItems(GCI item1, GCI item2) + int compareItems(QCollection::Item item1, QCollection::Item item2) { return stricmp(((IndexField *)item1)->name,((IndexField *)item2)->name); } diff --git a/src/htmlhelp.h b/src/htmlhelp.h index 8c0d317..4b8064d 100644 --- a/src/htmlhelp.h +++ b/src/htmlhelp.h @@ -21,7 +21,6 @@ #ifndef HTMLHELP_H #define HTMLHELP_H -#include "qtbc.h" #include <qstrlist.h> #include "index.h" #include "ftextstream.h" diff --git a/src/image.cpp b/src/image.cpp index 8afab58..2293d1f 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -16,7 +16,6 @@ * */ -#include "qtbc.h" #include "image.h" #include <qfile.h> #include <math.h> diff --git a/src/index.cpp b/src/index.cpp index 6424e44..2f9b06a 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -43,6 +43,10 @@ #include "dirdef.h" #include "vhdldocgen.h" #include "layout.h" +#include "memberlist.h" +#include "classlist.h" +#include "namespacedef.h" +#include "filename.h" #define MAX_ITEMS_BEFORE_MULTIPAGE_INDEX 200 #define MAX_ITEMS_BEFORE_QUICK_INDEX 30 @@ -117,7 +121,7 @@ class MemberIndexList : public QList<MemberDef> public: MemberIndexList() : QList<MemberDef>() {} ~MemberIndexList() {} - int compareItems(GCI item1, GCI item2) + int compareItems(QCollection::Item item1, QCollection::Item item2) { MemberDef *md1=(MemberDef *)item1; MemberDef *md2=(MemberDef *)item2; @@ -294,7 +298,7 @@ void addMembersToIndex(T *def,LayoutDocManager::LayoutPart part, bool addToIndex=TRUE,bool preventSeparateIndex=FALSE) { bool hasMembers = def->getMemberLists().count()>0 || def->getMemberGroupSDict()!=0; - Doxygen::indexList.addContentsItem(hasMembers,name, + Doxygen::indexList->addContentsItem(hasMembers,name, def->getReference(),def->getOutputFileBase(),anchor, hasMembers && !preventSeparateIndex, addToIndex, @@ -313,7 +317,7 @@ void addMembersToIndex(T *def,LayoutDocManager::LayoutPart part, //printf("addMembersToIndex(def=%s hasMembers=%d numClasses=%d)\n",def->name().data(),hasMembers,numClasses); if (hasMembers || numClasses>0) { - Doxygen::indexList.incContentsDepth(); + Doxygen::indexList->incContentsDepth(); QListIterator<LayoutDocEntry> eli(LayoutDocManager::instance().docEntries(part)); LayoutDocEntry *lde; for (eli.toFirst();(lde=eli.current());++eli) @@ -331,16 +335,21 @@ void addMembersToIndex(T *def,LayoutDocManager::LayoutPart part, LockingPtr<MemberList> enumList = md->enumFieldList(); bool isDir = enumList!=0 && md->isEnumerate(); bool isAnonymous = md->name().find('@')!=-1; - if (!isAnonymous) + static bool hideUndocMembers = Config_getBool("HIDE_UNDOC_MEMBERS"); + static bool extractStatic = Config_getBool("EXTRACT_STATIC"); + if (!isAnonymous && + (!hideUndocMembers || md->hasDocumentation()) && + (!md->isStatic() || extractStatic) + ) { if (md->getOuterScope()==def) { - Doxygen::indexList.addContentsItem(isDir, + Doxygen::indexList->addContentsItem(isDir, md->name(),md->getReference(),md->getOutputFileBase(),md->anchor(),FALSE,addToIndex); } else // inherited member { - Doxygen::indexList.addContentsItem(isDir, + Doxygen::indexList->addContentsItem(isDir, md->name(),def->getReference(),def->getOutputFileBase(),md->anchor(),FALSE,addToIndex); } } @@ -348,7 +357,7 @@ void addMembersToIndex(T *def,LayoutDocManager::LayoutPart part, { if (!isAnonymous) { - Doxygen::indexList.incContentsDepth(); + Doxygen::indexList->incContentsDepth(); } MemberListIterator emli(*enumList); MemberDef *emd; @@ -356,18 +365,18 @@ void addMembersToIndex(T *def,LayoutDocManager::LayoutPart part, { if (emd->getOuterScope()==def) { - Doxygen::indexList.addContentsItem(FALSE, + Doxygen::indexList->addContentsItem(FALSE, emd->name(),emd->getReference(),emd->getOutputFileBase(),emd->anchor(),FALSE,addToIndex); } else // inherited member { - Doxygen::indexList.addContentsItem(FALSE, + Doxygen::indexList->addContentsItem(FALSE, emd->name(),def->getReference(),def->getOutputFileBase(),emd->anchor(),FALSE,addToIndex); } } if (!isAnonymous) { - Doxygen::indexList.decContentsDepth(); + Doxygen::indexList->decContentsDepth(); } } } @@ -396,7 +405,7 @@ void addMembersToIndex(T *def,LayoutDocManager::LayoutPart part, } } - Doxygen::indexList.decContentsDepth(); + Doxygen::indexList->decContentsDepth(); } } @@ -461,7 +470,7 @@ static void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper,int startIndexHierarchy(ol,level); if (addToIndex) { - Doxygen::indexList.incContentsDepth(); + Doxygen::indexList->incContentsDepth(); } if (ftv) { @@ -487,7 +496,7 @@ static void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper,int } if (addToIndex) { - Doxygen::indexList.addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor()); + Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor()); } if (ftv) { @@ -508,7 +517,7 @@ static void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper,int ol.endIndexItem(0,0); if (addToIndex) { - Doxygen::indexList.addContentsItem(hasChildren,cd->displayName(),0,0,0); + Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),0,0,0); } if (ftv) { @@ -537,7 +546,7 @@ static void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper,int endIndexHierarchy(ol,level); if (addToIndex) { - Doxygen::indexList.decContentsDepth(); + Doxygen::indexList->decContentsDepth(); } if (ftv) { @@ -612,8 +621,8 @@ static void writeDirTreeNode(OutputList &ol, DirDef *dd, int level, FTVHelp* ftv //printf("gd=`%s': pageDict=%d\n",gd->name().data(),gd->pageDict->count()); if (addToIndex) { - Doxygen::indexList.addContentsItem(isDir,dd->shortName(),dd->getReference(),dd->getOutputFileBase(),0,TRUE,TRUE); - Doxygen::indexList.incContentsDepth(); + Doxygen::indexList->addContentsItem(isDir,dd->shortName(),dd->getReference(),dd->getOutputFileBase(),0,TRUE,TRUE); + Doxygen::indexList->incContentsDepth(); } if (ftv) { @@ -723,7 +732,7 @@ static void writeDirTreeNode(OutputList &ol, DirDef *dd, int level, FTVHelp* ftv } else if (src) { - Doxygen::indexList.addContentsItem( + Doxygen::indexList->addContentsItem( FALSE, convertToHtml(fd->name(),TRUE), 0, fd->getSourceFileBase(), 0, FALSE, TRUE, fd); } @@ -735,7 +744,7 @@ static void writeDirTreeNode(OutputList &ol, DirDef *dd, int level, FTVHelp* ftv if (addToIndex) { - Doxygen::indexList.decContentsDepth(); + Doxygen::indexList->decContentsDepth(); } if (ftv) { @@ -799,7 +808,7 @@ static void writeDirHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex) } else if (src) { - Doxygen::indexList.addContentsItem( + Doxygen::indexList->addContentsItem( FALSE, convertToHtml(fd->name(),TRUE), 0, fd->getSourceFileBase(), 0, FALSE, TRUE, fd); } @@ -852,7 +861,7 @@ static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started,FT startIndexHierarchy(ol,0); if (addToIndex) { - Doxygen::indexList.incContentsDepth(); + Doxygen::indexList->incContentsDepth(); } started=TRUE; } @@ -875,7 +884,7 @@ static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started,FT if (addToIndex) { if (cd->getLanguage()!=SrcLangExt_VHDL) // prevents double insertion in Design Unit List - Doxygen::indexList.addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE); + Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE); } if (ftv) { @@ -889,7 +898,7 @@ static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started,FT ol.endIndexItem(0,0); if (addToIndex) { - Doxygen::indexList.addContentsItem(hasChildren,cd->displayName(),0,0,0,FALSE,FALSE); + Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),0,0,0,FALSE,FALSE); } if (ftv) { @@ -929,7 +938,7 @@ static void writeClassHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex) endIndexHierarchy(ol,0); if (addToIndex) { - Doxygen::indexList.decContentsDepth(); + Doxygen::indexList->decContentsDepth(); } } if (ftv) @@ -1012,11 +1021,11 @@ static void writeHierarchicalIndex(OutputList &ol) ol.pushGeneratorState(); //2.{ ol.disable(OutputGenerator::Html); - Doxygen::indexList.disable(); + Doxygen::indexList->disable(); writeClassHierarchy(ol,0,addToIndex); - Doxygen::indexList.enable(); + Doxygen::indexList->enable(); ol.popGeneratorState(); //2.} @@ -1030,7 +1039,7 @@ static void writeHierarchicalIndex(OutputList &ol) { if (addToIndex) { - Doxygen::indexList.addContentsItem(TRUE,title,0,"hierarchy",0,TRUE,TRUE); + Doxygen::indexList->addContentsItem(TRUE,title,0,"hierarchy",0,TRUE,TRUE); } FTVHelp* ftv = new FTVHelp(FALSE); writeClassHierarchy(ol,ftv,addToIndex); @@ -1134,8 +1143,8 @@ static void writeFileIndex(OutputList &ol) if (addToIndex) { - Doxygen::indexList.addContentsItem(TRUE,title,0,"files",0,TRUE,TRUE); - Doxygen::indexList.incContentsDepth(); + Doxygen::indexList->addContentsItem(TRUE,title,0,"files",0,TRUE,TRUE); + Doxygen::indexList->incContentsDepth(); } ol.parseText(lne ? lne->intro() : theTranslator->trFileListDescription(Config_getBool("EXTRACT_ALL"))); @@ -1235,7 +1244,7 @@ static void writeFileIndex(OutputList &ol) ol.endBold(); //if (addToIndex) //{ - // Doxygen::indexList.addContentsItem(FALSE,fullName,0,0,0); + // Doxygen::indexList->addContentsItem(FALSE,fullName,0,0,0); //} } if (src) @@ -1307,7 +1316,7 @@ static void writeFileIndex(OutputList &ol) if (addToIndex) { - Doxygen::indexList.decContentsDepth(); + Doxygen::indexList->decContentsDepth(); } endFile(ol); @@ -1462,7 +1471,7 @@ static void writeNamespaceTree(NamespaceSDict *nsDict,FTVHelp *ftv, if (addToIndex) { - Doxygen::indexList.addContentsItem(hasChildren,nd->localName(),ref,file,QCString(), + Doxygen::indexList->addContentsItem(hasChildren,nd->localName(),ref,file,QCString(), hasChildren && !file.isEmpty(),addToIndex); } @@ -1470,7 +1479,7 @@ static void writeNamespaceTree(NamespaceSDict *nsDict,FTVHelp *ftv, // count,addToIndex,showClasses,classCount); if (hasChildren) { - if (addToIndex) Doxygen::indexList.incContentsDepth(); + if (addToIndex) Doxygen::indexList->incContentsDepth(); ftv->incContentsDepth(); writeNamespaceTree(nd->getNamespaceSDict(),ftv,FALSE,showClasses,addToIndex); if (showClasses) @@ -1478,7 +1487,7 @@ static void writeNamespaceTree(NamespaceSDict *nsDict,FTVHelp *ftv, writeClassTree(nd->getClassSDict(),ftv,addToIndex,FALSE); } ftv->decContentsDepth(); - if (addToIndex) Doxygen::indexList.decContentsDepth(); + if (addToIndex) Doxygen::indexList->decContentsDepth(); } } } @@ -1570,8 +1579,8 @@ static void writeNamespaceIndex(OutputList &ol) { if (addToIndex) { - Doxygen::indexList.addContentsItem(TRUE,title,0,"namespaces",0,TRUE,TRUE); - Doxygen::indexList.incContentsDepth(); + Doxygen::indexList->addContentsItem(TRUE,title,0,"namespaces",0,TRUE,TRUE); + Doxygen::indexList->incContentsDepth(); } FTVHelp* ftv = new FTVHelp(FALSE); writeNamespaceTree(Doxygen::namespaceSDict,ftv,TRUE,FALSE,addToIndex); @@ -1582,7 +1591,7 @@ static void writeNamespaceIndex(OutputList &ol) delete ftv; if (addToIndex) { - Doxygen::indexList.decContentsDepth(); + Doxygen::indexList->decContentsDepth(); } } @@ -1706,7 +1715,7 @@ static QCString letterToLabel(char startLetter) class PrefixIgnoreClassList : public ClassList { public: - virtual int compareItems(GCI item1, GCI item2) + virtual int compareItems(QCollection::Item item1, QCollection::Item item2) { ClassDef *c1=(ClassDef *)item1; ClassDef *c2=(ClassDef *)item2; @@ -2019,7 +2028,7 @@ static void writeAlphabeticalIndex(OutputList &ol) if (addToIndex) { - Doxygen::indexList.addContentsItem(FALSE,title,0,"classes",0,FALSE,TRUE); + Doxygen::indexList->addContentsItem(FALSE,title,0,"classes",0,FALSE,TRUE); } ol.startContents(); @@ -2071,11 +2080,11 @@ static void writeAnnotatedIndex(OutputList &ol) // --------------- ol.pushGeneratorState(); ol.disable(OutputGenerator::Html); - Doxygen::indexList.disable(); + Doxygen::indexList->disable(); writeAnnotatedClassList(ol); - Doxygen::indexList.enable(); + Doxygen::indexList->enable(); ol.popGeneratorState(); // --------------- @@ -2087,8 +2096,8 @@ static void writeAnnotatedIndex(OutputList &ol) { if (addToIndex) { - Doxygen::indexList.addContentsItem(TRUE,title,0,"annotated",0,TRUE,TRUE); - Doxygen::indexList.incContentsDepth(); + Doxygen::indexList->addContentsItem(TRUE,title,0,"annotated",0,TRUE,TRUE); + Doxygen::indexList->incContentsDepth(); } FTVHelp* ftv = new FTVHelp(FALSE); writeNamespaceTree(Doxygen::namespaceSDict,ftv,TRUE,TRUE,addToIndex); @@ -2100,7 +2109,7 @@ static void writeAnnotatedIndex(OutputList &ol) delete ftv; if (addToIndex) { - Doxygen::indexList.decContentsDepth(); + Doxygen::indexList->decContentsDepth(); } } @@ -2547,9 +2556,9 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h if (addToIndex) { - Doxygen::indexList.addContentsItem(multiPageIndex,getCmhlInfo(hl)->title,0, + Doxygen::indexList->addContentsItem(multiPageIndex,getCmhlInfo(hl)->title,0, getCmhlInfo(hl)->fname,0,multiPageIndex,TRUE); - if (multiPageIndex) Doxygen::indexList.incContentsDepth(); + if (multiPageIndex) Doxygen::indexList->incContentsDepth(); } int page; @@ -2570,7 +2579,7 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h cs[1]=0; if (addToIndex) { - Doxygen::indexList.addContentsItem(FALSE,cs,0,fileName,0,FALSE,TRUE); + Doxygen::indexList->addContentsItem(FALSE,cs,0,fileName,0,FALSE,TRUE); } } bool quickIndex = documentedClassMembers[hl]>maxItemsBeforeQuickIndex; @@ -2639,7 +2648,7 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h } } - if (multiPageIndex && addToIndex) Doxygen::indexList.decContentsDepth(); + if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth(); ol.popGeneratorState(); } @@ -2651,8 +2660,8 @@ static void writeClassMemberIndex(OutputList &ol) if (documentedClassMembers[CMHL_All]>0 && addToIndex) { - Doxygen::indexList.addContentsItem(TRUE,lne ? lne->title() : theTranslator->trCompoundMembers(),0,"functions",0); - Doxygen::indexList.incContentsDepth(); + Doxygen::indexList->addContentsItem(TRUE,lne ? lne->title() : theTranslator->trCompoundMembers(),0,"functions",0); + Doxygen::indexList->incContentsDepth(); } writeClassMemberIndexFiltered(ol,CMHL_All); writeClassMemberIndexFiltered(ol,CMHL_Functions); @@ -2665,7 +2674,7 @@ static void writeClassMemberIndex(OutputList &ol) writeClassMemberIndexFiltered(ol,CMHL_Related); if (documentedClassMembers[CMHL_All]>0 && addToIndex) { - Doxygen::indexList.decContentsDepth(); + Doxygen::indexList->decContentsDepth(); } } @@ -2724,9 +2733,9 @@ static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight hl) if (addToIndex) { - Doxygen::indexList.addContentsItem(multiPageIndex,getFmhlInfo(hl)->title,0, + Doxygen::indexList->addContentsItem(multiPageIndex,getFmhlInfo(hl)->title,0, getFmhlInfo(hl)->fname,0,multiPageIndex,TRUE); - if (multiPageIndex) Doxygen::indexList.incContentsDepth(); + if (multiPageIndex) Doxygen::indexList->incContentsDepth(); } int page; @@ -2747,7 +2756,7 @@ static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight hl) cs[1]=0; if (addToIndex) { - Doxygen::indexList.addContentsItem(FALSE,cs,0,fileName,0,FALSE,TRUE); + Doxygen::indexList->addContentsItem(FALSE,cs,0,fileName,0,FALSE,TRUE); } } bool quickIndex = documentedFileMembers[hl]>maxItemsBeforeQuickIndex; @@ -2814,7 +2823,7 @@ static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight hl) first=FALSE; } } - if (multiPageIndex && addToIndex) Doxygen::indexList.decContentsDepth(); + if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth(); ol.popGeneratorState(); } @@ -2824,8 +2833,8 @@ static void writeFileMemberIndex(OutputList &ol) bool addToIndex = lne==0 || lne->visible(); if (documentedFileMembers[FMHL_All]>0 && addToIndex) { - Doxygen::indexList.addContentsItem(FALSE,lne ? lne->title() : theTranslator->trFileMembers(),0,"globals",0); - Doxygen::indexList.incContentsDepth(); + Doxygen::indexList->addContentsItem(FALSE,lne ? lne->title() : theTranslator->trFileMembers(),0,"globals",0); + Doxygen::indexList->incContentsDepth(); } writeFileMemberIndexFiltered(ol,FMHL_All); writeFileMemberIndexFiltered(ol,FMHL_Functions); @@ -2836,7 +2845,7 @@ static void writeFileMemberIndex(OutputList &ol) writeFileMemberIndexFiltered(ol,FMHL_Defines); if (documentedFileMembers[FMHL_All]>0 && addToIndex) { - Doxygen::indexList.decContentsDepth(); + Doxygen::indexList->decContentsDepth(); } } @@ -2898,9 +2907,9 @@ static void writeNamespaceMemberIndexFiltered(OutputList &ol, if (addToIndex) { - Doxygen::indexList.addContentsItem(multiPageIndex,getNmhlInfo(hl)->title,0, + Doxygen::indexList->addContentsItem(multiPageIndex,getNmhlInfo(hl)->title,0, getNmhlInfo(hl)->fname,0,multiPageIndex,TRUE); - if (multiPageIndex) Doxygen::indexList.incContentsDepth(); + if (multiPageIndex) Doxygen::indexList->incContentsDepth(); } int page; @@ -2921,7 +2930,7 @@ static void writeNamespaceMemberIndexFiltered(OutputList &ol, cs[1]=0; if (addToIndex) { - Doxygen::indexList.addContentsItem(FALSE,cs,0,fileName,0,FALSE,TRUE); + Doxygen::indexList->addContentsItem(FALSE,cs,0,fileName,0,FALSE,TRUE); } } bool quickIndex = documentedNamespaceMembers[hl]>maxItemsBeforeQuickIndex; @@ -2989,7 +2998,7 @@ static void writeNamespaceMemberIndexFiltered(OutputList &ol, endFile(ol); } } - if (multiPageIndex && addToIndex) Doxygen::indexList.decContentsDepth(); + if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth(); ol.popGeneratorState(); } @@ -2999,8 +3008,8 @@ static void writeNamespaceMemberIndex(OutputList &ol) bool addToIndex = lne==0 || lne->visible(); if (documentedNamespaceMembers[NMHL_All]>0 && addToIndex) { - Doxygen::indexList.addContentsItem(FALSE,lne ? lne->title() : theTranslator->trNamespaceMembers(),0,"namespacemembers",0); - Doxygen::indexList.incContentsDepth(); + Doxygen::indexList->addContentsItem(FALSE,lne ? lne->title() : theTranslator->trNamespaceMembers(),0,"namespacemembers",0); + Doxygen::indexList->incContentsDepth(); } //bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN"); writeNamespaceMemberIndexFiltered(ol,NMHL_All); @@ -3011,7 +3020,7 @@ static void writeNamespaceMemberIndex(OutputList &ol) writeNamespaceMemberIndexFiltered(ol,NMHL_EnumValues); if (documentedNamespaceMembers[NMHL_All]>0 && addToIndex) { - Doxygen::indexList.decContentsDepth(); + Doxygen::indexList->decContentsDepth(); } } @@ -3039,8 +3048,8 @@ static void writeExampleIndex(OutputList &ol) if (addToIndex) { - Doxygen::indexList.addContentsItem(TRUE,title,0,"examples",0,TRUE,TRUE); - Doxygen::indexList.incContentsDepth(); + Doxygen::indexList->addContentsItem(TRUE,title,0,"examples",0,TRUE,TRUE); + Doxygen::indexList->incContentsDepth(); } ol.startTextBlock(); @@ -3059,7 +3068,7 @@ static void writeExampleIndex(OutputList &ol) ol.writeObjectLink(0,n,0,pd->title()); if (addToIndex) { - Doxygen::indexList.addContentsItem(FALSE,filterTitle(pd->title()),pd->getReference(),n,0,FALSE,TRUE); + Doxygen::indexList->addContentsItem(FALSE,filterTitle(pd->title()),pd->getReference(),n,0,FALSE,TRUE); } } else @@ -3067,7 +3076,7 @@ static void writeExampleIndex(OutputList &ol) ol.writeObjectLink(0,n,0,pd->name()); if (addToIndex) { - Doxygen::indexList.addContentsItem(FALSE,pd->name(),pd->getReference(),n,0,FALSE,TRUE); + Doxygen::indexList->addContentsItem(FALSE,pd->name(),pd->getReference(),n,0,FALSE,TRUE); } } ol.endItemListItem(); @@ -3077,7 +3086,7 @@ static void writeExampleIndex(OutputList &ol) if (addToIndex) { - Doxygen::indexList.decContentsDepth(); + Doxygen::indexList->decContentsDepth(); } endFile(ol); ol.popGeneratorState(); @@ -3267,6 +3276,16 @@ static void countRelatedPages(int &docPages,int &indexPages) //---------------------------------------------------------------------------- +static bool mainPageHasTitle() +{ + if (Doxygen::mainPage==0) return FALSE; + if (Doxygen::mainPage->title().isEmpty()) return FALSE; + if (Doxygen::mainPage->title().lower()=="notitle") return FALSE; + return TRUE; +} + +//---------------------------------------------------------------------------- + static void writePages(PageDef *pd,FTVHelp *ftv) { //printf("writePages()=%s pd=%p mainpage=%p\n",pd->name().data(),pd,Doxygen::mainPage); @@ -3296,16 +3315,18 @@ static void writePages(PageDef *pd,FTVHelp *ftv) } if (addToIndex && pd!=Doxygen::mainPage) { - Doxygen::indexList.addContentsItem( + Doxygen::indexList->addContentsItem( hasSubPages,pageTitle, pd->getReference(),pd->getOutputFileBase(), 0,hasSubPages,TRUE); } } if (hasSubPages && ftv) ftv->incContentsDepth(); - if ((hasSections || hasSubPages) && pd!=Doxygen::mainPage) + bool doIndent = (hasSections || hasSubPages) && + (pd!=Doxygen::mainPage || mainPageHasTitle()); + if (doIndent) { - Doxygen::indexList.incContentsDepth(); + Doxygen::indexList->incContentsDepth(); } if (hasSections) { @@ -3322,13 +3343,14 @@ static void writePages(PageDef *pd,FTVHelp *ftv) } } if (hasSubPages && ftv) ftv->decContentsDepth(); - if ((hasSections || hasSubPages) && pd!=Doxygen::mainPage) + if (doIndent) { - Doxygen::indexList.decContentsDepth(); + Doxygen::indexList->decContentsDepth(); } //printf("end writePages()=%s\n",pd->title().data()); } +//---------------------------------------------------------------------------- static void writePageIndex(OutputList &ol) { @@ -3479,7 +3501,7 @@ static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp* MemberList *ml; for (mli.toFirst();(ml=mli.current());++mli) { - if (ml->listType()&MemberList::documentationLists) + if (ml->listType()&MemberListType_documentationLists) { numSubItems += ml->count(); } @@ -3495,8 +3517,8 @@ static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp* //printf("gd=`%s': pageDict=%d\n",gd->name().data(),gd->pageDict->count()); if (addToIndex) { - Doxygen::indexList.addContentsItem(isDir,gd->groupTitle(),gd->getReference(),gd->getOutputFileBase(),0,isDir,TRUE); - Doxygen::indexList.incContentsDepth(); + Doxygen::indexList->addContentsItem(isDir,gd->groupTitle(),gd->getReference(),gd->getOutputFileBase(),0,isDir,TRUE); + Doxygen::indexList->incContentsDepth(); } if (ftv) { @@ -3540,25 +3562,25 @@ static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp* bool isDir = enumList!=0 && md->isEnumerate(); if (md->isVisible() && md->name().find('@')==-1) { - Doxygen::indexList.addContentsItem(isDir, + Doxygen::indexList->addContentsItem(isDir, md->name(),md->getReference(), md->getOutputFileBase(),md->anchor(),FALSE,addToIndex); } if (isDir) { - Doxygen::indexList.incContentsDepth(); + Doxygen::indexList->incContentsDepth(); MemberListIterator emli(*enumList); MemberDef *emd; for (emli.toFirst();(emd=emli.current());++emli) { if (emd->isVisible()) { - Doxygen::indexList.addContentsItem(FALSE, + Doxygen::indexList->addContentsItem(FALSE, emd->name(),emd->getReference(),emd->getOutputFileBase(), emd->anchor(),FALSE,addToIndex); } } - Doxygen::indexList.decContentsDepth(); + Doxygen::indexList->decContentsDepth(); } } } @@ -3583,7 +3605,7 @@ static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp* //else // only index the class, not its members //{ // printf("%s: add class only\n",cd->name().data()); - // Doxygen::indexList.addContentsItem(FALSE, + // Doxygen::indexList->addContentsItem(FALSE, // cd->displayName(TRUE),cd->getReference(), // cd->getOutputFileBase(),cd->anchor(),addToIndex,TRUE); //} @@ -3598,7 +3620,7 @@ static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp* { if (nd->isVisible()) { - Doxygen::indexList.addContentsItem(FALSE, + Doxygen::indexList->addContentsItem(FALSE, nd->localName(),nd->getReference(), nd->getOutputFileBase(),0,FALSE,FALSE); } @@ -3612,7 +3634,7 @@ static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp* { if (fd->isVisible()) { - Doxygen::indexList.addContentsItem(FALSE, + Doxygen::indexList->addContentsItem(FALSE, fd->displayName(),fd->getReference(), fd->getOutputFileBase(),0,FALSE,FALSE); } @@ -3626,7 +3648,7 @@ static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp* { if (dd->isVisible()) { - Doxygen::indexList.addContentsItem(FALSE, + Doxygen::indexList->addContentsItem(FALSE, dd->shortName(),dd->getReference(), dd->getOutputFileBase(),0,FALSE,FALSE); } @@ -3639,10 +3661,10 @@ static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp* for (;(pd=it.current());++it) { SectionInfo *si=0; - if (!pd->name().isEmpty()) si=Doxygen::sectionDict[pd->name()]; + if (!pd->name().isEmpty()) si=Doxygen::sectionDict->find(pd->name()); bool hasSubPages = pd->hasSubPages(); bool hasSections = pd->hasSections(); - Doxygen::indexList.addContentsItem( + Doxygen::indexList->addContentsItem( hasSubPages || hasSections, convertToHtml(pd->title(),TRUE), gd->getReference(), @@ -3652,7 +3674,7 @@ static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp* TRUE); // addToNavIndex if (hasSections || hasSubPages) { - Doxygen::indexList.incContentsDepth(); + Doxygen::indexList->incContentsDepth(); } if (hasSections) { @@ -3661,7 +3683,7 @@ static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp* writePages(pd,0); if (hasSections || hasSubPages) { - Doxygen::indexList.decContentsDepth(); + Doxygen::indexList->decContentsDepth(); } } } @@ -3686,7 +3708,7 @@ static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp* if (addToIndex) { - Doxygen::indexList.decContentsDepth(); + Doxygen::indexList->decContentsDepth(); } if (ftv) { @@ -3783,11 +3805,11 @@ static void writeGroupIndex(OutputList &ol) // 2.{ ol.pushGeneratorState(); ol.disable(OutputGenerator::Html); - Doxygen::indexList.disable(); + Doxygen::indexList->disable(); writeGroupHierarchy(ol,0,FALSE); - Doxygen::indexList.enable(); + Doxygen::indexList->enable(); ol.popGeneratorState(); // 2.} @@ -3801,8 +3823,8 @@ static void writeGroupIndex(OutputList &ol) { if (addToIndex) { - Doxygen::indexList.addContentsItem(TRUE,title,0,"modules",0,TRUE,TRUE); - Doxygen::indexList.incContentsDepth(); + Doxygen::indexList->addContentsItem(TRUE,title,0,"modules",0,TRUE,TRUE); + Doxygen::indexList->incContentsDepth(); } FTVHelp* ftv = new FTVHelp(FALSE); writeGroupHierarchy(ol,ftv,addToIndex); @@ -3814,7 +3836,7 @@ static void writeGroupIndex(OutputList &ol) delete ftv; if (addToIndex) { - Doxygen::indexList.decContentsDepth(); + Doxygen::indexList->decContentsDepth(); } } ol.popGeneratorState(); @@ -3846,8 +3868,8 @@ static void writeDirIndex(OutputList &ol) if (addToIndex) { - Doxygen::indexList.addContentsItem(TRUE,title,0,"dirs",0,TRUE,TRUE); - Doxygen::indexList.incContentsDepth(); + Doxygen::indexList->addContentsItem(TRUE,title,0,"dirs",0,TRUE,TRUE); + Doxygen::indexList->incContentsDepth(); } ol.parseText(lne ? lne->intro() : theTranslator->trDirDescription()); ol.endTextBlock(); @@ -3874,7 +3896,7 @@ static void writeDirIndex(OutputList &ol) } if (addToIndex) { - Doxygen::indexList.decContentsDepth(); + Doxygen::indexList->decContentsDepth(); } endFile(ol); ol.popGeneratorState(); @@ -3891,6 +3913,7 @@ static void writeUserGroupStubPage(OutputList &ol,LayoutNavEntry *lne) startTitle(ol,0); ol.parseText(lne->title()); endTitle(ol,0,0); + ol.startContents(); QListIterator<LayoutNavEntry> li(lne->children()); LayoutNavEntry *entry; int count=0; @@ -3917,15 +3940,6 @@ static void writeUserGroupStubPage(OutputList &ol,LayoutNavEntry *lne) //---------------------------------------------------------------------------- -static bool mainPageHasTitle() -{ - if (Doxygen::mainPage==0) return FALSE; - if (Doxygen::mainPage->title().isEmpty()) return FALSE; - if (Doxygen::mainPage->title().lower()=="notitle") return FALSE; - return TRUE; -} - -//---------------------------------------------------------------------------- static void writeIndex(OutputList &ol) { @@ -3969,7 +3983,7 @@ static void writeIndex(OutputList &ol) (!Config_getString("PROJECT_NAME").isEmpty() && mainPageHasTitle()) ) // to avoid duplicate entries in the treeview { - Doxygen::indexList.addContentsItem(Doxygen::mainPage->hasSubPages(),title,0,indexName,0,Doxygen::mainPage->hasSubPages(),TRUE); + Doxygen::indexList->addContentsItem(Doxygen::mainPage->hasSubPages(),title,0,indexName,0,Doxygen::mainPage->hasSubPages(),TRUE); } if (Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections()) { @@ -4276,8 +4290,8 @@ static void writeIndexHierarchyEntries(OutputList &ol,const QList<LayoutNavEntry { if (documentedNamespaces>0 && addToIndex) { - Doxygen::indexList.addContentsItem(TRUE,lne->title(),0,0,0); - Doxygen::indexList.incContentsDepth(); + Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,0,0); + Doxygen::indexList->incContentsDepth(); needsClosing=TRUE; } if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces)!=lne) // for backward compatibility with old layout file @@ -4305,8 +4319,8 @@ static void writeIndexHierarchyEntries(OutputList &ol,const QList<LayoutNavEntry case LayoutNavEntry::Classes: if (annotatedClasses>0 && addToIndex) { - Doxygen::indexList.addContentsItem(TRUE,lne->title(),0,0,0); - Doxygen::indexList.incContentsDepth(); + Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,0,0); + Doxygen::indexList->incContentsDepth(); needsClosing=TRUE; } if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Classes)!=lne) // for backward compatibility with old layout file @@ -4343,8 +4357,8 @@ static void writeIndexHierarchyEntries(OutputList &ol,const QList<LayoutNavEntry { if (documentedHtmlFiles>0 && addToIndex) { - Doxygen::indexList.addContentsItem(TRUE,lne->title(),0,0,0); - Doxygen::indexList.incContentsDepth(); + Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,0,0); + Doxygen::indexList->incContentsDepth(); needsClosing=TRUE; } if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files)!=lne) // for backward compatibility with old layout file @@ -4382,14 +4396,14 @@ static void writeIndexHierarchyEntries(OutputList &ol,const QList<LayoutNavEntry url.prepend("^"); // prepend ^ to absolute URL } bool isRef = lne->baseFile().left(4)=="@ref" || lne->baseFile().left(4)=="\\ref"; - Doxygen::indexList.addContentsItem(TRUE,lne->title(),0,url,0,FALSE,isRef); + Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,url,0,FALSE,isRef); } break; case LayoutNavEntry::UserGroup: if (addToIndex) { - Doxygen::indexList.addContentsItem(TRUE,lne->title(),0,lne->baseFile(),0,TRUE,TRUE); - Doxygen::indexList.incContentsDepth(); + Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,lne->baseFile(),0,TRUE,TRUE); + Doxygen::indexList->incContentsDepth(); needsClosing=TRUE; } writeUserGroupStubPage(ol,lne); @@ -4409,7 +4423,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const QList<LayoutNavEntry case LayoutNavEntry::Classes: case LayoutNavEntry::Files: case LayoutNavEntry::UserGroup: - Doxygen::indexList.decContentsDepth(); + Doxygen::indexList->decContentsDepth(); break; default: break; diff --git a/src/index.h b/src/index.h index 122a9bb..fa3c8fe 100644 --- a/src/index.h +++ b/src/index.h @@ -18,9 +18,8 @@ #ifndef INDEX_H #define INDEX_H -#include "qtbc.h" -#include <qfile.h> #include <qlist.h> +#include <qcstring.h> class Definition; class MemberDef; diff --git a/src/language.cpp b/src/language.cpp index 3afa5b9..d7a95ca 100644 --- a/src/language.cpp +++ b/src/language.cpp @@ -16,6 +16,8 @@ */ #include "message.h" +#include "config.h" +#include "util.h" #include "language.h" #include "lang_cfg.h" #include "translator.h" diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index d134385..5fc2361 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -28,6 +28,8 @@ #include "msc.h" #include "htmlattrib.h" #include "cite.h" +#include "filedef.h" +#include "config.h" static QCString escapeLabelName(const char *s) { @@ -1549,6 +1551,16 @@ void LatexDocVisitor::visitPost(DocHtmlBlockQuote *) m_t << "\\end{quotation}" << endl; } +void LatexDocVisitor::visitPre(DocVhdlFlow *) +{ + if (m_hide) return; +} + +void LatexDocVisitor::visitPost(DocVhdlFlow *) +{ + if (m_hide) return; +} + void LatexDocVisitor::filter(const char *str) { filterLatexString(m_t,str,m_insideTabbing,m_insidePre,m_insideItem); diff --git a/src/latexdocvisitor.h b/src/latexdocvisitor.h index a4892ce..4745800 100644 --- a/src/latexdocvisitor.h +++ b/src/latexdocvisitor.h @@ -132,6 +132,8 @@ class LatexDocVisitor : public DocVisitor void visitPost(DocText *); void visitPre(DocHtmlBlockQuote *); void visitPost(DocHtmlBlockQuote *); + void visitPre(DocVhdlFlow *); + void visitPost(DocVhdlFlow *); private: diff --git a/src/latexgen.cpp b/src/latexgen.cpp index d57764e..8a7555d 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -17,7 +17,6 @@ #include <stdlib.h> -#include "qtbc.h" #include <qdir.h> #include "latexgen.h" #include "config.h" @@ -33,6 +32,10 @@ #include "latexdocvisitor.h" #include "dirdef.h" #include "cite.h" +#include "groupdef.h" +#include "classlist.h" +#include "namespacedef.h" +#include "filename.h" //static QCString filterTitle(const char *s) //{ @@ -794,7 +797,7 @@ static void writeDefaultStyleSheetPart3(FTextStream &t) //" \\arrayrulecolor{gray}%\n" " \\setlength{\\tabcolsep}{0.01\\textwidth}%\n" " \\begin{longtable}{|>{\\raggedleft\\hspace{0pt}}p{0.25\\textwidth}|%\n" - " p{0.77\\textwidth}|}%\n" + " p{0.705\\textwidth}|}%\n" " \\hline%\n" "}{%\n" " \\end{longtable}%\n" @@ -811,7 +814,7 @@ static void writeDefaultStyleSheetPart3(FTextStream &t) " \\arrayrulecolor{gray}%\n" " \\setlength{\\tabcolsep}{0.01\\textwidth}%\n" " \\begin{longtable}{|>{\\raggedleft\\hspace{0pt}}p{0.25\\textwidth}|%\n" - " p{0.77\\textwidth}|}%\n" + " p{0.705\\textwidth}|}%\n" " \\hline%\n" "}{%\n" " \\end{longtable}%\n" @@ -828,7 +831,7 @@ static void writeDefaultStyleSheetPart3(FTextStream &t) " \\arrayrulecolor{gray}%\n" " \\setlength{\\tabcolsep}{0.01\\textwidth}%\n" " \\begin{longtable}{|>{\\raggedleft\\hspace{0pt}}p{0.25\\textwidth}|%\n" - " p{0.77\\textwidth}|}%\n" + " p{0.705\\textwidth}|}%\n" " \\hline%\n" "}{%\n" " \\end{longtable}%\n" @@ -1972,7 +1975,7 @@ void LatexGenerator::codify(const char *str) //char cs[5]; int spacesToNextTabStop; static int tabSize = Config_getInt("TAB_SIZE"); - const int maxLineLen = 80; + const int maxLineLen = 108; QCString result(4*maxLineLen+1); // worst case for 1 line of 4-byte chars int i; while ((c=*p)) diff --git a/src/layout.cpp b/src/layout.cpp index adfb4e8..d1e02ac 100644 --- a/src/layout.cpp +++ b/src/layout.cpp @@ -23,6 +23,7 @@ #include "util.h" #include "doxygen.h" #include "version.h" +#include "config.h" #include <assert.h> #include <qxml.h> @@ -51,7 +52,7 @@ static const char layout_default[] = static bool elemIsVisible(const QXmlAttributes &attrib,bool defVal=TRUE) { - QCString visible = convertToQCString(attrib.value("visible")); + QCString visible = attrib.value("visible").utf8(); if (visible.isEmpty()) return defVal; if (visible.at(0)=='$' && visible.length()>1) { @@ -188,13 +189,13 @@ class LayoutParser : public QXmlDefaultHandler class StartElementHandlerMember : public StartElementHandler { typedef void (LayoutParser::*Handler)(const QXmlAttributes &attrib, - MemberList::ListType type, + MemberListType type, const QCString &title, const QCString &subtitle); public: StartElementHandlerMember(LayoutParser *parent, Handler h, - MemberList::ListType type, + MemberListType type, const QCString &tl, const QCString &ss = QCString() ) @@ -207,7 +208,7 @@ class LayoutParser : public QXmlDefaultHandler private: LayoutParser *m_parent; Handler m_handler; - MemberList::ListType m_type; + MemberListType m_type; QCString m_title; QCString m_subscript; }; @@ -313,96 +314,96 @@ class LayoutParser : public QXmlDefaultHandler ))); m_sHandler.insert("class/memberdecl/publictypes", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::pubTypes,theTranslator->trPublicTypes())); + MemberListType_pubTypes,theTranslator->trPublicTypes())); m_sHandler.insert("class/memberdecl/publicslots", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::pubSlots,theTranslator->trPublicSlots())); + MemberListType_pubSlots,theTranslator->trPublicSlots())); m_sHandler.insert("class/memberdecl/signals", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::signals,theTranslator->trSignals())); + MemberListType_signals,theTranslator->trSignals())); m_sHandler.insert("class/memberdecl/publicmethods", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::pubMethods, + MemberListType_pubMethods, COMPILE_FOR_1_OPTION( theTranslator->trPublicMembers(), SrcLangExt_ObjC,theTranslator->trInstanceMethods() ))); m_sHandler.insert("class/memberdecl/publicstaticmethods", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::pubStaticMethods, + MemberListType_pubStaticMethods, COMPILE_FOR_1_OPTION( theTranslator->trStaticPublicMembers(), SrcLangExt_ObjC,theTranslator->trClassMethods() ))); m_sHandler.insert("class/memberdecl/publicattributes", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::pubAttribs,theTranslator->trPublicAttribs())); + MemberListType_pubAttribs,theTranslator->trPublicAttribs())); m_sHandler.insert("class/memberdecl/publicstaticattributes", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::pubStaticAttribs,theTranslator->trStaticPublicAttribs())); + MemberListType_pubStaticAttribs,theTranslator->trStaticPublicAttribs())); m_sHandler.insert("class/memberdecl/protectedtypes", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::proTypes,theTranslator->trProtectedTypes())); + MemberListType_proTypes,theTranslator->trProtectedTypes())); m_sHandler.insert("class/memberdecl/protectedslots", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::proSlots,theTranslator->trProtectedSlots())); + MemberListType_proSlots,theTranslator->trProtectedSlots())); m_sHandler.insert("class/memberdecl/protectedmethods", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::proMethods,theTranslator->trProtectedMembers())); + MemberListType_proMethods,theTranslator->trProtectedMembers())); m_sHandler.insert("class/memberdecl/protectedstaticmethods", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::proStaticMethods,theTranslator->trStaticProtectedMembers())); + MemberListType_proStaticMethods,theTranslator->trStaticProtectedMembers())); m_sHandler.insert("class/memberdecl/protectedattributes", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::proAttribs,theTranslator->trProtectedAttribs())); + MemberListType_proAttribs,theTranslator->trProtectedAttribs())); m_sHandler.insert("class/memberdecl/protectedstaticattributes", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::proStaticAttribs,theTranslator->trStaticProtectedAttribs())); + MemberListType_proStaticAttribs,theTranslator->trStaticProtectedAttribs())); m_sHandler.insert("class/memberdecl/packagetypes", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::pacTypes,theTranslator->trPackageTypes())); + MemberListType_pacTypes,theTranslator->trPackageTypes())); m_sHandler.insert("class/memberdecl/packagemethods", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::pacMethods,theTranslator->trPackageMembers())); + MemberListType_pacMethods,theTranslator->trPackageMembers())); m_sHandler.insert("class/memberdecl/packagestaticmethods", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::pacStaticMethods,theTranslator->trStaticPackageMembers())); + MemberListType_pacStaticMethods,theTranslator->trStaticPackageMembers())); m_sHandler.insert("class/memberdecl/packageattributes", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::pacAttribs,theTranslator->trPackageAttribs())); + MemberListType_pacAttribs,theTranslator->trPackageAttribs())); m_sHandler.insert("class/memberdecl/packagestaticattributes", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::pacStaticAttribs,theTranslator->trStaticPackageAttribs())); + MemberListType_pacStaticAttribs,theTranslator->trStaticPackageAttribs())); m_sHandler.insert("class/memberdecl/properties", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::properties,theTranslator->trProperties())); + MemberListType_properties,theTranslator->trProperties())); m_sHandler.insert("class/memberdecl/events", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::events,theTranslator->trEvents())); + MemberListType_events,theTranslator->trEvents())); m_sHandler.insert("class/memberdecl/privatetypes", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::priTypes,theTranslator->trPrivateTypes())); + MemberListType_priTypes,theTranslator->trPrivateTypes())); m_sHandler.insert("class/memberdecl/privateslots", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::priSlots,theTranslator->trPrivateSlots())); + MemberListType_priSlots,theTranslator->trPrivateSlots())); m_sHandler.insert("class/memberdecl/privatemethods", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::priMethods,theTranslator->trPrivateMembers())); + MemberListType_priMethods,theTranslator->trPrivateMembers())); m_sHandler.insert("class/memberdecl/privatestaticmethods", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::priStaticMethods,theTranslator->trStaticPrivateMembers())); + MemberListType_priStaticMethods,theTranslator->trStaticPrivateMembers())); m_sHandler.insert("class/memberdecl/privateattributes", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::priAttribs,theTranslator->trPrivateAttribs())); + MemberListType_priAttribs,theTranslator->trPrivateAttribs())); m_sHandler.insert("class/memberdecl/privatestaticattributes", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::priStaticAttribs,theTranslator->trStaticPrivateAttribs())); + MemberListType_priStaticAttribs,theTranslator->trStaticPrivateAttribs())); m_sHandler.insert("class/memberdecl/friends", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::friends,theTranslator->trFriends())); + MemberListType_friends,theTranslator->trFriends())); m_sHandler.insert("class/memberdecl/related", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::related,theTranslator->trRelatedFunctions(), + MemberListType_related,theTranslator->trRelatedFunctions(), theTranslator->trRelatedSubscript())); m_eHandler.insert("class/memberdecl", new EndElementHandler(this,&LayoutParser::endMemberDecl)); @@ -416,16 +417,16 @@ class LayoutParser : public QXmlDefaultHandler ))); m_sHandler.insert("class/memberdef/typedefs", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::typedefMembers,theTranslator->trMemberTypedefDocumentation())); + MemberListType_typedefMembers,theTranslator->trMemberTypedefDocumentation())); m_sHandler.insert("class/memberdef/enums", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::enumMembers,theTranslator->trMemberEnumerationDocumentation())); + MemberListType_enumMembers,theTranslator->trMemberEnumerationDocumentation())); m_sHandler.insert("class/memberdef/constructors", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::constructors,theTranslator->trConstructorDocumentation())); + MemberListType_constructors,theTranslator->trConstructorDocumentation())); m_sHandler.insert("class/memberdef/functions", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::functionMembers, + MemberListType_functionMembers, COMPILE_FOR_2_OPTIONS( theTranslator->trMemberFunctionDocumentation(), SrcLangExt_ObjC,theTranslator->trMethodDocumentation(), @@ -433,16 +434,16 @@ class LayoutParser : public QXmlDefaultHandler ))); m_sHandler.insert("class/memberdef/related", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::relatedMembers,theTranslator->trRelatedFunctionDocumentation())); + MemberListType_relatedMembers,theTranslator->trRelatedFunctionDocumentation())); m_sHandler.insert("class/memberdef/variables", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::variableMembers,theTranslator->trMemberDataDocumentation())); + MemberListType_variableMembers,theTranslator->trMemberDataDocumentation())); m_sHandler.insert("class/memberdef/properties", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::propertyMembers,theTranslator->trPropertyDocumentation())); + MemberListType_propertyMembers,theTranslator->trPropertyDocumentation())); m_sHandler.insert("class/memberdef/events", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::eventMembers,theTranslator->trEventDocumentation())); + MemberListType_eventMembers,theTranslator->trEventDocumentation())); m_eHandler.insert("class/memberdef", new EndElementHandler(this,&LayoutParser::endMemberDef)); m_eHandler.insert("class", @@ -480,13 +481,13 @@ class LayoutParser : public QXmlDefaultHandler new StartElementHandlerKind(this,LayoutDocEntry::MemberGroups,&LayoutParser::startSimpleEntry)); m_sHandler.insert("namespace/memberdecl/typedefs", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::decTypedefMembers,theTranslator->trTypedefs())); + MemberListType_decTypedefMembers,theTranslator->trTypedefs())); m_sHandler.insert("namespace/memberdecl/enums", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::decEnumMembers,theTranslator->trEnumerations())); + MemberListType_decEnumMembers,theTranslator->trEnumerations())); m_sHandler.insert("namespace/memberdecl/functions", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::decFuncMembers, + MemberListType_decFuncMembers, COMPILE_FOR_2_OPTIONS( theTranslator->trFunctions(), SrcLangExt_Fortran,theTranslator->trSubprograms(), @@ -494,7 +495,7 @@ class LayoutParser : public QXmlDefaultHandler ))); m_sHandler.insert("namespace/memberdecl/variables", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::decVarMembers,theTranslator->trVariables())); + MemberListType_decVarMembers,theTranslator->trVariables())); m_eHandler.insert("namespace/memberdecl", new EndElementHandler(this,&LayoutParser::endMemberDecl)); m_sHandler.insert("namespace/memberdef", @@ -507,20 +508,20 @@ class LayoutParser : public QXmlDefaultHandler ))); m_sHandler.insert("namespace/memberdef/typedefs", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::docTypedefMembers,theTranslator->trTypedefDocumentation())); + MemberListType_docTypedefMembers,theTranslator->trTypedefDocumentation())); m_sHandler.insert("namespace/memberdef/enums", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::docEnumMembers,theTranslator->trEnumerationTypeDocumentation())); + MemberListType_docEnumMembers,theTranslator->trEnumerationTypeDocumentation())); m_sHandler.insert("namespace/memberdef/functions", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::docFuncMembers, + MemberListType_docFuncMembers, COMPILE_FOR_1_OPTION( theTranslator->trFunctionDocumentation(), SrcLangExt_Fortran,theTranslator->trSubprogramDocumentation() ))); m_sHandler.insert("namespace/memberdef/variables", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::docVarMembers,theTranslator->trVariableDocumentation())); + MemberListType_docVarMembers,theTranslator->trVariableDocumentation())); m_eHandler.insert("namespace/memberdef", new EndElementHandler(this,&LayoutParser::endMemberDef)); m_eHandler.insert("namespace", @@ -564,16 +565,16 @@ class LayoutParser : public QXmlDefaultHandler ))); m_sHandler.insert("file/memberdecl/defines", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::decDefineMembers,theTranslator->trDefines())); + MemberListType_decDefineMembers,theTranslator->trDefines())); m_sHandler.insert("file/memberdecl/typedefs", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::decTypedefMembers,theTranslator->trTypedefs())); + MemberListType_decTypedefMembers,theTranslator->trTypedefs())); m_sHandler.insert("file/memberdecl/enums", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::decEnumMembers,theTranslator->trEnumerations())); + MemberListType_decEnumMembers,theTranslator->trEnumerations())); m_sHandler.insert("file/memberdecl/functions", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::decFuncMembers, + MemberListType_decFuncMembers, COMPILE_FOR_2_OPTIONS( theTranslator->trFunctions(), SrcLangExt_Fortran,theTranslator->trSubprograms(), @@ -581,7 +582,7 @@ class LayoutParser : public QXmlDefaultHandler ))); m_sHandler.insert("file/memberdecl/variables", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::decVarMembers,theTranslator->trVariables())); + MemberListType_decVarMembers,theTranslator->trVariables())); m_eHandler.insert("file/memberdecl", new EndElementHandler(this,&LayoutParser::endMemberDecl)); @@ -595,24 +596,24 @@ class LayoutParser : public QXmlDefaultHandler ))); m_sHandler.insert("file/memberdef/defines", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::docDefineMembers,theTranslator->trDefineDocumentation())); + MemberListType_docDefineMembers,theTranslator->trDefineDocumentation())); m_sHandler.insert("file/memberdef/typedefs", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::docTypedefMembers,theTranslator->trTypedefDocumentation())); + MemberListType_docTypedefMembers,theTranslator->trTypedefDocumentation())); m_sHandler.insert("file/memberdef/enums", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::docEnumMembers, + MemberListType_docEnumMembers, theTranslator->trEnumerationTypeDocumentation())); m_sHandler.insert("file/memberdef/functions", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::docFuncMembers, + MemberListType_docFuncMembers, COMPILE_FOR_1_OPTION( theTranslator->trFunctionDocumentation(), SrcLangExt_Fortran,theTranslator->trSubprogramDocumentation() ))); m_sHandler.insert("file/memberdef/variables", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::docVarMembers,theTranslator->trVariableDocumentation())); + MemberListType_docVarMembers,theTranslator->trVariableDocumentation())); m_eHandler.insert("file/memberdef", new EndElementHandler(this,&LayoutParser::endMemberDef)); m_eHandler.insert("file", @@ -663,19 +664,19 @@ class LayoutParser : public QXmlDefaultHandler m_sHandler.insert("group/memberdecl/defines", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::decDefineMembers,theTranslator->trDefines())); + MemberListType_decDefineMembers,theTranslator->trDefines())); m_sHandler.insert("group/memberdecl/typedefs", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::decTypedefMembers,theTranslator->trTypedefs())); + MemberListType_decTypedefMembers,theTranslator->trTypedefs())); m_sHandler.insert("group/memberdecl/enums", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::decEnumMembers,theTranslator->trEnumerations())); + MemberListType_decEnumMembers,theTranslator->trEnumerations())); m_sHandler.insert("group/memberdecl/enumvalues", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::decEnumValMembers,theTranslator->trEnumerationValues())); + MemberListType_decEnumValMembers,theTranslator->trEnumerationValues())); m_sHandler.insert("group/memberdecl/functions", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::decFuncMembers, + MemberListType_decFuncMembers, COMPILE_FOR_2_OPTIONS( theTranslator->trFunctions(), SrcLangExt_Fortran,theTranslator->trSubprograms(), @@ -683,28 +684,28 @@ class LayoutParser : public QXmlDefaultHandler ))); m_sHandler.insert("group/memberdecl/variables", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::decVarMembers,theTranslator->trVariables())); + MemberListType_decVarMembers,theTranslator->trVariables())); m_sHandler.insert("group/memberdecl/signals", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::decSignalMembers,theTranslator->trSignals())); + MemberListType_decSignalMembers,theTranslator->trSignals())); m_sHandler.insert("group/memberdecl/publicslots", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::decPubSlotMembers,theTranslator->trPublicSlots())); + MemberListType_decPubSlotMembers,theTranslator->trPublicSlots())); m_sHandler.insert("group/memberdecl/protectedslots", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::decProSlotMembers,theTranslator->trProtectedSlots())); + MemberListType_decProSlotMembers,theTranslator->trProtectedSlots())); m_sHandler.insert("group/memberdecl/privateslots", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::decPriSlotMembers,theTranslator->trPrivateSlots())); + MemberListType_decPriSlotMembers,theTranslator->trPrivateSlots())); m_sHandler.insert("group/memberdecl/events", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::decEventMembers,theTranslator->trEvents())); + MemberListType_decEventMembers,theTranslator->trEvents())); m_sHandler.insert("group/memberdecl/properties", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::decPropMembers,theTranslator->trProperties())); + MemberListType_decPropMembers,theTranslator->trProperties())); m_sHandler.insert("group/memberdecl/friends", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberList::decFriendMembers,theTranslator->trFriends())); + MemberListType_decFriendMembers,theTranslator->trFriends())); m_eHandler.insert("group/memberdecl", new EndElementHandler(this,&LayoutParser::endMemberDecl)); m_sHandler.insert("group/memberdef", @@ -719,47 +720,47 @@ class LayoutParser : public QXmlDefaultHandler ))); m_sHandler.insert("group/memberdef/defines", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::docDefineMembers,theTranslator->trDefineDocumentation())); + MemberListType_docDefineMembers,theTranslator->trDefineDocumentation())); m_sHandler.insert("group/memberdef/typedefs", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::docTypedefMembers,theTranslator->trTypedefDocumentation())); + MemberListType_docTypedefMembers,theTranslator->trTypedefDocumentation())); m_sHandler.insert("group/memberdef/enums", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::docEnumMembers,theTranslator->trEnumerationTypeDocumentation())); + MemberListType_docEnumMembers,theTranslator->trEnumerationTypeDocumentation())); m_sHandler.insert("group/memberdef/enumvalues", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::docEnumValMembers,theTranslator->trEnumerationValueDocumentation())); + MemberListType_docEnumValMembers,theTranslator->trEnumerationValueDocumentation())); m_sHandler.insert("group/memberdef/functions", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::docFuncMembers, + MemberListType_docFuncMembers, COMPILE_FOR_1_OPTION( theTranslator->trFunctionDocumentation(), SrcLangExt_Fortran,theTranslator->trSubprogramDocumentation() ))); m_sHandler.insert("group/memberdef/variables", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::docVarMembers,theTranslator->trVariableDocumentation())); + MemberListType_docVarMembers,theTranslator->trVariableDocumentation())); m_sHandler.insert("group/memberdef/signals", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::docSignalMembers,theTranslator->trSignals())); + MemberListType_docSignalMembers,theTranslator->trSignals())); m_sHandler.insert("group/memberdef/publicslots", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::docPubSlotMembers,theTranslator->trPublicSlots())); + MemberListType_docPubSlotMembers,theTranslator->trPublicSlots())); m_sHandler.insert("group/memberdef/protectedslots", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::docProSlotMembers,theTranslator->trProtectedSlots())); + MemberListType_docProSlotMembers,theTranslator->trProtectedSlots())); m_sHandler.insert("group/memberdef/privateslots", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::docPriSlotMembers,theTranslator->trPrivateSlots())); + MemberListType_docPriSlotMembers,theTranslator->trPrivateSlots())); m_sHandler.insert("group/memberdef/events", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::docEventMembers,theTranslator->trEvents())); + MemberListType_docEventMembers,theTranslator->trEvents())); m_sHandler.insert("group/memberdef/properties", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::docPropMembers,theTranslator->trProperties())); + MemberListType_docPropMembers,theTranslator->trProperties())); m_sHandler.insert("group/memberdef/friends", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::docFriendMembers,theTranslator->trFriends())); + MemberListType_docFriendMembers,theTranslator->trFriends())); m_eHandler.insert("group/memberdef", new EndElementHandler(this,&LayoutParser::endMemberDef)); m_eHandler.insert("group", @@ -801,7 +802,7 @@ class LayoutParser : public QXmlDefaultHandler const QCString &title) { bool isVisible = elemIsVisible(attrib); - QCString userTitle = convertToQCString(attrib.value("title")); + QCString userTitle = attrib.value("title").utf8(); //printf("startSectionEntry: title='%s' userTitle='%s'\n", // title.data(),userTitle.data()); if (userTitle.isEmpty()) userTitle = title; @@ -813,13 +814,13 @@ class LayoutParser : public QXmlDefaultHandler } - void startMemberDeclEntry(const QXmlAttributes &attrib,MemberList::ListType type, + void startMemberDeclEntry(const QXmlAttributes &attrib,MemberListType type, const QCString &title,const QCString &subscript) { //QCString visible = convertToQCString(attrib.value("visible")); //bool isVisible = visible.isEmpty() || (visible!="no" && visible!="0"); - QCString userTitle = convertToQCString(attrib.value("title")); - QCString userSubscript = convertToQCString(attrib.value("subtitle")); + QCString userTitle = attrib.value("title").utf8(); + QCString userSubscript = attrib.value("subtitle").utf8(); if (userTitle.isEmpty()) userTitle = title; if (userSubscript.isEmpty()) userSubscript = subscript; //printf("memberdecl: %s\n",userTitle.data()); @@ -830,10 +831,10 @@ class LayoutParser : public QXmlDefaultHandler } } - void startMemberDefEntry(const QXmlAttributes &attrib,MemberList::ListType type, + void startMemberDefEntry(const QXmlAttributes &attrib,MemberListType type, const QCString &title,const QCString &) { - QCString userTitle = convertToQCString(attrib.value("title")); + QCString userTitle = attrib.value("title").utf8(); if (userTitle.isEmpty()) userTitle = title; //printf("memberdef: %s\n",userTitle.data()); if (m_part!=-1 /*&& isVisible*/) @@ -1049,7 +1050,7 @@ class LayoutParser : public QXmlDefaultHandler return; } QCString baseFile = mapping[i].baseFile; - QCString title = convertToQCString(attrib.value("title")); + QCString title = attrib.value("title").utf8(); bool isVisible = elemIsVisible(attrib); if (title.isEmpty()) // use default title { @@ -1060,12 +1061,12 @@ class LayoutParser : public QXmlDefaultHandler // this is mainly done to get compatible naming with older versions. } } - QCString intro = convertToQCString(attrib.value("intro")); + QCString intro = attrib.value("intro").utf8(); if (intro.isEmpty()) // use default intro text { intro = mapping[i].intro; } - QCString url = convertToQCString(attrib.value("url")); + QCString url = attrib.value("url").utf8(); if (mapping[i].kind==LayoutNavEntry::User && !url.isEmpty()) { baseFile=url; diff --git a/src/layout.h b/src/layout.h index 3425a4c..830ee70 100644 --- a/src/layout.h +++ b/src/layout.h @@ -19,11 +19,12 @@ #ifndef LAYOUT_H #define LAYOUT_H -#include "qtbc.h" -#include "memberlist.h" #include <qlist.h> +#include "types.h" class LayoutParser; +class MemberList; +class QTextStream; /** @brief Base class representing a piece of a documentation page */ struct LayoutDocEntry @@ -87,12 +88,12 @@ private: /** @brief Represents of a member declaration list with configurable title and subtitle. */ struct LayoutDocEntryMemberDecl: public LayoutDocEntry { - LayoutDocEntryMemberDecl(MemberList::ListType tp, + LayoutDocEntryMemberDecl(MemberListType tp, const QCString &tl,const QCString &ss) : type(tp), m_title(tl), m_subscript(ss) {} Kind kind() const { return MemberDecl; } - MemberList::ListType type; + MemberListType type; QCString title(SrcLangExt lang) const; QCString subtitle(SrcLangExt lang) const; private: @@ -103,11 +104,11 @@ private: /** @brief Represents of a member definition list with configurable title. */ struct LayoutDocEntryMemberDef: public LayoutDocEntry { - LayoutDocEntryMemberDef(MemberList::ListType tp,const QCString &tl) + LayoutDocEntryMemberDef(MemberListType tp,const QCString &tl) : type(tp), m_title(tl) {} Kind kind() const { return MemberDef; } - MemberList::ListType type; + MemberListType type; QCString title(SrcLangExt lang) const; private: QCString m_title; diff --git a/src/libdoxygen.pro.in b/src/libdoxygen.pro.in index 6008f0f..546f6ea 100644 --- a/src/libdoxygen.pro.in +++ b/src/libdoxygen.pro.in @@ -26,6 +26,7 @@ HEADERS = arguments.h \ commentcnv.h \ commentscan.h \ compound_xsd.h \ + condparser.h \ config.h \ constexp.h \ cppvalue.h \ @@ -106,7 +107,6 @@ HEADERS = arguments.h \ dbusxmlscanner.h \ qhp.h \ qhpxmlwriter.h \ - qtbc.h \ reflist.h \ resize_js.h \ rtfdocvisitor.h \ @@ -181,6 +181,7 @@ SOURCES = arguments.cpp \ code.cpp \ commentcnv.cpp \ commentscan.cpp \ + condparser.cpp \ cppvalue.cpp \ dbusxmlscanner.cpp \ debug.cpp \ diff --git a/src/logos.cpp b/src/logos.cpp index afc93cb..120a449 100644 --- a/src/logos.cpp +++ b/src/logos.cpp @@ -17,7 +17,6 @@ #include <stdio.h> -#include "qtbc.h" #include <qfile.h> #include <qdir.h> diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp index 87dd16f..38a3ab3 100644 --- a/src/mandocvisitor.cpp +++ b/src/mandocvisitor.cpp @@ -16,6 +16,8 @@ * */ +#include <qfileinfo.h> + #include "mandocvisitor.h" #include "docparser.h" #include "language.h" @@ -25,8 +27,8 @@ #include "dot.h" #include "util.h" #include "message.h" -#include <qfileinfo.h> #include "parserintf.h" +#include "filedef.h" ManDocVisitor::ManDocVisitor(FTextStream &t,CodeOutputInterface &ci, const char *langExt) @@ -191,7 +193,7 @@ void ManDocVisitor::visit(DocStyleChange *s) void ManDocVisitor::visit(DocVerbatim *s) { if (m_hide) return; - switch(s->type()) + switch (s->type()) { case DocVerbatim::Code: // fall though if (!m_firstCol) m_t << endl; @@ -978,6 +980,14 @@ void ManDocVisitor::visitPost(DocHtmlBlockQuote *) m_firstCol=TRUE; } +void ManDocVisitor::visitPre(DocVhdlFlow *) +{ +} + +void ManDocVisitor::visitPost(DocVhdlFlow *) +{ +} + void ManDocVisitor::filter(const char *str) { diff --git a/src/mandocvisitor.h b/src/mandocvisitor.h index acd0663..d595644 100644 --- a/src/mandocvisitor.h +++ b/src/mandocvisitor.h @@ -131,6 +131,8 @@ class ManDocVisitor : public DocVisitor void visitPost(DocText *); void visitPre(DocHtmlBlockQuote *); void visitPost(DocHtmlBlockQuote *); + void visitPre(DocVhdlFlow *); + void visitPost(DocVhdlFlow *); private: diff --git a/src/mangen.cpp b/src/mangen.cpp index e20b5f7..cea01ce 100644 --- a/src/mangen.cpp +++ b/src/mangen.cpp @@ -20,7 +20,6 @@ #include <stdlib.h> -#include "qtbc.h" #include <qdir.h> #include "message.h" #include "mangen.h" @@ -131,7 +130,7 @@ static QCString buildFileName(const char *name) } QCString &manExtension = Config_getString("MAN_EXTENSION"); - if (convertToQCString(fileName.right(2))!=manExtension) + if (fileName.right(2)!=manExtension) { fileName+=manExtension; } diff --git a/src/markdown.cpp b/src/markdown.cpp index 0c7c2f8..2571a1a 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -46,6 +46,8 @@ #include "entry.h" #include "bufstr.h" #include "commentcnv.h" +#include "config.h" +#include "section.h" //----------- @@ -224,7 +226,7 @@ static QCString isBlockCommand(const char *data,int offset,int size) /** looks for the next emph char, skipping other constructs, and * stopping when either it is found, or we are at the end of a paragraph. */ -static int findEmphasisChar(const char *data, int size, char c) +static int findEmphasisChar(const char *data, int size, char c, int c_size) { int i = 1; @@ -242,16 +244,25 @@ static int findEmphasisChar(const char *data, int size, char c) i++; continue; } - else if (data[i] == c) + else { - if (i<size-1 && isIdChar(i+1)) // to prevent touching some_underscore_identifier + // get length of emphasis token + int len = 0; + while (i+len<size && data[i+len]==c) { - i++; - continue; + len++; } - return i; // found it - } + if (len>0) + { + if (len!=c_size || (i<size-len && isIdChar(i+len))) // to prevent touching some_underscore_identifier + { + i=i+len; + continue; + } + return i; // found it + } + } // skipping a code span if (data[i]=='`') @@ -318,7 +329,7 @@ static int processEmphasis1(GrowBuf &out, const char *data, int size, char c) while (i<size) { - len = findEmphasisChar(data+i, size-i, c); + len = findEmphasisChar(data+i, size-i, c, 1); if (len==0) return 0; i+=len; if (i>=size) return 0; @@ -346,7 +357,7 @@ static int processEmphasis2(GrowBuf &out, const char *data, int size, char c) while (i<size) { - len = findEmphasisChar(data+i, size-i, c); + len = findEmphasisChar(data+i, size-i, c, 2); if (len==0) { return 0; @@ -375,7 +386,7 @@ static int processEmphasis3(GrowBuf &out, const char *data, int size, char c) while (i<size) { - len = findEmphasisChar(data+i, size-i, c); + len = findEmphasisChar(data+i, size-i, c, 3); if (len==0) { return 0; @@ -1648,7 +1659,7 @@ void writeOneLineHeaderOrRuler(GrowBuf &out,const char *data,int size) { g_current->anchors->append(si); } - Doxygen::sectionDict.append(header,si); + Doxygen::sectionDict->append(header,si); } else { @@ -1976,7 +1987,7 @@ static QCString processBlocks(const QCString &s,int indent) { g_current->anchors->append(si); } - Doxygen::sectionDict.append(header,si); + Doxygen::sectionDict->append(header,si); } else { @@ -2207,10 +2218,17 @@ void MarkdownFileParser::parseInput(const char *fileName, QCString id; QCString title=extractPageTitle(docs,id).stripWhiteSpace(); //g_correctSectionLevel = !title.isEmpty(); - QCString baseName = substitute(QFileInfo(fileName).baseName().utf8()," ","_"); + QCString baseFn = QFileInfo(fileName).baseName().utf8(); + QCString fn = QFileInfo(fileName).fileName().utf8(); + QCString baseName = substitute(baseFn," ","_"); + static QCString mdfileAsMainPage = Config_getString("USE_MDFILE_AS_MAINPAGE"); if (id.isEmpty()) id = "md_"+baseName; if (title.isEmpty()) title = baseName; - if (id=="mainpage" || id=="index") + if (fn==mdfileAsMainPage) + { + docs.prepend("@mainpage\n"); + } + else if (id=="mainpage" || id=="index") { docs.prepend("@mainpage "+title+"\n"); } diff --git a/src/memberdef.cpp b/src/memberdef.cpp index fe55168..d658c4a 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -1,7 +1,5 @@ /****************************************************************************** * - * - * * Copyright (C) 1997-2012 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its @@ -42,6 +40,10 @@ #include "vhdlscanner.h" #include "vhdldocgen.h" #include "arguments.h" +#include "memberlist.h" +#include "namespacedef.h" +#include "filedef.h" +#include "config.h" #define START_MARKER 0x4D454D5B // MEM[ #define END_MARKER 0x4D454D5D // MEM] @@ -391,7 +393,7 @@ class MemberDefImpl ~MemberDefImpl(); void init(Definition *def,const char *t,const char *a,const char *e, Protection p,Specifier v,bool s,Relationship r, - MemberDef::MemberType mt,const ArgumentList *tal, + MemberType mt,const ArgumentList *tal, const ArgumentList *al ); @@ -432,7 +434,7 @@ class MemberDefImpl int initLines; // number of lines in the initializer int memSpec; // The specifiers present for this member - MemberDef::MemberType mtype; // returns the kind of member + MemberType mtype; // returns the kind of member int maxInitLines; // when the initializer will be displayed int userInitLines; // result of explicit \hideinitializer or \showinitializer MemberDef *annMemb; @@ -534,7 +536,7 @@ MemberDefImpl::~MemberDefImpl() void MemberDefImpl::init(Definition *def, const char *t,const char *a,const char *e, Protection p,Specifier v,bool s,Relationship r, - MemberDef::MemberType mt,const ArgumentList *tal, + MemberType mt,const ArgumentList *tal, const ArgumentList *al ) { @@ -557,7 +559,7 @@ void MemberDefImpl::init(Definition *def, hasCallerGraph = FALSE; initLines=0; type=t; - if (mt==MemberDef::Typedef) type.stripPrefix("typedef "); + if (mt==MemberType_Typedef) type.stripPrefix("typedef "); // type.stripPrefix("struct "); // type.stripPrefix("class " ); // type.stripPrefix("union " ); @@ -808,7 +810,7 @@ void MemberDef::insertReimplementedBy(MemberDef *md) { m_impl->templateMaster->insertReimplementedBy(md); } - if (m_impl->redefinedBy==0) m_impl->redefinedBy = new MemberList(MemberList::redefinedBy); + if (m_impl->redefinedBy==0) m_impl->redefinedBy = new MemberList(MemberListType_redefinedBy); if (m_impl->redefinedBy->findRef(md)==-1) { m_impl->redefinedBy->inSort(md); @@ -852,7 +854,7 @@ bool MemberDef::isReimplementedBy(ClassDef *cd) const void MemberDef::insertEnumField(MemberDef *md) { makeResident(); - if (m_impl->enumFields==0) m_impl->enumFields=new MemberList(MemberList::enumFields); + if (m_impl->enumFields==0) m_impl->enumFields=new MemberList(MemberListType_enumFields); m_impl->enumFields->append(md); } @@ -1050,7 +1052,7 @@ void MemberDef::_computeLinkableInProject() m_isLinkableCached = 1; // in file (and not in namespace) but file not linkable return; } - if (!protectionLevelVisible(m_impl->prot) && m_impl->mtype!=Friend) + if (!protectionLevelVisible(m_impl->prot) && m_impl->mtype!=MemberType_Friend) { //printf("private and invisible!\n"); m_isLinkableCached = 1; // hidden due to protection @@ -1155,7 +1157,7 @@ void MemberDef::writeLink(OutputList &ol,ClassDef *,NamespaceDef *, } if (!onlyText && isLinkable()) // write link { - if (m_impl->mtype==EnumValue && getGroupDef()==0 && // enum value is not grouped + if (m_impl->mtype==MemberType_EnumValue && getGroupDef()==0 && // enum value is not grouped getEnumScope() && getEnumScope()->getGroupDef()) // but its container is { GroupDef *enumValGroup = getEnumScope()->getGroupDef(); @@ -1294,7 +1296,7 @@ bool MemberDef::isBriefSectionVisible() const // only include members that are non-private unless EXTRACT_PRIVATE is // set to YES or the member is part of a group bool visibleIfPrivate = (protectionLevelVisible(protection()) || - m_impl->mtype==Friend + m_impl->mtype==MemberType_Friend ); // hide member if it overrides a member in a superclass and has no @@ -1344,7 +1346,7 @@ void MemberDef::writeDeclaration(OutputList &ol, // hide enum value, since they appear already as part of the enum, unless they // are explicitly grouped. KEEP_RESIDENT_DURING_CALL; - if (!inGroup && m_impl->mtype==EnumValue) return; + if (!inGroup && m_impl->mtype==MemberType_EnumValue) return; // hide members whose brief section should not be visible //if (!isBriefSectionVisible()) return; @@ -1418,7 +1420,7 @@ void MemberDef::writeDeclaration(OutputList &ol, // *** write type QCString ltype(m_impl->type); - if (m_impl->mtype==Typedef) ltype.prepend("typedef "); + if (m_impl->mtype==MemberType_Typedef) ltype.prepend("typedef "); if (isAlias()) { ltype="using"; @@ -1532,7 +1534,7 @@ void MemberDef::writeDeclaration(OutputList &ol, //printf("Member name=`%s gd=%p md->groupDef=%p inGroup=%d isLinkable()=%d\n",name().data(),gd,getGroupDef(),inGroup,isLinkable()); if (!(name().isEmpty() || name().at(0)=='@') && // name valid (hasDocumentation() || isReference()) && // has docs - !(m_impl->prot==Private && !Config_getBool("EXTRACT_PRIVATE") && m_impl->mtype!=Friend) && // hidden due to protection + !(m_impl->prot==Private && !Config_getBool("EXTRACT_PRIVATE") && m_impl->mtype!=MemberType_Friend) && // hidden due to protection !(isStatic() && m_impl->classDef==0 && !Config_getBool("EXTRACT_STATIC")) // hidden due to static-ness ) { @@ -1587,14 +1589,14 @@ void MemberDef::writeDeclaration(OutputList &ol, //static bool separateMemPages = Config_getBool("SEPARATE_MEMBER_PAGES"); //QCString cfname = getOutputFileBase(); //QCString cfiname = d->getOutputFileBase(); - //Doxygen::indexList.addIndexItem( + //Doxygen::indexList->addIndexItem( // cname, // level1 // name(), // level2 // separateMemPages ? cfname : cfiname, // contRef // cfname, // memRef // anchor(), // anchor // this); // memberdef - Doxygen::indexList.addIndexItem(d,this); + Doxygen::indexList->addIndexItem(d,this); } // *** write arguments @@ -1769,9 +1771,9 @@ bool MemberDef::isDetailedSectionLinkable() const // has inbody docs !inbodyDocumentation().isEmpty() || // is an enum with values that are documented - (m_impl->mtype==Enumeration && m_impl->docEnumValues) || + (m_impl->mtype==MemberType_Enumeration && m_impl->docEnumValues) || // is documented enum value - (m_impl->mtype==EnumValue && !briefDescription().isEmpty()) || + (m_impl->mtype==MemberType_EnumValue && !briefDescription().isEmpty()) || // has brief description that is part of the detailed description (!briefDescription().isEmpty() && // has brief docs (alwaysDetailedSec && // they are visible in @@ -1794,7 +1796,7 @@ bool MemberDef::isDetailedSectionLinkable() const // only include members that are non-private unless EXTRACT_PRIVATE is // set to YES or the member is part of a group - bool privateFilter = protectionLevelVisible(protection()) || m_impl->mtype==Friend; + bool privateFilter = protectionLevelVisible(protection()) || m_impl->mtype==MemberType_Friend; // member is part of an anonymous scope that is the type of // another member in the list. @@ -2220,14 +2222,14 @@ void MemberDef::_writeEnumValues(OutputList &ol,Definition *container, ol.addIndexItem(fmd->name(),ciname); ol.addIndexItem(ciname,fmd->name()); - //Doxygen::indexList.addIndexItem( + //Doxygen::indexList->addIndexItem( // ciname, // level1 // fmd->name(), // level2 // separateMemPages ? cfname : cfiname, // contRef // cfname, // memRef // fmd->anchor(), // anchor // fmd); // memberdef - Doxygen::indexList.addIndexItem(container,fmd); + Doxygen::indexList->addIndexItem(container,fmd); //ol.writeListItem(); ol.startDescTableTitle(); // this enables emphasis! @@ -2518,7 +2520,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, if (optVhdl) { - VhdlDocGen::writeVHDLTypeDocumentation(this,container,ol); + hasParameterList=VhdlDocGen::writeVHDLTypeDocumentation(this,container,ol); } else { @@ -2617,7 +2619,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, { //printf("md=%s initLines=%d init=`%s'\n",name().data(),initLines,init.data()); ol.startBold(); - if (m_impl->mtype==Define) + if (m_impl->mtype==MemberType_Define) ol.parseText(theTranslator->trDefineValue()); else ol.parseText(theTranslator->trInitialValue()); @@ -2923,7 +2925,7 @@ void MemberDef::writeMemberDocSimple(OutputList &ol, Definition *container) { ol.parseDoc(docFile(),docLine(), getOuterScope()?getOuterScope():container,this, - detailed+"\n",FALSE,FALSE,0,TRUE,FALSE); + detailed+"\n",FALSE,FALSE,0,FALSE,FALSE); } @@ -2935,18 +2937,18 @@ QCString MemberDef::memberTypeName() const makeResident(); switch (m_impl->mtype) { - case Define: return "macro definition"; - case Function: return "function"; - case Variable: return "variable"; - case Typedef: return "typedef"; - case Enumeration: return "enumeration"; - case EnumValue: return "enumvalue"; - case Signal: return "signal"; - case Slot: return "slot"; - case Friend: return "friend"; - case DCOP: return "dcop"; - case Property: return "property"; - case Event: return "event"; + case MemberType_Define: return "macro definition"; + case MemberType_Function: return "function"; + case MemberType_Variable: return "variable"; + case MemberType_Typedef: return "typedef"; + case MemberType_Enumeration: return "enumeration"; + case MemberType_EnumValue: return "enumvalue"; + case MemberType_Signal: return "signal"; + case MemberType_Slot: return "slot"; + case MemberType_Friend: return "friend"; + case MemberType_DCOP: return "dcop"; + case MemberType_Property: return "property"; + case MemberType_Event: return "event"; default: return "unknown"; } } @@ -3012,7 +3014,7 @@ bool MemberDef::hasDocumentation() const { makeResident(); return Definition::hasDocumentation() || - (m_impl->mtype==Enumeration && m_impl->docEnumValues) || // has enum values + (m_impl->mtype==MemberType_Enumeration && m_impl->docEnumValues) || // has enum values (m_impl->defArgList!=0 && m_impl->defArgList->hasDocumentation()); // has doc arguments } @@ -3072,11 +3074,9 @@ static QCString escapeAnchor(const QCString &anchor) } #endif -void MemberDef::setAnchor(const char *a) +void MemberDef::setAnchor() { makeResident(); - //anc=a; - (void)a; QCString memAnchor = name(); if (!m_impl->args.isEmpty()) memAnchor+=m_impl->args; @@ -3343,18 +3343,18 @@ void MemberDef::_writeTagData() Doxygen::tagFile << " <member kind=\""; switch (m_impl->mtype) { - case Define: Doxygen::tagFile << "define"; break; - case EnumValue: Doxygen::tagFile << "enumvalue"; break; - case Property: Doxygen::tagFile << "property"; break; - case Event: Doxygen::tagFile << "event"; break; - case Variable: Doxygen::tagFile << "variable"; break; - case Typedef: Doxygen::tagFile << "typedef"; break; - case Enumeration: Doxygen::tagFile << "enumeration"; break; - case Function: Doxygen::tagFile << "function"; break; - case Signal: Doxygen::tagFile << "signal"; break; - case Friend: Doxygen::tagFile << "friend"; break; - case DCOP: Doxygen::tagFile << "dcop"; break; - case Slot: Doxygen::tagFile << "slot"; break; + case MemberType_Define: Doxygen::tagFile << "define"; break; + case MemberType_EnumValue: Doxygen::tagFile << "enumvalue"; break; + case MemberType_Property: Doxygen::tagFile << "property"; break; + case MemberType_Event: Doxygen::tagFile << "event"; break; + case MemberType_Variable: Doxygen::tagFile << "variable"; break; + case MemberType_Typedef: Doxygen::tagFile << "typedef"; break; + case MemberType_Enumeration: Doxygen::tagFile << "enumeration"; break; + case MemberType_Function: Doxygen::tagFile << "function"; break; + case MemberType_Signal: Doxygen::tagFile << "signal"; break; + case MemberType_Friend: Doxygen::tagFile << "friend"; break; + case MemberType_DCOP: Doxygen::tagFile << "dcop"; break; + case MemberType_Slot: Doxygen::tagFile << "slot"; break; } if (m_impl->prot!=Public) { @@ -3899,7 +3899,7 @@ Protection MemberDef::protection() const return m_impl->prot; } -MemberDef::MemberType MemberDef::memberType() const +MemberType MemberDef::memberType() const { makeResident(); return m_impl->mtype; @@ -3908,79 +3908,79 @@ MemberDef::MemberType MemberDef::memberType() const bool MemberDef::isSignal() const { makeResident(); - return m_impl->mtype==Signal; + return m_impl->mtype==MemberType_Signal; } bool MemberDef::isSlot() const { makeResident(); - return m_impl->mtype==Slot; + return m_impl->mtype==MemberType_Slot; } bool MemberDef::isVariable() const { makeResident(); - return m_impl->mtype==Variable; + return m_impl->mtype==MemberType_Variable; } bool MemberDef::isEnumerate() const { makeResident(); - return m_impl->mtype==Enumeration; + return m_impl->mtype==MemberType_Enumeration; } bool MemberDef::isEnumValue() const { makeResident(); - return m_impl->mtype==EnumValue; + return m_impl->mtype==MemberType_EnumValue; } bool MemberDef::isTypedef() const { makeResident(); - return m_impl->mtype==Typedef; + return m_impl->mtype==MemberType_Typedef; } bool MemberDef::isFunction() const { makeResident(); - return m_impl->mtype==Function; + return m_impl->mtype==MemberType_Function; } bool MemberDef::isFunctionPtr() const { makeResident(); - return m_impl->mtype==Variable && QCString(argsString()).find(")(")!=-1; + return m_impl->mtype==MemberType_Variable && QCString(argsString()).find(")(")!=-1; } bool MemberDef::isDefine() const { makeResident(); - return m_impl->mtype==Define; + return m_impl->mtype==MemberType_Define; } bool MemberDef::isFriend() const { makeResident(); - return m_impl->mtype==Friend; + return m_impl->mtype==MemberType_Friend; } bool MemberDef::isDCOP() const { makeResident(); - return m_impl->mtype==DCOP; + return m_impl->mtype==MemberType_DCOP; } bool MemberDef::isProperty() const { makeResident(); - return m_impl->mtype==Property; + return m_impl->mtype==MemberType_Property; } bool MemberDef::isEvent() const { makeResident(); - return m_impl->mtype==Event; + return m_impl->mtype==MemberType_Event; } bool MemberDef::isRelated() const @@ -4835,7 +4835,7 @@ void MemberDef::loadFromDisk() const m_impl->extraTypeChars = unmarshalQCString (Doxygen::symbolStorage); m_impl->initLines = unmarshalInt (Doxygen::symbolStorage); m_impl->memSpec = unmarshalInt (Doxygen::symbolStorage); - m_impl->mtype = (MemberDef::MemberType)unmarshalInt (Doxygen::symbolStorage); + m_impl->mtype = (MemberType)unmarshalInt (Doxygen::symbolStorage); m_impl->maxInitLines = unmarshalInt (Doxygen::symbolStorage); m_impl->userInitLines = unmarshalInt (Doxygen::symbolStorage); m_impl->annMemb = (MemberDef*)unmarshalObjPointer (Doxygen::symbolStorage); @@ -4969,6 +4969,8 @@ void MemberDef::unlock() const } } +//---------------- + QCString MemberDef::displayName(bool) const { return Definition::name(); diff --git a/src/memberdef.h b/src/memberdef.h index e1db828..8727302 100644 --- a/src/memberdef.h +++ b/src/memberdef.h @@ -18,14 +18,11 @@ #ifndef MEMBERDEF_H #define MEMBERDEF_H -#include "qtbc.h" #include <qlist.h> -#include <qdict.h> -#include <qstack.h> +#include <sys/types.h> #include "types.h" #include "definition.h" -#include "sortdict.h" class ClassDef; class NamespaceDef; @@ -39,27 +36,14 @@ class GroupDef; class QTextStream; class ArgumentList; class MemberDefImpl; +class QStrList; +struct TagInfo; /** A model of a class/file/namespace member symbol. */ class MemberDef : public Definition { public: - enum MemberType { - Define, - Function, - Variable, - Typedef, - Enumeration, - EnumValue, - Signal, - Slot, - Friend, - DCOP, - Property, - Event - }; - MemberDef(const char *defFileName,int defLine, const char *type,const char *name,const char *args, const char *excp,Protection prot,Specifier virt,bool stat, @@ -254,7 +238,7 @@ class MemberDef : public Definition void setMemberType(MemberType t); void setDefinition(const char *d); void setFileDef(FileDef *fd); - void setAnchor(const char *a); + void setAnchor(); void setProtection(Protection p); void setMemberSpecifiers(int s); void mergeMemberSpecifiers(int s); @@ -363,14 +347,13 @@ class MemberDef : public Definition bool inGroup,bool showEnumValues=FALSE,bool showInline=FALSE); void writeMemberDocSimple(OutputList &ol,Definition *container); + void writeEnumDeclaration(OutputList &typeDecl, + ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd); void warnIfUndocumented(); MemberDef *createTemplateInstanceMember(ArgumentList *formalArgs, ArgumentList *actualArgs); - void writeEnumDeclaration(OutputList &typeDecl, - ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd); - void findSectionsInDocumentation(); bool visited; diff --git a/src/membergroup.cpp b/src/membergroup.cpp index 34253eb..e7ce2b5 100644 --- a/src/membergroup.cpp +++ b/src/membergroup.cpp @@ -15,7 +15,6 @@ * */ -#include "qtbc.h" #include "membergroup.h" #include "memberlist.h" #include "outputlist.h" @@ -46,7 +45,7 @@ MemberGroup::MemberGroup(Definition *parent, int id,const char *hdr,const char *d,const char *docFile) { //printf("New member group id=%d header=%s desc=%s\n",id,hdr,d); - memberList = new MemberList(MemberList::memberGroup); + memberList = new MemberList(MemberListType_memberGroup); grpId = id; grpHeader = hdr; doc = d; @@ -101,9 +100,9 @@ void MemberGroup::insertMember(MemberDef *md) } -void MemberGroup::setAnchors(ClassDef *context) +void MemberGroup::setAnchors() { - ::setAnchors(context,'z',memberList,grpId); + ::setAnchors(memberList); } void MemberGroup::writeDeclarations(OutputList &ol, @@ -138,7 +137,7 @@ void MemberGroup::writeDocumentationPage(OutputList &ol,const char *scopeName, } void MemberGroup::addGroupedInheritedMembers(OutputList &ol,ClassDef *cd, - MemberList::ListType lt, + MemberListType lt, ClassDef *inheritedFrom,const QCString &inheritId) { //printf("** addGroupedInheritedMembers()\n"); @@ -156,7 +155,7 @@ void MemberGroup::addGroupedInheritedMembers(OutputList &ol,ClassDef *cd, } } -int MemberGroup::countGroupedInheritedMembers(MemberList::ListType lt) +int MemberGroup::countGroupedInheritedMembers(MemberListType lt) { //printf("** countGroupedInheritedMembers()\n"); int count=0; diff --git a/src/membergroup.h b/src/membergroup.h index 6f0aa43..84b7d32 100644 --- a/src/membergroup.h +++ b/src/membergroup.h @@ -18,14 +18,13 @@ #ifndef MEMBERGROUP_H #define MEMBERGROUP_H -#include "qtbc.h" #include <qlist.h> -#include <qfile.h> #include "sortdict.h" -#include "memberlist.h" +#include "types.h" #define DOX_NOGROUP -1 +class MemberList; class MemberDef; class ClassDef; class NamespaceDef; @@ -47,7 +46,7 @@ class MemberGroup QCString header() const { return grpHeader; } int groupId() const { return grpId; } void insertMember(MemberDef *md); - void setAnchors(ClassDef *); + void setAnchors(); void writePlainDeclarations(OutputList &ol, ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, ClassDef *inheritedFrom,const char *inheritId); @@ -59,7 +58,7 @@ class MemberGroup void writeDocumentationPage(OutputList &ol,const char *scopeName, Definition *container); void addGroupedInheritedMembers(OutputList &ol,ClassDef *cd, - MemberList::ListType lt, + MemberListType lt, ClassDef *inheritedFrom,const QCString &inheritId); QCString documentation() { return doc; } @@ -67,7 +66,7 @@ class MemberGroup void addToDeclarationSection(); int countDecMembers(GroupDef *gd=0); int countDocMembers(); - int countGroupedInheritedMembers(MemberList::ListType lt); + int countGroupedInheritedMembers(MemberListType lt); void distributeMemberGroupDocumentation(); void findSectionsInDocumentation(); int varCount() const; @@ -126,7 +125,7 @@ class MemberGroupSDict : public SIntDict<MemberGroup> public: MemberGroupSDict(int size=17) : SIntDict<MemberGroup>(size) {} ~MemberGroupSDict() {} - int compareItems(GCI item1,GCI item2) + int compareItems(QCollection::Item item1,QCollection::Item item2) { return ((MemberGroup *)item1)->groupId() - ((MemberGroup*)item2)->groupId(); } diff --git a/src/memberlist.cpp b/src/memberlist.cpp index 2810be2..5a36ef8 100644 --- a/src/memberlist.cpp +++ b/src/memberlist.cpp @@ -27,6 +27,10 @@ #include "groupdef.h" #include "marshal.h" #include "vhdldocgen.h" +#include "namespacedef.h" +#include "filedef.h" +#include "membergroup.h" +#include "config.h" MemberList::MemberList() { @@ -35,7 +39,7 @@ MemberList::MemberList() m_numDocMembers=-1; // special value indicating that value needs to be computed } -MemberList::MemberList(ListType lt) : m_listType(lt) +MemberList::MemberList(MemberListType lt) : m_listType(lt) { memberGroupList=0; m_numDecMembers=-1; // special value indicating that value needs to be computed @@ -50,7 +54,7 @@ MemberList::~MemberList() delete memberGroupList; } -int MemberList::compareItems(GCI item1, GCI item2) +int MemberList::compareItems(QCollection::Item item1, QCollection::Item item2) { static bool sortConstructorsFirst = Config_getBool("SORT_MEMBERS_CTORS_1ST"); MemberDef *c1=(MemberDef *)item1; @@ -76,13 +80,13 @@ int MemberList::countInheritableMembers(ClassDef *inheritedFrom) const { if (md->isBriefSectionVisible()) { - if (md->memberType()!=MemberDef::Friend && - md->memberType()!=MemberDef::EnumValue) + if (md->memberType()!=MemberType_Friend && + md->memberType()!=MemberType_EnumValue) { //printf("member %s: isReimplementedBy(%s)=%d\n",md->name().data(), // inheritedFrom->name().data(), // md->isReimplementedBy(inheritedFrom)); - if (md->memberType()==MemberDef::Function) + if (md->memberType()==MemberType_Function) { if (!md->isReimplementedBy(inheritedFrom)) count++; } @@ -128,29 +132,29 @@ void MemberList::countDecMembers(bool countEnumValues,GroupDef *gd) { switch(md->memberType()) { - case MemberDef::Variable: // fall through - case MemberDef::Event: // fall through - case MemberDef::Property: m_varCnt++,m_numDecMembers++; + case MemberType_Variable: // fall through + case MemberType_Event: // fall through + case MemberType_Property: m_varCnt++,m_numDecMembers++; break; - case MemberDef::Function: // fall through - case MemberDef::Signal: // fall through - case MemberDef::DCOP: // fall through - case MemberDef::Slot: if (!md->isRelated() || md->getClassDef()) + case MemberType_Function: // fall through + case MemberType_Signal: // fall through + case MemberType_DCOP: // fall through + case MemberType_Slot: if (!md->isRelated() || md->getClassDef()) m_funcCnt++,m_numDecMembers++; break; - case MemberDef::Enumeration: m_enumCnt++,m_numDecMembers++; break; - case MemberDef::EnumValue: if (countEnumValues) + case MemberType_Enumeration: m_enumCnt++,m_numDecMembers++; break; + case MemberType_EnumValue: if (countEnumValues) m_enumValCnt++,m_numDecMembers++; break; - case MemberDef::Typedef: m_typeCnt++,m_numDecMembers++; break; - //case MemberDef::Prototype: m_protoCnt++,m_numDecMembers++; break; - case MemberDef::Define: if (Config_getBool("EXTRACT_ALL") || + case MemberType_Typedef: m_typeCnt++,m_numDecMembers++; break; + //case MemberType_Prototype: m_protoCnt++,m_numDecMembers++; break; + case MemberType_Define: if (Config_getBool("EXTRACT_ALL") || md->argsString() || !md->initializer().isEmpty() || md->hasDocumentation() ) m_defCnt++,m_numDecMembers++; break; - case MemberDef::Friend: m_friendCnt++,m_numDecMembers++; + case MemberType_Friend: m_friendCnt++,m_numDecMembers++; break; default: err("Error: Unknown member type found for member `%s'\n!",md->name().data()); @@ -191,7 +195,7 @@ void MemberList::countDocMembers(bool countEnumValues) if (md->isDetailedSectionVisible(m_inGroup,m_inFile)) { // do not count enum values, since they do not produce entries of their own - if (countEnumValues || md->memberType()!=MemberDef::EnumValue) + if (countEnumValues || md->memberType()!=MemberType_EnumValue) m_numDocMembers++; } } @@ -238,17 +242,17 @@ bool MemberList::declVisible() const { switch (md->memberType()) { - case MemberDef::Define: // fall through - case MemberDef::Typedef: // fall through - case MemberDef::Variable: // fall through - case MemberDef::Function: // fall through - case MemberDef::Signal: // fall through - case MemberDef::Slot: // fall through - case MemberDef::DCOP: // fall through - case MemberDef::Property: // fall through - case MemberDef::Event: + case MemberType_Define: // fall through + case MemberType_Typedef: // fall through + case MemberType_Variable: // fall through + case MemberType_Function: // fall through + case MemberType_Signal: // fall through + case MemberType_Slot: // fall through + case MemberType_DCOP: // fall through + case MemberType_Property: // fall through + case MemberType_Event: return TRUE; - case MemberDef::Enumeration: + case MemberType_Enumeration: { int enumVars=0; MemberListIterator vmli(*this); @@ -275,9 +279,9 @@ bool MemberList::declVisible() const } } break; - case MemberDef::Friend: + case MemberType_Friend: return TRUE; - case MemberDef::EnumValue: + case MemberType_EnumValue: { if (m_inGroup) { @@ -320,22 +324,22 @@ void MemberList::writePlainDeclarations(OutputList &ol, { switch(md->memberType()) { - case MemberDef::Define: // fall through - //case MemberDef::Prototype: // fall through - case MemberDef::Typedef: // fall through - case MemberDef::Variable: // fall through - case MemberDef::Function: // fall through - case MemberDef::Signal: // fall through - case MemberDef::Slot: // fall through - case MemberDef::DCOP: // fall through - case MemberDef::Property: // fall through - case MemberDef::Event: + case MemberType_Define: // fall through + //case MemberType_Prototype: // fall through + case MemberType_Typedef: // fall through + case MemberType_Variable: // fall through + case MemberType_Function: // fall through + case MemberType_Signal: // fall through + case MemberType_Slot: // fall through + case MemberType_DCOP: // fall through + case MemberType_Property: // fall through + case MemberType_Event: { if (first) ol.startMemberList(),first=FALSE; md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,inheritedFrom,inheritId); break; } - case MemberDef::Enumeration: + case MemberType_Enumeration: { int enumVars=0; MemberListIterator vmli(*this); @@ -397,7 +401,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, md->warnIfUndocumented(); break; } - case MemberDef::Friend: + case MemberType_Friend: if (inheritedFrom==0) { if (first) @@ -408,7 +412,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,inheritedFrom,inheritId); break; } - case MemberDef::EnumValue: + case MemberType_EnumValue: { if (m_inGroup) { @@ -744,7 +748,7 @@ void MemberList::addListReferences(Definition *def) { md->addListReference(def); LockingPtr<MemberList> enumFields = md->enumFieldList(); - if (md->memberType()==MemberDef::Enumeration && enumFields!=0) + if (md->memberType()==MemberType_Enumeration && enumFields!=0) { //printf(" Adding enum values!\n"); MemberListIterator vmli(*enumFields); @@ -821,7 +825,7 @@ void MemberList::marshal(StorageIntf *s) void MemberList::unmarshal(StorageIntf *s) { - m_listType = (MemberList::ListType)unmarshalInt(s); + m_listType = (MemberListType)unmarshalInt(s); m_varCnt = unmarshalInt(s); m_funcCnt = unmarshalInt(s); m_enumCnt = unmarshalInt(s); @@ -856,51 +860,51 @@ QCString MemberList::listTypeAsString() const { switch(m_listType) { - case pubMethods: return "pub-methods"; - case proMethods: return "pro-methods"; - case pacMethods: return "pac-methods"; - case priMethods: return "pri-methods"; - case pubStaticMethods: return "pub-static-methods"; - case proStaticMethods: return "pro-static-methods"; - case pacStaticMethods: return "pac-static-methods"; - case priStaticMethods: return "pri-static-methods"; - case pubSlots: return "pub-slots"; - case proSlots: return "pro-slots"; - case priSlots: return "pri-slots"; - case pubAttribs: return "pub-attribs"; - case proAttribs: return "pro-attribs"; - case pacAttribs: return "pac-attribs"; - case priAttribs: return "pri-attribs"; - case pubStaticAttribs: return "pub-static-attribs"; - case proStaticAttribs: return "pro-static-attribs"; - case pacStaticAttribs: return "pac-static-attribs"; - case priStaticAttribs: return "pri-static-attribs"; - case pubTypes: return "pub-types"; - case proTypes: return "pro-types"; - case pacTypes: return "pac-types"; - case priTypes: return "pri-types"; - case related: return "related"; - case signals: return "signals"; - case friends: return "friends"; - case dcopMethods: return "dcop-methods"; - case properties: return "properties"; - case events: return "events"; - case decDefineMembers: return "define-members"; - case decProtoMembers: return "proto-members"; - case decTypedefMembers: return "typedef-members"; - case decEnumMembers: return "enum-members"; - case decFuncMembers: return "func-members"; - case decVarMembers: return "var-members"; - case decEnumValMembers: return "enumval-members"; - case decPubSlotMembers: return "pub-slot-members"; - case decProSlotMembers: return "pro-slot-members"; - case decPriSlotMembers: return "pri-slot-members"; - case decSignalMembers: return "signal-members"; - case decEventMembers: return "event-members"; - case decFriendMembers: return "friend-members"; - case decPropMembers: return "prop-members"; - case enumFields: return "enum-fields"; - case memberGroup: return "member-group"; + case MemberListType_pubMethods: return "pub-methods"; + case MemberListType_proMethods: return "pro-methods"; + case MemberListType_pacMethods: return "pac-methods"; + case MemberListType_priMethods: return "pri-methods"; + case MemberListType_pubStaticMethods: return "pub-static-methods"; + case MemberListType_proStaticMethods: return "pro-static-methods"; + case MemberListType_pacStaticMethods: return "pac-static-methods"; + case MemberListType_priStaticMethods: return "pri-static-methods"; + case MemberListType_pubSlots: return "pub-slots"; + case MemberListType_proSlots: return "pro-slots"; + case MemberListType_priSlots: return "pri-slots"; + case MemberListType_pubAttribs: return "pub-attribs"; + case MemberListType_proAttribs: return "pro-attribs"; + case MemberListType_pacAttribs: return "pac-attribs"; + case MemberListType_priAttribs: return "pri-attribs"; + case MemberListType_pubStaticAttribs: return "pub-static-attribs"; + case MemberListType_proStaticAttribs: return "pro-static-attribs"; + case MemberListType_pacStaticAttribs: return "pac-static-attribs"; + case MemberListType_priStaticAttribs: return "pri-static-attribs"; + case MemberListType_pubTypes: return "pub-types"; + case MemberListType_proTypes: return "pro-types"; + case MemberListType_pacTypes: return "pac-types"; + case MemberListType_priTypes: return "pri-types"; + case MemberListType_related: return "related"; + case MemberListType_signals: return "signals"; + case MemberListType_friends: return "friends"; + case MemberListType_dcopMethods: return "dcop-methods"; + case MemberListType_properties: return "properties"; + case MemberListType_events: return "events"; + case MemberListType_decDefineMembers: return "define-members"; + case MemberListType_decProtoMembers: return "proto-members"; + case MemberListType_decTypedefMembers: return "typedef-members"; + case MemberListType_decEnumMembers: return "enum-members"; + case MemberListType_decFuncMembers: return "func-members"; + case MemberListType_decVarMembers: return "var-members"; + case MemberListType_decEnumValMembers: return "enumval-members"; + case MemberListType_decPubSlotMembers: return "pub-slot-members"; + case MemberListType_decProSlotMembers: return "pro-slot-members"; + case MemberListType_decPriSlotMembers: return "pri-slot-members"; + case MemberListType_decSignalMembers: return "signal-members"; + case MemberListType_decEventMembers: return "event-members"; + case MemberListType_decFriendMembers: return "friend-members"; + case MemberListType_decPropMembers: return "prop-members"; + case MemberListType_enumFields: return "enum-fields"; + case MemberListType_memberGroup: return "member-group"; default: break; } return ""; @@ -913,7 +917,7 @@ void MemberList::setNeedsSorting(bool b) //-------------------------------------------------------------------------- -int MemberSDict::compareItems(GCI item1, GCI item2) +int MemberSDict::compareItems(QCollection::Item item1, QCollection::Item item2) { // NOTE: this function can be triggered from unmarshalMemberSDict // so it may not result in called to MemberDef::makeResident(). diff --git a/src/memberlist.h b/src/memberlist.h index 2c46f02..a047300 100644 --- a/src/memberlist.h +++ b/src/memberlist.h @@ -21,6 +21,7 @@ #include <qlist.h> #include "memberdef.h" #include "sortdict.h" +#include "types.h" class GroupDef; class MemberGroup; @@ -31,99 +32,15 @@ class StorageIntf; class MemberList : public QList<MemberDef> { public: - enum ListType - { - privateLists = 0x0800, - detailedLists = 0x1000, - declarationLists = 0x2000, - documentationLists = 0x4000, - - pubMethods = 0, - proMethods = 1, - pacMethods = 2, - priMethods = 3 + privateLists, - pubStaticMethods = 4, - proStaticMethods = 5, - pacStaticMethods = 6, - priStaticMethods = 7 + privateLists, - pubSlots = 8, - proSlots = 9, - priSlots = 10 + privateLists, - pubAttribs = 11, - proAttribs = 12, - pacAttribs = 13, - priAttribs = 14 + privateLists, - pubStaticAttribs = 15, - proStaticAttribs = 16, - pacStaticAttribs = 17, - priStaticAttribs = 18 + privateLists, - pubTypes = 19, - proTypes = 20, - pacTypes = 21, - priTypes = 22 + privateLists, - related = 23, - signals = 24, - friends = 25, - dcopMethods = 26, - properties = 27, - events = 28, - - typedefMembers = 29 + detailedLists, - enumMembers = 30 + detailedLists, - enumValMembers = 31 + detailedLists, - functionMembers = 32 + detailedLists, - relatedMembers = 33 + detailedLists, - variableMembers = 34 + detailedLists, - propertyMembers = 35 + detailedLists, - eventMembers = 36 + detailedLists, - constructors = 37 + detailedLists, - - allMembersList = 38, - - decDefineMembers = 39 + declarationLists, - decProtoMembers = 40 + declarationLists, - decTypedefMembers = 41 + declarationLists, - decEnumMembers = 42 + declarationLists, - decFuncMembers = 43 + declarationLists, - decVarMembers = 44 + declarationLists, - decEnumValMembers = 45 + declarationLists, - decPubSlotMembers = 46 + declarationLists, - decProSlotMembers = 47 + declarationLists, - decPriSlotMembers = 48 + declarationLists, - decSignalMembers = 49 + declarationLists, - decEventMembers = 50 + declarationLists, - decFriendMembers = 51 + declarationLists, - decPropMembers = 52 + declarationLists, - - docDefineMembers = 53 + documentationLists, - docProtoMembers = 54 + documentationLists, - docTypedefMembers = 55 + documentationLists, - docEnumMembers = 56 + documentationLists, - docFuncMembers = 57 + documentationLists, - docVarMembers = 58 + documentationLists, - docEnumValMembers = 59 + documentationLists, - docPubSlotMembers = 60 + documentationLists, - docProSlotMembers = 61 + documentationLists, - docPriSlotMembers = 62 + documentationLists, - docSignalMembers = 63 + documentationLists, - docEventMembers = 64 + documentationLists, - docFriendMembers = 65 + documentationLists, - docPropMembers = 66 + documentationLists, - - redefinedBy = 67, - enumFields = 68, - memberGroup = 69 - }; - MemberList(); - MemberList(ListType lt); + MemberList(MemberListType lt); ~MemberList(); - ListType listType() const { return m_listType; } + MemberListType listType() const { return m_listType; } QCString listTypeAsString() const; bool insert(uint index,const MemberDef *md); void inSort(const MemberDef *md); void append(const MemberDef *md); - int compareItems(GCI item1,GCI item2); + int compareItems(QCollection::Item item1,QCollection::Item item2); int varCount() const { ASSERT(m_numDecMembers!=-1); return m_varCnt; } int funcCount() const { ASSERT(m_numDecMembers!=-1); return m_funcCnt; } int enumCount() const { ASSERT(m_numDecMembers!=-1); return m_enumCnt; } @@ -177,7 +94,7 @@ class MemberList : public QList<MemberDef> MemberGroupList *memberGroupList; bool m_inGroup; // is this list part of a group definition bool m_inFile; // is this list part of a file definition - ListType m_listType; + MemberListType m_listType; bool m_needsSorting; }; @@ -203,7 +120,7 @@ class MemberSDict : public SDict<MemberDef> public: MemberSDict(int size=17) : SDict<MemberDef>(size) {} virtual ~MemberSDict() {} - int compareItems(GCI item1,GCI item2); + int compareItems(QCollection::Item item1,QCollection::Item item2); }; diff --git a/src/membername.cpp b/src/membername.cpp index 506313e..324db7f 100644 --- a/src/membername.cpp +++ b/src/membername.cpp @@ -30,7 +30,7 @@ MemberName::~MemberName() { } -int MemberName::compareItems(GCI item1, GCI item2) +int MemberName::compareItems(QCollection::Item item1, QCollection::Item item2) { MemberDef *m1=(MemberDef *)item1; MemberDef *m2=(MemberDef *)item2; @@ -52,7 +52,7 @@ MemberNameInfo::MemberNameInfo(const char *n) : QList<MemberInfo>() setAutoDelete(TRUE); } -int MemberNameInfo::compareItems(GCI item1, GCI item2) +int MemberNameInfo::compareItems(QCollection::Item item1, QCollection::Item item2) { MemberInfo *m1=(MemberInfo *)item1; MemberInfo *m2=(MemberInfo *)item2; @@ -72,7 +72,7 @@ MemberNameIterator::MemberNameIterator(const MemberName &mnlist) : { } -int MemberNameSDict::compareItems(GCI item1, GCI item2) +int MemberNameSDict::compareItems(QCollection::Item item1, QCollection::Item item2) { MemberName *n1=(MemberName *)item1; MemberName *n2=(MemberName *)item2; diff --git a/src/membername.h b/src/membername.h index 68a5293..2abcbf3 100644 --- a/src/membername.h +++ b/src/membername.h @@ -30,7 +30,7 @@ class MemberName : public QList<MemberDef> ~MemberName(); const char *memberName() const { return name; } - int compareItems(GCI item1,GCI item2); + int compareItems(QCollection::Item item1,QCollection::Item item2); private: QCString name; }; @@ -49,7 +49,7 @@ class MemberNameSDict : public SDict<MemberName> MemberNameSDict(int size) : SDict<MemberName>(size) {} ~MemberNameSDict() {} - int compareItems(GCI item1,GCI item2); + int compareItems(QCollection::Item item1,QCollection::Item item2); }; /** Data associated with a MemberDef in an inheritance relation. */ @@ -74,7 +74,7 @@ class MemberNameInfo : public QList<MemberInfo> MemberNameInfo(const char *name); ~MemberNameInfo() {} const char *memberName() const { return name; } - int compareItems(GCI item1,GCI item2); + int compareItems(QCollection::Item item1,QCollection::Item item2); private: QCString name; }; @@ -93,7 +93,7 @@ class MemberNameInfoSDict : public SDict<MemberNameInfo> public: MemberNameInfoSDict(int size) : SDict<MemberNameInfo>(size) {} ~MemberNameInfoSDict() {} - int compareItems(GCI item1,GCI item2) + int compareItems(QCollection::Item item1,QCollection::Item item2) { return stricmp( ((MemberNameInfo *)item1)->memberName(), ((MemberNameInfo *)item2)->memberName() diff --git a/src/message.cpp b/src/message.cpp index 5a452cc..ed438bb 100644 --- a/src/message.cpp +++ b/src/message.cpp @@ -23,6 +23,7 @@ #include "debug.h" #include "doxygen.h" #include "portable.h" +#include "filedef.h" static QCString outputFormat; //static int warnFormatOrder; // 1 = $file,$line,$text diff --git a/src/msc.cpp b/src/msc.cpp index 51875ba..fadbc0c 100644 --- a/src/msc.cpp +++ b/src/msc.cpp @@ -21,7 +21,9 @@ #include "message.h" #include "docparser.h" #include "doxygen.h" +#include "util.h" +#include <qtextstream.h> #include <qdir.h> static const int maxCmdLine = 40960; @@ -94,7 +96,7 @@ void writeMscGraphFromFile(const char *inFile,const char *outDir, absOutFile+=outFile; // chdir to the output dir, so dot can find the font file. - QCString oldDir = convertToQCString(QDir::currentDirPath()); + QCString oldDir = QDir::currentDirPath().utf8(); // go to the html output directory (i.e. path) QDir::setCurrent(outDir); //printf("Going to dir %s\n",QDir::currentDirPath().data()); @@ -151,7 +153,7 @@ QCString getMscImageMapFromFile(const QCString& inFile, const QCString& outDir, //printf("*** running:getMscImageMapFromFile \n"); // chdir to the output dir, so dot can find the font file. - QCString oldDir = convertToQCString(QDir::currentDirPath()); + QCString oldDir = QDir::currentDirPath().utf8(); // go to the html output directory (i.e. path) QDir::setCurrent(outDir); //printf("Going to dir %s\n",QDir::currentDirPath().data()); @@ -18,8 +18,7 @@ #ifndef _MSC_H #define _MSC_H -#include "qtbc.h" - +class QCString; class FTextStream; enum MscOutputFormat { MSC_BITMAP , MSC_EPS }; diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index 0bb63a7..c57c7ca 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -15,7 +15,6 @@ * */ -#include "qtbc.h" #include "namespacedef.h" #include "outputlist.h" #include "util.h" @@ -29,6 +28,8 @@ #include "searchindex.h" #include "vhdldocgen.h" #include "layout.h" +#include "membergroup.h" +#include "config.h" //------------------------------------------------------------------ @@ -67,6 +68,7 @@ NamespaceDef::~NamespaceDef() delete usingDirList; delete usingDeclList; delete memberGroupSDict; + delete m_allMembersDict; } void NamespaceDef::distributeMemberGroupDocumentation() @@ -92,7 +94,7 @@ void NamespaceDef::findSectionsInDocumentation() MemberList *ml; for (mli.toFirst();(ml=mli.current());++mli) { - if (ml->listType()&MemberList::declarationLists) + if (ml->listType()&MemberListType_declarationLists) { ml->findSectionsInDocumentation(); } @@ -152,7 +154,7 @@ void NamespaceDef::addMembersToMemberGroup() MemberList *ml; for (mli.toFirst();(ml=mli.current());++mli) { - if (ml->listType()&MemberList::declarationLists) + if (ml->listType()&MemberListType_declarationLists) { ::addMembersToMemberGroup(ml,&memberGroupSDict,this); } @@ -177,10 +179,10 @@ void NamespaceDef::addMembersToMemberGroup() void NamespaceDef::insertMember(MemberDef *md) { if (md->isHidden()) return; - MemberList *allMemberList = getMemberList(MemberList::allMembersList); + MemberList *allMemberList = getMemberList(MemberListType_allMembersList); if (allMemberList==0) { - allMemberList = new MemberList(MemberList::allMembersList); + allMemberList = new MemberList(MemberListType_allMembersList); m_memberLists.append(allMemberList); } allMemberList->append(md); @@ -194,27 +196,27 @@ void NamespaceDef::insertMember(MemberDef *md) //static bool sortBriefDocs=Config_getBool("SORT_BRIEF_DOCS"); switch(md->memberType()) { - case MemberDef::Variable: - addMemberToList(MemberList::decVarMembers,md); - addMemberToList(MemberList::docVarMembers,md); + case MemberType_Variable: + addMemberToList(MemberListType_decVarMembers,md); + addMemberToList(MemberListType_docVarMembers,md); break; - case MemberDef::Function: - addMemberToList(MemberList::decFuncMembers,md); - addMemberToList(MemberList::docFuncMembers,md); + case MemberType_Function: + addMemberToList(MemberListType_decFuncMembers,md); + addMemberToList(MemberListType_docFuncMembers,md); break; - case MemberDef::Typedef: - addMemberToList(MemberList::decTypedefMembers,md); - addMemberToList(MemberList::docTypedefMembers,md); + case MemberType_Typedef: + addMemberToList(MemberListType_decTypedefMembers,md); + addMemberToList(MemberListType_docTypedefMembers,md); break; - case MemberDef::Enumeration: - addMemberToList(MemberList::decEnumMembers,md); - addMemberToList(MemberList::docEnumMembers,md); + case MemberType_Enumeration: + addMemberToList(MemberListType_decEnumMembers,md); + addMemberToList(MemberListType_docEnumMembers,md); break; - case MemberDef::EnumValue: + case MemberType_EnumValue: break; - case MemberDef::Define: - addMemberToList(MemberList::decDefineMembers,md); - addMemberToList(MemberList::docDefineMembers,md); + case MemberType_Define: + addMemberToList(MemberListType_decDefineMembers,md); + addMemberToList(MemberListType_docDefineMembers,md); break; default: err("NamespaceDef::insertMembers(): " @@ -227,8 +229,8 @@ void NamespaceDef::insertMember(MemberDef *md) void NamespaceDef::computeAnchors() { - MemberList *allMemberList = getMemberList(MemberList::allMembersList); - if (allMemberList) setAnchors(0,'a',allMemberList); + MemberList *allMemberList = getMemberList(MemberListType_allMembersList); + if (allMemberList) setAnchors(allMemberList); } void NamespaceDef::writeDetailedDescription(OutputList &ol,const QCString &title) @@ -470,7 +472,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl; } - Doxygen::indexList.addIndexItem(this,0); + Doxygen::indexList->addIndexItem(this,0); //---------------------------------------- start flexible part ------------------------------- @@ -580,7 +582,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) if (Config_getBool("SEPARATE_MEMBER_PAGES")) { - MemberList *allMemberList = getMemberList(MemberList::allMembersList); + MemberList *allMemberList = getMemberList(MemberListType_allMembersList); if (allMemberList) allMemberList->sort(); writeMemberPages(ol); } @@ -595,7 +597,7 @@ void NamespaceDef::writeMemberPages(OutputList &ol) MemberList *ml; for (mli.toFirst();(ml=mli.current());++mli) { - if (ml->listType()&MemberList::documentationLists) + if (ml->listType()&MemberListType_documentationLists) { ml->writeDocumentationPage(ol,displayName(),this); } @@ -610,7 +612,7 @@ void NamespaceDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) co ol.writeString(" <div class=\"navtab\">\n"); ol.writeString(" <table>\n"); - MemberList *allMemberList = getMemberList(MemberList::allMembersList); + MemberList *allMemberList = getMemberList(MemberListType_allMembersList); if (allMemberList) { MemberListIterator mli(*allMemberList); @@ -648,7 +650,7 @@ void NamespaceDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) co int NamespaceDef::countMembers() { - MemberList *allMemberList = getMemberList(MemberList::allMembersList); + MemberList *allMemberList = getMemberList(MemberListType_allMembersList); if (allMemberList) allMemberList->countDocMembers(); return (allMemberList ? allMemberList->numDocMembers() : 0)+classSDict->count(); } @@ -738,7 +740,7 @@ void NamespaceDef::addListReferences() MemberList *ml; for (mli.toFirst();(ml=mli.current());++mli) { - if (ml->listType()&MemberList::documentationLists) + if (ml->listType()&MemberListType_documentationLists) { ml->addListReferences(this); } @@ -895,7 +897,7 @@ void NamespaceSDict::writeDeclaration(OutputList &ol,const char *title,bool loca ol.endMemberList(); } -MemberList *NamespaceDef::createMemberList(MemberList::ListType lt) +MemberList *NamespaceDef::createMemberList(MemberListType lt) { m_memberLists.setAutoDelete(TRUE); QListIterator<MemberList> mli(m_memberLists); @@ -913,14 +915,14 @@ MemberList *NamespaceDef::createMemberList(MemberList::ListType lt) return ml; } -void NamespaceDef::addMemberToList(MemberList::ListType lt,MemberDef *md) +void NamespaceDef::addMemberToList(MemberListType lt,MemberDef *md) { static bool sortBriefDocs = Config_getBool("SORT_BRIEF_DOCS"); static bool sortMemberDocs = Config_getBool("SORT_MEMBER_DOCS"); MemberList *ml = createMemberList(lt); ml->setNeedsSorting( - ((ml->listType()&MemberList::declarationLists) && sortBriefDocs) || - ((ml->listType()&MemberList::documentationLists) && sortMemberDocs)); + ((ml->listType()&MemberListType_declarationLists) && sortBriefDocs) || + ((ml->listType()&MemberListType_documentationLists) && sortMemberDocs)); ml->append(md); #if 0 @@ -930,7 +932,7 @@ void NamespaceDef::addMemberToList(MemberList::ListType lt,MemberDef *md) ml->append(md); #endif - if (ml->listType()&MemberList::declarationLists) md->setSectionList(this,ml); + if (ml->listType()&MemberListType_declarationLists) md->setSectionList(this,ml); } void NamespaceDef::sortMemberLists() @@ -945,7 +947,7 @@ void NamespaceDef::sortMemberLists() -MemberList *NamespaceDef::getMemberList(MemberList::ListType lt) const +MemberList *NamespaceDef::getMemberList(MemberListType lt) const { NamespaceDef *that = (NamespaceDef*)this; MemberList *ml = that->m_memberLists.first(); @@ -960,13 +962,13 @@ MemberList *NamespaceDef::getMemberList(MemberList::ListType lt) const return 0; } -void NamespaceDef::writeMemberDeclarations(OutputList &ol,MemberList::ListType lt,const QCString &title) +void NamespaceDef::writeMemberDeclarations(OutputList &ol,MemberListType lt,const QCString &title) { MemberList * ml = getMemberList(lt); if (ml) ml->writeDeclarations(ol,0,this,0,0,title,0); } -void NamespaceDef::writeMemberDocumentation(OutputList &ol,MemberList::ListType lt,const QCString &title) +void NamespaceDef::writeMemberDocumentation(OutputList &ol,MemberListType lt,const QCString &title) { MemberList * ml = getMemberList(lt); if (ml) ml->writeDocumentation(ol,displayName(),this,title); diff --git a/src/namespacedef.h b/src/namespacedef.h index a88b5db..8458a78 100644 --- a/src/namespacedef.h +++ b/src/namespacedef.h @@ -18,13 +18,12 @@ #ifndef NAMESPACEDEF_H #define NAMESPACEDEF_H -#include "qtbc.h" #include <qstrlist.h> #include <qdict.h> #include "sortdict.h" #include "definition.h" -#include "memberlist.h" +class MemberList; class ClassDef; class ClassList; class OutputList; @@ -76,7 +75,7 @@ class NamespaceDef : public Definition void addInnerCompound(Definition *d); void addListReferences(); - MemberList *getMemberList(MemberList::ListType lt) const; + MemberList *getMemberList(MemberListType lt) const; const QList<MemberList> &getMemberLists() const { return m_memberLists; } MemberDef *getMemberByName(const QCString &) const; @@ -92,10 +91,10 @@ class NamespaceDef : public Definition bool visited; private: - MemberList *createMemberList(MemberList::ListType lt); - void addMemberToList(MemberList::ListType lt,MemberDef *md); - void writeMemberDeclarations(OutputList &ol,MemberList::ListType lt,const QCString &title); - void writeMemberDocumentation(OutputList &ol,MemberList::ListType lt,const QCString &title); + MemberList *createMemberList(MemberListType lt); + void addMemberToList(MemberListType lt,MemberDef *md); + void writeMemberDeclarations(OutputList &ol,MemberListType lt,const QCString &title); + void writeMemberDocumentation(OutputList &ol,MemberListType lt,const QCString &title); void writeDetailedDescription(OutputList &ol,const QCString &title); void writeBriefDescription(OutputList &ol); void startMemberDeclarations(OutputList &ol); @@ -129,7 +128,7 @@ class NamespaceList : public QList<NamespaceDef> { public: ~NamespaceList() {} - int compareItems(GCI item1,GCI item2) + int compareItems(QCollection::Item item1,QCollection::Item item2) { return stricmp(((NamespaceDef *)item1)->name(), ((NamespaceDef *)item2)->name() @@ -159,7 +158,7 @@ class NamespaceSDict : public SDict<NamespaceDef> public: NamespaceSDict(int size=17) : SDict<NamespaceDef>(size) {} ~NamespaceSDict() {} - int compareItems(GCI item1,GCI item2) + int compareItems(QCollection::Item item1,QCollection::Item item2) { return stricmp(((NamespaceDef *)item1)->name(), ((NamespaceDef *)item2)->name() diff --git a/src/navtree.js b/src/navtree.js index 5549d7f..d4b241a 100644 --- a/src/navtree.js +++ b/src/navtree.js @@ -63,7 +63,7 @@ function getScript(scriptName,func,show) script.onload = func; script.src = scriptName+'.js'; if ($.browser.msie && $.browser.version<=8) { - // script.onload does work with older versions of IE + // script.onload does not work with older versions of IE script.onreadystatechange = function() { if (script.readyState=='complete' || script.readyState=='loaded') { func(); if (show) showRoot(); @@ -129,6 +129,34 @@ function createIndent(o,domNode,node,level) imgNode.border = "0"; } +var animationInProgress = false; + +function gotoAnchor(anchor,aname,updateLocation) +{ + var pos, docContent = $('#doc-content'); + if (anchor.parent().attr('class')=='memItemLeft' || + anchor.parent().attr('class')=='fieldtype' || + anchor.parent().is(':header')) + { + pos = anchor.parent().position().top; + } else if (anchor.position()) { + pos = anchor.position().top; + } + if (pos) { + var dist = Math.abs(Math.min( + pos-docContent.offset().top, + docContent[0].scrollHeight- + docContent.height()-docContent.scrollTop())); + animationInProgress=true; + docContent.animate({ + scrollTop: pos + docContent.scrollTop() - docContent.offset().top + },Math.max(50,Math.min(500,dist)),function(){ + if (updateLocation) window.location.href=aname; + animationInProgress=false; + }); + } +} + function newNode(o, po, text, link, childrenData, lastNode) { var node = new Object(); @@ -170,7 +198,7 @@ function newNode(o, po, text, link, childrenData, lastNode) var aname = '#'+link.split('#')[1]; var srcPage = stripPath($(location).attr('pathname')); var targetPage = stripPath(link.split('#')[0]); - a.href = srcPage!=targetPage ? url : '#'; + a.href = srcPage!=targetPage ? url : "javascript:void(0)"; a.onclick = function(){ storeLink(link); if (!$(a).parent().parent().hasClass('selected')) @@ -180,23 +208,8 @@ function newNode(o, po, text, link, childrenData, lastNode) $(a).parent().parent().addClass('selected'); $(a).parent().parent().attr('id','selected'); } - var pos, anchor = $(aname), docContent = $('#doc-content'); - if (anchor.parent().attr('class')=='memItemLeft') { - pos = anchor.parent().position().top; - } else if (anchor.position()) { - pos = anchor.position().top; - } - if (pos) { - var dist = Math.abs(Math.min( - pos-docContent.offset().top, - docContent[0].scrollHeight- - docContent.height()-docContent.scrollTop())); - docContent.animate({ - scrollTop: pos + docContent.scrollTop() - docContent.offset().top - },Math.max(50,Math.min(500,dist)),function(){ - window.location.replace(aname); - }); - } + var anchor = $(aname); + gotoAnchor(anchor,aname,true); }; } else { a.href = url; @@ -277,7 +290,8 @@ function glowEffect(n,duration) function highlightAnchor() { - var anchor = $($(location).attr('hash')); + var aname = $(location).attr('hash'); + var anchor = $(aname); if (anchor.parent().attr('class')=='memItemLeft'){ var rows = $('.memberdecls tr[class$="'+ window.location.hash.substring(1)+'"]'); @@ -291,6 +305,7 @@ function highlightAnchor() } else { glowEffect(anchor.next(),1000); // normal member } + gotoAnchor(anchor,aname,false); } function selectAndHighlight(hash,n) @@ -308,6 +323,11 @@ function selectAndHighlight(hash,n) $(n.itemDiv).addClass('selected'); $(n.itemDiv).attr('id','selected'); } + if ($('#nav-tree-contents .item:first').hasClass('selected')) { + $('#nav-sync').css('top','30px'); + } else { + $('#nav-sync').css('top','5px'); + } showRoot(); } @@ -391,11 +411,6 @@ function navTo(o,root,hash,relpath) if (parts.length>1) hash = '#'+parts[1]; else hash=''; } - if (root==NAVTREE[0][1]) { - $('#nav-sync').css('top','30px'); - } else { - $('#nav-sync').css('top','5px'); - } if (hash.match(/^#l\d+$/)) { var anchor=$('a[name='+hash.substring(1)+']'); glowEffect(anchor.parent(),1000); // line number @@ -424,7 +439,7 @@ function showSyncOff(n,relpath) function showSyncOn(n,relpath) { - n.html('<img src="'+relpath+'sync_on.png"/ title="'+SYNCONMSG+'">'); + n.html('<img src="'+relpath+'sync_on.png" title="'+SYNCONMSG+'"/>'); } function toggleSyncButton(relpath) @@ -488,6 +503,11 @@ function initNavTree(toroot,relpath) } var link=stripPath2($(location).attr('pathname')); navTo(o,link,$(location).attr('hash'),relpath); + } else if (!animationInProgress) { + $('#doc-content').scrollTop(0); + $('.item').removeClass('selected'); + $('.item').removeAttr('id'); + navTo(o,toroot,window.location.hash,relpath); } }) diff --git a/src/navtree_js.h b/src/navtree_js.h index aa57a13..b0c6d7c 100644 --- a/src/navtree_js.h +++ b/src/navtree_js.h @@ -63,7 +63,7 @@ " script.onload = func; \n" " script.src = scriptName+'.js'; \n" " if ($.browser.msie && $.browser.version<=8) { \n" -" // script.onload does work with older versions of IE\n" +" // script.onload does not work with older versions of IE\n" " script.onreadystatechange = function() {\n" " if (script.readyState=='complete' || script.readyState=='loaded') { \n" " func(); if (show) showRoot(); \n" @@ -129,6 +129,34 @@ " imgNode.border = \"0\";\n" "}\n" "\n" +"var animationInProgress = false;\n" +"\n" +"function gotoAnchor(anchor,aname,updateLocation)\n" +"{\n" +" var pos, docContent = $('#doc-content');\n" +" if (anchor.parent().attr('class')=='memItemLeft' ||\n" +" anchor.parent().attr('class')=='fieldtype' ||\n" +" anchor.parent().is(':header')) \n" +" {\n" +" pos = anchor.parent().position().top;\n" +" } else if (anchor.position()) {\n" +" pos = anchor.position().top;\n" +" }\n" +" if (pos) {\n" +" var dist = Math.abs(Math.min(\n" +" pos-docContent.offset().top,\n" +" docContent[0].scrollHeight-\n" +" docContent.height()-docContent.scrollTop()));\n" +" animationInProgress=true;\n" +" docContent.animate({\n" +" scrollTop: pos + docContent.scrollTop() - docContent.offset().top\n" +" },Math.max(50,Math.min(500,dist)),function(){\n" +" if (updateLocation) window.location.href=aname;\n" +" animationInProgress=false;\n" +" });\n" +" }\n" +"}\n" +"\n" "function newNode(o, po, text, link, childrenData, lastNode)\n" "{\n" " var node = new Object();\n" @@ -170,7 +198,7 @@ " var aname = '#'+link.split('#')[1];\n" " var srcPage = stripPath($(location).attr('pathname'));\n" " var targetPage = stripPath(link.split('#')[0]);\n" -" a.href = srcPage!=targetPage ? url : '#';\n" +" a.href = srcPage!=targetPage ? url : \"javascript:void(0)\"; \n" " a.onclick = function(){\n" " storeLink(link);\n" " if (!$(a).parent().parent().hasClass('selected'))\n" @@ -180,23 +208,8 @@ " $(a).parent().parent().addClass('selected');\n" " $(a).parent().parent().attr('id','selected');\n" " }\n" -" var pos, anchor = $(aname), docContent = $('#doc-content');\n" -" if (anchor.parent().attr('class')=='memItemLeft') {\n" -" pos = anchor.parent().position().top;\n" -" } else if (anchor.position()) {\n" -" pos = anchor.position().top;\n" -" }\n" -" if (pos) {\n" -" var dist = Math.abs(Math.min(\n" -" pos-docContent.offset().top,\n" -" docContent[0].scrollHeight-\n" -" docContent.height()-docContent.scrollTop()));\n" -" docContent.animate({\n" -" scrollTop: pos + docContent.scrollTop() - docContent.offset().top\n" -" },Math.max(50,Math.min(500,dist)),function(){\n" -" window.location.replace(aname);\n" -" });\n" -" }\n" +" var anchor = $(aname);\n" +" gotoAnchor(anchor,aname,true);\n" " };\n" " } else {\n" " a.href = url;\n" @@ -277,7 +290,8 @@ "\n" "function highlightAnchor()\n" "{\n" -" var anchor = $($(location).attr('hash'));\n" +" var aname = $(location).attr('hash');\n" +" var anchor = $(aname);\n" " if (anchor.parent().attr('class')=='memItemLeft'){\n" " var rows = $('.memberdecls tr[class$=\"'+\n" " window.location.hash.substring(1)+'\"]');\n" @@ -291,6 +305,7 @@ " } else {\n" " glowEffect(anchor.next(),1000); // normal member\n" " }\n" +" gotoAnchor(anchor,aname,false);\n" "}\n" "\n" "function selectAndHighlight(hash,n)\n" @@ -308,6 +323,11 @@ " $(n.itemDiv).addClass('selected');\n" " $(n.itemDiv).attr('id','selected');\n" " }\n" +" if ($('#nav-tree-contents .item:first').hasClass('selected')) {\n" +" $('#nav-sync').css('top','30px');\n" +" } else {\n" +" $('#nav-sync').css('top','5px');\n" +" }\n" " showRoot();\n" "}\n" "\n" @@ -391,11 +411,6 @@ " if (parts.length>1) hash = '#'+parts[1];\n" " else hash='';\n" " }\n" -" if (root==NAVTREE[0][1]) {\n" -" $('#nav-sync').css('top','30px');\n" -" } else {\n" -" $('#nav-sync').css('top','5px');\n" -" }\n" " if (hash.match(/^#l\\d+$/)) {\n" " var anchor=$('a[name='+hash.substring(1)+']');\n" " glowEffect(anchor.parent(),1000); // line number\n" @@ -424,7 +439,7 @@ "\n" "function showSyncOn(n,relpath)\n" "{\n" -" n.html('<img src=\"'+relpath+'sync_on.png\"/ title=\"'+SYNCONMSG+'\">');\n" +" n.html('<img src=\"'+relpath+'sync_on.png\" title=\"'+SYNCONMSG+'\"/>');\n" "}\n" "\n" "function toggleSyncButton(relpath)\n" @@ -488,6 +503,11 @@ " }\n" " var link=stripPath2($(location).attr('pathname'));\n" " navTo(o,link,$(location).attr('hash'),relpath);\n" +" } else if (!animationInProgress) {\n" +" $('#doc-content').scrollTop(0);\n" +" $('.item').removeClass('selected');\n" +" $('.item').removeAttr('id');\n" +" navTo(o,toroot,window.location.hash,relpath);\n" " }\n" " })\n" "\n" diff --git a/src/outputgen.cpp b/src/outputgen.cpp index 74ba116..13b6e62 100644 --- a/src/outputgen.cpp +++ b/src/outputgen.cpp @@ -17,7 +17,8 @@ #include <stdlib.h> -#include "qtbc.h" +#include <qfile.h> + #include "outputgen.h" #include "message.h" #include "portable.h" diff --git a/src/outputgen.h b/src/outputgen.h index be9c208..df4c4e2 100644 --- a/src/outputgen.h +++ b/src/outputgen.h @@ -18,13 +18,11 @@ #ifndef OUTPUTGEN_H #define OUTPUTGEN_H -#include "qtbc.h" -#include "ftextstream.h" -#include <qbuffer.h> -#include <qfile.h> #include <qstack.h> + #include "index.h" #include "section.h" +#include "ftextstream.h" class ClassDiagram; class DotClassGraph; @@ -37,6 +35,7 @@ class DocNode; class MemberDef; class GroupDef; class Definition; +class QFile; /** Output interface for code parser. */ diff --git a/src/outputlist.cpp b/src/outputlist.cpp index 01b1a51..adab93b 100644 --- a/src/outputlist.cpp +++ b/src/outputlist.cpp @@ -27,8 +27,8 @@ #include "config.h" #include "message.h" #include "definition.h" - #include "docparser.h" +#include "vhdldocgen.h" OutputList::OutputList(bool) { @@ -170,6 +170,8 @@ void OutputList::parseDoc(const char *fileName,int startLine, og=outputs->next(); } + VhdlDocGen::setFlowMember(0); + delete root; } diff --git a/src/outputlist.h b/src/outputlist.h index 784b16b..90a3723 100644 --- a/src/outputlist.h +++ b/src/outputlist.h @@ -18,7 +18,6 @@ #ifndef OUTPUTLIST_H #define OUTPUTLIST_H -#include "qtbc.h" #include <qlist.h> #include "index.h" // for IndexSections #include "outputgen.h" diff --git a/src/pagedef.cpp b/src/pagedef.cpp index 0d98184..7fc4639 100644 --- a/src/pagedef.cpp +++ b/src/pagedef.cpp @@ -1,3 +1,20 @@ +/****************************************************************************** + * + * Copyright (C) 1997-2012 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 + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#include <qregexp.h> + #include "pagedef.h" #include "groupdef.h" #include "docparser.h" @@ -6,8 +23,8 @@ #include "outputlist.h" #include "doxygen.h" #include "language.h" -#include <qregexp.h> - +#include "namespacedef.h" +#include "reflist.h" PageDef::PageDef(const char *f,int l,const char *n, const char *d,const char *t) @@ -103,7 +120,7 @@ void PageDef::writeDocumentation(OutputList &ol) } ol.endQuickIndices(); } - SectionInfo *si=Doxygen::sectionDict.find(name()); + SectionInfo *si=Doxygen::sectionDict->find(name()); // save old generator state and write title only to Man generator ol.pushGeneratorState(); @@ -184,7 +201,7 @@ void PageDef::writeDocumentation(OutputList &ol) } } - Doxygen::indexList.addIndexItem(this,0,0,filterTitle(title())); + Doxygen::indexList->addIndexItem(this,0,0,filterTitle(title())); } void PageDef::writePageDocumentation(OutputList &ol) diff --git a/src/pagedef.h b/src/pagedef.h index 170326d..b73ed3b 100644 --- a/src/pagedef.h +++ b/src/pagedef.h @@ -82,7 +82,7 @@ class PageSDict : public SDict<PageDef> public: PageSDict(int size) : SDict<PageDef>(size) {} virtual ~PageSDict() {} - int compareItems(GCI i1,GCI i2) + int compareItems(QCollection::Item i1,QCollection::Item i2) { return stricmp(((PageDef *)i1)->name(),((PageDef *)i2)->name()); } diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp index fd477c2..2a80f8f 100644 --- a/src/perlmodgen.cpp +++ b/src/perlmodgen.cpp @@ -19,18 +19,28 @@ #include <stdlib.h> +#include <qdir.h> +#include <qstack.h> +#include <qdict.h> +#include <qfile.h> + #include "perlmodgen.h" #include "docparser.h" #include "message.h" #include "doxygen.h" #include "pagedef.h" - -#include <qdir.h> -#include <qstack.h> -#include <qdict.h> -#include <qfile.h> +#include "memberlist.h" #include "ftextstream.h" #include "arguments.h" +#include "config.h" +#include "groupdef.h" +#include "classdef.h" +#include "classlist.h" +#include "filename.h" +#include "membername.h" +#include "namespacedef.h" +#include "membergroup.h" +#include "section.h" #define PERLOUTPUT_MAX_INDENTATION 40 @@ -378,6 +388,8 @@ public: void visitPost(DocText *); void visitPre(DocHtmlBlockQuote *); void visitPost(DocHtmlBlockQuote *); + void visitPre(DocVhdlFlow *); + void visitPost(DocVhdlFlow *); private: @@ -697,23 +709,23 @@ void PerlModDocVisitor::visit(DocStyleChange *s) void PerlModDocVisitor::visit(DocVerbatim *s) { const char *type = 0; - switch(s->type()) + switch (s->type()) { - case DocVerbatim::Code: + case DocVerbatim::Code: #if 0 - m_output.add("<programlisting>"); - parseCode(m_ci,s->context(),s->text(),FALSE,0); - m_output.add("</programlisting>"); + m_output.add("<programlisting>"); + parseCode(m_ci,s->context(),s->text(),FALSE,0); + m_output.add("</programlisting>"); #endif - return; - case DocVerbatim::Verbatim: type = "preformatted"; break; - case DocVerbatim::HtmlOnly: type = "htmlonly"; break; - case DocVerbatim::RtfOnly: type = "rtfonly"; break; - case DocVerbatim::ManOnly: type = "manonly"; break; - case DocVerbatim::LatexOnly: type = "latexonly"; break; - case DocVerbatim::XmlOnly: type = "xmlonly"; break; - case DocVerbatim::Dot: type = "dot"; break; - case DocVerbatim::Msc: type = "msc"; break; + return; + case DocVerbatim::Verbatim: type = "preformatted"; break; + case DocVerbatim::HtmlOnly: type = "htmlonly"; break; + case DocVerbatim::RtfOnly: type = "rtfonly"; break; + case DocVerbatim::ManOnly: type = "manonly"; break; + case DocVerbatim::LatexOnly: type = "latexonly"; break; + case DocVerbatim::XmlOnly: type = "xmlonly"; break; + case DocVerbatim::Dot: type = "dot"; break; + case DocVerbatim::Msc: type = "msc"; break; } openItem(type); m_output.addFieldQuotedString("content", s->text()); @@ -1384,6 +1396,14 @@ void PerlModDocVisitor::visitPost(DocHtmlBlockQuote *) closeItem(); } +void PerlModDocVisitor::visitPre(DocVhdlFlow *) +{ +} + +void PerlModDocVisitor::visitPost(DocVhdlFlow *) +{ +} + static void addTemplateArgumentList(ArgumentList *al,PerlModOutput &output,const char *) { QCString indentStr; @@ -1541,19 +1561,19 @@ void PerlModGenerator::generatePerlModForMember(MemberDef *md,Definition *) bool isFunc=FALSE; switch (md->memberType()) { - case MemberDef::Define: memType="define"; break; - case MemberDef::EnumValue: memType="enumvalue"; break; - case MemberDef::Property: memType="property"; break; - case MemberDef::Variable: memType="variable"; break; - case MemberDef::Typedef: memType="typedef"; break; - case MemberDef::Enumeration: memType="enum"; break; - case MemberDef::Function: memType="function"; isFunc=TRUE; break; - case MemberDef::Signal: memType="signal"; isFunc=TRUE; break; - //case MemberDef::Prototype: memType="prototype"; isFunc=TRUE; break; - case MemberDef::Friend: memType="friend"; isFunc=TRUE; break; - case MemberDef::DCOP: memType="dcop"; isFunc=TRUE; break; - case MemberDef::Slot: memType="slot"; isFunc=TRUE; break; - case MemberDef::Event: memType="event"; break; + case MemberType_Define: memType="define"; break; + case MemberType_EnumValue: memType="enumvalue"; break; + case MemberType_Property: memType="property"; break; + case MemberType_Variable: memType="variable"; break; + case MemberType_Typedef: memType="typedef"; break; + case MemberType_Enumeration: memType="enum"; break; + case MemberType_Function: memType="function"; isFunc=TRUE; break; + case MemberType_Signal: memType="signal"; isFunc=TRUE; break; + //case MemberType_Prototype: memType="prototype"; isFunc=TRUE; break; + case MemberType_Friend: memType="friend"; isFunc=TRUE; break; + case MemberType_DCOP: memType="dcop"; isFunc=TRUE; break; + case MemberType_Slot: memType="slot"; isFunc=TRUE; break; + case MemberType_Event: memType="event"; break; } m_output.openHash() @@ -1565,8 +1585,8 @@ void PerlModGenerator::generatePerlModForMember(MemberDef *md,Definition *) addPerlModDocBlock(m_output,"brief",md->getDefFileName(),md->getDefLine(),md->getOuterScope(),md,md->briefDescription()); addPerlModDocBlock(m_output,"detailed",md->getDefFileName(),md->getDefLine(),md->getOuterScope(),md,md->documentation()); - if (md->memberType()!=MemberDef::Define && - md->memberType()!=MemberDef::Enumeration) + if (md->memberType()!=MemberType_Define && + md->memberType()!=MemberType_Enumeration) m_output.addFieldQuotedString("type", md->typeString()); LockingPtr<ArgumentList> al = md->argumentList(); @@ -1612,7 +1632,7 @@ void PerlModGenerator::generatePerlModForMember(MemberDef *md,Definition *) } m_output.closeList(); } - else if (md->memberType()==MemberDef::Define && + else if (md->memberType()==MemberType_Define && md->argsString()!=0) // define { m_output.openList("parameters"); @@ -1637,7 +1657,7 @@ void PerlModGenerator::generatePerlModForMember(MemberDef *md,Definition *) if (md->excpString()) m_output.addFieldQuotedString("exceptions", md->excpString()); - if (md->memberType()==MemberDef::Enumeration) // enum + if (md->memberType()==MemberType_Enumeration) // enum { LockingPtr<MemberList> enumFields = md->enumFieldList(); if (enumFields!=0) @@ -1833,29 +1853,29 @@ void PerlModGenerator::generatePerlModForClass(ClassDef *cd) generatePerlModSection(cd,mg->members(),"user_defined",mg->header()); } - generatePerlModSection(cd,cd->getMemberList(MemberList::pubTypes),"public_typedefs"); - generatePerlModSection(cd,cd->getMemberList(MemberList::pubMethods),"public_methods"); - generatePerlModSection(cd,cd->getMemberList(MemberList::pubAttribs),"public_members"); - generatePerlModSection(cd,cd->getMemberList(MemberList::pubSlots),"public_slots"); - generatePerlModSection(cd,cd->getMemberList(MemberList::signals),"signals"); - generatePerlModSection(cd,cd->getMemberList(MemberList::dcopMethods),"dcop_methods"); - generatePerlModSection(cd,cd->getMemberList(MemberList::properties),"properties"); - generatePerlModSection(cd,cd->getMemberList(MemberList::pubStaticMethods),"public_static_methods"); - generatePerlModSection(cd,cd->getMemberList(MemberList::pubStaticAttribs),"public_static_members"); - generatePerlModSection(cd,cd->getMemberList(MemberList::proTypes),"protected_typedefs"); - generatePerlModSection(cd,cd->getMemberList(MemberList::proMethods),"protected_methods"); - generatePerlModSection(cd,cd->getMemberList(MemberList::proAttribs),"protected_members"); - generatePerlModSection(cd,cd->getMemberList(MemberList::proSlots),"protected_slots"); - generatePerlModSection(cd,cd->getMemberList(MemberList::proStaticMethods),"protected_static_methods"); - generatePerlModSection(cd,cd->getMemberList(MemberList::proStaticAttribs),"protected_static_members"); - generatePerlModSection(cd,cd->getMemberList(MemberList::priTypes),"private_typedefs"); - generatePerlModSection(cd,cd->getMemberList(MemberList::priMethods),"private_methods"); - generatePerlModSection(cd,cd->getMemberList(MemberList::priAttribs),"private_members"); - generatePerlModSection(cd,cd->getMemberList(MemberList::priSlots),"private_slots"); - generatePerlModSection(cd,cd->getMemberList(MemberList::priStaticMethods),"private_static_methods"); - generatePerlModSection(cd,cd->getMemberList(MemberList::priStaticAttribs),"private_static_members"); - generatePerlModSection(cd,cd->getMemberList(MemberList::friends),"friend_methods"); - generatePerlModSection(cd,cd->getMemberList(MemberList::related),"related_methods"); + generatePerlModSection(cd,cd->getMemberList(MemberListType_pubTypes),"public_typedefs"); + generatePerlModSection(cd,cd->getMemberList(MemberListType_pubMethods),"public_methods"); + generatePerlModSection(cd,cd->getMemberList(MemberListType_pubAttribs),"public_members"); + generatePerlModSection(cd,cd->getMemberList(MemberListType_pubSlots),"public_slots"); + generatePerlModSection(cd,cd->getMemberList(MemberListType_signals),"signals"); + generatePerlModSection(cd,cd->getMemberList(MemberListType_dcopMethods),"dcop_methods"); + generatePerlModSection(cd,cd->getMemberList(MemberListType_properties),"properties"); + generatePerlModSection(cd,cd->getMemberList(MemberListType_pubStaticMethods),"public_static_methods"); + generatePerlModSection(cd,cd->getMemberList(MemberListType_pubStaticAttribs),"public_static_members"); + generatePerlModSection(cd,cd->getMemberList(MemberListType_proTypes),"protected_typedefs"); + generatePerlModSection(cd,cd->getMemberList(MemberListType_proMethods),"protected_methods"); + generatePerlModSection(cd,cd->getMemberList(MemberListType_proAttribs),"protected_members"); + generatePerlModSection(cd,cd->getMemberList(MemberListType_proSlots),"protected_slots"); + generatePerlModSection(cd,cd->getMemberList(MemberListType_proStaticMethods),"protected_static_methods"); + generatePerlModSection(cd,cd->getMemberList(MemberListType_proStaticAttribs),"protected_static_members"); + generatePerlModSection(cd,cd->getMemberList(MemberListType_priTypes),"private_typedefs"); + generatePerlModSection(cd,cd->getMemberList(MemberListType_priMethods),"private_methods"); + generatePerlModSection(cd,cd->getMemberList(MemberListType_priAttribs),"private_members"); + generatePerlModSection(cd,cd->getMemberList(MemberListType_priSlots),"private_slots"); + generatePerlModSection(cd,cd->getMemberList(MemberListType_priStaticMethods),"private_static_methods"); + generatePerlModSection(cd,cd->getMemberList(MemberListType_priStaticAttribs),"private_static_members"); + generatePerlModSection(cd,cd->getMemberList(MemberListType_friends),"friend_methods"); + generatePerlModSection(cd,cd->getMemberList(MemberListType_related),"related_methods"); addPerlModDocBlock(m_output,"brief",cd->getDefFileName(),cd->getDefLine(),cd,0,cd->briefDescription()); addPerlModDocBlock(m_output,"detailed",cd->getDefFileName(),cd->getDefLine(),cd,0,cd->documentation()); @@ -1939,12 +1959,12 @@ void PerlModGenerator::generatePerlModForNamespace(NamespaceDef *nd) generatePerlModSection(nd,mg->members(),"user-defined",mg->header()); } - generatePerlModSection(nd,nd->getMemberList(MemberList::decDefineMembers),"defines"); - generatePerlModSection(nd,nd->getMemberList(MemberList::decProtoMembers),"prototypes"); - generatePerlModSection(nd,nd->getMemberList(MemberList::decTypedefMembers),"typedefs"); - generatePerlModSection(nd,nd->getMemberList(MemberList::decEnumMembers),"enums"); - generatePerlModSection(nd,nd->getMemberList(MemberList::decFuncMembers),"functions"); - generatePerlModSection(nd,nd->getMemberList(MemberList::decVarMembers),"variables"); + generatePerlModSection(nd,nd->getMemberList(MemberListType_decDefineMembers),"defines"); + generatePerlModSection(nd,nd->getMemberList(MemberListType_decProtoMembers),"prototypes"); + generatePerlModSection(nd,nd->getMemberList(MemberListType_decTypedefMembers),"typedefs"); + generatePerlModSection(nd,nd->getMemberList(MemberListType_decEnumMembers),"enums"); + generatePerlModSection(nd,nd->getMemberList(MemberListType_decFuncMembers),"functions"); + generatePerlModSection(nd,nd->getMemberList(MemberListType_decVarMembers),"variables"); addPerlModDocBlock(m_output,"brief",nd->getDefFileName(),nd->getDefLine(),0,0,nd->briefDescription()); addPerlModDocBlock(m_output,"detailed",nd->getDefFileName(),nd->getDefLine(),0,0,nd->documentation()); @@ -2008,12 +2028,12 @@ void PerlModGenerator::generatePerlModForFile(FileDef *fd) } m_output.closeList(); - generatePerlModSection(fd,fd->getMemberList(MemberList::decDefineMembers),"defines"); - generatePerlModSection(fd,fd->getMemberList(MemberList::decProtoMembers),"prototypes"); - generatePerlModSection(fd,fd->getMemberList(MemberList::decTypedefMembers),"typedefs"); - generatePerlModSection(fd,fd->getMemberList(MemberList::decEnumMembers),"enums"); - generatePerlModSection(fd,fd->getMemberList(MemberList::decFuncMembers),"functions"); - generatePerlModSection(fd,fd->getMemberList(MemberList::decVarMembers),"variables"); + generatePerlModSection(fd,fd->getMemberList(MemberListType_decDefineMembers),"defines"); + generatePerlModSection(fd,fd->getMemberList(MemberListType_decProtoMembers),"prototypes"); + generatePerlModSection(fd,fd->getMemberList(MemberListType_decTypedefMembers),"typedefs"); + generatePerlModSection(fd,fd->getMemberList(MemberListType_decEnumMembers),"enums"); + generatePerlModSection(fd,fd->getMemberList(MemberListType_decFuncMembers),"functions"); + generatePerlModSection(fd,fd->getMemberList(MemberListType_decVarMembers),"variables"); addPerlModDocBlock(m_output,"brief",fd->getDefFileName(),fd->getDefLine(),0,0,fd->briefDescription()); addPerlModDocBlock(m_output,"detailed",fd->getDefFileName(),fd->getDefLine(),0,0,fd->documentation()); @@ -2114,12 +2134,12 @@ void PerlModGenerator::generatePerlModForGroup(GroupDef *gd) generatePerlModSection(gd,mg->members(),"user-defined",mg->header()); } - generatePerlModSection(gd,gd->getMemberList(MemberList::decDefineMembers),"defines"); - generatePerlModSection(gd,gd->getMemberList(MemberList::decProtoMembers),"prototypes"); - generatePerlModSection(gd,gd->getMemberList(MemberList::decTypedefMembers),"typedefs"); - generatePerlModSection(gd,gd->getMemberList(MemberList::decEnumMembers),"enums"); - generatePerlModSection(gd,gd->getMemberList(MemberList::decFuncMembers),"functions"); - generatePerlModSection(gd,gd->getMemberList(MemberList::decVarMembers),"variables"); + generatePerlModSection(gd,gd->getMemberList(MemberListType_decDefineMembers),"defines"); + generatePerlModSection(gd,gd->getMemberList(MemberListType_decProtoMembers),"prototypes"); + generatePerlModSection(gd,gd->getMemberList(MemberListType_decTypedefMembers),"typedefs"); + generatePerlModSection(gd,gd->getMemberList(MemberListType_decEnumMembers),"enums"); + generatePerlModSection(gd,gd->getMemberList(MemberListType_decFuncMembers),"functions"); + generatePerlModSection(gd,gd->getMemberList(MemberListType_decVarMembers),"variables"); addPerlModDocBlock(m_output,"brief",gd->getDefFileName(),gd->getDefLine(),0,0,gd->briefDescription()); addPerlModDocBlock(m_output,"detailed",gd->getDefFileName(),gd->getDefLine(),0,0,gd->documentation()); @@ -2138,7 +2158,7 @@ void PerlModGenerator::generatePerlModForPage(PageDef *pd) m_output.openHash() .addFieldQuotedString("name", pd->name()); - SectionInfo *si = Doxygen::sectionDict.find(pd->name()); + SectionInfo *si = Doxygen::sectionDict->find(pd->name()); if (si) m_output.addFieldQuotedString("title", si->title); @@ -18,10 +18,6 @@ #ifndef PRE_H #define PRE_H -#include "qtbc.h" -#include <stdio.h> -#include "define.h" - class BufStr; void initPreprocessor(); @@ -26,7 +26,6 @@ #include <ctype.h> #include <errno.h> -#include "qtbc.h" #include <qarray.h> #include <qstack.h> #include <qfile.h> @@ -49,6 +48,11 @@ #include "bufstr.h" #include "arguments.h" #include "entry.h" +#include "condparser.h" +#include "config.h" +#include "filedef.h" +#include "memberdef.h" +#include "membername.h" #define YY_NEVER_INTERACTIVE 1 enum GuardType @@ -370,7 +374,7 @@ static void setFileName(const char *name) { bool ambig; QFileInfo fi(name); - g_yyFileName=convertToQCString(fi.absFilePath()); + g_yyFileName=fi.absFilePath().utf8(); g_yyFileDef=findFileDef(Doxygen::inputNameDict,g_yyFileName,ambig); if (g_yyFileDef==0) // if this is not an input file check if it is an // include file @@ -488,7 +492,7 @@ static FileState *checkAndOpenFile(const QCString &fileName,bool &alreadyInclude static QStrList &exclPatterns = Config_getList("EXCLUDE_PATTERNS"); if (patternMatch(fi,&exclPatterns)) return 0; - QCString absName = convertToQCString(fi.absFilePath()); + QCString absName = fi.absFilePath().utf8(); // global guard if (g_curlyCount==0) // not #include inside { ... } @@ -1418,7 +1422,7 @@ void addDefine() MemberDef *md=new MemberDef( g_yyFileName,g_yyLineNr, "#define",g_defName,g_defArgsStr,0, - Public,Normal,FALSE,Member,MemberDef::Define,0,0); + Public,Normal,FALSE,Member,MemberType_Define,0,0); if (!g_defArgsStr.isEmpty()) { ArgumentList *argList = new ArgumentList; @@ -1655,17 +1659,19 @@ static void readIncludeFile(const QCString &inc) static void startCondSection(const char *sectId) { + CondParser prs; + bool expResult = prs.parse(g_yyFileName,g_yyLineNr,sectId); g_condStack.push(new bool(g_skip)); if (guardType == Guard_Cond) { - if (Config_getList("ENABLED_SECTIONS").find(sectId)==-1) + if (expResult) { g_skip=TRUE; } } else if (guardType == Guard_CondNot) { - if (Config_getList("ENABLED_SECTIONS").find(sectId)!=-1) + if (!expResult) { g_skip=TRUE; } @@ -1768,6 +1774,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) %x Ifdef %x Ifndef %x SkipCComment +%x ArgCopyCComment %x CopyCComment %x SkipVerbatim %x SkipCPPComment @@ -1975,11 +1982,16 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) <FindDefineArgs>{CHARLIT} { g_defArgsStr+=yytext; } +<FindDefineArgs>"/*"[*]? { + g_defArgsStr+=yytext; + BEGIN(ArgCopyCComment); + } <FindDefineArgs>\" { g_defArgsStr+=*yytext; BEGIN(ReadString); } <FindDefineArgs>\n { + g_defArgsStr+=' '; g_yyLineNr++; outputChar('\n'); } @@ -1989,6 +2001,21 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) <FindDefineArgs>. { g_defArgsStr+=*yytext; } +<ArgCopyCComment>[^*\n]+ { + g_defArgsStr+=yytext; + } +<ArgCopyCComment>"*/" { + g_defArgsStr+=yytext; + BEGIN(FindDefineArgs); + } +<ArgCopyCComment>\n { + g_defArgsStr+=' '; + g_yyLineNr++; + outputChar('\n'); + } +<ArgCopyCComment>. { + g_defArgsStr+=yytext; + } <ReadString>"\"" { g_defArgsStr+=*yytext; BEGIN(FindDefineArgs); @@ -2477,7 +2504,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) outputArray(yytext,(int)yyleng); BEGIN(CondLine); } -<CondLine>[a-z_A-Z][a-z_A-Z0-9.\-]* { +<CondLine>[!()&| \ta-z_A-Z0-9.\-]+ { startCondSection(yytext); outputArray(yytext,(int)yyleng); BEGIN(g_condCtx); diff --git a/src/printdocvisitor.h b/src/printdocvisitor.h index 223e838..1138e8b 100644 --- a/src/printdocvisitor.h +++ b/src/printdocvisitor.h @@ -748,6 +748,16 @@ class PrintDocVisitor : public DocVisitor indent_post(); printf("</blockquote>\n"); } + void visitPre(DocVhdlFlow *) + { + indent_pre(); + printf("<vhdlflow>\n"); + } + void visitPost(DocVhdlFlow *) + { + indent_post(); + printf("</vhdlflow>\n"); + } private: // helper functions diff --git a/src/pycode.h b/src/pycode.h index 642da46..e7c1b8b 100644 --- a/src/pycode.h +++ b/src/pycode.h @@ -25,9 +25,6 @@ #ifndef PYCODE_H #define PYCODE_H -#include "qtbc.h" -#include <stdio.h> - class CodeOutputInterface; class FileDef; class MemberDef; diff --git a/src/pycode.l b/src/pycode.l index 319712e..df99758 100644 --- a/src/pycode.l +++ b/src/pycode.l @@ -37,6 +37,11 @@ #include "util.h" #include "membername.h" #include "searchindex.h" +#include "config.h" +#include "groupdef.h" +#include "classlist.h" +#include "filedef.h" +#include "namespacedef.h" #define YY_NEVER_INTERACTIVE 1 #define YY_NO_INPUT 1 diff --git a/src/pyscanner.l b/src/pyscanner.l index ba19fee..4e031bb 100644 --- a/src/pyscanner.l +++ b/src/pyscanner.l @@ -32,7 +32,6 @@ #include <assert.h> #include <ctype.h> -#include "qtbc.h" #include <qarray.h> #include <qstack.h> #include <qregexp.h> diff --git a/src/qhp.cpp b/src/qhp.cpp index e72db55..9e6cc5d 100644 --- a/src/qhp.cpp +++ b/src/qhp.cpp @@ -25,6 +25,7 @@ #include <qstringlist.h> #include <string.h> +#include <qfile.h> static QCString makeFileName(const char * withoutExtension) { @@ -83,6 +84,8 @@ void Qhp::initialize() QCString nameSpace = Config_getString("QHP_NAMESPACE"); QCString virtualFolder = Config_getString("QHP_VIRTUAL_FOLDER"); + m_doc.declaration("1.0", "UTF-8"); + const char * rootAttributes[] = { "version", "1.0", 0 }; @@ -189,7 +192,7 @@ void Qhp::decContentsDepth() void Qhp::addContentsItem(bool /*isDir*/, const char * name, const char * /*ref*/, const char * file, - const char * /*anchor*/,bool /* separateIndex */, + const char *anchor, bool /* separateIndex */, bool /* addToNavIndex */, Definition * /*def*/) { @@ -202,7 +205,7 @@ void Qhp::addContentsItem(bool /*isDir*/, const char * name, int diff = m_prevSectionLevel - m_sectionLevel; handlePrevSection(); - setPrevSection(name, f, m_sectionLevel); + setPrevSection(name, f, anchor, m_sectionLevel); // Close sections as needed for (; diff > 0; diff--) @@ -254,7 +257,7 @@ void Qhp::addIndexItem(Definition *context,MemberDef *md, } else if (context) // container { - // <keyword name="Foo" id="Foo" ref="doc.html"/> + // <keyword name="Foo" id="Foo" ref="doc.html#Foo"/> QCString contRef = context->getOutputFileBase(); QCString level1 = word ? QCString(word) : context->name(); QCString ref = makeRef(contRef,sectionAnchor); @@ -309,7 +312,7 @@ void Qhp::handlePrevSection() // We skip "Main Page" as our extra root is pointing to that if (!((m_prevSectionLevel==1) && (m_prevSectionTitle==getFullProjectName()))) { - QCString finalRef = makeFileName(m_prevSectionRef); + QCString finalRef = makeRef(m_prevSectionBaseName, m_prevSectionAnchor); const char * const attributes[] = { "title", m_prevSectionTitle, @@ -332,17 +335,19 @@ void Qhp::handlePrevSection() clearPrevSection(); } -void Qhp::setPrevSection(const char * title, const char * ref, int level) +void Qhp::setPrevSection(const char * title, const char * basename, const char * anchor, int level) { m_prevSectionTitle = title; - m_prevSectionRef = ref; + m_prevSectionBaseName = basename; + m_prevSectionAnchor = anchor; m_prevSectionLevel = level; } void Qhp::clearPrevSection() { m_prevSectionTitle.resize(0); - m_prevSectionRef.resize(0); + m_prevSectionBaseName.resize(0); + m_prevSectionAnchor.resize(0); } void Qhp::addFile(const char * fileName) @@ -47,7 +47,7 @@ class Qhp : public IndexIntf private: void handlePrevSection(); void clearPrevSection(); - void setPrevSection(const char * title, const char * ref, int level); + void setPrevSection(const char * title, const char * basename, const char * anchor, int level); void addFile(const char * fileName); static QCString getFullProjectName(); @@ -58,7 +58,8 @@ class Qhp : public IndexIntf QhpXmlWriter m_files; QCString m_prevSectionTitle; - QCString m_prevSectionRef; + QCString m_prevSectionBaseName; + QCString m_prevSectionAnchor; int m_prevSectionLevel; int m_sectionLevel; diff --git a/src/qhpxmlwriter.cpp b/src/qhpxmlwriter.cpp index 93bb8cd..edf9ae0 100644 --- a/src/qhpxmlwriter.cpp +++ b/src/qhpxmlwriter.cpp @@ -84,6 +84,12 @@ void QhpXmlWriter::close(char const * elementName) newLine(); } +void QhpXmlWriter::declaration(char const * version, char const * encoding) +{ + m_out << "<?xml version=\"" << version << "\" encoding=\"" << encoding << "\"?>"; + newLine(); +} + void QhpXmlWriter::indent() { if (m_curLineIndented) diff --git a/src/qhpxmlwriter.h b/src/qhpxmlwriter.h index c88eebd..f75414b 100644 --- a/src/qhpxmlwriter.h +++ b/src/qhpxmlwriter.h @@ -38,6 +38,7 @@ class QhpXmlWriter char const * const * attributes = 0); void openCloseContent(char const * elementName, char const * content); void close(char const * elementName); + void declaration(char const * version, char const * encoding); static char * dupEscaped(const char * source); @@ -18,28 +18,4 @@ #ifndef QTBC_H #define QTBC_H -/*! This file contains some hacks to make Doxygen work with - * Qt version 2.00 and Qt version 1.xx - */ - -#include <qglobal.h> - -#if QT_VERSION >= 200 - -#include <locale.h> - -#define GCI QCollection::Item - -#include <qcstring.h> -#include <qstring.h> -inline QCString convertToQCString(const QString &s) { return s.utf8(); } - -#else /* QT_VERSION < 200 */ - -#include <qstring.h> -#define QCString QString -inline QCString convertToQCString(const QCString &s) { return s; } - -#endif - #endif diff --git a/src/reflist.h b/src/reflist.h index 742a7f9..a4a450e 100644 --- a/src/reflist.h +++ b/src/reflist.h @@ -19,7 +19,6 @@ #ifndef _REFLIST_H #define _REFLIST_H -#include "qtbc.h" #include <qintdict.h> #include <qlist.h> #include "sortdict.h" @@ -45,7 +44,7 @@ class SortedRefItems : public SDict<RefItem> public: SortedRefItems(int size=17) : SDict<RefItem>(size) {} virtual ~SortedRefItems() {} - int compareItems(GCI item1,GCI item2) + int compareItems(QCollection::Item item1,QCollection::Item item2) { RefItem *r1 = (RefItem*)item1; RefItem *r2 = (RefItem*)item2; diff --git a/src/resize.js b/src/resize.js index 9fe82ba..8365b25 100644 --- a/src/resize.js +++ b/src/resize.js @@ -37,7 +37,7 @@ function writeCookie(cookie, val, expiration) function resizeWidth() { var windowWidth = $(window).width() + "px"; - var sidenavWidth = $(sidenav).width(); + var sidenavWidth = $(sidenav).outerWidth(); content.css({marginLeft:parseInt(sidenavWidth)+6+"px"}); //account for 6px-wide handle-bar writeCookie('width',sidenavWidth, null); } @@ -51,8 +51,8 @@ function restoreWidth(navWidth) function resizeHeight() { - var headerHeight = header.height(); - var footerHeight = footer.height(); + var headerHeight = header.outerHeight(); + var footerHeight = footer.outerHeight(); var windowHeight = $(window).height() - headerHeight - footerHeight; content.css({height:windowHeight + "px"}); navtree.css({height:windowHeight + "px"}); diff --git a/src/resize_js.h b/src/resize_js.h index ec50059..e24c0b0 100644 --- a/src/resize_js.h +++ b/src/resize_js.h @@ -37,7 +37,7 @@ "function resizeWidth() \n" "{\n" " var windowWidth = $(window).width() + \"px\";\n" -" var sidenavWidth = $(sidenav).width();\n" +" var sidenavWidth = $(sidenav).outerWidth();\n" " content.css({marginLeft:parseInt(sidenavWidth)+6+\"px\"}); //account for 6px-wide handle-bar\n" " writeCookie('width',sidenavWidth, null);\n" "}\n" @@ -51,8 +51,8 @@ "\n" "function resizeHeight() \n" "{\n" -" var headerHeight = header.height();\n" -" var footerHeight = footer.height();\n" +" var headerHeight = header.outerHeight();\n" +" var footerHeight = footer.outerHeight();\n" " var windowHeight = $(window).height() - headerHeight - footerHeight;\n" " content.css({height:windowHeight + \"px\"});\n" " navtree.css({height:windowHeight + \"px\"});\n" diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp index 7f92c0c..d77a3d6 100644 --- a/src/rtfdocvisitor.cpp +++ b/src/rtfdocvisitor.cpp @@ -29,7 +29,8 @@ #include <qfileinfo.h> #include "parserintf.h" #include "msc.h" - +#include "filedef.h" +#include "config.h" //#define DBG_RTF(x) m_t << x #define DBG_RTF(x) do {} while(0) @@ -1669,6 +1670,16 @@ void RTFDocVisitor::visitPost(DocHtmlBlockQuote *) m_lastIsPara=TRUE; } +void RTFDocVisitor::visitPre(DocVhdlFlow *) +{ + if (m_hide) return; +} + +void RTFDocVisitor::visitPost(DocVhdlFlow *) +{ + if (m_hide) return; +} + //static char* getMultiByte(int c) //{ diff --git a/src/rtfdocvisitor.h b/src/rtfdocvisitor.h index 2e35b3b..2ad0d23 100644 --- a/src/rtfdocvisitor.h +++ b/src/rtfdocvisitor.h @@ -129,6 +129,8 @@ class RTFDocVisitor : public DocVisitor void visitPost(DocText *); void visitPre(DocHtmlBlockQuote *); void visitPost(DocHtmlBlockQuote *); + void visitPre(DocVhdlFlow *); + void visitPost(DocVhdlFlow *); private: diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 7abb929..b51245c 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -19,9 +19,9 @@ #include <stdlib.h> -#include "qtbc.h" #include <qdir.h> #include <qregexp.h> +#include <qtextstream.h> #include "rtfgen.h" #include "config.h" @@ -39,6 +39,10 @@ #include "dirdef.h" #include "vhdldocgen.h" #include "portable.h" +#include "groupdef.h" +#include "classlist.h" +#include "filename.h" +#include "namespacedef.h" //#define DBG_RTF(x) x; #define DBG_RTF(x) @@ -263,7 +267,7 @@ void RTFGenerator::beginRTFDocument() } if (array.at(index) != 0) { - QCString key(convertToQCString(iter.currentKey())); + QCString key(iter.currentKey()); msg("Style '%s' redefines \\s%d.\n", key.data(), index); } array.at(index) = style; @@ -2564,7 +2568,7 @@ bool RTFGenerator::preProcessFileInplace(const char *path,const char *name) err("error: Output dir %s does not exist!\n",path); return FALSE; } - QCString oldDir = convertToQCString(QDir::currentDirPath()); + QCString oldDir = QDir::currentDirPath().utf8(); // go to the html output directory (i.e. path) QDir::setCurrent(d.absPath()); diff --git a/src/rtfstyle.h b/src/rtfstyle.h index 3dd4897..ef7cb9a 100644 --- a/src/rtfstyle.h +++ b/src/rtfstyle.h @@ -19,7 +19,6 @@ #ifndef RTFSTYLE_H #define RTFSTYLE_H -#include "qtbc.h" #include <qregexp.h> #include <qdict.h> diff --git a/src/scanner.l b/src/scanner.l index c8dfcaa..c711765 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -25,7 +25,6 @@ #include <assert.h> #include <ctype.h> -#include "qtbc.h" #include <qarray.h> #include <qstack.h> #include <qregexp.h> @@ -303,6 +302,7 @@ static inline int computeIndent(const char *s,int startIndent) while ((c=*p++)) { if (c=='\t') col+=tabSize-(col%tabSize); + else if (c=='\n') col=0; else col++; } return col; @@ -2454,7 +2454,11 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" docBlockInBody = FALSE; docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF") ) || ( yytext[yyleng-2]=='!' && Config_getBool("QT_AUTOBRIEF") ); - docBlock.resize(0); + + QCString indent; + indent.fill(' ',computeIndent(yytext+1,g_column)); + docBlock=indent; + docBlockTerm = ';'; if (YY_START==EnumBaseType && current->section==Entry::ENUM_SEC) { @@ -2479,7 +2483,11 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" docBlockInBody = FALSE; docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF") ) || ( yytext[yyleng-2]=='!' && Config_getBool("QT_AUTOBRIEF") ); - docBlock.resize(0); + + QCString indent; + indent.fill(' ',computeIndent(yytext+1,g_column)); + docBlock=indent; + docBlockTerm = ','; if (YY_START==EnumBaseType && current->section==Entry::ENUM_SEC) { @@ -2508,7 +2516,10 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" docBlockInBody = FALSE; docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF") ) || ( yytext[yyleng-2]=='!' && Config_getBool("QT_AUTOBRIEF") ); - docBlock.resize(0); + QCString indent; + indent.fill(' ',computeIndent(yytext,g_column)); + docBlock=indent; + docBlockTerm = 0; if (yytext[yyleng-3]=='/') { @@ -5611,11 +5622,10 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" docBlockInBody = YY_START==SkipCurly; static bool javadocAutoBrief = Config_getBool("JAVADOC_AUTOBRIEF"); docBlockAutoBrief = javadocAutoBrief; - docBlock.resize(0); QCString indent; indent.fill(' ',computeIndent(yytext,g_column)); - docBlock+=indent; + docBlock=indent; if (docBlockAutoBrief) { diff --git a/src/searchindex.cpp b/src/searchindex.cpp index bb86998..42c9114 100644 --- a/src/searchindex.cpp +++ b/src/searchindex.cpp @@ -21,7 +21,6 @@ #include <qfile.h> #include <qregexp.h> -#include "qtbc.h" #include "searchindex.h" #include "config.h" #include "util.h" @@ -31,7 +30,12 @@ #include "growbuf.h" #include "message.h" #include "version.h" - +#include "groupdef.h" +#include "classlist.h" +#include "filedef.h" +#include "memberdef.h" +#include "filename.h" +#include "membername.h" // file format: (all multi-byte values are stored in big endian format) // 4 byte header @@ -625,7 +629,7 @@ class SearchIndexList : public SDict< QList<Definition> > } l->append(d); } - int compareItems(GCI item1, GCI item2) + int compareItems(QCollection::Item item1, QCollection::Item item2) { QList<Definition> *md1=(QList<Definition> *)item1; QList<Definition> *md2=(QList<Definition> *)item2; @@ -1327,7 +1331,7 @@ void writeJavascriptSearchIndex() t << "</html>" << endl; } } - Doxygen::indexList.addStyleSheetFile("search/search.js"); + Doxygen::indexList->addStyleSheetFile("search/search.js"); } void writeSearchCategories(FTextStream &t) diff --git a/src/searchindex.h b/src/searchindex.h index d1fe994..ddfe384 100644 --- a/src/searchindex.h +++ b/src/searchindex.h @@ -18,13 +18,11 @@ #ifndef _SEARCHINDEX_H #define _SEARCHINDEX_H -#include "qtbc.h" #include <qintdict.h> #include <qlist.h> #include <qdict.h> #include <qintdict.h> #include <qvector.h> -#include "sortdict.h" class FTextStream; class Definition; diff --git a/src/section.h b/src/section.h index 3ee8474..d3dfc7e 100644 --- a/src/section.h +++ b/src/section.h @@ -19,9 +19,6 @@ #ifndef SECTION_H #define SECTION_H -#include "qtbc.h" -#include <qlist.h> -#include <qdict.h> #include "sortdict.h" class Definition; diff --git a/src/sortdict.h b/src/sortdict.h index 564453f..02f1f7b 100644 --- a/src/sortdict.h +++ b/src/sortdict.h @@ -19,7 +19,6 @@ #ifndef _SORTDICT_H #define _SORTDICT_H -#include "qtbc.h" #include <qlist.h> #include <qdict.h> #include <qintdict.h> @@ -83,7 +82,7 @@ class SList : public QList<T> public: SList(SDict<T> *owner) : m_owner(owner) {} virtual ~SList() {} - int compareItems(GCI item1,GCI item2) + int compareItems(QCollection::Item item1,QCollection::Item item2) { return m_owner->compareItems(item1,item2); } @@ -265,7 +264,7 @@ class SDict * Overload this to properly sort items. * \sa inSort() */ - virtual int compareItems(GCI item1,GCI item2) + virtual int compareItems(QCollection::Item item1,QCollection::Item item2) { return item1!=item2; } @@ -431,7 +430,7 @@ class SIntList : public QList<T> public: SIntList(SIntDict<T> *owner) : m_owner(owner) {} virtual ~SIntList() {} - int compareItems(GCI item1,GCI item2) + int compareItems(QCollection::Item item1,QCollection::Item item2) { return m_owner->compareItems(item1,item2); } @@ -574,7 +573,7 @@ class SIntDict * Overload this to properly sort items. * \sa inSort() */ - virtual int compareItems(GCI item1,GCI item2) + virtual int compareItems(QCollection::Item item1,QCollection::Item item2) { return item1!=item2; } diff --git a/src/tagreader.cpp b/src/tagreader.cpp index 8cfdb7b..553d195 100644 --- a/src/tagreader.cpp +++ b/src/tagreader.cpp @@ -36,7 +36,9 @@ #include "message.h" #include "defargs.h" #include "arguments.h" -//#include "reflist.h" +#include "filedef.h" +#include "filename.h" +#include "section.h" /** Information about an linkable anchor */ class TagAnchorInfo @@ -1035,13 +1037,13 @@ void TagFileParser::addDocAnchors(Entry *e,const TagAnchorInfoList &l) TagAnchorInfo *ta; for (tli.toFirst();(ta=tli.current());++tli) { - if (Doxygen::sectionDict.find(ta->label)==0) + if (Doxygen::sectionDict->find(ta->label)==0) { //printf("New sectionInfo file=%s anchor=%s\n", // ta->fileName.data(),ta->label.data()); SectionInfo *si=new SectionInfo(ta->fileName,ta->label,ta->label, SectionInfo::Anchor,0,m_tagName); - Doxygen::sectionDict.append(ta->label,si); + Doxygen::sectionDict->append(ta->label,si); e->anchors->append(si); } else diff --git a/src/tagreader.h b/src/tagreader.h index 8366cbb..427f674 100644 --- a/src/tagreader.h +++ b/src/tagreader.h @@ -19,8 +19,6 @@ #ifndef TAGREADER_H #define TAGREADER_H -#include "qtbc.h" - class Entry; void parseTagFile(Entry *root,const char *fullPathName,const char *fileName); diff --git a/src/tclscanner.l b/src/tclscanner.l index c46d136..aaeac41 100644 --- a/src/tclscanner.l +++ b/src/tclscanner.l @@ -19,13 +19,18 @@ #include <stdlib.h> #include <assert.h> #include <ctype.h> -#include "qtbc.h" +#include <unistd.h> + +#include <qstring.h> +#include <qstringlist.h> +#include <qlist.h> +#include <qmap.h> #include <qarray.h> #include <qstack.h> #include <qregexp.h> -#include <unistd.h> #include <qfile.h> #include <qdict.h> + #include "entry.h" #include "message.h" #include "config.h" @@ -42,11 +47,9 @@ #include "commentcnv.h" #include "bufstr.h" #include "portable.h" -#include <qstring.h> -#include <qstringlist.h> -#include <qlist.h> -#include <qmap.h> #include "arguments.h" +#include "namespacedef.h" +#include "filedef.h" #define YY_NEVER_INTERACTIVE 1 #define YY_NO_INPUT 1 diff --git a/src/textdocvisitor.h b/src/textdocvisitor.h index 66ace1a..b6c50e0 100644 --- a/src/textdocvisitor.h +++ b/src/textdocvisitor.h @@ -128,6 +128,8 @@ class TextDocVisitor : public DocVisitor void visitPost(DocText *) {} void visitPre(DocHtmlBlockQuote *) {} void visitPost(DocHtmlBlockQuote *) {} + void visitPre(DocVhdlFlow *) {} + void visitPost(DocVhdlFlow *) {} private: diff --git a/src/translator.cpp b/src/translator.cpp index 10dfa9b..b161345 100644 --- a/src/translator.cpp +++ b/src/translator.cpp @@ -7,6 +7,7 @@ * */ #include "translator.h" +#include <stdio.h> /*! The translation table used by Win1250ToISO88592() method. */ const char Translator::Win1250ToISO88592Tab[] = diff --git a/src/translator.h b/src/translator.h index f89f771..f96962e 100644 --- a/src/translator.h +++ b/src/translator.h @@ -18,10 +18,7 @@ #ifndef TRANSLATOR_H #define TRANSLATOR_H -#include "qtbc.h" #include "classdef.h" -#include "util.h" -#include "config.h" /** Abstract base class for all translatable text fragments. */ class Translator diff --git a/src/translator_de.h b/src/translator_de.h index 4f75879..47fec53 100644 --- a/src/translator_de.h +++ b/src/translator_de.h @@ -133,7 +133,7 @@ #ifndef TRANSLATOR_DE_H #define TRANSLATOR_DE_H -class TranslatorGerman : public TranslatorAdapter_1_8_2 +class TranslatorGerman : public Translator { public: @@ -2026,6 +2026,71 @@ class TranslatorGerman : public TranslatorAdapter_1_8_2 virtual QCString trAdditionalInheritedMembers() { return "Weitere Geerbte Elemente"; } +////////////////////////////////////////////////////////////////////////// +// new since 1.8.2 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a tooltip for the toggle button thatappears in the + * navigation tree in the HTML output when GENERATE_TREEVIEW is + * enabled. This tooltip explains the meaning of the button. + */ + virtual QCString trPanelSynchronisationTooltip(bool enable) + { + QCString opt = enable ? "einzuschalten" : "auszuschalten"; + return "Klicken um Panelsynchronisation "+opt; + } + + /*! Used in a method of an Objective-C class that is declared in a + * a category. Note that the @1 marker is required and is replaced + * by a link. + */ + virtual QCString trProvidedByCategory() + { + return "Bestandteil der Kategorie @1."; + } + + /*! Used in a method of an Objective-C category that extends a class. + * Note that the @1 marker is required and is replaced by a link to + * the class method. + */ + virtual QCString trExtendsClass() + { + return "Erweitert Klasse @1."; + } + + /*! Used as the header of a list of class methods in Objective-C. + * These are similar to static public member functions in C++. + */ + virtual QCString trClassMethods() + { + return "Klassenmethoden"; + } + + /*! Used as the header of a list of instance methods in Objective-C. + * These are similar to public member functions in C++. + */ + virtual QCString trInstanceMethods() + { + return "Instanzmethoden"; + } + + /*! Used as the header of the member functions of an Objective-C class. + */ + virtual QCString trMethodDocumentation() + { + return "Methodendokumentation"; + } + + /*! Used as the title of the design overview picture created for the + * VHDL output. + */ + virtual QCString trDesignOverview() + { + return "Ãœbersicht"; + } + +////////////////////////////////////////////////////////////////////////// + }; #endif diff --git a/src/translator_tr.h b/src/translator_tr.h index 83af116..4370400 100644 --- a/src/translator_tr.h +++ b/src/translator_tr.h @@ -1736,7 +1736,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5 QCString result=(QCString)"Bu "; switch(compType) { - case ClassDef::Class: result+="mdoül"; break; + case ClassDef::Class: result+="modül"; break; case ClassDef::Struct: result+="tip"; break; case ClassDef::Union: result+="birleÅŸim(union)"; break; case ClassDef::Interface: result+="arayüz"; break; diff --git a/src/types.h b/src/types.h index a8b2db6..9bc5827 100644 --- a/src/types.h +++ b/src/types.h @@ -16,7 +16,7 @@ #ifndef TYPES_H #define TYPES_H -#include "qtbc.h" +#include <qcstring.h> /** @file * @brief This file contains a number of basic enums and types. @@ -88,5 +88,104 @@ struct ListItemInfo int itemId; }; +enum MemberListType +{ + MemberListType_privateLists = 0x0800, + MemberListType_detailedLists = 0x1000, + MemberListType_declarationLists = 0x2000, + MemberListType_documentationLists = 0x4000, + + MemberListType_pubMethods = 0, + MemberListType_proMethods = 1, + MemberListType_pacMethods = 2, + MemberListType_priMethods = 3 + MemberListType_privateLists, + MemberListType_pubStaticMethods = 4, + MemberListType_proStaticMethods = 5, + MemberListType_pacStaticMethods = 6, + MemberListType_priStaticMethods = 7 + MemberListType_privateLists, + MemberListType_pubSlots = 8, + MemberListType_proSlots = 9, + MemberListType_priSlots = 10 + MemberListType_privateLists, + MemberListType_pubAttribs = 11, + MemberListType_proAttribs = 12, + MemberListType_pacAttribs = 13, + MemberListType_priAttribs = 14 + MemberListType_privateLists, + MemberListType_pubStaticAttribs = 15, + MemberListType_proStaticAttribs = 16, + MemberListType_pacStaticAttribs = 17, + MemberListType_priStaticAttribs = 18 + MemberListType_privateLists, + MemberListType_pubTypes = 19, + MemberListType_proTypes = 20, + MemberListType_pacTypes = 21, + MemberListType_priTypes = 22 + MemberListType_privateLists, + MemberListType_related = 23, + MemberListType_signals = 24, + MemberListType_friends = 25, + MemberListType_dcopMethods = 26, + MemberListType_properties = 27, + MemberListType_events = 28, + + MemberListType_typedefMembers = 29 + MemberListType_detailedLists, + MemberListType_enumMembers = 30 + MemberListType_detailedLists, + MemberListType_enumValMembers = 31 + MemberListType_detailedLists, + MemberListType_functionMembers = 32 + MemberListType_detailedLists, + MemberListType_relatedMembers = 33 + MemberListType_detailedLists, + MemberListType_variableMembers = 34 + MemberListType_detailedLists, + MemberListType_propertyMembers = 35 + MemberListType_detailedLists, + MemberListType_eventMembers = 36 + MemberListType_detailedLists, + MemberListType_constructors = 37 + MemberListType_detailedLists, + + MemberListType_allMembersList = 38, + + MemberListType_decDefineMembers = 39 + MemberListType_declarationLists, + MemberListType_decProtoMembers = 40 + MemberListType_declarationLists, + MemberListType_decTypedefMembers = 41 + MemberListType_declarationLists, + MemberListType_decEnumMembers = 42 + MemberListType_declarationLists, + MemberListType_decFuncMembers = 43 + MemberListType_declarationLists, + MemberListType_decVarMembers = 44 + MemberListType_declarationLists, + MemberListType_decEnumValMembers = 45 + MemberListType_declarationLists, + MemberListType_decPubSlotMembers = 46 + MemberListType_declarationLists, + MemberListType_decProSlotMembers = 47 + MemberListType_declarationLists, + MemberListType_decPriSlotMembers = 48 + MemberListType_declarationLists, + MemberListType_decSignalMembers = 49 + MemberListType_declarationLists, + MemberListType_decEventMembers = 50 + MemberListType_declarationLists, + MemberListType_decFriendMembers = 51 + MemberListType_declarationLists, + MemberListType_decPropMembers = 52 + MemberListType_declarationLists, + + MemberListType_docDefineMembers = 53 + MemberListType_documentationLists, + MemberListType_docProtoMembers = 54 + MemberListType_documentationLists, + MemberListType_docTypedefMembers = 55 + MemberListType_documentationLists, + MemberListType_docEnumMembers = 56 + MemberListType_documentationLists, + MemberListType_docFuncMembers = 57 + MemberListType_documentationLists, + MemberListType_docVarMembers = 58 + MemberListType_documentationLists, + MemberListType_docEnumValMembers = 59 + MemberListType_documentationLists, + MemberListType_docPubSlotMembers = 60 + MemberListType_documentationLists, + MemberListType_docProSlotMembers = 61 + MemberListType_documentationLists, + MemberListType_docPriSlotMembers = 62 + MemberListType_documentationLists, + MemberListType_docSignalMembers = 63 + MemberListType_documentationLists, + MemberListType_docEventMembers = 64 + MemberListType_documentationLists, + MemberListType_docFriendMembers = 65 + MemberListType_documentationLists, + MemberListType_docPropMembers = 66 + MemberListType_documentationLists, + + MemberListType_redefinedBy = 67, + MemberListType_enumFields = 68, + MemberListType_memberGroup = 69 +}; + +enum MemberType +{ + MemberType_Define, + MemberType_Function, + MemberType_Variable, + MemberType_Typedef, + MemberType_Enumeration, + MemberType_EnumValue, + MemberType_Signal, + MemberType_Slot, + MemberType_Friend, + MemberType_DCOP, + MemberType_Property, + MemberType_Event +}; #endif diff --git a/src/util.cpp b/src/util.cpp index e5caac5..836ac70 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -22,7 +22,6 @@ #include "md5.h" -#include "qtbc.h" #include <qregexp.h> #include <qfileinfo.h> #include <qdir.h> @@ -55,6 +54,13 @@ #include "growbuf.h" #include "entry.h" #include "arguments.h" +#include "memberlist.h" +#include "classlist.h" +#include "namespacedef.h" +#include "membername.h" +#include "filename.h" +#include "membergroup.h" +#include "dirdef.h" #define ENABLE_TRACINGSUPPORT 0 @@ -952,22 +958,25 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item) int i; Definition *itemScope=item->getOuterScope(); - - if ( - itemScope==scope || // same thing + bool memberAccessibleFromScope = (item->definitionType()==Definition::TypeMember && // a member itemScope && itemScope->definitionType()==Definition::TypeClass && // of a class scope->definitionType()==Definition::TypeClass && // accessible ((ClassDef*)scope)->isAccessibleMember((MemberDef *)item) // from scope - ) || + ); + bool nestedClassInsideBaseClass = (item->definitionType()==Definition::TypeClass && // a nested class itemScope && itemScope->definitionType()==Definition::TypeClass && // inside a base scope->definitionType()==Definition::TypeClass && // class of scope ((ClassDef*)scope)->isBaseClass((ClassDef*)itemScope,TRUE) - ) - ) + ); + + if (itemScope==scope || memberAccessibleFromScope || nestedClassInsideBaseClass) { //printf("> found it\n"); + if (nestedClassInsideBaseClass) result++; // penalty for base class to prevent + // this is preferred over nested class in this class + // see bug 686956 } else if (scope==Doxygen::globalScope) { @@ -2146,9 +2155,9 @@ QCString tempArgListToString(ArgumentList *al) // compute the HTML anchors for a list of members -void setAnchors(ClassDef *cd,char id,MemberList *ml,int groupId) +void setAnchors(MemberList *ml) { - int count=0; + //int count=0; if (ml==0) return; MemberListIterator mli(*ml); MemberDef *md; @@ -2156,13 +2165,13 @@ void setAnchors(ClassDef *cd,char id,MemberList *ml,int groupId) { if (!md->isReference()) { - QCString anchor; - if (groupId==-1) - anchor.sprintf("%c%d",id,count++); - else - anchor.sprintf("%c%d_%d",id,groupId,count++); - if (cd) anchor.prepend(escapeCharsInString(cd->name(),FALSE)); - md->setAnchor(anchor); + //QCString anchor; + //if (groupId==-1) + // anchor.sprintf("%c%d",id,count++); + //else + // anchor.sprintf("%c%d_%d",id,groupId,count++); + //if (cd) anchor.prepend(escapeCharsInString(cd->name(),FALSE)); + md->setAnchor(); //printf("setAnchors(): Member %s outputFileBase=%s anchor %s result %s\n", // md->name().data(),md->getOutputFileBase().data(),anchor.data(),md->anchor().data()); } @@ -4561,7 +4570,7 @@ bool resolveLink(/* in */ const char *scName, if (gd) { SectionInfo *si=0; - if (!pd->name().isEmpty()) si=Doxygen::sectionDict[pd->name()]; + if (!pd->name().isEmpty()) si=Doxygen::sectionDict->find(pd->name()); *resContext=gd; if (si) resAnchor = si->label; } @@ -4753,7 +4762,7 @@ FileDef *findFileDef(const FileNameDict *fnDict,const char *n,bool &ambig) cachedResult = new FindFileCacheElem(0,FALSE); } - QCString name=convertToQCString(QDir::cleanDirPath(n)); + QCString name=QDir::cleanDirPath(n).utf8(); QCString path; int slashPos; FileName *fn; @@ -5778,6 +5787,62 @@ int extractClassNameFromType(const QCString &type,int &pos,QCString &name,QCStri return -1; } +QCString normalizeNonTemplateArgumentsInString( + const QCString &name, + Definition *context, + const ArgumentList * formalArgs) +{ + // skip until < + int p=name.find('<'); + if (p==-1) return name; + p++; + QCString result = name.left(p); + + static QRegExp re("[a-z_A-Z\\x80-\\xFF][a-z_A-Z0-9\\x80-\\xFF]*"); + int l,i; + // for each identifier in the template part (e.g. B<T> -> T) + while ((i=re.match(name,p,&l))!=-1) + { + result += name.mid(p,i-p); + QCString n = name.mid(i,l); + bool found=FALSE; + if (formalArgs) // check that n is not a formal template argument + { + ArgumentListIterator formAli(*formalArgs); + Argument *formArg; + for (formAli.toFirst(); + (formArg=formAli.current()) && !found; + ++formAli + ) + { + found = formArg->name==n; + } + } + if (!found) + { + // try to resolve the type + ClassDef *cd = getResolvedClass(context,0,n); + if (cd) + { + result+=cd->name(); + } + else + { + result+=n; + } + } + else + { + result+=n; + } + p=i+l; + } + result+=name.right(name.length()-p); + //printf("normalizeNonTemplateArgumentInString(%s)=%s\n",name.data(),result.data()); + return removeRedundantWhiteSpace(result); +} + + /*! Substitutes any occurrence of a formal argument from argument list * \a formalArgs in \a name by the corresponding actual argument in * argument list \a actualArgs. The result after substitution @@ -5873,7 +5938,10 @@ QCString substituteTemplateArgumentsInString( found=TRUE; } } - if (!found) result += n; + if (!found) + { + result += n; + } p=i+l; } result+=name.right(name.length()-p); @@ -6114,7 +6182,7 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle, // si->fileName.data()); //printf(" SectionInfo: sec=%p sec->fileName=%s\n",si,si->fileName.data()); //printf("Adding section key=%s si->fileName=%s\n",pageName.data(),si->fileName.data()); - Doxygen::sectionDict.append(pd->name(),si); + Doxygen::sectionDict->append(pd->name(),si); } } return pd; @@ -7296,7 +7364,7 @@ void writeColoredImgData(const char *dir,ColoredImgDataItem data[]) { fprintf(stderr,"Warning: Cannot open file %s for writing\n",data->name); } - Doxygen::indexList.addImageFile(data->name); + Doxygen::indexList->addImageFile(data->name); data++; } } @@ -22,11 +22,8 @@ * \brief A bunch of utility functions. */ -#include "qtbc.h" #include <qlist.h> -#include <qtextstream.h> #include <ctype.h> -#include "sortdict.h" #include "types.h" //-------------------------------------------------------------------- @@ -106,7 +103,7 @@ void linkifyText(const TextGeneratorIntf &ol, int indentLevel=0 ); -void setAnchors(ClassDef *cd,char id,MemberList *ml,int groupId=-1); +void setAnchors(MemberList *ml); QCString fileToString(const char *name,bool filter=FALSE,bool isSourceCode=FALSE); @@ -261,6 +258,11 @@ void addMembersToMemberGroup(/* in */ MemberList *ml, int extractClassNameFromType(const QCString &type,int &pos, QCString &name,QCString &templSpec,SrcLangExt=SrcLangExt_Unknown); +QCString normalizeNonTemplateArgumentsInString( + const QCString &name, + Definition *context, + const ArgumentList *formalArgs); + QCString substituteTemplateArgumentsInString( const QCString &name, ArgumentList *formalArgs, diff --git a/src/vhdlcode.h b/src/vhdlcode.h index 362b79d..dab2624 100644 --- a/src/vhdlcode.h +++ b/src/vhdlcode.h @@ -1,9 +1,6 @@ #ifndef VHDLCODE_H #define VHDLCODE_H -#include "qtbc.h" -#include <stdio.h> - class CodeOutputInterface; class FileDef; class MemberDef; diff --git a/src/vhdlcode.l b/src/vhdlcode.l index 22df1c1..b3d24d1 100644 --- a/src/vhdlcode.l +++ b/src/vhdlcode.l @@ -15,8 +15,7 @@ /****************************************************************************** * Parser for syntax hightlighting and references for vhdl subset * written by M. Kreis - * supports VHDL-87 - * does not support VHDL-AMS + * supports VHDL-87/93/2008 ******************************************************************************/ %{ @@ -31,7 +30,6 @@ #include <qdir.h> #include <qstringlist.h> -#include "qtbc.h" #include "entry.h" #include "doxygen.h" #include "message.h" @@ -41,6 +39,9 @@ #include "searchindex.h" #include "vhdldocgen.h" #include "arguments.h" +#include "config.h" +#include "classdef.h" +#include "filedef.h" #define YY_NEVER_INTERACTIVE 1 #define YY_NO_INPUT 1 diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp index 1ddcbdf..ba8fd1f 100644 --- a/src/vhdldocgen.cpp +++ b/src/vhdldocgen.cpp @@ -15,7 +15,7 @@ /****************************************************************************** * Parser for VHDL subset * written by M. Kreis - * supports VHDL-87/93/2002 + * supports VHDL-87/93/2008 * does not support VHDL-AMS ******************************************************************************/ @@ -27,7 +27,6 @@ #include <qcstring.h> #include <qfileinfo.h> #include <qstringlist.h> -#include "memberdef.h" /* --------------------------------------------------------------- */ // local includes @@ -47,19 +46,24 @@ #include "layout.h" #include "arguments.h" #include "portable.h" +#include "memberlist.h" +#include "memberdef.h" +#include "groupdef.h" +#include "classlist.h" +#include "namespacedef.h" +#include "filename.h" +#include "membergroup.h" #define theTranslator_vhdlType VhdlDocGen::trVhdlType static QDict<QCString> g_vhdlKeyDict0(17,FALSE); static QDict<QCString> g_vhdlKeyDict1(17,FALSE); static QDict<QCString> g_vhdlKeyDict2(17,FALSE); - static QDict<QCString> g_xilinxUcfDict(17,FALSE); static void initUCF(Entry* root,const char* type,QCString & qcs,int line,QCString & fileName,QCString & brief); static void writeUCFLink(const MemberDef* mdef,OutputList &ol); -static void assignConfiguration(VhdlConfNode* ,QCString); -static void assignBinding(VhdlConfNode* conf,QCString label); +static void assignBinding(VhdlConfNode* conf); static void addInstance(ClassDef* entity, ClassDef* arch, ClassDef *inst,Entry *cur,ClassDef* archBind=NULL); //---------- create svg ------------------------------------------------------------- @@ -73,8 +77,7 @@ static void writeTable(QList<MemberDef>* port,FTextStream & t); static void endTabel(FTextStream &t); static void writeClassToDot(FTextStream &t,ClassDef* cd); static void writeVhdlDotLink(FTextStream &t,const QCString &a,const QCString &b,const QCString &style); -static void writeVhdlPortToolTip(FTextStream& t,QList<MemberDef>* port,ClassDef *cd); - +//static void writeVhdlPortToolTip(FTextStream& t,QList<MemberDef>* port,ClassDef *cd); static const MemberDef *flowMember=0; void VhdlDocGen::setFlowMember( const MemberDef* mem) @@ -87,10 +90,7 @@ const MemberDef* VhdlDocGen::getFlowMember() return flowMember; } -void VhdlDocGen::resetFlowMember() -{ - flowMember=NULL; -} + //-------------------------------------------------------------------------------------------------- static void codify(FTextStream &t,const char *str) @@ -193,7 +193,7 @@ void VhdlDocGen::writeOverview() writeTable(port,t); endTabel(t); - writeVhdlPortToolTip(t,port,cd); + // writeVhdlPortToolTip(t,port,cd); writeVhdlEntityToolTip(t,cd); delete port; @@ -276,13 +276,12 @@ static QCString formatBriefNote(const QCString &brief,ClassDef * cd) return vForm; } - +#if 0 static void writeVhdlPortToolTip(FTextStream& t,QList<MemberDef>* port,ClassDef *cd) { - +/* uint len=port->count(); MemberDef *md; - return; //???? for (uint j=0;j<len;j++) { @@ -301,8 +300,9 @@ static void writeVhdlPortToolTip(FTextStream& t,QList<MemberDef>* port,ClassDef dotn+=md->name(); // writeVhdlDotLink(t,dotn,node,"dotted"); } +*/ } - +#endif static void writeVhdlEntityToolTip(FTextStream& t,ClassDef *cd) { @@ -431,7 +431,7 @@ static QList<MemberDef>* getPorts(ClassDef *cd) { MemberDef* md; QList<MemberDef> *portList=new QList<MemberDef>; - MemberList *ml=cd->getMemberList(MemberList::variableMembers); + MemberList *ml=cd->getMemberList(MemberListType_variableMembers); if (ml==0) return NULL; @@ -610,8 +610,7 @@ QCString* VhdlDocGen::findKeyWord(const QCString& word) static QCString g_vhdllogic("vhdllogic"); if (word.isEmpty() || word.at(0)=='\0') return 0; - //printf("VhdlDocGen::findKeyWord(%s)\n",word.data()); - + if (g_vhdlKeyDict0.find(word.lower())) return &g_vhdlkeyword; @@ -624,15 +623,6 @@ QCString* VhdlDocGen::findKeyWord(const QCString& word) return 0; } -/*! - * returns the parsed entry at line xxx - */ - - - -bool found =FALSE; -static Entry eMerge; - ClassDef *VhdlDocGen::getClass(const char *name) { if (name==0 || name[0]=='\0') return 0; @@ -645,9 +635,6 @@ ClassDef *VhdlDocGen::getClass(const char *name) return cd; } - - - ClassDef* VhdlDocGen::getPackageName(const QCString & name) { ClassDef* cd=0; @@ -668,9 +655,9 @@ MemberDef* VhdlDocGen::findMember(const QCString& className, const QCString& mem //printf("VhdlDocGen::findMember(%s,%s)=%p\n",className.data(),memName.data(),cd); if (cd==0) return 0; - mdef=VhdlDocGen::findMemberDef(cd,memName,MemberList::variableMembers); + mdef=VhdlDocGen::findMemberDef(cd,memName,MemberListType_variableMembers); if (mdef) return mdef; - mdef=VhdlDocGen::findMemberDef(cd,memName,MemberList::pubMethods); + mdef=VhdlDocGen::findMemberDef(cd,memName,MemberListType_pubMethods); if (mdef) return mdef; // nothing found so far @@ -698,9 +685,9 @@ MemberDef* VhdlDocGen::findMember(const QCString& className, const QCString& mem if (ecd) //d && d->definitionType()==Definition::TypeClass) { //ClassDef *ecd = (ClassDef*)d; - mdef=VhdlDocGen::findMemberDef(ecd,memName,MemberList::variableMembers); + mdef=VhdlDocGen::findMemberDef(ecd,memName,MemberListType_variableMembers); if (mdef) return mdef; - mdef=VhdlDocGen::findMemberDef(cd,memName,MemberList::pubMethods); + mdef=VhdlDocGen::findMemberDef(cd,memName,MemberListType_pubMethods); if (mdef) return mdef; } //cd=getClass(getClassName(cd)); @@ -753,9 +740,9 @@ MemberDef* VhdlDocGen::findMember(const QCString& className, const QCString& mem } if (cd) { - mdef=VhdlDocGen::findMemberDef(cd,memName,MemberList::variableMembers); + mdef=VhdlDocGen::findMemberDef(cd,memName,MemberListType_variableMembers); if (mdef) return mdef; - mdef=VhdlDocGen::findMemberDef(cd,memName,MemberList::pubMethods); + mdef=VhdlDocGen::findMemberDef(cd,memName,MemberListType_pubMethods); if (mdef) return mdef; } } // for @@ -767,7 +754,7 @@ MemberDef* VhdlDocGen::findMember(const QCString& className, const QCString& mem * in which the key (type) is found */ -MemberDef* VhdlDocGen::findMemberDef(ClassDef* cd,const QCString& key,MemberList::ListType type) +MemberDef* VhdlDocGen::findMemberDef(ClassDef* cd,const QCString& key,MemberListType type) { // return cd->getMemberByName(key);//does not work MemberDef *md=0; @@ -796,7 +783,7 @@ void VhdlDocGen::findAllPackages(const QCString& className,QDict<QCString>& qdic ClassDef *cdef=getClass(className); if (cdef) { - MemberList *mem=cdef->getMemberList(MemberList::variableMembers); + MemberList *mem=cdef->getMemberList(MemberListType_variableMembers); MemberDef *md; if (mem) @@ -843,12 +830,7 @@ MemberDef* VhdlDocGen::findFunction(const QList<Argument> &ql, ClassDef *cdef=getClass(package.data()); if (cdef==0) return 0; - //if (type) - // funcType=VhdlDocGen::PROCEDURE; - //else - // funcType=VhdlDocGen::FUNCTION; - - MemberList *mem=cdef->getMemberList(MemberList::pubMethods); + MemberList *mem=cdef->getMemberList(MemberListType_pubMethods); if (mem) { @@ -928,13 +910,7 @@ QCString VhdlDocGen::getClassName(const ClassDef* cd) temp.stripPrefix("_"); return temp; } - //if ((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ARCHITECTURECLASS) - //{ - // QStringList qlist=QStringList::split("-",cd->className(),FALSE); - // if (qlist.count()>1) - // return (QCString)qlist[1]; - // return ""; - //} + return substitute(cd->className(),"::","."); } @@ -1096,8 +1072,6 @@ bool VhdlDocGen::compareString(const QCString& s1,const QCString& s2) void VhdlDocGen::prepareComment(QCString& qcs) { const char* s="--!"; - //const char *start="--!{"; - //const char *end="--!}"; int index=0; while (TRUE) @@ -1616,13 +1590,13 @@ void VhdlDocGen::writeProcessProto(OutputList& ol,const ArgumentList* al,const M * writes a function|procedure documentation to the output */ -void VhdlDocGen::writeFuncProcDocu( +bool VhdlDocGen::writeFuncProcDocu( const MemberDef *md, OutputList& ol, const ArgumentList* al, bool /*type*/) { - if (al==0) return; + if (al==0) return FALSE; //bool sem=FALSE; ol.enableAll(); @@ -1631,8 +1605,9 @@ void VhdlDocGen::writeFuncProcDocu( if (index==0) { ol.docify(" ( ) "); - return; + return FALSE; } + ol.endMemberDocName(); ol.startParameterList(TRUE); //ol.startParameterName(FALSE); Argument *arg; @@ -1656,8 +1631,7 @@ void VhdlDocGen::writeFuncProcDocu( ol.startParameterName(TRUE); VhdlDocGen::writeFormatString(arg->name,ol,md); - ol.docify(" : "); - + if (VhdlDocGen::isProcedure(md)) { startFonts(arg->attrib,"stringliteral",ol); @@ -1696,6 +1670,7 @@ void VhdlDocGen::writeFuncProcDocu( first=FALSE; } //ol.endParameterList(); + return TRUE; } // writeDocFunProc @@ -1814,11 +1789,12 @@ static void setGlobalType(MemberList *ml) } /* writes a vhdl type documentation */ -void VhdlDocGen::writeVHDLTypeDocumentation(const MemberDef* mdef, const Definition *d, OutputList &ol) +bool VhdlDocGen::writeVHDLTypeDocumentation(const MemberDef* mdef, const Definition *d, OutputList &ol) { ClassDef *cd=(ClassDef*)d; + bool hasParams = FALSE; - if (cd==0) return; + if (cd==0) return hasParams; QCString ttype=mdef->typeString(); QCString largs=mdef->argsString(); @@ -1845,7 +1821,7 @@ void VhdlDocGen::writeVHDLTypeDocumentation(const MemberDef* mdef, const Definit ol.docify(" "); } ol.docify(mdef->name()); - VhdlDocGen::writeFuncProcDocu(mdef,ol, mdef->argumentList().pointer()); + hasParams = VhdlDocGen::writeFuncProcDocu(mdef,ol, mdef->argumentList().pointer()); } @@ -1858,14 +1834,14 @@ void VhdlDocGen::writeVHDLTypeDocumentation(const MemberDef* mdef, const Definit largs=largs.replace(QRegExp("#")," "); VhdlDocGen::formatString(largs,ol,mdef); - return; + return hasParams; } else { writeLink(mdef,ol); if (VhdlDocGen::isLibrary(mdef) || VhdlDocGen::isPackage(mdef)) { - return; + return hasParams; } ol.docify(" "); } @@ -1883,7 +1859,7 @@ void VhdlDocGen::writeVHDLTypeDocumentation(const MemberDef* mdef, const Definit if (c) largs=ttype; VhdlDocGen::writeRecUnitDocu(mdef,ol,largs); - return; + return hasParams; } ol.docify(" "); @@ -1894,6 +1870,7 @@ void VhdlDocGen::writeVHDLTypeDocumentation(const MemberDef* mdef, const Definit ol.docify(" "); } } + return hasParams; } /* writes a vhdl type declaration */ @@ -2400,29 +2377,11 @@ void VhdlDocGen::writeVHDLDeclarations(MemberList* ml,OutputList &ol, } }// writeVHDLDeclarations -#if 0 -/* strips the prefix for record and unit members*/ -void VhdlDocGen::adjustRecordMember(MemberDef *mdef) -{ //,OutputList & ol) { - QRegExp regg("[_a-zA-Z\"]"); - QCString nn=mdef->name(); - int j=nn.find(regg,0); - if (j>0) - { - nn=nn.mid(j,nn.length()); - mdef->setName(nn.data()); - } -}//adjustRecordMember -#endif -/* strips the prefix for package and package body */ bool VhdlDocGen::writeClassType( ClassDef *& cd, OutputList &ol ,QCString & cname) { - //static ClassDef *prev = 0; - //if (prev == cd) return TRUE; - //if (cd != prev) prev=cd; - + int id=cd->protection(); QCString qcs = VhdlDocGen::trTypeString(id+2); cname=VhdlDocGen::getClassName(cd); @@ -2557,26 +2516,6 @@ QCString VhdlDocGen::trFunctionAndProc() } - - - -/* do not insert the same component twice */ - -bool VhdlDocGen::foundInsertedComponent(const QCString & name,Entry* root) -{ - QListIterator<BaseInfo> bii(*root->extends); - BaseInfo *bi=0; - for (bii.toFirst();(bi=bii.current());++bii) - { - if (bi->name==name) - { - return TRUE; // - } - } - - return FALSE; -}// found component - /*! writes a link if the string is linkable else a formatted string */ void VhdlDocGen::writeStringLink(const MemberDef *mdef,QCString mem, OutputList& ol) @@ -2603,14 +2542,7 @@ void VhdlDocGen::writeStringLink(const MemberDef *mdef,QCString mem, OutputList& void VhdlDocGen::writeCodeFragment( MemberDef *mdef,OutputList& ol) { - // Definition d=(Definition)mdef; - // QCString fdd=mdef->getDefFileExtension(); - // QCString scope=mdef->getScopeString(); QCString codeFragment=mdef->documentation(); - //FileDef *fd=mdef->getFileDef(); - - //int start=mdef->getStartBodyLine(); - //int end=mdef->getEndBodyLine(); QStringList qsl=QStringList::split("\n",codeFragment); writeLink(mdef,ol); ol.docify(" "); @@ -2769,8 +2701,6 @@ static void initUCF(Entry* root,const char* type,QCString & qcs,int line,QCStr current->bodyLine=line; current->fileName=fileName; current->type="ucf_const"; - //if (!bo) - //current->args=type; current->args+=qcs; current->lang= SrcLangExt_VHDL ; @@ -2864,25 +2794,6 @@ bool VhdlDocGen::findConstraintFile(LayoutNavEntry *lne) return FALSE; } -void VhdlDocGen::writeAlphbeticalClass(OutputList& ol,const ClassDef* cd,const QCString & cname) -{ - if (cname.contains("::")==0) - { - ClassDef*oo= VhdlDocGen::findArchitecture(cd); - ol.writeObjectLink(cd->getReference(), - cd->getOutputFileBase(),0,cname); - if (oo) - { - ol.docify(" ["); - ol.writeObjectLink(oo->getReference(), - oo->getOutputFileBase(),0,"arch"); - ol.docify("] "); - } - } -} - - - // for cell_inst : [entity] work.proto [ (label|expr) ] QCString VhdlDocGen::parseForConfig(QCString & entity,QCString & arch) @@ -2913,7 +2824,6 @@ QCString VhdlDocGen::parseForConfig(QCString & entity,QCString & arch) return label; // label } - // use (configuration|entity|open) work.test [(cellfor)]; QCString VhdlDocGen::parseForBinding(QCString & entity,QCString & arch) @@ -2938,11 +2848,21 @@ QCString VhdlDocGen::parseForBinding(QCString & entity,QCString & arch) return label; } -ClassDef* VhdlDocGen::findArchitecture(QCString identifier, QCString entity_name) -{ - QCString archName=entity_name+"::"+identifier; - return Doxygen::classSDict->find(archName.data()); -} + + + // find class with upper/lower letters + ClassDef* VhdlDocGen::findVhdlClass(const char *className ) + { + + ClassSDict::Iterator cli(*Doxygen::classSDict); + ClassDef *cd; + for (;(cd=cli.current());++cli) + { + if(stricmp(className,cd->name().data())==0) + return cd; + } + return 0; + } //@param arch bit0:flipflop @@ -2954,107 +2874,116 @@ ClassDef* VhdlDocGen::findArchitecture(QCString identifier, QCString entity_nam //@param isInlineConf //@param confN List of configurations -void assignBinding(VhdlConfNode * conf,QCString label) +void assignBinding(VhdlConfNode * conf) { QList<Entry> instList= getVhdlInstList(); QListIterator<Entry> eli(instList); Entry *cur; - ClassDef *archClass; + ClassDef *archClass,*entClass; QCString archName,entityName; - bool allOthers=FALSE; - - if (conf->isInlineConf) - { - archClass=Doxygen::classSDict->find(conf->confVhdl.data()); - } - else - { - archName= VhdlDocGen::getIndexWord(label.data(),0); - entityName= VhdlDocGen::getIndexWord(conf->confVhdl.data(),1); - archClass=VhdlDocGen::findArchitecture(archName,entityName); - } + QCString arcBind,entBind; + + bool others,all; + entBind=conf->binding; + QCString conf2=VhdlDocGen::parseForBinding(entBind,arcBind); + + if(stricmp(conf2.data(),"configuration")==0) + { + QList<VhdlConfNode> confList = getVhdlConfiguration(); + VhdlConfNode* vconf; + bool found=false; + for (uint iter=0;iter<confList.count(); iter++) + { + vconf= (VhdlConfNode *)confList.at(iter); + QCString n=VhdlDocGen::getIndexWord(vconf->confVhdl.data(),0); + if (n==entBind) + { + found=true; + entBind=VhdlDocGen::getIndexWord(vconf->confVhdl.data(),1); + QCString a=VhdlDocGen::getIndexWord(conf->compSpec.data(),0); + QCString e=VhdlDocGen::getIndexWord(conf->confVhdl.data(),1); + a=e+"::"+a; + archClass= VhdlDocGen::findVhdlClass(a.data());//Doxygen::classSDict->find(a.data()); + entClass= VhdlDocGen::findVhdlClass(e.data());//Doxygen::classSDict->find(e.data()); + break; + } + } + if (!found) + err("error: %s%s",conf->binding.data()," could not be found"); + //return; + }// if + else{ // find entity work.entname(arch?) + QCString a=VhdlDocGen::getIndexWord(conf->compSpec.data(),0); + QCString e=VhdlDocGen::getIndexWord(conf->confVhdl.data(),1); + a=e+"::"+a; + archClass= VhdlDocGen::findVhdlClass(a.data());//Doxygen::classSDict->find(a.data()); + entClass= VhdlDocGen::findVhdlClass(e.data()); //Doxygen::classSDict->find(e.data()); + } + + QCString label=conf->compSpec.lower(); + //label.prepend("|"); if (!archClass) { - fprintf(stderr,"\n architecture %s not found ! ",conf->confVhdl.data()); + err("\n error:architecture %s not found ! ",conf->confVhdl.data()); return; } archName=archClass->name(); - QCString allOt=VhdlDocGen::getIndexWord(conf->arch.data(),0); - - if (allOt=="all" || allOt=="others") - allOthers=TRUE; - - for (;(cur=eli.current());++eli) - { - if (conf->isInlineConf && (conf->confVhdl!=cur->args)) - continue; - - if (!conf->isInlineConf && (archName!=cur->args)) - continue; - - if (cur->exception==label || conf->isInlineConf) + all=allOt.lower()=="all" ; + others= allOt.lower()=="others"; + + for (;(cur=eli.current());++eli){ + + if (cur->exception.lower()==label || conf->isInlineConf) { QCString sign,archy; - if (allOthers==FALSE) - { - archy=conf->arch; - sign=cur->name+":"+cur->type; - } - else - { - sign=cur->type; + if (all || others) archy=VhdlDocGen::getIndexWord(conf->arch.data(),1); - } - - - if (archy==sign && !cur->stat) + else + archy=conf->arch; + + + QCString inst1=VhdlDocGen::getIndexWord(archy.data(),0).lower(); + QCString comp=VhdlDocGen::getIndexWord(archy.data(),1).lower(); + + QStringList ql=QStringList::split(",",inst1); + + for(uint j=0;j<ql.count();j++) + { + QCString archy1,sign1; + if(all || others) + { + archy1=VhdlDocGen::getIndexWord(conf->arch.data(),1); + sign1=cur->type; + } + else + { + archy1=comp+":"+ql[j].utf8(); + sign1=cur->type+":"+cur->name; + } + + if (archy1==sign1.lower() && !cur->stat) { - // fprintf(stderr," \n label [%s] [%s] [%s]",cur->exception.data(),cur->type.data(),cur->name.data()); - QCString ent1=conf->binding; - QCString arch1; - QCString rr=VhdlDocGen::parseForBinding(ent1,arch1); - arch1=ent1+"::"+arch1; - //ClassDef *archBind=Doxygen::classSDict->find(arch1.data()); - ClassDef *ent=Doxygen::classSDict->find(ent1.data()); - QCString inst=VhdlDocGen::getIndexWord(cur->args.data(),0); - ClassDef *cd=Doxygen::classSDict->find(inst.data()); - - if (cd==0 || ent==0) + // fprintf(stderr," \n label [%s] [%s] [%s]",cur->exception.data(),cur->type.data(),cur->name.data()); + ClassDef *ent= VhdlDocGen::findVhdlClass(entBind.data());//Doxygen::classSDict->find(entBind.data()); + + if (entClass==0 || ent==0) continue; - - addInstance(ent,archClass,cd,cur); - cur->stat=TRUE; + + addInstance(ent,archClass,entClass,cur); + cur->stat=TRUE; + break; } - } + }// for + } }//for -}//assignBinding - -void assignConfiguration(VhdlConfNode* rootNode,QCString label) -{ - if (rootNode==NULL) return; - uint iter; - - if (!rootNode->isBinding()) - { - // printf("\n ARCH %s BIND %s \n",rootNode->arch.data(),rootNode->binding.data()); - assignBinding(rootNode,label); - return; - } - else - label+="|"+rootNode->arch; +}//assignBinding - for(iter=0;iter<rootNode->confN.count();iter++) - { - VhdlConfNode* conf= (VhdlConfNode *)rootNode->confN.at(iter); - assignConfiguration(conf,label); - } -} /* @@ -3072,13 +3001,15 @@ void assignConfiguration(VhdlConfNode* rootNode,QCString label) void VhdlDocGen::computeVhdlComponentRelations() { - QCString entity,inst,arch,vhd; - + QCString entity,arch,inst; QList<VhdlConfNode> confList = getVhdlConfiguration(); + for (uint iter=0;iter<confList.count(); iter++) { VhdlConfNode* conf= (VhdlConfNode *)confList.at(iter); - assignConfiguration(conf,""); + if (!(conf->isInlineConf || conf->isLeaf)) + continue; + assignBinding(conf); } QList<Entry> qsl= getVhdlInstList(); @@ -3099,29 +3030,45 @@ void VhdlDocGen::computeVhdlComponentRelations() { entity=cur->type; } - ClassDef *classEntity=Doxygen::classSDict->find(entity); + + + + ClassDef *classEntity= VhdlDocGen::findVhdlClass(entity.data());//Doxygen::classSDict->find(entity); inst=VhdlDocGen::getIndexWord(cur->args.data(),0); ClassDef *cd=Doxygen::classSDict->find(inst); ClassDef *ar=Doxygen::classSDict->find(cur->args); - if (cd==0 || classEntity==0 ) - continue; + if (cd==0) continue; + if (classEntity==0) + err("error: %s:%d:Entity:%s%s",cur->fileName.data(),cur->startLine,entity.data()," could not be found"); + addInstance(classEntity,ar,cd,cur); - } + } static void addInstance(ClassDef* classEntity, ClassDef* ar, ClassDef *cd , Entry *cur,ClassDef* /*archBind*/) -{ + { + + QCString bName,n1; + if (ar==0) return; + + if(classEntity==0) + { + //add component inst + n1=cur->type; + goto ferr; + } + if (classEntity==cd) return; - QCString bName=classEntity->name(); - //printf("addInstance %s to %s\n", cd->name().data(), classEntity->name().data()); - QCString n1=cur->type; + bName=classEntity->name(); + // fprintf(stderr,"\naddInstance %s to %s %s %s\n", classEntity->name().data(),cd->name().data(),ar->name().data(),cur->name); + n1=classEntity->name().data(); - if (!cd->isBaseClass(classEntity, TRUE, 0)) + if (!cd->isBaseClass(classEntity, true, 0)) { cd->insertBaseClass(classEntity,n1,Public,Normal,0); } @@ -3130,19 +3077,19 @@ static void addInstance(ClassDef* classEntity, ClassDef* ar, VhdlDocGen::addBaseClass(cd,classEntity); } - if (!VhdlDocGen::isSubClass(classEntity,cd,TRUE,0)) + if (!VhdlDocGen::isSubClass(classEntity,cd,true,0)) { classEntity->insertSubClass(cd,Public,Normal,0); + classEntity->setLanguage(SrcLangExt_VHDL); } - if (ar==0) return; - +ferr: QCString uu=cur->name; MemberDef *md=new MemberDef( ar->getDefFileName(), cur->startLine, - cur->type,uu,uu, 0, + n1,uu,uu, 0, Public, Normal, cur->stat,Member, - MemberDef::Variable, + MemberType_Variable, 0, 0); @@ -3164,8 +3111,17 @@ static void addInstance(ClassDef* classEntity, ClassDef* ar, md->setDocumentation(cur->doc.data(),cur->docFile.data(),cur->docLine); FileDef *fd=ar->getFileDef(); md->setBodyDef(fd); - ar->insertMember(md); - // printf("\nMemberreference [%p]",md); + + QCString info="Info: Elaborating entity "+n1; + fd=ar->getFileDef(); + info+=" for hierarchy "; + QRegExp epr("[|]"); + QCString label=cur->type+":"+cur->write+":"+cur->name; + label.replace(epr,":"); + info+=label; + fprintf(stderr,"\n[%s:%d:%s]\n",fd->fileName().data(),cur->startLine,info.data()); + ar->insertMember(md); + } @@ -3246,8 +3202,6 @@ bool VhdlDocGen::isSubClass(ClassDef* cd,ClassDef *scd, bool followInstances,int if (cd->subClasses()) { - // Beware: trying to optimise the iterator away using ->first() & ->next() - // causes bug 625531 BaseClassListIterator bcli(*cd->subClasses()); for ( ; bcli.current() && !found ; ++bcli) { @@ -3304,9 +3258,33 @@ void VhdlDocGen::addBaseClass(ClassDef* cd,ClassDef *ent) } -void VhdlDocGen::createFlowChart(MemberDef *mdef) +static QList<MemberDef> mdList; + +static MemberDef* findMemFlow(const MemberDef* mdef) +{ + for(uint j=0;j<mdList.count();j++) + { + MemberDef* md=(MemberDef*)mdList.at(j); + if (md->name()==mdef->name() && md->getStartBodyLine()==mdef->getStartBodyLine()) + return md; + } + return 0; +} + +void VhdlDocGen::createFlowChart(const MemberDef *mdef) { QCString codeFragment; + MemberDef* mm=0; + if((mm=findMemFlow(mdef))!=0) + { + // don't create the same flowchart twice + VhdlDocGen::setFlowMember(mm); + return; + } + else + mdList.append(mdef); + + //fprintf(stderr,"\n create flow mem %s %p\n",mdef->name().data(),mdef); int actualStart= mdef->getStartBodyLine(); int actualEnd=mdef->getEndBodyLine(); @@ -3321,6 +3299,63 @@ void VhdlDocGen::createFlowChart(MemberDef *mdef) } +bool VhdlDocGen::isConstraint(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::UCF_CONST; } +bool VhdlDocGen::isConfig(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::CONFIG; } +bool VhdlDocGen::isAlias(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::ALIAS; } +bool VhdlDocGen::isLibrary(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::LIBRARY; } +bool VhdlDocGen::isGeneric(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::GENERIC; } +bool VhdlDocGen::isPort(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::PORT; } +bool VhdlDocGen::isComponent(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::COMPONENT; } +bool VhdlDocGen::isPackage(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::USE; } +bool VhdlDocGen::isEntity(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::ENTITY; } +bool VhdlDocGen::isConstant(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::CONSTANT; } +bool VhdlDocGen::isVType(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::TYPE; } +bool VhdlDocGen::isSubType(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::SUBTYPE; } +bool VhdlDocGen::isVhdlFunction(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::FUNCTION; } +bool VhdlDocGen::isProcess(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::PROCESS; } +bool VhdlDocGen::isSignal(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::SIGNAL; } +bool VhdlDocGen::isAttribute(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::ATTRIBUTE; } +bool VhdlDocGen::isSignals(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::SIGNAL; } +bool VhdlDocGen::isProcedure(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::PROCEDURE; } +bool VhdlDocGen::isRecord(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::RECORD; } +bool VhdlDocGen::isArchitecture(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::ARCHITECTURE; } +bool VhdlDocGen::isUnit(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::UNITS; } +bool VhdlDocGen::isPackageBody(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::PACKAGE_BODY; } +bool VhdlDocGen::isVariable(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::SHAREDVARIABLE; } +bool VhdlDocGen::isFile(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::VFILE; } +bool VhdlDocGen::isGroup(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::GROUP; } +bool VhdlDocGen::isCompInst(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::INSTANTIATION; } +bool VhdlDocGen::isMisc(const MemberDef *mdef) +{ return mdef->getMemberSpecifiers()==VhdlDocGen::MISCELLANEOUS; } + + + //############################## Flowcharts ################################################# @@ -3531,8 +3566,13 @@ QCString FlowNode::convertNameToFileName() { static QRegExp exp ("[#&*+-/<=>|$?^]"); QCString temp,qcs; - qcs=VhdlDocGen::getFlowMember()->name(); + const MemberDef* md=VhdlDocGen::getFlowMember(); + temp.sprintf("%p",md); + qcs=md->name(); + +//long pp=(long)&temp; + // string literal VhdlDocGen::deleteAllChars(qcs,'"'); @@ -3545,7 +3585,7 @@ QCString FlowNode::convertNameToFileName() qcs=qcs.replace(exp,"_"); } - temp=temp.setNum(imageCounter); + // temp=temp.setNum(1); return qcs+temp; } @@ -4073,3 +4113,4 @@ void FlowNode::alignFuncProc( QCString & q,const ArgumentList* al,bool isFunc) } q+=temp; } + diff --git a/src/vhdldocgen.h b/src/vhdldocgen.h index 8d8307e..b26cd63 100644 --- a/src/vhdldocgen.h +++ b/src/vhdldocgen.h @@ -24,12 +24,18 @@ #include <qdict.h> #include <qcstring.h> #include "layout.h" -#include "memberlist.h" #include "arguments.h" class Entry; class ClassDef; +class MemberList; class MemberDef; +class FTextStream; +class OutputList; +class Definition; +class GroupDef; +class FileDef; +class NamespaceDef; struct Argument; /** Class for generating documentation specific for VHDL */ @@ -85,7 +91,6 @@ class VhdlDocGen static bool isSubClass(ClassDef* cd,ClassDef *scd, bool followInstances,int level); static QCString getIndexWord(const char* ,int index); - static bool foundInsertedComponent(const QCString& name,Entry* root); static bool deleteCharRev(QCString &s,char c); static void deleteAllChars(QCString &s,char c); static void parseFuncProto(const char* text, @@ -106,7 +111,7 @@ class VhdlDocGen QDict<QCString>&); static MemberDef* findMemberDef(ClassDef* cd, const QCString& key, - MemberList::ListType type); + MemberListType type); static ClassDef *getClass(const char *name); static MemberDef* findFunction(const QList<Argument> &ql, const QCString& name, @@ -117,60 +122,33 @@ class VhdlDocGen static void writeInlineClassLink(const ClassDef*, OutputList &ol); - static bool isConstraint(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::UCF_CONST; } - static bool isConfig(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::CONFIG; } - static bool isAlias(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::ALIAS; } - static bool isLibrary(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::LIBRARY; } - static bool isGeneric(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::GENERIC; } - static bool isPort(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::PORT; } - static bool isComponent(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::COMPONENT; } - static bool isPackage(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::USE; } - static bool isEntity(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::ENTITY; } - static bool isConstant(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::CONSTANT; } - static bool isVType(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::TYPE; } - static bool isSubType(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::SUBTYPE; } - static bool isVhdlFunction(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::FUNCTION; } - static bool isProcess(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::PROCESS; } - static bool isSignal(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::SIGNAL; } - static bool isAttribute(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::ATTRIBUTE; } - static bool isSignals(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::SIGNAL; } - static bool isProcedure(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::PROCEDURE; } - static bool isRecord(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::RECORD; } - static bool isArchitecture(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::ARCHITECTURE; } - static bool isUnit(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::UNITS; } - static bool isPackageBody(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::PACKAGE_BODY; } - static bool isVariable(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::SHAREDVARIABLE; } - static bool isFile(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::VFILE; } - static bool isGroup(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::GROUP; } - static bool isCompInst(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::INSTANTIATION; } - static bool isMisc(const MemberDef *mdef) - { return mdef->getMemberSpecifiers()==VhdlDocGen::MISCELLANEOUS; } + static bool isConstraint(const MemberDef *mdef); + static bool isConfig(const MemberDef *mdef); + static bool isAlias(const MemberDef *mdef); + static bool isLibrary(const MemberDef *mdef); + static bool isGeneric(const MemberDef *mdef); + static bool isPort(const MemberDef *mdef); + static bool isComponent(const MemberDef *mdef); + static bool isPackage(const MemberDef *mdef); + static bool isEntity(const MemberDef *mdef); + static bool isConstant(const MemberDef *mdef); + static bool isVType(const MemberDef *mdef); + static bool isSubType(const MemberDef *mdef); + static bool isVhdlFunction(const MemberDef *mdef); + static bool isProcess(const MemberDef *mdef); + static bool isSignal(const MemberDef *mdef); + static bool isAttribute(const MemberDef *mdef); + static bool isSignals(const MemberDef *mdef); + static bool isProcedure(const MemberDef *mdef); + static bool isRecord(const MemberDef *mdef); + static bool isArchitecture(const MemberDef *mdef); + static bool isUnit(const MemberDef *mdef); + static bool isPackageBody(const MemberDef *mdef); + static bool isVariable(const MemberDef *mdef); + static bool isFile(const MemberDef *mdef); + static bool isGroup(const MemberDef *mdef); + static bool isCompInst(const MemberDef *mdef); + static bool isMisc(const MemberDef *mdef); //----------------------------------------------------- // translatable items @@ -208,10 +186,10 @@ class VhdlDocGen static void writeFunctionProto(OutputList& ol,const ArgumentList *al,const MemberDef*); static void writeProcessProto(OutputList& ol,const ArgumentList *al,const MemberDef*); static void writeProcedureProto(OutputList& ol, const ArgumentList *al,const MemberDef*); - static void writeFuncProcDocu(const MemberDef *mdef, OutputList& ol,const ArgumentList* al,bool type=false); + static bool writeFuncProcDocu(const MemberDef *mdef, OutputList& ol,const ArgumentList* al,bool type=false); static void writeRecordProto(const MemberDef *mdef, OutputList& ol,const ArgumentList *al); - static void writeVHDLTypeDocumentation(const MemberDef* mdef, const Definition* d, OutputList &ol); + static bool writeVHDLTypeDocumentation(const MemberDef* mdef, const Definition* d, OutputList &ol); static void writeVhdlDeclarations(MemberList*,OutputList&,GroupDef*,ClassDef*,FileDef*,NamespaceDef*); @@ -260,17 +238,17 @@ class VhdlDocGen static QCString parseForConfig(QCString & entity,QCString & arch); static QCString parseForBinding(QCString & entity,QCString & arch); static void addBaseClass(ClassDef* cd,ClassDef *ent); + static ClassDef* findVhdlClass(const char *className ); static void writeOverview(OutputList &ol); static void writeOverview(); // flowcharts - static void createFlowChart( MemberDef*); - static void addFlowImage(FTextStream,QCString); + static void createFlowChart(const MemberDef*); + //static void addFlowImage(const FTextStream &,const QCString &); static void setFlowMember( const MemberDef *flowMember); - static const MemberDef * getFlowMember(); - static void resetFlowMember(); + static const MemberDef *getFlowMember(); private: static void findAllArchitectures(QList<QCString>& ql,const ClassDef *cd); @@ -356,6 +334,7 @@ class FlowNode FlowNode(int typ,const char* t,const char* ex,const char* label=NULL); ~FlowNode(); +private: int id; int stamp; int type; @@ -365,6 +344,4 @@ class FlowNode QCString exp; }; - - #endif diff --git a/src/vhdlparser.y b/src/vhdlparser.y index 32727a2..a525666 100644 --- a/src/vhdlparser.y +++ b/src/vhdlparser.y @@ -31,7 +31,7 @@ *******************************************************/ /****************************************************************************** * modified for doxygen by M. Kreis - * extended to VHDL 93/2002/2008 + * extended to VHDL 93/2008 ******************************************************************************/ @@ -61,6 +61,7 @@ struct YYMM #include "commentscan.h" #include "entry.h" #include "arguments.h" +#include "memberdef.h" //-----------------------------variables --------------------------------------------------------------------------- //static MyParserVhdl* myconv=0; @@ -81,9 +82,9 @@ static int levelCounter; static QCString confName; static QCString genLabels; static QCString lab; - +static QCString forL; static QList<VhdlConfNode> configL; -static VhdlConfNode* currNode; + static int currP=0; @@ -107,9 +108,9 @@ static void addCompInst(char *n, char* instName,char* comp,int line); static void newEntry(); static void initEntry(Entry *e); -static void popConfig(); -static void pushLabel(const QCString &label); -static void popLabel(); + +static void pushLabel(QCString &,QCString&); +static QCString popLabel(QCString&); static void addConfigureNode(const char* a,const char*b, bool isRoot,bool isLeave,bool inlineConf=FALSE); //static bool addLibUseClause(const QCString &type); @@ -497,7 +498,8 @@ arch_body : arch_start error t_END arch_body_2 t_Semicolon arch_start : t_ARCHITECTURE t_Identifier t_OF t_Identifier t_IS { $$=$4+"::"+$2; - pushLabel($2); + genLabels.resize(0); + pushLabel(genLabels,$2); lastCompound=current; addVhdlType($$,getParsedLine(t_ARCHITECTURE),Entry::CLASS_SEC,VhdlDocGen::ARCHITECTURE,0,0,Private); } @@ -514,18 +516,25 @@ arch_body_3 : block_decltve_item config_decl : config_start error t_END config_decl_2 t_Semicolon { genLabels.resize(0); } config_decl : config_start config_decl_1 block_config t_END config_decl_2 t_Semicolon { genLabels.resize(0); } { + QCString k=$3; + QCString k2=$2; confName=""; } config_start : t_CONFIGURATION t_Identifier t_OF t_Identifier t_IS { + forL.resize(0); confName=$2+"::"+$4; addVhdlType($2.data(),getParsedLine(t_CONFIGURATION),Entry::VARIABLE_SEC,VhdlDocGen::CONFIG,"configuration",$4.data()); } config_decl_2 : /* empty */ { $$=""; } -config_decl_2 : t_Identifier { $$=$1; } +config_decl_2 : t_Identifier + { + QCString l=$1; + $$=$1; + } config_decl_2 : t_CONFIGURATION { $$="configuration"; } config_decl_2 : t_CONFIGURATION t_Identifier { $$=$2; } config_decl_1 : /* empty */ { $$=""; } @@ -1360,9 +1369,13 @@ concurrent_stat : block_stat {$$=$1;} | generate_stat {$$=$1;} | procs_stat -block_stat: t_Identifier t_Colon t_BLOCK block_stat_0 block_stat_1 block_stat_2 +block_stat: t_Identifier t_Colon t_BLOCK {pushLabel(genLabels,$1); }block_stat_0 block_stat_1 block_stat_2 block_stat_3 block_stat_4 t_BEGIN concurrent_stats t_END t_BLOCK block_stat_5 - t_Semicolon {$$=$1+":block"+$4+$5+$6+$7+$8+"begin "+$10+" block "+$13;} + t_Semicolon + { + $$=$1+":block"; //+$4+$5+$6+$7+$8+"begin "+$10+" block "+$13; + genLabels=popLabel(genLabels); + } block_stat_5: /* empty */ {$$="";} block_stat_5: t_Identifier {$$=$1;} block_stat_4: /* empty */ {$$=""; } @@ -1396,20 +1409,20 @@ vcomp_stat: t_COMPONENT { $$="component";yyLineNr=s_str.iLine; } comp_inst_stat: t_Identifier t_Colon name { yyLineNr=s_str.iLine; } t_GENERIC t_MAP association_list comp_inst_stat_1 t_Semicolon { - addCompInst($1.data(),$3.data(),0,yyLineNr);$$=""; + addCompInst($1.lower().data(),$3.lower().data(),0,yyLineNr);$$=""; } comp_inst_stat: t_Identifier t_Colon name { yyLineNr=s_str.iLine; } t_PORT t_MAP association_list t_Semicolon { - addCompInst($1.data(),$3.data(),0,yyLineNr);$$="222"; + addCompInst($1.lower().data(),$3.lower().data(),0,yyLineNr);$$="222"; } comp_inst_stat: t_Identifier t_Colon vcomp_stat mark_comp t_PORT t_MAP association_list t_Semicolon { - addCompInst($1.data(),$4.data(),$3.data(),yyLineNr);$$=""; + addCompInst($1.lower().data(),$4.lower().data(),$3.data(),yyLineNr);$$=""; } comp_inst_stat: t_Identifier t_Colon vcomp_stat mark_comp t_GENERIC t_MAP association_list comp_inst_stat_1 t_Semicolon { - addCompInst($1.data(),$4.data(),$3.data(),yyLineNr);$$=""; + addCompInst($1.lower().data(),$4.lower().data(),$3.lower().data(),yyLineNr);$$=""; } comp_inst_stat_1: /* empty {$$="";} */ comp_inst_stat_1: t_PORT t_MAP association_list // {$$="port map"+$3;} @@ -1489,17 +1502,17 @@ gen_stat1: /* empty */ {$$="";} generate_statement_body: gen_stat1 concurrent_stats generate_stat : t_Identifier t_Colon - { pushLabel($1); } + { pushLabel(genLabels,$1); } generation_scheme t_GENERATE gen_stat1 concurrent_stats opstat // stems from VHDL 2008 generate_statement_body -opstat: end_stats t_END generate_stat_1 t_Semicolon { popLabel(); } -opstat: t_END generate_stat_1 t_Semicolon { popLabel(); } +opstat: end_stats t_END generate_stat_1 t_Semicolon { genLabels=popLabel(genLabels); } +opstat: t_END generate_stat_1 t_Semicolon {genLabels=popLabel(genLabels); } generate_stat: t_Identifier t_Colon - { pushLabel($1); } - if_generation_scheme opstat // t_END generate_stat_1 t_Semicolon { popLabel(); } + { pushLabel(genLabels,$1); } + if_generation_scheme opstat // t_END generate_stat_1 t_Semicolon { genLabels=popLabel(genLabels);} generate_stat: t_Identifier t_Colon case_scheme generate_stat_1: t_GENERATE { $$=""; } @@ -1677,6 +1690,7 @@ if_stat_1 : /* empty */ {$$=""; } if_stat_1 : if_stat_1 if_stat_3 {$$=$1+$2; } if_stat_3 : t_ELSIF expr t_THEN { + $2.prepend("elsif "); FlowNode::addFlowNode(FlowNode::ELSIF_NO,0,$2.data()); } seq_stats {$$="";} @@ -1789,9 +1803,8 @@ comp_decl_2: t_PORT interf_list t_Semicolon { $$=$2; } comp_decl_1: /* empty */ { $$=""; } comp_decl_1: t_GENERIC interf_list t_Semicolon { $$=$2; } -block_config: t_FOR block_spec block_config_1 block_config_2 t_END t_FOR t_Semicolon +block_config: t_FOR block_spec block_config_1 block_config_2 { levelCounter--;} t_END t_FOR t_Semicolon { - popConfig(); } block_config: t_FOR error t_END t_FOR t_Semicolon { $$=""; } @@ -1805,11 +1818,11 @@ block_config_4: use_clause { $$=$1; } block_spec: name { $$=$1; - if (levelCounter==0) addConfigureNode($1.data(),NULL,TRUE,FALSE); else addConfigureNode($1.data(),NULL,FALSE,FALSE); + levelCounter++; } config_item: block_config { $$=$1; } @@ -1818,31 +1831,41 @@ config_item: comp_config { $$=$1; } comp_config: t_FOR comp_spec comp_config_1 comp_config_2 t_END t_FOR t_Semicolon { $$=$2+" "+$3+" "+$4; - popConfig(); } comp_config_2: /* empty */ { $$=""; } comp_config_2: block_config { $$=$1; } comp_config_1: /*empty*/ { $$=""; } -comp_config_1: binding_indic_1 binding_indic_2 t_Semicolon { $$=""; } +comp_config_1: binding_indic_1 binding_indic_2 t_Semicolon +{ + $$=""; +} comp_config_1: t_USE t_VUNIT idf_list t_Semicolon { $$=""; } comp_config_1: t_USE binding_indic t_Semicolon { - addConfigureNode(compSpec.data(),$2.data(),FALSE,FALSE); + addConfigureNode(compSpec.data(),$2.data(),FALSE,TRUE); } config_spec: t_FOR comp_spec comp_spec_stat t_Semicolon { - addConfigureNode($2.data(),$3.data(),TRUE,FALSE,TRUE);currNode->confVhdl=lastCompound->name; + addConfigureNode($2.data(),$3.data(),TRUE,FALSE,TRUE); } config_spec: t_FOR comp_spec comp_spec_stat t_Semicolon t_END t_FOR t_Semicolon { - addConfigureNode($2.data(),$3.data(),TRUE,FALSE,TRUE);currNode->confVhdl=lastCompound->name; - } + addConfigureNode($2.data(),$3.data(),TRUE,FALSE,TRUE); + } -comp_spec_stat: t_USE binding_indic { $$=$2; } -comp_spec_stat: t_USE t_VUNIT idf_list t_Semicolon { $$=""; } -comp_spec_stat: binding_indic_1 binding_indic_2 { $$=""; } +comp_spec_stat: t_USE binding_indic { + $$=$2; + } +comp_spec_stat: t_USE t_VUNIT idf_list t_Semicolon +{ + $$=""; +} +comp_spec_stat: binding_indic_1 binding_indic_2 + { + $$=""; + } comp_spec: inst_list t_Colon expr { @@ -2209,14 +2232,13 @@ extern YYSTYPE vhdlScanYYlval; void vhdlScanYYerror(const char* /*str*/) { - // fprintf(stderr,"\n<---error at line %d : [ %s] in file : %s ---->",s_str.yyLineNr,s_str.qstr.data(),s_str.fileName); - // exit(0); + // fprintf(stderr,"\n<---error at line %d : [ %s] in file : %s ---->",s_str.yyLineNr,s_str.qstr.data(),s_str.fileName); + // exit(0); } - void vhdlParse() { -vhdlScanYYparse(); + vhdlScanYYparse(); } struct VhdlContainer* getVhdlCont() @@ -2241,12 +2263,17 @@ static void addCompInst(char *n, char* instName, char* comp,int iLine) current->startLine=iLine; current->bodyLine=iLine; current->type=instName; // foo:instname e.g proto or work. proto(ttt) - current->exception=genLabels; // |arch|label1:label2... + current->exception=genLabels.lower(); // |arch|label1:label2... current->name=n; // foo current->args=lastCompound->name; // architecture name current->includeName=comp; // component/enity/configuration - - //printf(" \n genlable: [%s] inst: [%s] name: [%s] %d\n",n,instName,comp,iLine); + int u=genLabels.find("|",1); + if (u>0) + { + current->write=genLabels.right(genLabels.length()-u); + current->read=genLabels.left(u); + } + //printf (" \n genlable: [%s] inst: [%s] name: [%s] %d\n",n,instName,comp,iLine); if (lastCompound) { @@ -2256,11 +2283,10 @@ static void addCompInst(char *n, char* instName, char* comp,int iLine) initEntry(current); instFiles.append(new Entry(*current)); } - + Entry *temp=current; // hold current pointer (temp=oldEntry) current=new Entry; // (oldEntry != current) delete temp; - } else { @@ -2268,30 +2294,26 @@ static void addCompInst(char *n, char* instName, char* comp,int iLine) } } -static void pushLabel(const QCString &label) +static void pushLabel( QCString &label,QCString & val) { - genLabels+="|"+label; + label+="|"; + label+=val; } -static void popLabel() +static QCString popLabel(QCString & q) { - int u=genLabels.findRev("|"); - if (u<0) return; - genLabels=genLabels.left(u); + QCString u=q; + int i=q.findRev("|"); + if (i<0) return ""; + q = q.left(i); + return q; } -static void popConfig() +static void addConfigureNode(const char* a,const char*b, bool,bool isLeaf,bool inlineConf) { - assert(currNode); - currNode=currNode->prevNode; - printf("\n pop arch %s ",currNode->arch.data()); -} - -static void addConfigureNode(const char* a,const char*b, bool isRoot,bool isLeave,bool inlineConf) -{ - assert(false); - VhdlConfNode* co; + VhdlConfNode* co; QCString ent,arch,lab; + QCString l=genLabels; ent=a; lab = VhdlDocGen::parseForConfig(ent,arch); @@ -2300,32 +2322,45 @@ static void addConfigureNode(const char* a,const char*b, bool isRoot,bool isLeav ent=b; lab=VhdlDocGen::parseForBinding(ent,arch); } + int level=0; - co=new VhdlConfNode(a,b,confName.data()); - if (inlineConf) + if(!configL.isEmpty()) { - co->isInlineConf=TRUE; + VhdlConfNode* vc=configL.last(); + level=vc->level; + if (level<levelCounter) + { + if (!isLeaf) + { + pushLabel(forL,ent); + } + } + else if (level>levelCounter) + { + forL=popLabel(forL); + } } - - if (isRoot) + else { - co->isRoot=TRUE; - configL.append(co); - currNode=co; - currNode->prevNode=currNode; + pushLabel(forL,ent); } - else if (!isLeave) + + + if (inlineConf) { - currNode->addNode(co); - co->prevNode=currNode; - currNode=co; + confName=lastCompound->name; } - else + + //fprintf(stderr,"\n[%s %d %d]\n",forL.data(),levelCounter,level); + co=new VhdlConfNode(a,b,confName.lower().data(),forL.lower().data(),isLeaf); + + if (inlineConf) { - assert(0); - co=new VhdlConfNode(a,b,confName.data()); - currNode->addNode(co); + co->isInlineConf=TRUE; } + + configL.append(co); + }// addConfigure // ------------------------------------------------------------------------------------------------------------ @@ -2351,7 +2386,7 @@ static void initEntry(Entry *e) } static void addProto(const char *s1,const char *s2,const char *s3, - const char *s4,const char *s5,const char *s6) + const char *s4,const char *s5,const char *s6) { (void)s5; // avoid unused warning static QRegExp reg("[\\s]"); @@ -2392,14 +2427,16 @@ static void addProto(const char *s1,const char *s2,const char *s3, } static void createFunction(const QCString &impure,int spec, - const QCString &fname) + const QCString &fname) { int it=0; current->spec=spec; current->section=Entry::FUNCTION_SEC; -if(impure=="impure" || impure=="pure") - current->exception=impure; + if (impure=="impure" || impure=="pure") + { + current->exception=impure; + } if (parse_sec==GEN_SEC) { @@ -2424,8 +2461,8 @@ if(impure=="impure" || impure=="pure") it=t_PROCESS; current->args=fname; current->name=impure; - if (!fname.isEmpty()) VhdlDocGen::deleteAllChars(current->args,' '); + if (!fname.isEmpty()) { QStringList q1=QStringList::split(",",fname); for (uint ii=0;ii<q1.count();ii++) @@ -2435,21 +2472,19 @@ if(impure=="impure" || impure=="pure") current->argList->append(arg); } } - return; + return; } - - current->startLine=getParsedLine(it); - current->bodyLine=getParsedLine(it); - + current->startLine=getParsedLine(it); + current->bodyLine=getParsedLine(it); } static void addVhdlType(const QCString &name,int startLine,int section,int spec, - const char* args,const char* type,Protection prot) + const char* args,const char* type,Protection prot) { static QRegExp reg("[\\s]"); - - if (isFuncProcProced() || VhdlDocGen::getFlowMember()) + + if (isFuncProcProced() || VhdlDocGen::getFlowMember()) { return; } @@ -2465,11 +2500,11 @@ static void addVhdlType(const QCString &name,int startLine,int section,int spec, for (uint u=0;u<ql.count();u++) { current->name=ql[u].utf8(); - // if (section==Entry::VARIABLE_SEC && !(spec == VhdlDocGen::USE || spec == VhdlDocGen::LIBRARY) ) - // { - // current->name.prepend(VhdlDocGen::getRecordNumber()); - // } - + // if (section==Entry::VARIABLE_SEC && !(spec == VhdlDocGen::USE || spec == VhdlDocGen::LIBRARY) ) + // { + // current->name.prepend(VhdlDocGen::getRecordNumber()); + // } + current->startLine=startLine; current->bodyLine=startLine; current->section=section; @@ -2521,48 +2556,55 @@ static void newEntry() void createFlow(QCString val) { - - if(!VhdlDocGen::getFlowMember()) return; - QCString q,ret; - - if(currP==VhdlDocGen::FUNCTION) - { - q=":function( "; - FlowNode::alignFuncProc(q,tempEntry->argList,true); - q+=")"; - } - else if(currP==VhdlDocGen::PROCEDURE) - { - q=":procedure ("; - FlowNode::alignFuncProc(q,tempEntry->argList,false); - q+=")"; - } - else { - q=":process( "+tempEntry->args; - q+=")"; - } - - q.prepend(VhdlDocGen::getFlowMember()->name().data()); - - FlowNode::addFlowNode(FlowNode::START_NO,q,0); - - if(!val.isEmpty()) - FlowNode::addFlowNode(FlowNode::VARIABLE_NO,val,0); - - if(currP==VhdlDocGen::FUNCTION) - { - ret="end function "; - } - else if(currP==VhdlDocGen::PROCEDURE) - ret="end procedure"; - else - ret="end process "; - - FlowNode::addFlowNode(FlowNode::END_NO,ret,0); - // FlowNode::printFlowList(); - FlowNode::writeFlowNode(); - currP=0; - } - + if (!VhdlDocGen::getFlowMember()) + { + return; + } + QCString q,ret; + + if (currP==VhdlDocGen::FUNCTION) + { + q=":function( "; + FlowNode::alignFuncProc(q,tempEntry->argList,true); + q+=")"; + } + else if (currP==VhdlDocGen::PROCEDURE) + { + q=":procedure ("; + FlowNode::alignFuncProc(q,tempEntry->argList,false); + q+=")"; + } + else + { + q=":process( "+tempEntry->args; + q+=")"; + } + + q.prepend(VhdlDocGen::getFlowMember()->name().data()); + + FlowNode::addFlowNode(FlowNode::START_NO,q,0); + + if (!val.isEmpty()) + { + FlowNode::addFlowNode(FlowNode::VARIABLE_NO,val,0); + } + + if (currP==VhdlDocGen::FUNCTION) + { + ret="end function "; + } + else if (currP==VhdlDocGen::PROCEDURE) + { + ret="end procedure"; + } + else + { + ret="end process "; + } + + FlowNode::addFlowNode(FlowNode::END_NO,ret,0); + // FlowNode::printFlowList(); + FlowNode::writeFlowNode(); + currP=0; +} -
\ No newline at end of file diff --git a/src/vhdlscanner.h b/src/vhdlscanner.h index 7fbed18..c1192cf 100644 --- a/src/vhdlscanner.h +++ b/src/vhdlscanner.h @@ -30,7 +30,6 @@ #include <qdict.h> #include "entry.h" -#include "memberlist.h" class Entry; class ClassSDict; @@ -38,6 +37,7 @@ class FileStorage; class ClassDef; class MemberDef; class QStringList; +class MemberList; /** VHDL parser using state-based lexical scanning. @@ -79,33 +79,33 @@ struct VhdlContainer Entry* root; // root }; -/** Configuation node for VHDL */ +/** Configuration node for VHDL */ struct VhdlConfNode { - VhdlConfNode *prevNode; - VhdlConfNode(const char* a,const char* b,const char* config) + VhdlConfNode(const char* a,const char* b,const char* config,const char* cs,bool leaf) { arch=a; // architecture e.g. for iobuffer + arch=arch.lower(); binding=b; // binding e.g. use entiy work.xxx(bev) + binding=binding.lower(); confVhdl=config; // configuration foo is bar - isBind=false; - prevNode=NULL; - isRoot=false; + compSpec=cs; isInlineConf=false; // primary configuration? + isLeaf=leaf; }; QCString confVhdl; QCString arch; QCString binding; - QList<VhdlConfNode> confN; - bool isBind; + QCString compSpec; + int level; + bool isLeaf; bool isInlineConf; - bool isRoot; - void addNode(VhdlConfNode* n) { confN.append(n); } - bool isBinding() { return binding.isEmpty(); } }; + + // returns the current conpound entity,architecture, package,package body Entry* getVhdlCompound(); diff --git a/src/vhdlscanner.l b/src/vhdlscanner.l index e7de626..898713e 100644 --- a/src/vhdlscanner.l +++ b/src/vhdlscanner.l @@ -34,7 +34,7 @@ *******************************************************/ /****************************************************************************** * modified for doxygen by M. Kreis - * extended to VHDL 93/2002/2008 + * extended to VHDL 93/2008 ******************************************************************************/ %{ @@ -42,29 +42,27 @@ typedef int YYSTYPE; #endif -#include <ctype.h> #include <search.h> - #include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> #include <ctype.h> + +#include <qmap.h> #include "commentscan.h" #include "vhdlparser.h" #include "vhdlscanner.h" - #include "doxygen.h" #include "searchindex.h" -#include <ctype.h> #include "scanner.h" #include "vhdldocgen.h" #include "util.h" #include "bufstr.h" #include "message.h" #include "vhdlcode.h" -#include <qmap.h> #include "entry.h" +#include "config.h" #define YY_NO_INPUT 1 diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp index f82e9d6..05da2a0 100644 --- a/src/xmldocvisitor.cpp +++ b/src/xmldocvisitor.cpp @@ -16,6 +16,8 @@ * */ +#include <qfileinfo.h> + #include "xmldocvisitor.h" #include "docparser.h" #include "language.h" @@ -25,8 +27,9 @@ #include "dot.h" #include "message.h" #include "util.h" -#include <qfileinfo.h> #include "parserintf.h" +#include "filename.h" +#include "config.h" XmlDocVisitor::XmlDocVisitor(FTextStream &t,CodeOutputInterface &ci) : DocVisitor(DocVisitor_XML), m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE) @@ -1038,6 +1041,13 @@ void XmlDocVisitor::visitPost(DocHtmlBlockQuote *) m_t << "</blockquote>"; } +void XmlDocVisitor::visitPre(DocVhdlFlow *) +{ +} + +void XmlDocVisitor::visitPost(DocVhdlFlow *) +{ +} void XmlDocVisitor::filter(const char *str) { diff --git a/src/xmldocvisitor.h b/src/xmldocvisitor.h index dbe4bd5..77242a1 100644 --- a/src/xmldocvisitor.h +++ b/src/xmldocvisitor.h @@ -133,6 +133,8 @@ class XmlDocVisitor : public DocVisitor void visitPost(DocText *); void visitPre(DocHtmlBlockQuote *); void visitPost(DocHtmlBlockQuote *); + void visitPre(DocVhdlFlow *); + void visitPost(DocVhdlFlow *); private: diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 5c71cd6..e5ac2d7 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -15,7 +15,11 @@ #include <stdlib.h> -#include "qtbc.h" +#include <qdir.h> +#include <qfile.h> +#include <qtextstream.h> +#include <qintdict.h> + #include "xmlgen.h" #include "doxygen.h" #include "message.h" @@ -33,11 +37,14 @@ #include "language.h" #include "parserintf.h" #include "arguments.h" - -#include <qdir.h> -#include <qfile.h> -#include <qtextstream.h> -#include <qintdict.h> +#include "memberlist.h" +#include "groupdef.h" +#include "memberdef.h" +#include "namespacedef.h" +#include "membername.h" +#include "membergroup.h" +#include "dirdef.h" +#include "section.h" // no debug info #define XML_DB(x) do {} while(0) @@ -66,41 +73,41 @@ class XmlSectionMapper : public QIntDict<char> public: XmlSectionMapper() : QIntDict<char>(47) { - insert(MemberList::pubTypes,"public-type"); - insert(MemberList::pubMethods,"public-func"); - insert(MemberList::pubAttribs,"public-attrib"); - insert(MemberList::pubSlots,"public-slot"); - insert(MemberList::signals,"signal"); - insert(MemberList::dcopMethods,"dcop-func"); - insert(MemberList::properties,"property"); - insert(MemberList::events,"event"); - insert(MemberList::pubStaticMethods,"public-static-func"); - insert(MemberList::pubStaticAttribs,"public-static-attrib"); - insert(MemberList::proTypes,"protected-type"); - insert(MemberList::proMethods,"protected-func"); - insert(MemberList::proAttribs,"protected-attrib"); - insert(MemberList::proSlots,"protected-slot"); - insert(MemberList::proStaticMethods,"protected-static-func"); - insert(MemberList::proStaticAttribs,"protected-static-attrib"); - insert(MemberList::pacTypes,"package-type"); - insert(MemberList::pacMethods,"package-func"); - insert(MemberList::pacAttribs,"package-attrib"); - insert(MemberList::pacStaticMethods,"package-static-func"); - insert(MemberList::pacStaticAttribs,"package-static-attrib"); - insert(MemberList::priTypes,"private-type"); - insert(MemberList::priMethods,"private-func"); - insert(MemberList::priAttribs,"private-attrib"); - insert(MemberList::priSlots,"private-slot"); - insert(MemberList::priStaticMethods,"private-static-func"); - insert(MemberList::priStaticAttribs,"private-static-attrib"); - insert(MemberList::friends,"friend"); - insert(MemberList::related,"related"); - insert(MemberList::decDefineMembers,"define"); - insert(MemberList::decProtoMembers,"prototype"); - insert(MemberList::decTypedefMembers,"typedef"); - insert(MemberList::decEnumMembers,"enum"); - insert(MemberList::decFuncMembers,"func"); - insert(MemberList::decVarMembers,"var"); + insert(MemberListType_pubTypes,"public-type"); + insert(MemberListType_pubMethods,"public-func"); + insert(MemberListType_pubAttribs,"public-attrib"); + insert(MemberListType_pubSlots,"public-slot"); + insert(MemberListType_signals,"signal"); + insert(MemberListType_dcopMethods,"dcop-func"); + insert(MemberListType_properties,"property"); + insert(MemberListType_events,"event"); + insert(MemberListType_pubStaticMethods,"public-static-func"); + insert(MemberListType_pubStaticAttribs,"public-static-attrib"); + insert(MemberListType_proTypes,"protected-type"); + insert(MemberListType_proMethods,"protected-func"); + insert(MemberListType_proAttribs,"protected-attrib"); + insert(MemberListType_proSlots,"protected-slot"); + insert(MemberListType_proStaticMethods,"protected-static-func"); + insert(MemberListType_proStaticAttribs,"protected-static-attrib"); + insert(MemberListType_pacTypes,"package-type"); + insert(MemberListType_pacMethods,"package-func"); + insert(MemberListType_pacAttribs,"package-attrib"); + insert(MemberListType_pacStaticMethods,"package-static-func"); + insert(MemberListType_pacStaticAttribs,"package-static-attrib"); + insert(MemberListType_priTypes,"private-type"); + insert(MemberListType_priMethods,"private-func"); + insert(MemberListType_priAttribs,"private-attrib"); + insert(MemberListType_priSlots,"private-slot"); + insert(MemberListType_priStaticMethods,"private-static-func"); + insert(MemberListType_priStaticAttribs,"private-static-attrib"); + insert(MemberListType_friends,"friend"); + insert(MemberListType_related,"related"); + insert(MemberListType_decDefineMembers,"define"); + insert(MemberListType_decProtoMembers,"prototype"); + insert(MemberListType_decTypedefMembers,"typedef"); + insert(MemberListType_decEnumMembers,"enum"); + insert(MemberListType_decFuncMembers,"func"); + insert(MemberListType_decVarMembers,"var"); } }; @@ -589,7 +596,7 @@ static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,De // - call graph // enum values are written as part of the enum - if (md->memberType()==MemberDef::EnumValue) return; + if (md->memberType()==MemberType_EnumValue) return; if (md->isHidden()) return; //if (md->name().at(0)=='@') return; // anonymous member @@ -600,18 +607,18 @@ static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,De bool isFunc=FALSE; switch (md->memberType()) { - case MemberDef::Define: memType="define"; break; - case MemberDef::EnumValue: ASSERT(0); break; - case MemberDef::Property: memType="property"; break; - case MemberDef::Event: memType="event"; break; - case MemberDef::Variable: memType="variable"; break; - case MemberDef::Typedef: memType="typedef"; break; - case MemberDef::Enumeration: memType="enum"; break; - case MemberDef::Function: memType="function"; isFunc=TRUE; break; - case MemberDef::Signal: memType="signal"; isFunc=TRUE; break; - case MemberDef::Friend: memType="friend"; isFunc=TRUE; break; - case MemberDef::DCOP: memType="dcop"; isFunc=TRUE; break; - case MemberDef::Slot: memType="slot"; isFunc=TRUE; break; + case MemberType_Define: memType="define"; break; + case MemberType_EnumValue: ASSERT(0); break; + case MemberType_Property: memType="property"; break; + case MemberType_Event: memType="event"; break; + case MemberType_Variable: memType="variable"; break; + case MemberType_Typedef: memType="typedef"; break; + case MemberType_Enumeration: memType="enum"; break; + case MemberType_Function: memType="function"; isFunc=TRUE; break; + case MemberType_Signal: memType="signal"; isFunc=TRUE; break; + case MemberType_Friend: memType="friend"; isFunc=TRUE; break; + case MemberType_DCOP: memType="dcop"; isFunc=TRUE; break; + case MemberType_Slot: memType="slot"; isFunc=TRUE; break; } ti << " <member refid=\"" << memberOutputFileBase(md) @@ -702,7 +709,7 @@ static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,De t << "\""; } - if (md->memberType() == MemberDef::Variable) + if (md->memberType() == MemberType_Variable) { //ArgumentList *al = md->argumentList(); //t << " volatile=\""; @@ -718,7 +725,7 @@ static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,De } } - else if (md->memberType() == MemberDef::Property) + else if (md->memberType() == MemberType_Property) { t << " readable=\""; if (md->isReadable()) t << "yes"; else t << "no"; @@ -747,7 +754,7 @@ static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,De t << "\""; } } - else if (md->memberType() == MemberDef::Event) + else if (md->memberType() == MemberType_Event) { t << " add=\""; if (md->isAddable()) t << "yes"; else t << "no"; @@ -764,11 +771,11 @@ static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,De t << ">" << endl; - if (md->memberType()!=MemberDef::Define && - md->memberType()!=MemberDef::Enumeration + if (md->memberType()!=MemberType_Define && + md->memberType()!=MemberType_Enumeration ) { - if (md->memberType()!=MemberDef::Typedef) + if (md->memberType()!=MemberType_Typedef) { writeMemberTemplateLists(md,t); } @@ -783,14 +790,14 @@ static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,De t << " <name>" << convertToXML(md->name()) << "</name>" << endl; - if (md->memberType() == MemberDef::Property) + if (md->memberType() == MemberType_Property) { if (md->isReadable()) t << " <read>" << convertToXML(md->getReadAccessor()) << "</read>" << endl; if (md->isWritable()) t << " <write>" << convertToXML(md->getWriteAccessor()) << "</write>" << endl; } - if (md->memberType()==MemberDef::Variable && md->bitfieldString()) + if (md->memberType()==MemberType_Variable && md->bitfieldString()) { QCString bitfield = md->bitfieldString(); if (bitfield.at(0)==':') bitfield=bitfield.mid(1); @@ -877,7 +884,7 @@ static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,De } } } - else if (md->memberType()==MemberDef::Define && + else if (md->memberType()==MemberType_Define && md->argsString()) // define { if (md->argumentList()->count()==0) // special case for "foo()" to @@ -911,7 +918,7 @@ static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,De t << "</exceptions>" << endl; } - if (md->memberType()==MemberDef::Enumeration) // enum + if (md->memberType()==MemberType_Enumeration) // enum { LockingPtr<MemberList> enumFields = md->enumFieldList(); if (enumFields!=0) @@ -1362,7 +1369,7 @@ static void generateXMLForClass(ClassDef *cd,FTextStream &ti) MemberList *ml; for (mli.toFirst();(ml=mli.current());++mli) { - if ((ml->listType()&MemberList::detailedLists)==0) + if ((ml->listType()&MemberListType_detailedLists)==0) { generateXMLSection(cd,ti,t,ml,g_xmlSectionMapper.find(ml->listType())); } @@ -1493,7 +1500,7 @@ static void generateXMLForNamespace(NamespaceDef *nd,FTextStream &ti) MemberList *ml; for (mli.toFirst();(ml=mli.current());++mli) { - if ((ml->listType()&MemberList::declarationLists)!=0) + if ((ml->listType()&MemberListType_declarationLists)!=0) { generateXMLSection(nd,ti,t,ml,g_xmlSectionMapper.find(ml->listType())); } @@ -1636,7 +1643,7 @@ static void generateXMLForFile(FileDef *fd,FTextStream &ti) MemberList *ml; for (mli.toFirst();(ml=mli.current());++mli) { - if ((ml->listType()&MemberList::declarationLists)!=0) + if ((ml->listType()&MemberListType_declarationLists)!=0) { generateXMLSection(fd,ti,t,ml,g_xmlSectionMapper.find(ml->listType())); } @@ -1726,7 +1733,7 @@ static void generateXMLForGroup(GroupDef *gd,FTextStream &ti) MemberList *ml; for (mli.toFirst();(ml=mli.current());++mli) { - if ((ml->listType()&MemberList::declarationLists)!=0) + if ((ml->listType()&MemberListType_declarationLists)!=0) { generateXMLSection(gd,ti,t,ml,g_xmlSectionMapper.find(ml->listType())); } @@ -1829,7 +1836,7 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample) t << " <compoundname>" << convertToXML(pd->name()) << "</compoundname>" << endl; - SectionInfo *si = Doxygen::sectionDict.find(pd->name()); + SectionInfo *si = Doxygen::sectionDict->find(pd->name()); if (si) { t << " <title>" << convertToXML(si->title) << "</title>" << endl; diff --git a/winbuild/Doxygen.vcproj b/winbuild/Doxygen.vcproj index be37221..7a0e734 100644 --- a/winbuild/Doxygen.vcproj +++ b/winbuild/Doxygen.vcproj @@ -695,6 +695,10 @@ </FileConfiguration> </File> <File + RelativePath="..\src\condparser.cpp" + > + </File> + <File RelativePath="..\src\config.cpp" > </File> @@ -3610,6 +3614,10 @@ > </File> <File + RelativePath="..\src\condparser.h" + > + </File> + <File RelativePath="..\src\config.h" > </File> |