Commit 2fcc16df authored by dimitri's avatar dimitri

Release-1.4.1-20050315

parent 5a640083
DOXYGEN Version 1.4.1-20050307 DOXYGEN Version 1.4.1-20050315
Please read the installation section of the manual Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions. (http://www.doxygen.org/install.html) for instructions.
-------- --------
Dimitri van Heesch (07 March 2005) Dimitri van Heesch (15 March 2005)
DOXYGEN Version 1.4.1_20050307 DOXYGEN Version 1.4.1_20050315
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. ...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (07 March 2005) Dimitri van Heesch (dimitri@stack.nl) (15 March 2005)
1.4.1-20050307 1.4.1-20050315
...@@ -137,6 +137,7 @@ documentation: ...@@ -137,6 +137,7 @@ documentation:
\refitem cmdskip \\skip \refitem cmdskip \\skip
\refitem cmdskipline \\skipline \refitem cmdskipline \\skipline
\refitem cmdstruct \\struct \refitem cmdstruct \\struct
\refitem cmdsubpage \\subpage
\refitem cmdsubsection \\subsection \refitem cmdsubsection \\subsection
\refitem cmdsubsubsection \\subsubsection \refitem cmdsubsubsection \\subsubsection
\refitem cmdtest \\test \refitem cmdtest \\test
...@@ -1322,6 +1323,58 @@ void memcpy(void *dest, const void *src, size_t n); ...@@ -1322,6 +1323,58 @@ void memcpy(void *dest, const void *src, size_t n);
\sa \sa
Section \ref cmdpage "\\page" for an example of the \\ref command. Section \ref cmdpage "\\page" for an example of the \\ref command.
<hr>
\section cmdsubpage \\subpage <name> ["(text)"]
\addindex \\subpage
This command can be used to create a hierarchy of pages. The
same structure can be made using the \ref cmddefgroup "\\defgroup" and
\ref cmdingroup "\\ingroup" commands, but for pages the \\subpage command
is often more convenient. The main page (see \ref cmdmainpage "\\mainpage")
is typically the root of hierarchy.
This command behaves similar as \ref cmdref "\\ref" in the sense that
it creates a reference to a page labeled \<name\> with the optional
link text as specified in the second argument.
It differs from the \\ref command in that it only works for pages,
and creates a parent-child relation between pages, where the
child page (or sub page) is identified by label \<name\>.
See the \ref cmdsection "\\section"
and \ref cmdsubsection "\\subsection" commands if you want to add structure
without creating multiple pages.
\note Each page can be the sub page of only one other page and
no cyclic relations are allowed, i.e. the page hierarchy must have a tree
structure.
Here is an example:
\verbatim
/*! \mainpage A simple manual
Some general info.
This manual is divided in the following sections:
- \subpage intro
- \subpage advanced "Advanced usage"
*/
//-----------------------------------------------------------
/*! \page intro Introduction
This page introduces the user to the topic.
Now you can proceed to the \ref advanced "advanced section".
*/
//-----------------------------------------------------------
/*! \page advanced Advanced Usage
This page is for advanced users.
Make sure you have first read \ref intro "the introduction".
*/
\endverbatim
<hr> <hr>
\section cmdsection \\section <section-name> (section title) \section cmdsection \\section <section-name> (section title)
......
...@@ -16,11 +16,13 @@ ...@@ -16,11 +16,13 @@
*/ */
/*! \page grouping Grouping /*! \page grouping Grouping
Doxygen has two mechanisms to group things together. Doxygen has three mechanisms to group things together.
One mechanism works at a global level, creating a new page One mechanism works at a global level, creating a new page
for each group. These groups are called "modules" in the documentation. for each group. These groups are called \ref modules "'modules'" in the documentation.
The other mechanism works within a member list of some compound entity, The second mechanism works within a member list of some compound entity,
and is refered to as a "member group". and is refered to as a \ref memgroup "'member groups'".
For \ref cmdpage "pages" there is a third grouping mechanism referred to
a \ref subpaging "subpaging".
\section modules Modules \section modules Modules
...@@ -31,46 +33,53 @@ variables, enums, typedefs, and defines, but also other groups. ...@@ -31,46 +33,53 @@ variables, enums, typedefs, and defines, but also other groups.
To define a group, you should put the \ref cmddefgroup "\\defgroup" To define a group, you should put the \ref cmddefgroup "\\defgroup"
command in a special comment block. The first argument of the command command in a special comment block. The first argument of the command
is a label that should uniquely identify the group. You can make an is a label that should uniquely identify the group.
entity a member of a specific group by putting The second argument is the name or title of the group as it should appear
in the documentation.
You can make an entity a member of a specific group by putting
a \ref cmdingroup "\\ingroup" command inside its documentation block. a \ref cmdingroup "\\ingroup" command inside its documentation block.
The second argument is the title of the group.
To avoid putting \ref cmdingroup "\\ingroup" commands in the documentation To avoid putting \ref cmdingroup "\\ingroup" commands in the documentation
of each member you can also group members together by the for each member you can also group members together by the
open marker <code>\@{</code> before the group and the open marker <code>\@{</code> before the group and the
closing marker <code>\@}</code> after the group. The markers can closing marker <code>\@}</code> after the group. The markers can
be put in the documentation of the group definition or in a separate be put in the documentation of the group definition or in a separate
documentation block. documentation block.
Groups can also be nested using these grouping markers. Groups themselves can also be nested using these grouping markers.
You will get an error message when you use the same group label more than once. You will get an error message when you use the same group label more than once.
If you don't want doxygen to enforce If you don't want doxygen to enforce unique labels, then you can
unique labels, then you can use \ref cmdaddtogroup "\\addtogroup" instead of use \ref cmdaddtogroup "\\addtogroup" instead of
\ref cmddefgroup "\\defgroup". It can be used exactly like \ref cmddefgroup "\\defgroup", \ref cmddefgroup "\\defgroup".
but when the group has been defined already, then it silently merges the existing documentation It can be used exactly like \ref cmddefgroup "\\defgroup",
with the new one. but when the group has been defined already, then it silently merges the
existing documentation with the new one.
The title of the group is optional for this command, so you can use The title of the group is optional for this command, so you can use
\verbatim \verbatim
/** \addtogroup <label> */ /** \addtogroup <label> */
/*\@{*/ /*\@{*/
/*\@}*/ /*\@}*/
\endverbatim \endverbatim
to add members to a group that is defined in more detail elsewhere. to add additional members to a group that is defined in more detail elsewhere.
Note that compound entities (like classes, files and namespaces) can Note that compound entities (like classes, files and namespaces) can
be put into multiple groups, but members (like variable, functions, typedefs be put into multiple groups, but members (like variable, functions, typedefs
and enums) can only be a member of one group and enums) can only be a member of one group
(this restriction is to avoid ambiguous linking targets). (this restriction is in place to avoid ambiguous linking targets in case
a member is not documented in the context of its class, namespace
Doxygen will put members into that group where the grouping definition had or file, but only visible as part of a group).
the highest priority: f.i. \ref cmdingroup "\\ingroup" overrides any automatic
grouping definition via <code>\@{</code> <code>\@}</code>. Conflicting grouping Doxygen will put members into the group whose definition has
definitions with the same priority trigger a warning, unless one definition the highest "priority": e.g. An explicit \ref cmdingroup "\\ingroup" overrides
was for a member without any explicit documentation. The following example an implicit grouping definition via <code>\@{</code> <code>\@}</code>.
puts VarInA into group A and silently resolves the conflict for IntegerVariable by Conflicting grouping definitions with the same priority trigger a warning,
putting it into group IntVariables, because the second instance of IntegerVariable unless one definition was for a member without any explicit documentation.
The following example puts VarInA into group A and silently resolves
the conflict for IntegerVariable by putting it into group IntVariables,
because the second instance of IntegerVariable
is undocumented: is undocumented:
\verbatim \verbatim
...@@ -192,4 +201,20 @@ Go to the <a href="formulas.html">next</a> section or return to the ...@@ -192,4 +201,20 @@ Go to the <a href="formulas.html">next</a> section or return to the
<a href="index.html">index</a>. <a href="index.html">index</a>.
\endhtmlonly \endhtmlonly
\section subpaging Subpaging
Information can be grouped into pages using the \ref cmdpage "\\page" and
\ref cmdsubpage "\\mainpage" commands. Normally, this results in a
flat list of pages, where the "main" page is the first in the list.
Instead of adding structure using the approach decribed in section
\ref modules "modules" it is often more natural and convienent to add
additional structure to the pages using the \ref cmdsubpage "\\subpage"
command.
For a page A the \\subpage command adds a link to another page B and at
the same time makes page B a subpage of A. This has the effect of making
two groups GA and GB, where GB is part of GA, page A is put in group GA,
and page B is put in group GB.
*/ */
...@@ -27,7 +27,7 @@ Version: $(VERSION) ...@@ -27,7 +27,7 @@ Version: $(VERSION)
<h2>Introduction</h2> <h2>Introduction</h2>
Doxygen is a documentation system for C++, C, Java, Objective-C, IDL Doxygen is a documentation system for C++, C, Java, Objective-C, IDL
(Corba and Microsoft flavors) and to some extent PHP, C# and D. (Corba and Microsoft flavors) and to some extent PHP, C#, D, and ActionScript.
It can help you in three ways: It can help you in three ways:
<ol> <ol>
......
...@@ -23,7 +23,7 @@ text fragments, generated by doxygen, can be produced in languages other ...@@ -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 than English (the default). The output language is chosen through the
configuration file (with default name and known as Doxyfile). configuration file (with default name and known as Doxyfile).
Currently (version 1.4.1-20050227), 30 languages Currently (version 1.4.1-20050314), 30 languages
are supported (sorted alphabetically): are supported (sorted alphabetically):
Afrikaans, Brazilian Portuguese, Catalan, Chinese, Chinese Afrikaans, Brazilian Portuguese, Catalan, Chinese, Chinese
Traditional, Croatian, Czech, Danish, Dutch, English, Finnish, French, Traditional, Croatian, Czech, Danish, Dutch, English, Finnish, French,
...@@ -90,7 +90,7 @@ when the translator was updated. ...@@ -90,7 +90,7 @@ when the translator was updated.
<td>Czech</td> <td>Czech</td>
<td>Petr P&#x0159;ikryl</td> <td>Petr P&#x0159;ikryl</td>
<td>prikrylp at skil dot cz</td> <td>prikrylp at skil dot cz</td>
<td>1.4.1</td> <td>up-to-date</td>
</tr> </tr>
<tr bgcolor="#ffffff"> <tr bgcolor="#ffffff">
<td>Danish</td> <td>Danish</td>
...@@ -204,7 +204,7 @@ when the translator was updated. ...@@ -204,7 +204,7 @@ when the translator was updated.
<td>Russian</td> <td>Russian</td>
<td>Alexandr Chelpanov</td> <td>Alexandr Chelpanov</td>
<td>cav at cryptopro dot ru</td> <td>cav at cryptopro dot ru</td>
<td>1.4.1</td> <td>up-to-date</td>
</tr> </tr>
<tr bgcolor="#ffffff"> <tr bgcolor="#ffffff">
<td>Serbian</td> <td>Serbian</td>
...@@ -234,7 +234,7 @@ when the translator was updated. ...@@ -234,7 +234,7 @@ when the translator was updated.
<td>Swedish</td> <td>Swedish</td>
<td>Mikael Hallin</td> <td>Mikael Hallin</td>
<td>mikaelhallin at yahoo dot se</td> <td>mikaelhallin at yahoo dot se</td>
<td>1.4.1</td> <td>up-to-date</td>
</tr> </tr>
<tr bgcolor="#ffffff"> <tr bgcolor="#ffffff">
<td>Ukrainian</td> <td>Ukrainian</td>
...@@ -271,7 +271,7 @@ when the translator was updated. ...@@ -271,7 +271,7 @@ when the translator was updated.
\hline \hline
Croatian & Boris Bralo & {\tt\tiny boris.bralo@zg.htnet.hr} & 1.4.1 \\ Croatian & Boris Bralo & {\tt\tiny boris.bralo@zg.htnet.hr} & 1.4.1 \\
\hline \hline
Czech & Petr P\v{r}ikryl & {\tt\tiny prikrylp@skil.cz} & 1.4.1 \\ Czech & Petr P\v{r}ikryl & {\tt\tiny prikrylp@skil.cz} & up-to-date \\
\hline \hline
Danish & Erik S\o{}e S\o{}rensen & {\tt\tiny eriksoe+doxygen@daimi.au.dk} & 1.3.9 \\ Danish & Erik S\o{}e S\o{}rensen & {\tt\tiny eriksoe+doxygen@daimi.au.dk} & 1.3.9 \\
\hline \hline
...@@ -317,7 +317,7 @@ when the translator was updated. ...@@ -317,7 +317,7 @@ when the translator was updated.
\hline \hline
Romanian & Alexandru Iosup & {\tt\tiny aiosup@yahoo.com} & 1.4.1 \\ Romanian & Alexandru Iosup & {\tt\tiny aiosup@yahoo.com} & 1.4.1 \\
\hline \hline
Russian & Alexandr Chelpanov & {\tt\tiny cav@cryptopro.ru} & 1.4.1 \\ Russian & Alexandr Chelpanov & {\tt\tiny cav@cryptopro.ru} & up-to-date \\
\hline \hline
Serbian & Dejan Milosavljevic & {\tt\tiny dmilos@email.com} & 1.4.1 \\ Serbian & Dejan Milosavljevic & {\tt\tiny dmilos@email.com} & 1.4.1 \\
\hline \hline
...@@ -327,7 +327,7 @@ when the translator was updated. ...@@ -327,7 +327,7 @@ when the translator was updated.
\hline \hline
Spanish & Francisco Oltra Thennet & {\tt\tiny foltra@puc.cl} & 1.3.8 \\ Spanish & Francisco Oltra Thennet & {\tt\tiny foltra@puc.cl} & 1.3.8 \\
\hline \hline
Swedish & Mikael Hallin & {\tt\tiny mikaelhallin@yahoo.se} & 1.4.1 \\ Swedish & Mikael Hallin & {\tt\tiny mikaelhallin@yahoo.se} & up-to-date \\
\hline \hline
Ukrainian & Olexij Tkatchenko & {\tt\tiny olexij.tkatchenko@parcs.de} & 1.4.1 \\ Ukrainian & Olexij Tkatchenko & {\tt\tiny olexij.tkatchenko@parcs.de} & 1.4.1 \\
\hline \hline
......
...@@ -74,7 +74,7 @@ Here is an example that speaks for itself: ...@@ -74,7 +74,7 @@ Here is an example that speaks for itself:
If you like you can also use HTML commands inside the documentation If you like you can also use HTML commands inside the documentation
blocks. Using these commands has the advantage that it is more natural blocks. Using these commands has the advantage that it is more natural
for list items that consists of multiple paragraphs. for list items that consist of multiple paragraphs.
Here is the above example with HTML commands: Here is the above example with HTML commands:
\verbatim \verbatim
......
(1.4.1-20050227) (1.4.1-20050314)
Doxygen supports the following 30 languages (sorted alphabetically): Doxygen supports the following 30 languages (sorted alphabetically):
...@@ -8,7 +8,7 @@ German, Greek, Hungarian, Italian, Japanese (+En), Korean (+En), ...@@ -8,7 +8,7 @@ German, Greek, Hungarian, Italian, Japanese (+En), Korean (+En),
Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, Serbian, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, Serbian,
Slovak, Slovene, Spanish, Swedish, and Ukrainian. Slovak, Slovene, Spanish, Swedish, and Ukrainian.
Of them, 2 translators are up-to-date, 28 translators are based on Of them, 5 translators are up-to-date, 25 translators are based on
some adapter class, and 2 are English based. some adapter class, and 2 are English based.
---------------------------------------------------------------------- ----------------------------------------------------------------------
...@@ -17,8 +17,11 @@ alphabetically). This means that they derive from the Translator class ...@@ -17,8 +17,11 @@ alphabetically). This means that they derive from the Translator class
and they implement all 192 of the required methods. Anyway, there and they implement all 192 of the required methods. Anyway, there
still may be some details listed even for them: still may be some details listed even for them:
TranslatorCzech
TranslatorDutch -- Remove the obsolete methods (never used). TranslatorDutch -- Remove the obsolete methods (never used).
TranslatorEnglish -- Remove the obsolete methods (never used). TranslatorEnglish -- Remove the obsolete methods (never used).
TranslatorRussian
TranslatorSwedish
---------------------------------------------------------------------- ----------------------------------------------------------------------
The following translator classes need some maintenance (the most The following translator classes need some maintenance (the most
...@@ -27,9 +30,7 @@ version when the class was last updated and number of methods that ...@@ -27,9 +30,7 @@ version when the class was last updated and number of methods that
must be implemented to become up-to-date: must be implemented to become up-to-date:
TranslatorUkrainian 1.4.1 1 method to implement TranslatorUkrainian 1.4.1 1 method to implement
TranslatorSwedish 1.4.1 1 method to implement
TranslatorSerbian 1.4.1 1 method to implement TranslatorSerbian 1.4.1 1 method to implement
TranslatorRussian 1.4.1 1 method to implement
TranslatorRomanian 1.4.1 1 method to implement TranslatorRomanian 1.4.1 1 method to implement
TranslatorPolish 1.4.1 1 method to implement TranslatorPolish 1.4.1 1 method to implement
TranslatorKorean 1.4.01 1 method to implement TranslatorKorean 1.4.01 1 method to implement
...@@ -39,7 +40,6 @@ must be implemented to become up-to-date: ...@@ -39,7 +40,6 @@ must be implemented to become up-to-date:
TranslatorHungarian 1.4.1 1 method to implement TranslatorHungarian 1.4.1 1 method to implement
TranslatorGerman 1.4.1 1 method to implement TranslatorGerman 1.4.1 1 method to implement
TranslatorFrench 1.4.1 1 method to implement TranslatorFrench 1.4.1 1 method to implement
TranslatorCzech 1.4.1 1 method to implement
TranslatorCroatian 1.4.1 1 method to implement TranslatorCroatian 1.4.1 1 method to implement
TranslatorChinese 1.4.1 1 method to implement TranslatorChinese 1.4.1 1 method to implement
TranslatorBrazilian 1.4.1 1 method to implement TranslatorBrazilian 1.4.1 1 method to implement
...@@ -217,16 +217,6 @@ TranslatorCroatian (TranslatorAdapter_1_4_1) 1 method to implement ...@@ -217,16 +217,6 @@ TranslatorCroatian (TranslatorAdapter_1_4_1) 1 method to implement
virtual QCString trOverloadText() virtual QCString trOverloadText()
TranslatorCzech (TranslatorAdapter_1_4_1) 1 method to implement
---------------
Implements 191 of the required methods.
Missing methods (should be implemented):
virtual QCString trOverloadText()
TranslatorDanish (TranslatorAdapter_1_3_9) 7 methods to implement TranslatorDanish (TranslatorAdapter_1_3_9) 7 methods to implement
---------------- ----------------
...@@ -769,29 +759,6 @@ TranslatorRomanian (TranslatorAdapter_1_4_1) 1 method to implement ...@@ -769,29 +759,6 @@ TranslatorRomanian (TranslatorAdapter_1_4_1) 1 method to implement
virtual QCString trNoDescriptionAvailable() virtual QCString trNoDescriptionAvailable()
TranslatorRussian (TranslatorAdapter_1_4_1) 1 method to implement
-----------------
Implements 191 of the required methods.
Missing methods (should be implemented):
virtual QCString trOverloadText()
Obsolete methods (should be removed, never used):
virtual QCString trHeaderFilesDescription()
virtual QCString trField(bool first_capital, bool singular)
virtual QCString trPackageDocumentation()
virtual QCString trSources()
virtual QCString trReimplementedForInternalReasons()
virtual QCString trInterfaces()
virtual QCString trHeaderFiles()
virtual QCString trBugsAndLimitations()
virtual QCString trEnumerationValueDocumentation()
virtual QCString trNoDescriptionAvailable()
TranslatorSerbian (TranslatorAdapter_1_4_1) 1 method to implement TranslatorSerbian (TranslatorAdapter_1_4_1) 1 method to implement
----------------- -----------------
...@@ -933,29 +900,6 @@ TranslatorSpanish (TranslatorAdapter_1_3_8) 8 methods to implement ...@@ -933,29 +900,6 @@ TranslatorSpanish (TranslatorAdapter_1_3_8) 8 methods to implement
virtual QCString trNoDescriptionAvailable() virtual QCString trNoDescriptionAvailable()
TranslatorSwedish (TranslatorAdapter_1_4_1) 1 method to implement
-----------------
Implements 191 of the required methods.
Missing methods (should be implemented):
virtual QCString trOverloadText()
Obsolete methods (should be removed, never used):
virtual QCString trHeaderFilesDescription()
virtual QCString trField(bool first_capital, bool/*singular*/)
virtual QCString trPackageDocumentation()
virtual QCString trSources()
virtual QCString trReimplementedForInternalReasons()
virtual QCString trInterfaces()
virtual QCString trHeaderFiles()
virtual QCString trBugsAndLimitations()
virtual QCString trEnumerationValueDocumentation()
virtual QCString trNoDescriptionAvailable()
TranslatorUkrainian (TranslatorAdapter_1_4_1) 1 method to implement TranslatorUkrainian (TranslatorAdapter_1_4_1) 1 method to implement
------------------- -------------------
......
Summary: A documentation system for C/C++. Summary: A documentation system for C/C++.
Name: doxygen Name: doxygen
Version: 1.4.1_20050307 Version: 1.4.1_20050315
Release: 1 Release: 1
Epoch: 1 Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
...@@ -55,6 +55,11 @@ class BufStr ...@@ -55,6 +55,11 @@ class BufStr
makeRoomFor(s); makeRoomFor(s);
m_writeOffset+=s; m_writeOffset+=s;
} }
void shrink( uint newlen )
{
m_writeOffset=newlen;
resize(newlen);
}
void resize( uint newlen ) void resize( uint newlen )
{ {
m_size=newlen; m_size=newlen;
......
...@@ -1571,7 +1571,7 @@ void ClassDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const ...@@ -1571,7 +1571,7 @@ void ClassDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
ol.writeString("href=\""); ol.writeString("href=\"");
ol.writeString(md->getOutputFileBase()+Doxygen::htmlFileExtension+"#"+md->anchor()); ol.writeString(md->getOutputFileBase()+Doxygen::htmlFileExtension+"#"+md->anchor());
ol.writeString("\">"); ol.writeString("\">");
ol.writeString(md->localName()); ol.writeString(md->name());
ol.writeString("</a>"); ol.writeString("</a>");
} }
ol.writeString("</td></tr>\n"); ol.writeString("</td></tr>\n");
...@@ -2076,12 +2076,9 @@ bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances,int level) ...@@ -2076,12 +2076,9 @@ bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances,int level)
static bool isStandardFunc(MemberDef *md) static bool isStandardFunc(MemberDef *md)
{ {
ClassDef *cd=md->getClassDef();
if (cd->templateMaster()) cd=cd->templateMaster();
return md->name()=="operator=" || // assignment operator return md->name()=="operator=" || // assignment operator
md->name()==cd->localName() || // constructor md->isConstructor() || // constructor
(md->name().find('~')!=-1 && md->isDestructor(); // destructor
md->name().find("operator")==-1); // destructor
} }
/*! /*!
......
...@@ -73,6 +73,7 @@ CommandMap cmdMap[] = ...@@ -73,6 +73,7 @@ CommandMap cmdMap[] =
{ "sa", CMD_SA }, { "sa", CMD_SA },
{ "secreflist", CMD_SECREFLIST }, { "secreflist", CMD_SECREFLIST },
{ "section", CMD_SECTION }, { "section", CMD_SECTION },
{ "subpage", CMD_SUBPAGE },
{ "subsection", CMD_SUBSECTION }, { "subsection", CMD_SUBSECTION },
{ "subsubsection", CMD_SUBSUBSECTION }, { "subsubsection", CMD_SUBSUBSECTION },
{ "paragraph", CMD_PARAGRAPH }, { "paragraph", CMD_PARAGRAPH },
......
...@@ -66,27 +66,27 @@ enum CommandType ...@@ -66,27 +66,27 @@ enum CommandType
CMD_INTERNAL = 32, CMD_INTERNAL = 32,
CMD_INTERNALREF = 33, CMD_INTERNALREF = 33,
CMD_INVARIANT = 34 | SIMPLESECT_BIT , CMD_INVARIANT = 34 | SIMPLESECT_BIT ,
//CMD_LANGSWITCH = 35, CMD_LATEXONLY = 35,
CMD_LATEXONLY = 36, CMD_LESS = 36,
CMD_LESS = 37, CMD_LI = 37,
CMD_LI = 38, CMD_LINE = 38,
CMD_LINE = 39, CMD_LINEBREAK = 39,
CMD_LINEBREAK = 40, CMD_LINK = 40,
CMD_LINK = 41, CMD_NOTE = 41 | SIMPLESECT_BIT,
CMD_NOTE = 42 | SIMPLESECT_BIT, CMD_PAR = 42 | SIMPLESECT_BIT,
CMD_PAR = 43 | SIMPLESECT_BIT, CMD_PARAM = 43 | SIMPLESECT_BIT,
CMD_PARAM = 44 | SIMPLESECT_BIT, CMD_PERCENT = 44,
CMD_PERCENT = 45, CMD_POST = 45 | SIMPLESECT_BIT,
CMD_POST = 46 | SIMPLESECT_BIT, CMD_PRE = 46 | SIMPLESECT_BIT ,
CMD_PRE = 47 | SIMPLESECT_BIT , CMD_REF = 47,
CMD_REF = 48, CMD_SECREFITEM = 48,
CMD_SECREFITEM = 49, CMD_REMARK = 49 | SIMPLESECT_BIT ,
CMD_REMARK = 50 | SIMPLESECT_BIT , CMD_RETURN = 50 | SIMPLESECT_BIT ,
CMD_RETURN = 51 | SIMPLESECT_BIT , CMD_RETVAL = 51 | SIMPLESECT_BIT,
CMD_RETVAL = 52 | SIMPLESECT_BIT, CMD_SA = 52 | SIMPLESECT_BIT ,
CMD_SA = 53 | SIMPLESECT_BIT , CMD_SECREFLIST = 53,
CMD_SECREFLIST = 54, CMD_SECTION = 54,
CMD_SECTION = 55, CMD_SUBPAGE = 55,
CMD_SUBSECTION = 56, CMD_SUBSECTION = 56,
CMD_SUBSUBSECTION= 57, CMD_SUBSUBSECTION= 57,
CMD_PARAGRAPH = 58, CMD_PARAGRAPH = 58,
......
...@@ -72,6 +72,7 @@ static void handleName(const QCString &); ...@@ -72,6 +72,7 @@ static void handleName(const QCString &);
static void handleTodo(const QCString &); static void handleTodo(const QCString &);
static void handleTest(const QCString &); static void handleTest(const QCString &);
static void handleBug(const QCString &); static void handleBug(const QCString &);
static void handleSubpage(const QCString &s);
static void handleDeprecated(const QCString &); static void handleDeprecated(const QCString &);
static void handleXRefItem(const QCString &); static void handleXRefItem(const QCString &);
static void handleRelated(const QCString &); static void handleRelated(const QCString &);
...@@ -153,6 +154,7 @@ static DocCmdMap docCmdMap[] = ...@@ -153,6 +154,7 @@ static DocCmdMap docCmdMap[] =
{ "relatedalso", &handleRelatedAlso }, { "relatedalso", &handleRelatedAlso },
{ "relatesalso", &handleRelatedAlso }, { "relatesalso", &handleRelatedAlso },
{ "refitem", &handleRefItem }, { "refitem", &handleRefItem },
{ "subpage", &handleSubpage },
{ "section", &handleSection }, { "section", &handleSection },
{ "subsection", &handleSection }, { "subsection", &handleSection },
{ "subsubsection", &handleSection }, { "subsubsection", &handleSection },
...@@ -335,25 +337,25 @@ static QCString getDocSectionName(int s) ...@@ -335,25 +337,25 @@ static QCString getDocSectionName(int s)
{ {
switch(s) switch(s)
{ {
case Entry::CLASSDOC_SEC: return "@class"; case Entry::CLASSDOC_SEC: return "\\class";
case Entry::STRUCTDOC_SEC: return "@struct"; case Entry::STRUCTDOC_SEC: return "\\struct";
case Entry::UNIONDOC_SEC: return "@union"; case Entry::UNIONDOC_SEC: return "\\union";
case Entry::EXCEPTIONDOC_SEC: return "@exception"; case Entry::EXCEPTIONDOC_SEC: return "\\exception";
case Entry::NAMESPACEDOC_SEC: return "@namespace"; case Entry::NAMESPACEDOC_SEC: return "\\namespace";
case Entry::PROTOCOLDOC_SEC: return "@protocol"; case Entry::PROTOCOLDOC_SEC: return "\\protocol";
case Entry::CATEGORYDOC_SEC: return "@category"; case Entry::CATEGORYDOC_SEC: return "\\category";
case Entry::ENUMDOC_SEC: return "@enum"; case Entry::ENUMDOC_SEC: return "\\enum";
case Entry::PAGEDOC_SEC: return "@page"; case Entry::PAGEDOC_SEC: return "\\page";
case Entry::MEMBERDOC_SEC: return "@fn"; case Entry::MEMBERDOC_SEC: return "\\fn";
case Entry::OVERLOADDOC_SEC: return "@overload"; case Entry::OVERLOADDOC_SEC: return "\\overload";
case Entry::FILEDOC_SEC: return "@file"; case Entry::FILEDOC_SEC: return "\\file";
case Entry::DEFINEDOC_SEC: return "@def"; case Entry::DEFINEDOC_SEC: return "\\def";
case Entry::GROUPDOC_SEC: return "@defgroup"; case Entry::GROUPDOC_SEC: return "\\defgroup";
case Entry::MAINPAGEDOC_SEC: return "@mainpage"; case Entry::MAINPAGEDOC_SEC: return "\\mainpage";
case Entry::PACKAGEDOC_SEC: return "@package"; case Entry::PACKAGEDOC_SEC: return "\\package";
case Entry::DIRDOC_SEC: return "@dir"; case Entry::DIRDOC_SEC: return "\\dir";
case Entry::EXAMPLE_SEC: return "@example"; case Entry::EXAMPLE_SEC: return "\\example";
case Entry::MEMBERGRP_SEC: return "@name"; case Entry::MEMBERGRP_SEC: return "\\name";
default: return ""; default: return "";
} }
} }
...@@ -645,7 +647,18 @@ static int yyread(char *buf,int max_size) ...@@ -645,7 +647,18 @@ static int yyread(char *buf,int max_size)
/* start command character */ /* start command character */
CMD ("\\"|"@") CMD ("\\"|"@")
DETAILEDCMD {CMD}("arg"|"attention"|"author"|"bug"|"code"|"date"|"deprecated"|"dot"|"dotfile"|"example"|"htmlinclude"|"htmlonly"|"image"|"include"|"includelineno"|"internal"|"invariant"|"latexonly"|"li"|"line"|manonly"|"name"|"note"|"par"|"paragraph"|"param"|"post"|"pre"|"remarks"|"relate"[sd]"("also")?|"remarks"|"return"[s]?|"retval"|"sa"|"section"|"see"|"since"|"subsection"|"subsubsection"|"test"|"throw"|"todo"|"until"|"verbatim"|"verbinclude"|"version"|"warning"|"xrefitem") DCMD1 ("arg"|"attention"|"author"|"bug"|"code")
DCMD2 ("date"|"deprecated"|"dot"|"dotfile"|"example")
DCMD3 ("htmlinclude"|"htmlonly"|"image"|"include")
DCMD4 ("includelineno"|"internal"|"invariant")
DCMD5 ("latexonly"|"li"|"line"|"manonly"|"name")
DCMD6 ("note"|"par"|"paragraph"|"param"|"post")
DCMD7 ("pre"|"remarks"|(("relate"[sd])("also")?))
DCMD8 ("remarks"|("return"[s]?)|"retval"|"sa"|"section")
DCMD9 ("see"|"since"|"subsection"|"subsubsection")
DCMD10 ("test"|"throw"|"todo"|"until"|"verbatim")
DCMD11 ("verbinclude"|"version"|"warning"|"xrefitem")
DETAILEDCMD {CMD}({DCMD1}|{DCMD2}|{DCMD3}|{DCMD4}|{DCMD5}|{DCMD6}|{DCMD7}|{DCMD8}|{DCMD9}|{DCMD10}|{DCMD11})
PRE [pP][rR][eE] PRE [pP][rR][eE]
TABLE [tT][aA][bB][lL][eE] TABLE [tT][aA][bB][lL][eE]
P [pP] P [pP]
...@@ -672,7 +685,6 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]* ...@@ -672,7 +685,6 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
SCOPEID {ID}({ID}*{BN}*"::"{BN}*)*({ID}?) SCOPEID {ID}({ID}*{BN}*"::"{BN}*)*({ID}?)
SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
%option nounput
%option noyywrap %option noyywrap
/* comment parsing states. */ /* comment parsing states. */
...@@ -695,6 +707,8 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) ...@@ -695,6 +707,8 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
%x GroupDocArg2 %x GroupDocArg2
%x SectionLabel %x SectionLabel
%x SectionTitle %x SectionTitle
%x SubpageLabel
%x SubpageTitle
%x FormatBlock %x FormatBlock
%x LineParam %x LineParam
%x GuardParam %x GuardParam
...@@ -736,7 +750,7 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) ...@@ -736,7 +750,7 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
<Comment>("\\"[a-z_A-Z]+)+"\\" { // directory (or chain of commands!) <Comment>("\\"[a-z_A-Z]+)+"\\" { // directory (or chain of commands!)
addOutput(yytext); addOutput(yytext);
} }
<Comment>{DETAILEDCMD}/[^a-z_A-Z] { // command that can end a brief description <Comment>{DETAILEDCMD}/[^a-z_A-Z]* { // command that can end a brief description
if (inContext!=OutputXRef) setOutput(OutputDoc); if (inContext!=OutputXRef) setOutput(OutputDoc);
// continue with the same input // continue with the same input
REJECT; REJECT;
...@@ -1262,6 +1276,36 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) ...@@ -1262,6 +1276,36 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
addOutput(*yytext); addOutput(*yytext);
} }
/* ----- handle arguments of the subpage command ------- */
<SubpageLabel>{LABELID} { // first argument
addOutput(yytext);
// we add subpage labels as a kind of "inheritance" relation to prevent
// needing to add another list to the Entry class.
current->extends->append(new BaseInfo(yytext,Public,Normal));
BEGIN(SubpageTitle);
}
<SubpageLabel>{DOCNL} { // missing argument
warn(yyFileName,yyLineNr,
"Warning: \\subpage command has no label"
);
if (*yytext=='\n') yyLineNr++;
addOutput('\n');
BEGIN( Comment );
}
<SubpageTitle>{DOCNL} { // no title, end command
addOutput(yytext);
BEGIN( Comment );
}
<SubpageTitle>[ \t]*"\""[^\"\n]*"\"" { // add title, end of command
addOutput(yytext);
BEGIN( Comment );
}
<SubpageTitle>. { // no title, end of command
unput(*yytext);
BEGIN( Comment );
}
/* ----- handle arguments of the anchor command ------- */ /* ----- handle arguments of the anchor command ------- */
<AnchorLabel>{LABELID} { // found argument <AnchorLabel>{LABELID} { // found argument
...@@ -1771,6 +1815,20 @@ static void handleSection(const QCString &s) ...@@ -1771,6 +1815,20 @@ static void handleSection(const QCString &s)
BEGIN(SectionLabel); BEGIN(SectionLabel);
} }
static void handleSubpage(const QCString &s)
{
if (current->section!=Entry::EMPTY_SEC &&
current->section!=Entry::PAGEDOC_SEC &&
current->section!=Entry::MAINPAGEDOC_SEC
)
{
warn(yyFileName,yyLineNr,
"Warning: found \\subpage command in a comment block that is not marked as a page!");
}
addOutput("@"+s+" ");
BEGIN(SubpageLabel);
}
static void handleAnchor(const QCString &s) static void handleAnchor(const QCString &s)
{ {
addOutput("@"+s+" "); addOutput("@"+s+" ");
...@@ -1808,7 +1866,7 @@ static void handleElseIf(const QCString &) ...@@ -1808,7 +1866,7 @@ static void handleElseIf(const QCString &)
if (guards.isEmpty()) if (guards.isEmpty())
{ {
warn(yyFileName,yyLineNr, warn(yyFileName,yyLineNr,
"Warning: found @else without matching start command"); "Warning: found \\else without matching start command");
} }
else else
{ {
...@@ -1822,7 +1880,7 @@ static void handleElse(const QCString &) ...@@ -1822,7 +1880,7 @@ static void handleElse(const QCString &)
if (guards.isEmpty()) if (guards.isEmpty())
{ {
warn(yyFileName,yyLineNr, warn(yyFileName,yyLineNr,
"Warning: found @else without matching start command"); "Warning: found \\else without matching start command");
} }
else else
{ {
...@@ -1835,7 +1893,7 @@ static void handleEndIf(const QCString &) ...@@ -1835,7 +1893,7 @@ static void handleEndIf(const QCString &)
if (guards.isEmpty()) if (guards.isEmpty())
{ {
warn(yyFileName,yyLineNr, warn(yyFileName,yyLineNr,
"Warning: found @endif without matching start command"); "Warning: found \\endif without matching start command");
} }
else else
{ {
...@@ -1960,6 +2018,7 @@ bool parseCommentBlock(/* in,out */ Entry *curEntry, ...@@ -1960,6 +2018,7 @@ bool parseCommentBlock(/* in,out */ Entry *curEntry,
current = curEntry; current = curEntry;
//previous = prevEntry; //previous = prevEntry;
inputString = comment; inputString = comment;
if (inputString==0) return FALSE; // avoid empty strings
inputPosition = 0; inputPosition = 0;
yyLineNr = lineNr; yyLineNr = lineNr;
yyFileName = fileName; yyFileName = fileName;
...@@ -1993,47 +2052,6 @@ bool parseCommentBlock(/* in,out */ Entry *curEntry, ...@@ -1993,47 +2052,6 @@ bool parseCommentBlock(/* in,out */ Entry *curEntry,
return needNewEntry; return needNewEntry;
} }
#if 0
//----------------------------------------------------------------------------
void commentScanTest()
{
Entry *ce = new Entry;
Entry *pe = new Entry;
Entry *re = new Entry;
Protection prot=Public;
ce->doc.resize(0);ce->brief.resize(0);
parseCommentBlock(ce,pe,re,"@brief A brief description.\n\n"
"This is a @e simple test!\n","test.dox",
1,FALSE,FALSE,FALSE,prot);
printf("---------\nbrief test: result: brief=[%s] doc=[%s]\n",ce->brief.data(),ce->doc.data());
ce->doc.resize(0);ce->brief.resize(0);
parseCommentBlock(ce,pe,re,"@defgroup grp A group\n"
"This is a @c group definition.","test.dox",
1,FALSE,FALSE,FALSE,prot);
printf("---------\ndefgroup test: result: brief=[%s] doc=[%s]\n",ce->brief.data(),ce->doc.data());
ce->doc.resize(0);ce->brief.resize(0);
parseCommentBlock(ce,pe,re,"A code example:\n"
"@code\n"
"void main()\n"
"{\n"
" printf(\"Hello world\");\n"
"}\n"
"@endcode\n"
"More text follows.","test.dox",
1,FALSE,FALSE,FALSE,prot);
printf("---------\ncode test: result: brief=[%s] doc=[%s]\n",ce->brief.data(),ce->doc.data());
ce->doc.resize(0);ce->brief.resize(0);
parseCommentBlock(ce,pe,re,"Some text <!-- A comment --> and more.\n"
,"test.dox",
1,FALSE,FALSE,FALSE,prot);
printf("---------\nhtml comment test: result: brief=[%s] doc=[%s]\n",ce->brief.data(),ce->doc.data());
}
#endif
#if !defined(YY_FLEX_SUBMINOR_VERSION) #if !defined(YY_FLEX_SUBMINOR_VERSION)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
......
...@@ -1094,6 +1094,7 @@ void Config::check() ...@@ -1094,6 +1094,7 @@ void Config::check()
filePatternList.append("*.cxx"); filePatternList.append("*.cxx");
filePatternList.append("*.cpp"); filePatternList.append("*.cpp");
filePatternList.append("*.c++"); filePatternList.append("*.c++");
filePatternList.append("*.d");
filePatternList.append("*.java"); filePatternList.append("*.java");
filePatternList.append("*.ii"); filePatternList.append("*.ii");
filePatternList.append("*.ixx"); filePatternList.append("*.ixx");
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "code.h" #include "code.h"
#include "util.h" #include "util.h"
#include "groupdef.h" #include "groupdef.h"
#include "pagedef.h"
#include "section.h" #include "section.h"
#if defined(_MSC_VER) || defined(__BORLANDC__) #if defined(_MSC_VER) || defined(__BORLANDC__)
...@@ -789,6 +790,10 @@ void Definition::writePathFragment(OutputList &ol) const ...@@ -789,6 +790,10 @@ void Definition::writePathFragment(OutputList &ol) const
{ {
ol.writeObjectLink(getReference(),getOutputFileBase(),0,((const GroupDef*)this)->groupTitle()); ol.writeObjectLink(getReference(),getOutputFileBase(),0,((const GroupDef*)this)->groupTitle());
} }
else if (definitionType()==Definition::TypePage && !((const PageDef*)this)->title().isEmpty())
{
ol.writeObjectLink(getReference(),getOutputFileBase(),0,((const PageDef*)this)->title());
}
else else
{ {
ol.writeObjectLink(getReference(),getOutputFileBase(),0,m_localName); ol.writeObjectLink(getReference(),getOutputFileBase(),0,m_localName);
......
...@@ -3620,6 +3620,7 @@ void DocPara::handleLink(const QString &cmdName,bool isJavaLink) ...@@ -3620,6 +3620,7 @@ void DocPara::handleLink(const QString &cmdName,bool isJavaLink)
void DocPara::handleRef(const QString &cmdName) void DocPara::handleRef(const QString &cmdName)
{ {
DBG(("handleRef(%s)\n",cmdName.data()));
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE) if (tok!=TK_WHITESPACE)
{ {
...@@ -3643,49 +3644,6 @@ endref: ...@@ -3643,49 +3644,6 @@ endref:
doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara();
} }
//int DocPara::handleLanguageSwitch()
//{
// int retval=RetVal_OK;
//
// if (!insideLang(this)) // start a language section at this level
// {
// do
// {
// int tok = doctokenizerYYlex();
// if (tok==TK_WHITESPACE)
// {
// // end of language specific sections
// retval=RetVal_OK;
// goto endlang;
// }
// else if (tok==TK_NEWPARA)
// {
// // end of language specific sections
// retval = tok;
// goto endlang;
// }
// else if (tok==TK_WORD || tok==TK_LNKWORD)
// {
// DocLanguage *dl = new DocLanguage(this,g_token->name);
// m_children.append(dl);
// retval = dl->parse();
// }
// else
// {
// warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s as parameter of \\~",
// tokToString(tok));
// goto endlang;
// }
// }
// while (retval==RetVal_SwitchLang);
// }
// else // return from this section
// {
// retval = RetVal_SwitchLang;
// }
//endlang:
// return retval;
//}
void DocPara::handleInclude(const QString &cmdName,DocInclude::Type t) void DocPara::handleInclude(const QString &cmdName,DocInclude::Type t)
{ {
...@@ -4084,7 +4042,8 @@ int DocPara::handleCommand(const QString &cmdName) ...@@ -4084,7 +4042,8 @@ int DocPara::handleCommand(const QString &cmdName)
case CMD_JAVALINK: case CMD_JAVALINK:
handleLink(cmdName,TRUE); handleLink(cmdName,TRUE);
break; break;
case CMD_REF: case CMD_REF: // fall through
case CMD_SUBPAGE:
handleRef(cmdName); handleRef(cmdName);
break; break;
case CMD_SECREFLIST: case CMD_SECREFLIST:
......
...@@ -682,22 +682,22 @@ REFWORD ("#"|"::")?({ID}("."|"#"|"::"|"-"))*{ID}{FUNCARG}? ...@@ -682,22 +682,22 @@ REFWORD ("#"|"::")?({ID}("."|"#"|"::"|"-"))*{ID}{FUNCARG}?
return 0; return 0;
} }
<St_Ref>{REFWORD} { <St_Ref>{REFWORD} { // label to refer to
g_token->name=yytext; g_token->name=yytext;
return TK_WORD; return TK_WORD;
} }
<St_Ref>{BLANK}+ { <St_Ref>{BLANK} { // white space
unput(' '); unput(' ');
return 0; return 0;
} }
<St_Ref>{WS}+"\"" { <St_Ref>{WS}+"\"" { // white space following by quoted string
BEGIN(St_Ref2); BEGIN(St_Ref2);
} }
<St_Ref>\n { <St_Ref>\n { // new line
unput(*yytext); unput(*yytext);
return 0; return 0;
} }
<St_Ref>. { <St_Ref>. { // any other character
unput(*yytext); unput(*yytext);
return 0; return 0;
} }
......
...@@ -221,9 +221,9 @@ static void addRelatedPage(Entry *root) ...@@ -221,9 +221,9 @@ static void addRelatedPage(Entry *root)
); );
if (pd) if (pd)
{ {
// see if the function is inside a namespace
Definition *ctx = 0; Definition *ctx = 0;
// find the page's context
if (root->parent->section & Entry::COMPOUND_MASK ) // inside class if (root->parent->section & Entry::COMPOUND_MASK ) // inside class
{ {
QCString fullName=removeRedundantWhiteSpace(root->parent->name); QCString fullName=removeRedundantWhiteSpace(root->parent->name);
...@@ -648,7 +648,7 @@ static void addClassToContext(Entry *root) ...@@ -648,7 +648,7 @@ static void addClassToContext(Entry *root)
bool ambig; bool ambig;
NamespaceDef *nd = 0; //NamespaceDef *nd = 0;
FileDef *fd = findFileDef(Doxygen::inputNameDict,root->fileName,ambig); FileDef *fd = findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
// see if the using statement was found inside a namespace or inside // see if the using statement was found inside a namespace or inside
...@@ -657,18 +657,16 @@ static void addClassToContext(Entry *root) ...@@ -657,18 +657,16 @@ static void addClassToContext(Entry *root)
if (root->parent->section == Entry::NAMESPACE_SEC) if (root->parent->section == Entry::NAMESPACE_SEC)
{ {
scName=root->parent->name; scName=root->parent->name;
if (!scName.isEmpty()) // if (!scName.isEmpty())
{ // {
nd = getResolvedNamespace(scName); // nd = getResolvedNamespace(scName);
} // }
} }
QCString fullName = root->name; QCString fullName = root->name;
ClassDef *cd = getResolvedClass( nd,fd, QCString qualifiedName = scName.isEmpty() ? root->name : scName+"::"+root->name;
// normally we could use root->name to find the class, but since we did not yet resolve
// the class/namespace nesting relations we have to use the fully qualified name here. ClassDef *cd = getClass(qualifiedName);
scName.isEmpty() ? root->name : scName+"::"+root->name,
0,0,TRUE);
Debug::print(Debug::Classes,0, " Found class with name %s (cd=%p)\n", Debug::print(Debug::Classes,0, " Found class with name %s (cd=%p)\n",
cd ? cd->name().data() : root->name.data(), cd); cd ? cd->name().data() : root->name.data(), cd);
...@@ -1975,7 +1973,6 @@ static void buildVarList(Entry *root) ...@@ -1975,7 +1973,6 @@ static void buildVarList(Entry *root)
QCString classScope=stripAnonymousNamespaceScope(scope); QCString classScope=stripAnonymousNamespaceScope(scope);
classScope=stripTemplateSpecifiersFromScope(classScope,FALSE); classScope=stripTemplateSpecifiersFromScope(classScope,FALSE);
QCString annScopePrefix=scope.left(scope.length()-classScope.length()); QCString annScopePrefix=scope.left(scope.length()-classScope.length());
scope=classScope;
bool isRelated=FALSE; bool isRelated=FALSE;
if (!root->relates.isEmpty()) // related variable if (!root->relates.isEmpty()) // related variable
...@@ -1991,6 +1988,7 @@ static void buildVarList(Entry *root) ...@@ -1991,6 +1988,7 @@ static void buildVarList(Entry *root)
{ {
// TODO: clean up this mess! // TODO: clean up this mess!
MemberDef *md=0; MemberDef *md=0;
#if 0
// if cd is an annonymous scope we insert the member // if cd is an annonymous scope we insert the member
// into a non-annonymous scope as well. // into a non-annonymous scope as well.
//int indentDepth=0; //int indentDepth=0;
...@@ -2028,6 +2026,7 @@ static void buildVarList(Entry *root) ...@@ -2028,6 +2026,7 @@ static void buildVarList(Entry *root)
} }
} }
} }
#endif
//printf("name=`%s' scope=%s scope.right=%s indentDepth=%d anonyScopes=%d\n", //printf("name=`%s' scope=%s scope.right=%s indentDepth=%d anonyScopes=%d\n",
// name.data(),scope.data(), // name.data(),scope.data(),
// scope.right(scope.length()-si).data(), // scope.right(scope.length()-si).data(),
...@@ -6654,6 +6653,62 @@ static void findMainPage(Entry *root) ...@@ -6654,6 +6653,62 @@ static void findMainPage(Entry *root)
} }
} }
static void computePageRelations(Entry *root)
{
if ((root->section==Entry::PAGEDOC_SEC ||
root->section==Entry::MAINPAGEDOC_SEC
)
&& !root->name.isEmpty()
)
{
PageDef *pd = root->section==Entry::PAGEDOC_SEC ?
Doxygen::pageSDict->find(root->name) :
Doxygen::mainPage;
if (pd)
{
QListIterator<BaseInfo> bii(*root->extends);
BaseInfo *bi;
for (bii.toFirst();(bi=bii.current());++bii)
{
PageDef *subPd = Doxygen::pageSDict->find(bi->name);
if (subPd)
{
pd->addInnerCompound(subPd);
//printf("*** Added subpage relation: %s->%s\n",
// pd->name().data(),subPd->name().data());
}
}
}
}
EntryListIterator eli(*root->sublist);
Entry *e;
for (;(e=eli.current());++eli)
{
computePageRelations(e);
}
}
static void checkPageRelations()
{
PageSDict::Iterator pdi(*Doxygen::pageSDict);
PageDef *pd=0;
for (pdi.toFirst();(pd=pdi.current());++pdi)
{
Definition *ppd = pd->getOuterScope();
while (ppd)
{
if (ppd==pd)
{
err("Warning: page defined at line %d of file %s with label %s is a subpage "
"of itself! Please remove this cyclic dependency.\n",
pd->docLine(),pd->docFile().data(),pd->name().data());
exit(1);
}
ppd=ppd->getOuterScope();
}
}
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static void resolveUserReferences() static void resolveUserReferences()
...@@ -6738,66 +6793,7 @@ static void generatePageDocs() ...@@ -6738,66 +6793,7 @@ static void generatePageDocs()
if (!pd->getGroupDef() && !pd->isReference()) if (!pd->getGroupDef() && !pd->isReference())
{ {
msg("Generating docs for page %s...\n",pd->name().data()); msg("Generating docs for page %s...\n",pd->name().data());
//outputList->disable(OutputGenerator::Man); pd->writeDocumentation(*outputList);
QCString pageName;
if (Config_getBool("CASE_SENSE_NAMES"))
pageName=pd->name();
else
pageName=pd->name().lower();
startFile(*outputList,pageName,pageName,pd->title());
// save old generator state and write title only to Man generator
outputList->pushGeneratorState();
outputList->disableAllBut(OutputGenerator::Man);
outputList->startTitleHead(pageName);
outputList->endTitleHead(pageName, pageName);
outputList->popGeneratorState();
SectionInfo *si=0;
if (!pd->title().isEmpty() && !pd->name().isEmpty() &&
(si=Doxygen::sectionDict.find(pageName))!=0)
{
outputList->startSection(si->label,si->title,si->type);
outputList->docify(si->title);
outputList->endSection(si->label,si->type);
}
outputList->startTextBlock();
outputList->parseDoc(pd->docFile(), // fileName
pd->docLine(), // startLine
pd, // context
0, // memberdef
pd->documentation(), // docStr
TRUE, // index words
FALSE // not an example
);
outputList->endTextBlock();
endFile(*outputList);
//outputList->enable(OutputGenerator::Man);
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
bool found=FALSE;
QDictIterator<RefList> rli(*Doxygen::xrefLists);
RefList *rl;
for (rli.toFirst();(rl=rli.current());++rli)
{
if (rl->listName()==pd->name())
{
found=TRUE;
break;
}
}
if (!found) // not one of the generated related pages
{
Doxygen::tagFile << " <compound kind=\"page\">" << endl;
Doxygen::tagFile << " <name>" << pd->name() << "</name>" << endl;
Doxygen::tagFile << " <title>" << convertToXML(pd->title()) << "</title>" << endl;
Doxygen::tagFile << " <filename>" << pd->getOutputFileBase() << "</filename>" << endl;
pd->writeDocAnchorsToTagFile();
Doxygen::tagFile << " </compound>" << endl;
}
}
} }
} }
} }
...@@ -7282,8 +7278,8 @@ static void copyAndFilterFile(const char *fileName,BufStr &dest) ...@@ -7282,8 +7278,8 @@ static void copyAndFilterFile(const char *fileName,BufStr &dest)
//printf("filter char at %p size=%d newSize=%d\n",dest.data()+oldPos,size,newSize); //printf("filter char at %p size=%d newSize=%d\n",dest.data()+oldPos,size,newSize);
if (newSize!=size) // we removed chars if (newSize!=size) // we removed chars
{ {
dest.resize(oldPos+newSize); // resize the array dest.shrink(oldPos+newSize); // resize the array
//printf(".......resizing from %d to %d\n",oldPos+size,oldPos+newSize); //printf(".......resizing from %d to %d result=[%s]\n",oldPos+size,oldPos+newSize,dest.data());
} }
} }
...@@ -8529,7 +8525,11 @@ void parseInput() ...@@ -8529,7 +8525,11 @@ void parseInput()
msg("Building class list...\n"); msg("Building class list...\n");
buildClassList(root); buildClassList(root);
msg("Associating documentation with classes...\n");
buildClassDocList(root); buildClassDocList(root);
msg("Computing nesting relations for classes...\n");
resolveClassNestingRelations(); resolveClassNestingRelations();
// calling buildClassList may result in cached relations that // calling buildClassList may result in cached relations that
// become invalid after resolveClassNestingRelation(), that's why // become invalid after resolveClassNestingRelation(), that's why
...@@ -8587,6 +8587,10 @@ void parseInput() ...@@ -8587,6 +8587,10 @@ void parseInput()
msg("Search for main page...\n"); msg("Search for main page...\n");
findMainPage(root); findMainPage(root);
msg("Computing page relations...\n");
computePageRelations(root);
checkPageRelations();
msg("Sorting lists...\n"); msg("Sorting lists...\n");
Doxygen::memberNameSDict.sort(); Doxygen::memberNameSDict.sort();
Doxygen::functionNameSDict.sort(); Doxygen::functionNameSDict.sort();
......
...@@ -2404,9 +2404,10 @@ void countRelatedPages(int &docPages,int &indexPages) ...@@ -2404,9 +2404,10 @@ void countRelatedPages(int &docPages,int &indexPages)
PageDef *pd=0; PageDef *pd=0;
for (pdi.toFirst();(pd=pdi.current());++pdi) for (pdi.toFirst();(pd=pdi.current());++pdi)
{ {
if (!pd->getGroupDef() && (!pd->isReference() || Config_getBool("ALLEXTERNALS"))) if (!pd->getGroupDef() &&
(!pd->isReference() || Config_getBool("ALLEXTERNALS")))
{ {
indexPages++; indexPages++;
if (!pd->isReference()) docPages++; if (!pd->isReference()) docPages++;
} }
} }
...@@ -2453,7 +2454,8 @@ void writePageIndex(OutputList &ol) ...@@ -2453,7 +2454,8 @@ void writePageIndex(OutputList &ol)
PageDef *pd=0; PageDef *pd=0;
for (pdi.toFirst();(pd=pdi.current());++pdi) for (pdi.toFirst();(pd=pdi.current());++pdi)
{ {
if (!pd->getGroupDef() && (!pd->isReference() || Config_getBool("ALLEXTERNALS"))) if (!pd->getGroupDef() &&
(!pd->isReference() || Config_getBool("ALLEXTERNALS")))
{ {
QCString pageTitle; QCString pageTitle;
......
...@@ -428,6 +428,7 @@ MemberDef::MemberDef(const char *df,int dl, ...@@ -428,6 +428,7 @@ MemberDef::MemberDef(const char *df,int dl,
m_hasDocumentedParams = FALSE; m_hasDocumentedParams = FALSE;
m_hasDocumentedReturnType = FALSE; m_hasDocumentedReturnType = FALSE;
m_docProvider = 0; m_docProvider = 0;
m_isDMember = m_defFileName.right(2).lower()==".d";
} }
/*! Destroys the member definition. */ /*! Destroys the member definition. */
...@@ -2141,14 +2142,30 @@ Specifier MemberDef::virtualness() const ...@@ -2141,14 +2142,30 @@ Specifier MemberDef::virtualness() const
bool MemberDef::isConstructor() const bool MemberDef::isConstructor() const
{ {
if (classDef) if (classDef)
return name()==classDef->localName(); {
if (m_isDMember) // for D
{
return name()=="this";
}
else // for other languages
{
return name()==classDef->localName();
}
}
else else
return FALSE; return FALSE;
} }
bool MemberDef::isDestructor() const bool MemberDef::isDestructor() const
{ {
return name().find('~')!=-1 && name().find("operator")==-1; if (m_isDMember) // for D
{
return name()=="~this";
}
else // other languages
{
return name().find('~')!=-1 && name().find("operator")==-1;
}
} }
void MemberDef::writeEnumDeclaration(OutputList &typeDecl, void MemberDef::writeEnumDeclaration(OutputList &typeDecl,
......
...@@ -404,6 +404,8 @@ class MemberDef : public Definition ...@@ -404,6 +404,8 @@ class MemberDef : public Definition
// to store the output file base from tag files // to store the output file base from tag files
QCString explicitOutputFileBase; QCString explicitOutputFileBase;
bool m_isDMember;
}; };
#endif #endif
#include "pagedef.h" #include "pagedef.h"
#include "groupdef.h" #include "groupdef.h"
#include "docparser.h" #include "docparser.h"
#include "config.h"
#include "util.h"
#include "outputlist.h"
#include "doxygen.h"
PageDef::PageDef(const char *f,int l,const char *n, PageDef::PageDef(const char *f,int l,const char *n,
...@@ -8,11 +12,12 @@ PageDef::PageDef(const char *f,int l,const char *n, ...@@ -8,11 +12,12 @@ PageDef::PageDef(const char *f,int l,const char *n,
: Definition(f,l,n), m_title(t) : Definition(f,l,n), m_title(t)
{ {
setDocumentation(d,f,l); setDocumentation(d,f,l);
subPageDict = new PageSDict(7);
} }
PageDef::~PageDef() PageDef::~PageDef()
{ {
delete subPageDict;
} }
void PageDef::findSectionsInDocumentation() void PageDef::findSectionsInDocumentation()
...@@ -33,3 +38,83 @@ QCString PageDef::getOutputFileBase() const ...@@ -33,3 +38,83 @@ QCString PageDef::getOutputFileBase() const
return m_fileName; return m_fileName;
} }
void PageDef::addInnerCompound(Definition *def)
{
if (def->definitionType()==Definition::TypePage)
{
PageDef *pd = (PageDef*)def;
subPageDict->append(pd->name(),pd);
def->setOuterScope(this);
}
}
void PageDef::writeDocumentation(OutputList &ol)
{
//outputList->disable(OutputGenerator::Man);
QCString pageName;
if (Config_getBool("CASE_SENSE_NAMES"))
pageName=name();
else
pageName=name().lower();
startFile(ol,pageName,pageName,title());
if (getOuterScope()!=Doxygen::globalScope)
{
getOuterScope()->writeNavigationPath(ol);
}
// save old generator state and write title only to Man generator
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Man);
ol.startTitleHead(pageName);
ol.endTitleHead(pageName, pageName);
ol.popGeneratorState();
SectionInfo *si=0;
if (!title().isEmpty() && !name().isEmpty() &&
(si=Doxygen::sectionDict.find(pageName))!=0)
{
ol.startSection(si->label,si->title,si->type);
ol.docify(si->title);
ol.endSection(si->label,si->type);
}
ol.startTextBlock();
ol.parseDoc(docFile(), // fileName
docLine(), // startLine
this, // context
0, // memberdef
documentation(), // docStr
TRUE, // index words
FALSE // not an example
);
ol.endTextBlock();
endFile(ol);
//outputList->enable(OutputGenerator::Man);
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
bool found=FALSE;
QDictIterator<RefList> rli(*Doxygen::xrefLists);
RefList *rl;
for (rli.toFirst();(rl=rli.current());++rli)
{
if (rl->listName()==name())
{
found=TRUE;
break;
}
}
if (!found) // not one of the generated related pages
{
Doxygen::tagFile << " <compound kind=\"page\">" << endl;
Doxygen::tagFile << " <name>" << name() << "</name>" << endl;
Doxygen::tagFile << " <title>" << convertToXML(title()) << "</title>" << endl;
Doxygen::tagFile << " <filename>" << getOutputFileBase() << "</filename>" << endl;
writeDocAnchorsToTagFile();
Doxygen::tagFile << " </compound>" << endl;
}
}
}
...@@ -18,6 +18,9 @@ ...@@ -18,6 +18,9 @@
#include "definition.h" #include "definition.h"
#include "sortdict.h" #include "sortdict.h"
class PageSDict;
class OutputList;
class PageDef : public Definition class PageDef : public Definition
{ {
public: public:
...@@ -32,18 +35,23 @@ class PageDef : public Definition ...@@ -32,18 +35,23 @@ class PageDef : public Definition
{ {
return isLinkableInProject() || isReference(); return isLinkableInProject() || isReference();
} }
void addSubPage(PageDef *def);
void writeDocumentation(OutputList &ol);
// functions to get a uniform interface with Definitions // functions to get a uniform interface with Definitions
QCString getOutputFileBase() const; QCString getOutputFileBase() const;
void findSectionsInDocumentation(); void findSectionsInDocumentation();
QCString title() const { return m_title; } QCString title() const { return m_title; }
GroupDef *getGroupDef() const; GroupDef * getGroupDef() const;
PageSDict * getSubPages() const { return subPageDict; }
void setFileName(const char *name) { m_fileName = name; } void setFileName(const char *name) { m_fileName = name; }
void addInnerCompound(Definition *d);
private: private:
QCString m_fileName; QCString m_fileName;
QCString m_title; QCString m_title;
GroupDef *m_inGroup; GroupDef *m_inGroup;
PageSDict *subPageDict; // list of pages in the group
}; };
class PageSDict : public SDict<PageDef> class PageSDict : public SDict<PageDef>
......
...@@ -473,9 +473,9 @@ static void setContext() ...@@ -473,9 +473,9 @@ static void setContext()
QCString fileName = yyFileName; QCString fileName = yyFileName;
insideIDL = fileName.right(4)==".idl" || fileName.right(5)==".pidl" || insideIDL = fileName.right(4)==".idl" || fileName.right(5)==".pidl" ||
fileName.right(4)==".odl"; fileName.right(4)==".odl";
insideJava = fileName.right(5)==".java"; insideJava = fileName.right(5)==".java" || fileName.right(3)==".as";
insideCS = fileName.right(3)==".cs"; // for normal keywords add colon insideCS = fileName.right(3)==".cs"; // for normal keywords add colon
insideD = fileName.right(3)==".d"; // for normal keywords add colon insideD = fileName.right(2)==".d"; // for normal keywords add colon
insidePHP = fileName.right(4)==".php" || fileName.right(5)==".php4" || insidePHP = fileName.right(4)==".php" || fileName.right(5)==".php4" ||
fileName.right(4)==".inc" || fileName.right(6)==".phtml"; fileName.right(4)==".inc" || fileName.right(6)==".phtml";
insideObjC = fileName.right(2)==".m" || fileName.right(2)==".M" || insideObjC = fileName.right(2)==".m" || fileName.right(2)==".M" ||
...@@ -1188,9 +1188,14 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -1188,9 +1188,14 @@ IDLATTR ("["[^\]]*"]"){BN}*
lineCount(); lineCount();
current->argList->getLast()->name=QCString(yytext).stripWhiteSpace(); current->argList->getLast()->name=QCString(yytext).stripWhiteSpace();
} }
<ObjCParams>"..." { // name of parameter <ObjCParams>","{BN}*"..." { // name of parameter
current->argList->getLast()->attrib="[,]"; lineCount();
current->argList->getLast()->type="..."; // do we want the comma as part of the name?
//current->name += ",";
Argument *a = new Argument;
a->attrib="[,]";
a->type="...";
current->argList->append(a);
} }
/* /*
<ObjCParams>":" { <ObjCParams>":" {
...@@ -1567,9 +1572,16 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -1567,9 +1572,16 @@ IDLATTR ("["[^\]]*"]"){BN}*
lineCount(); lineCount();
QCString scope=yytext; QCString scope=yytext;
current->name=removeRedundantWhiteSpace(substitute(scope,".","::")); current->name=removeRedundantWhiteSpace(substitute(scope,".","::"));
//printf("import name = %s -> %s\n",yytext,current->name.data()); current->fileName = yyFileName;
current->fileName = yyFileName; if (insideD)
current->section=Entry::USINGDECL_SEC; {
current->section=Entry::USINGDIR_SEC;
}
else
{
//printf("import name = %s -> %s\n",yytext,current->name.data());
current->section=Entry::USINGDECL_SEC;
}
current_root->addSubEntry(current); current_root->addSubEntry(current);
current = new Entry ; current = new Entry ;
initEntry(); initEntry();
...@@ -1709,6 +1721,7 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -1709,6 +1721,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
<FindMembers>"Q_PROPERTY" { // Qt property declaration <FindMembers>"Q_PROPERTY" { // Qt property declaration
current->protection = protection = Public ; current->protection = protection = Public ;
current->mtype = mtype = Property; current->mtype = mtype = Property;
current->type.resize(0);
BEGIN(QtPropType); BEGIN(QtPropType);
} }
<QtPropType>"(" { // start of property arguments <QtPropType>"(" { // start of property arguments
...@@ -1717,8 +1730,14 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -1717,8 +1730,14 @@ IDLATTR ("["[^\]]*"]"){BN}*
unput(';'); unput(';');
BEGIN(FindMembers); BEGIN(FindMembers);
} }
<QtPropType>"const"|"volatile" {
current->type+=yytext;
}
<QtPropType>{B}+ {
current->type+=yytext;
}
<QtPropType>{ID} { <QtPropType>{ID} {
current->type=yytext; current->type+=yytext;
BEGIN(QtPropName); BEGIN(QtPropName);
} }
<QtPropName>{ID} { <QtPropName>{ID} {
...@@ -4384,11 +4403,11 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -4384,11 +4403,11 @@ IDLATTR ("["[^\]]*"]"){BN}*
/* ---- Comments blocks ------ */ /* ---- Comments blocks ------ */
<DocBlock>"*/" { // end of comment block <DocBlock>"*"*"*/" { // end of comment block
handleCommentBlock(docBlock,FALSE); handleCommentBlock(docBlock,FALSE);
BEGIN(docBlockContext); BEGIN(docBlockContext);
} }
<DocBlock>^{B}*"*"+/{BN}+ { // start of a comment line <DocBlock>^{B}*"*"+/[^//] { // start of a comment line
} }
<DocBlock>("@@"|"\\\\"){ID}/[^a-z_A-Z0-9] { // escaped command <DocBlock>("@@"|"\\\\"){ID}/[^a-z_A-Z0-9] { // escaped command
docBlock+=yytext; docBlock+=yytext;
...@@ -4449,9 +4468,7 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -4449,9 +4468,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
/*************************************************************************/ /*************************************************************************/
/*** The next part is obsolete and will be removed */ /*** The next part is obsolete and will be removed ***/
<JavaDoc>{CMD}("brief"|"short"){B}+ { <JavaDoc>{CMD}("brief"|"short"){B}+ {
...@@ -6121,8 +6138,7 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -6121,8 +6138,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
} }
<DefLineDoc,LineDoc,ClassDoc,PageDoc,Doc>"/*"|"//" { current->doc += yytext; } <DefLineDoc,LineDoc,ClassDoc,PageDoc,Doc>"/*"|"//" { current->doc += yytext; }
/*** End of obsolete part ***/
/**** End of obsolete part */
/***********************************************************************/ /***********************************************************************/
......
...@@ -27,101 +27,33 @@ ...@@ -27,101 +27,33 @@
// //
// Updates: // Updates:
// -------- // --------
// 2000/06/20 // 2000/06/20 - Prototype: with diacritics; based on ver. 1.1.4 (from scratch).
// - The prototype version of Czech strings with diacritics. The // 2000/07/10 - Update to 1.1.5; conditionally decoding to iso-8859-2 for UNIX.
// translation was based on translator.h of Doxygen version // 2000/07/19 - Updates for "new since 1.1.5"; encoding conversion separated.
// 1.1.4 (from scratch). // 2000/08/02 - Updated for 1.2.0
// // 2000/08/24 - Corrections, updates.
// 2000/07/10 // 2000/08/30 - Macro DECODE replaced by the inline (thanks to Boris Bralo).
// - Updated version based on 1.1.5 sources (including important updates // 2000/08/31 - ISOToWin() and WinToISO() moved to the base class.
// of the up-to-1.1.4 strings). Czech strings in this file were written // 2000/09/06 - Reimplementation of trInheritsList().
// in windows-1250 encoding. On-line decoding into iso-8859-2 ensured // 2000/09/11 - Update for "new since 1.2.1" version.
// via conditional compilation if the sources are compiled under UNIX. // 2000/10/17 - Update for "new since 1.2.2" version.
// // 2001/01/09 - Update for "new since 1.2.4" version.
// 2000/07/19 // 2001/02/15 - trMore() now returns only "..." (ellipsis).
// - Encoding conversion tables moved to the methods that use them. // 2001/02/26 - Update for "new since 1.2.5" version (trBug(), trBugList()).
// - Updates for "new since 1.1.5". // 2001/03/12 - Minor correction of comments (synchronous with translator.h).
// // 2001/04/10 - Updates (1.2.6-20010408), cleaning.
// 2000/08/02 (Petr Prikryl) // 2001/04/20 - Update for "new since 1.2.6-20010422". Experimental version
// - Updated for 1.2.0 // introducing TranslatorAdapter class and the abstract base
// // class Translator. The English translator is now on the same
// 2000/08/24 // level as other translators.
// - Changed trTodo() text from "Udelat" to "Planovane upravy" // 2001/05/02 - Decode() inline changed to decode(); cleaning.
// which seems more appropriate in the document context. // 2001/05/18 - Updates, corrections.
// - Typo corrected in trMemberTypedefDocumentation(). // 2001/05/25 - Corrections.
//
// 2000/08/30
// - Macro DECODE replaced by the inline Decode() (proposed by
// Boris Bralo <boris.bralo@zg.tel.hr> in translator_hr.h).
//
// 2000/08/31
// - Methods ISOToWin() and WinToISO() renamed and moved to the
// base class (in translator.h) to be shared with the Croatian
// translator.
//
// 2000/09/06
// - Reimplementation of the method trInheritsList() which takes
// into account quantity of base classes.
//
// 2000/09/11
// - Update for "new since 1.2.1" version. The text of trDCOPMethods()
// was translated rather blindly (not knowing what exactly
// the DCOP means).
//
// 2000/10/17
// - Update for "new since 1.2.2" version.
//
// 2001/01/09
// - Update for "new since 1.2.4" version. As I do not use Java,
// I tried my best to guess the Czech terminology for the Java.
// Let me know if some wording should be changed/improved.
//
// 2001/02/15
// - trMore() now returns only "..." (ellipsis). The Czech replacement
// of "(more)" was too much visible. The previous "(...)" did not
// look well.
//
// 2001/02/26
// - Update for "new since 1.2.5" version (trBug(), trBugList()).
//
// 2001/03/12
// - Minor correction of comments which copied the same
// corrections in translator.h (doubled backslash) just after
// 1.2.6 release.
//
// 2001/04/10
// - Update for OPTIMIZE_OUTPUT_FOR_C (1.2.6-20010408).
// - Removed implementation of latexBabelPackage().
// - Removed implementation of trVerbatimText().
//
// 2001/04/20
// - Update for "new since 1.2.6-20010422". Experimental version
// introducing TranslatorAdapter class and the abstract base
// class Translator. The English translator is now on the same
// level as other translators.
//
// 2001/05/02
// - The Decode() inline identifier changed to decode (i.e. lower
// case) to be consistent with HR and RU translator, which also
// use the approach.
// - Removed the obsolete method trFiles().
//
// 2001/05/18
// - The trRelatedPagesDescription() content updated to fit
// the context better.
// - Implemented new method trAuthor(params).
// - Removed obsolete methods trAuthor() and trAuthors().
//
// 2001/05/25
// - Updated misleading information in trLegendDocs().
// - The trReimplementedInList() updated to fit the context better.
// - The trReimplementedFromList() updated to fit the context better.
//
// 2001/07/16 - trClassDocumentation() updated as in the English translator. // 2001/07/16 - trClassDocumentation() updated as in the English translator.
// 2001/11/06 - trReferences() implemented. // 2001/11/06 - trReferences() implemented.
// 2002/01/23 - Two new methods "since 1.2.13" implemented. // 2002/01/23 - Two new methods "since 1.2.13" implemented.
// 2002/03/05 - ... forgot to replace TranslatorAdapter... by Translator. // 2002/03/05 - ... forgot to replace TranslatorAdapter... by Translator.
// 2002/07/08 (my birthday! ;) - The new trRTFTableOfContents() implemented. // 2002/07/08 - The new trRTFTableOfContents() implemented. (my birthday! ;)
// 2002/07/29 - The new trDeprecatedList() implemented. // 2002/07/29 - The new trDeprecatedList() implemented.
// 2002/10/15 - The new trEvents() and trEventDocumentation() implemented. // 2002/10/15 - The new trEvents() and trEventDocumentation() implemented.
// 2003/04/28 - Five new methods "since 1.3" implemented. // 2003/04/28 - Five new methods "since 1.3" implemented.
...@@ -132,6 +64,7 @@ ...@@ -132,6 +64,7 @@
// 2004/06/16 - The new method "since 1.3.8" implemented. // 2004/06/16 - The new method "since 1.3.8" implemented.
// 2004/09/14 - The new methods "since 1.3.9" implemented. // 2004/09/14 - The new methods "since 1.3.9" implemented.
// 2005/02/11 - The "never used" methods removed. // 2005/02/11 - The "never used" methods removed.
// 2005/03/08 - Update for "new since 1.4.1" (trOverloadText())
// Todo // Todo
// ---- // ----
...@@ -151,7 +84,7 @@ ...@@ -151,7 +84,7 @@
// Windows version. The version which does not call the function is // Windows version. The version which does not call the function is
// probably slightly faster. // probably slightly faster.
class TranslatorCzech : public TranslatorAdapter_1_4_1 class TranslatorCzech : public Translator
{ {
private: private:
/*! The decode() inline assumes the source written in the /*! The decode() inline assumes the source written in the
...@@ -1673,6 +1606,20 @@ class TranslatorCzech : public TranslatorAdapter_1_4_1 ...@@ -1673,6 +1606,20 @@ class TranslatorCzech : public TranslatorAdapter_1_4_1
result += "e"; result += "e";
return decode(result); return decode(result);
} }
//////////////////////////////////////////////////////////////////////////
// new since 1.4.1
//////////////////////////////////////////////////////////////////////////
/*! This text is added to the documentation when the \\overload command
* is used for a overloaded function.
*/
virtual QCString trOverloadText()
{
return decode("Jde o pøetíženou (overloaded) metodu, "
"která má usnadnit používání. Od výše uvedené metody se liší "
"pouze jinak zadávanými argumenty.");
}
}; };
#endif // TRANSLATOR_CZ_H #endif // TRANSLATOR_CZ_H
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
// //
class TranslatorKorean : public TranslatorAdapter_1_3_9 class TranslatorKorean : public TranslatorAdapter_1_4_1
{ {
private: private:
/*! The decode() can change euc into sjis */ /*! The decode() can change euc into sjis */
......
...@@ -49,10 +49,10 @@ ...@@ -49,10 +49,10 @@
#ifndef TRANSLATOR_RU_H #ifndef TRANSLATOR_RU_H
#define TRANSLATOR_RU_H #define TRANSLATOR_RU_H
class TranslatorRussian : public TranslatorAdapter_1_4_1 class TranslatorRussian : public Translator
{ {
private: private:
/*! The Decode() inline assumes the source written in the /*! The decode() inline assumes the source written in the
Koi8-R encoding (maintainer dependent). Koi8-R encoding (maintainer dependent).
*/ */
inline QCString decode(const QCString & sInput) inline QCString decode(const QCString & sInput)
...@@ -216,10 +216,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1 ...@@ -216,10 +216,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
virtual QCString trFileList() virtual QCString trFileList()
{ return decode(""); } { return decode(""); }
/*! This is put above each page as a link to the list of all verbatim headers */
virtual QCString trHeaderFiles()
{ return decode(" "); }
/*! This is put above each page as a link to all members of compounds. */ /*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers() virtual QCString trCompoundMembers()
{ {
...@@ -330,10 +326,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1 ...@@ -330,10 +326,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
return decode( result ); return decode( result );
} }
/*! This is an introduction to the page with the list of all header files. */
virtual QCString trHeaderFilesDescription()
{ return decode(" ."); }
/*! This is an introduction to the page with the list of all examples */ /*! This is an introduction to the page with the list of all examples */
virtual QCString trExamplesDescription() virtual QCString trExamplesDescription()
{ return decode(" ."); } { return decode(" ."); }
...@@ -346,12 +338,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1 ...@@ -346,12 +338,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
virtual QCString trModulesDescription() virtual QCString trModulesDescription()
{ return decode(" ."); } { return decode(" ."); }
/*! This sentences is used in the annotated class/file lists if no brief
* description is given.
*/
virtual QCString trNoDescriptionAvailable()
{ return decode(" "); }
// index titles (the project name is prepended for these) // index titles (the project name is prepended for these)
...@@ -501,12 +487,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1 ...@@ -501,12 +487,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
virtual QCString trEnumerationTypeDocumentation() virtual QCString trEnumerationTypeDocumentation()
{ return decode(""); } { return decode(""); }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for enumeration values
*/
virtual QCString trEnumerationValueDocumentation()
{ return decode(" "); }
/*! This is used in the documentation of a file/namespace before the list /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for functions * of documentation blocks for functions
*/ */
...@@ -566,20 +546,10 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1 ...@@ -566,20 +546,10 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
virtual QCString trForInternalUseOnly() virtual QCString trForInternalUseOnly()
{ return decode(" "); } { return decode(" "); }
/*! this text is generated when the \\reimp command is used. */
virtual QCString trReimplementedForInternalReasons()
/*??*/
{ return decode(" ");
}
/*! this text is generated when the \\warning command is used. */ /*! this text is generated when the \\warning command is used. */
virtual QCString trWarning() virtual QCString trWarning()
{ return decode(""); } { return decode(""); }
/*! this text is generated when the \\bug command is used. */
virtual QCString trBugsAndLimitations()
{ return decode(" "); }
/*! this text is generated when the \\version command is used. */ /*! this text is generated when the \\version command is used. */
virtual QCString trVersion() virtual QCString trVersion()
{ return decode(""); } { return decode(""); }
...@@ -881,10 +851,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1 ...@@ -881,10 +851,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
// new since 0.49-991106 // new since 0.49-991106
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
virtual QCString trSources()
{
return decode(" .");
}
virtual QCString trDefinedAtLineInSourceFile() virtual QCString trDefinedAtLineInSourceFile()
{ {
return decode(". @1 @0"); return decode(". @1 @0");
...@@ -1192,11 +1158,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1 ...@@ -1192,11 +1158,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
// new since 1.2.4 // new since 1.2.4
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
/*! Used for Java interfaces in the summary section of Java packages */
virtual QCString trInterfaces()
{
return decode("");
}
/*! Used for Java classes in the summary section of Java packages */ /*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses() virtual QCString trClasses()
{ {
...@@ -1229,11 +1190,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1 ...@@ -1229,11 +1190,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
{ {
return decode(""); return decode("");
} }
/*! Used as a chapter title for Latex & RTF output */
virtual QCString trPackageDocumentation()
{
return decode("");
}
/*! Text shown before a multi-line define */ /*! Text shown before a multi-line define */
virtual QCString trDefineValue() virtual QCString trDefineValue()
{ {
...@@ -1348,17 +1304,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1 ...@@ -1348,17 +1304,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
return decode(result); return decode(result);
} }
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trField(bool first_capital, bool singular)
{
QCString result((first_capital ? "" : ""));
result+=(singular ? "" : "");
return decode(result);
}
/*! This is used for translation of the word that will possibly /*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names * be followed by a single name or by a list of names
* of the category. * of the category.
...@@ -1616,6 +1561,20 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1 ...@@ -1616,6 +1561,20 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
if (singular) result+=""; else result+=""; if (singular) result+=""; else result+="";
return decode( result ); return decode( result );
} }
//////////////////////////////////////////////////////////////////////////
// new since 1.4.1
//////////////////////////////////////////////////////////////////////////
/*! This text is added to the documentation when the \\overload command
* is used for a overloaded function.
*/
virtual QCString trOverloadText()
{
return decode( " "
" . "
" ." );
}
}; };
#endif #endif
...@@ -69,7 +69,7 @@ Problem! ...@@ -69,7 +69,7 @@ Problem!
#ifndef TRANSLATOR_SE_H #ifndef TRANSLATOR_SE_H
#define TRANSLATOR_SE_H #define TRANSLATOR_SE_H
class TranslatorSwedish : public TranslatorAdapter_1_4_1 class TranslatorSwedish : public Translator
{ {
public: public:
...@@ -187,9 +187,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1 ...@@ -187,9 +187,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
virtual QCString trFileList() virtual QCString trFileList()
{ return "Fillista"; } { return "Fillista"; }
virtual QCString trHeaderFiles()
{ return "Headerfiler"; }
virtual QCString trCompoundMembers() virtual QCString trCompoundMembers()
{ {
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
...@@ -314,9 +311,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1 ...@@ -314,9 +311,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
return result; return result;
} }
virtual QCString trHeaderFilesDescription()
{ return "Hr fljer headerfilerna som API:n bestr av:"; }
virtual QCString trExamplesDescription() virtual QCString trExamplesDescription()
{ return "Hr fljer en lista med alla exempel:"; } { return "Hr fljer en lista med alla exempel:"; }
...@@ -326,9 +320,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1 ...@@ -326,9 +320,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
virtual QCString trModulesDescription() virtual QCString trModulesDescription()
{ return "Hr fljer en lista ver alla moduler:"; } { return "Hr fljer en lista ver alla moduler:"; }
virtual QCString trNoDescriptionAvailable()
{ return "Beskrivning saknas"; }
virtual QCString trDocumentation() virtual QCString trDocumentation()
{ return "Dokumentation"; } { return "Dokumentation"; }
...@@ -411,9 +402,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1 ...@@ -411,9 +402,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
virtual QCString trEnumerationTypeDocumentation() virtual QCString trEnumerationTypeDocumentation()
{ return "Dokumentation ver egenupprknande typer"; } { return "Dokumentation ver egenupprknande typer"; }
virtual QCString trEnumerationValueDocumentation()
{ return "Dokumentation ver egenupprknande typers vrden"; }
virtual QCString trFunctionDocumentation() virtual QCString trFunctionDocumentation()
{ return "Dokumentation ver funktioner"; } { return "Dokumentation ver funktioner"; }
...@@ -456,15 +444,9 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1 ...@@ -456,15 +444,9 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
virtual QCString trForInternalUseOnly() virtual QCString trForInternalUseOnly()
{ return "Endast fr internt bruk."; } { return "Endast fr internt bruk."; }
virtual QCString trReimplementedForInternalReasons()
{ return "Omskriven av intern anledning; API:n pverkas inte.";}
virtual QCString trWarning() virtual QCString trWarning()
{ return "Varning"; } { return "Varning"; }
virtual QCString trBugsAndLimitations()
{ return "Fel och begrnsningar"; }
virtual QCString trVersion() virtual QCString trVersion()
{ return "Version"; } { return "Version"; }
...@@ -704,10 +686,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1 ...@@ -704,10 +686,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
// new since 0.49-991003 // new since 0.49-991003
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
virtual QCString trSources()
{
return "Kllor";
}
virtual QCString trDefinedAtLineInSourceFile() virtual QCString trDefinedAtLineInSourceFile()
{ {
return "Definition p rad @0 i filen @1."; return "Definition p rad @0 i filen @1.";
...@@ -1027,11 +1005,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1 ...@@ -1027,11 +1005,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
// new since 1.2.4 // new since 1.2.4
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
/*! Used for Java interfaces in the summary section of Java packages */
virtual QCString trInterfaces()
{
return "Grnssnitt";
}
/*! Used for Java classes in the summary section of Java packages */ /*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses() virtual QCString trClasses()
{ {
...@@ -1065,11 +1038,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1 ...@@ -1065,11 +1038,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
{ {
return "Paket"; return "Paket";
} }
/*! Used as a chapter title for Latex & RTF output */
virtual QCString trPackageDocumentation()
{
return "Paketdokumentation";
}
/*! Text shown before a multi-line define */ /*! Text shown before a multi-line define */
virtual QCString trDefineValue() virtual QCString trDefineValue()
{ {
...@@ -1189,16 +1157,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1 ...@@ -1189,16 +1157,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
return result; return result;
} }
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trField(bool first_capital, bool /*singular*/)
{
QCString result((first_capital ? "Flt" : "flt"));
return result;
}
/*! This is used for translation of the word that will possibly /*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names * be followed by a single name or by a list of names
* of the category. * of the category.
...@@ -1458,6 +1416,20 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1 ...@@ -1458,6 +1416,20 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
return result; return result;
} }
//////////////////////////////////////////////////////////////////////////
// new since 1.4.1
//////////////////////////////////////////////////////////////////////////
/*! This text is added to the documentation when the \\overload command
* is used for a overloaded function.
*/
virtual QCString trOverloadText()
{
return "Det hr r en verlagrad medlemsfunktion "
"tillhandahllen fr bekvmlighet. Den enda som "
"skiljer sig frn ovanstende funktion r vilka "
"argument den tar emot.";
}
}; };
......
...@@ -908,6 +908,7 @@ int isAccessibleFromWithExpScope(Definition *scope,FileDef *fileScope,Definition ...@@ -908,6 +908,7 @@ int isAccessibleFromWithExpScope(Definition *scope,FileDef *fileScope,Definition
Definition *cd; Definition *cd;
for (cli.toFirst();(cd=cli.current());++cli) for (cli.toFirst();(cd=cli.current());++cli)
{ {
//printf("Trying for class %s\n",cd->name().data());
i = isAccessibleFromWithExpScope(scope,fileScope,item,cd->name()); i = isAccessibleFromWithExpScope(scope,fileScope,item,cd->name());
if (i!=-1) if (i!=-1)
{ {
...@@ -925,6 +926,7 @@ int isAccessibleFromWithExpScope(Definition *scope,FileDef *fileScope,Definition ...@@ -925,6 +926,7 @@ int isAccessibleFromWithExpScope(Definition *scope,FileDef *fileScope,Definition
{ {
if (g_visitedNamespaces.find(nd->name())==0) if (g_visitedNamespaces.find(nd->name())==0)
{ {
//printf("Trying for namespace %s\n",nd->name().data());
i = isAccessibleFromWithExpScope(scope,fileScope,item,nd->name()); i = isAccessibleFromWithExpScope(scope,fileScope,item,nd->name());
if (i!=-1) if (i!=-1)
{ {
......
...@@ -641,6 +641,21 @@ void XmlDocVisitor::visitPre(DocImage *img) ...@@ -641,6 +641,21 @@ void XmlDocVisitor::visitPre(DocImage *img)
m_t << "\""; m_t << "\"";
} }
m_t << ">"; m_t << ">";
// copy the image to the output dir
QFile inImage(img->name());
QFile outImage(Config_getString("XML_OUTPUT")+"/"+baseName.ascii());
if (inImage.open(IO_ReadOnly))
{
if (outImage.open(IO_WriteOnly))
{
char *buffer = new char[inImage.size()];
inImage.readBlock(buffer,inImage.size());
outImage.writeBlock(buffer,inImage.size());
outImage.flush();
delete buffer;
}
}
} }
void XmlDocVisitor::visitPost(DocImage *) void XmlDocVisitor::visitPost(DocImage *)
......
...@@ -478,6 +478,18 @@ static void writeMemberReference(QTextStream &t,Definition *def,MemberDef *rmd,c ...@@ -478,6 +478,18 @@ static void writeMemberReference(QTextStream &t,Definition *def,MemberDef *rmd,c
} }
static void stripQualifiers(QCString &typeStr)
{
bool done=FALSE;
while (!done)
{
if (typeStr.left(7)=="static ") typeStr=typeStr.mid(7);
else if (typeStr.left(8)=="virtual ") typeStr=typeStr.mid(8);
else if (typeStr.left(9)=="volatile ") typeStr=typeStr.mid(9);
else done=TRUE;
}
}
static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,Definition *def) static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,Definition *def)
{ {
...@@ -612,6 +624,7 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De ...@@ -612,6 +624,7 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De
writeMemberTemplateLists(md,t); writeMemberTemplateLists(md,t);
} }
QCString typeStr = md->typeString(); //replaceAnonymousScopes(md->typeString()); QCString typeStr = md->typeString(); //replaceAnonymousScopes(md->typeString());
stripQualifiers(typeStr);
t << " <type>"; t << " <type>";
linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md->name(),typeStr); linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md->name(),typeStr);
t << "</type>" << endl; t << "</type>" << endl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment