Commit b91d710e authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.4.1-20050315

parent 42eb3f9c
DOXYGEN Version 1.4.1-20050307
DOXYGEN Version 1.4.1-20050315
Please read the installation section of the manual
(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.
......@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
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:
\refitem cmdskip \\skip
\refitem cmdskipline \\skipline
\refitem cmdstruct \\struct
\refitem cmdsubpage \\subpage
\refitem cmdsubsection \\subsection
\refitem cmdsubsubsection \\subsubsection
\refitem cmdtest \\test
......@@ -1322,6 +1323,58 @@ void memcpy(void *dest, const void *src, size_t n);
\sa
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>
\section cmdsection \\section <section-name> (section title)
......
......@@ -16,11 +16,13 @@
*/
/*! \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
for each group. These groups are called "modules" in the documentation.
The other mechanism works within a member list of some compound entity,
and is refered to as a "member group".
for each group. These groups are called \ref modules "'modules'" in the documentation.
The second mechanism works within a member list of some compound entity,
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
......@@ -31,46 +33,53 @@ variables, enums, typedefs, and defines, but also other groups.
To define a group, you should put the \ref cmddefgroup "\\defgroup"
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
entity a member of a specific group by putting
is a label that should uniquely identify the group.
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.
The second argument is the title of the group.
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
closing marker <code>\@}</code> after the group. The markers can
be put in the documentation of the group definition or in a separate
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.
If you don't want doxygen to enforce
unique labels, then you can use \ref cmdaddtogroup "\\addtogroup" instead of
\ref cmddefgroup "\\defgroup". It can be used exactly like \ref cmddefgroup "\\defgroup",
but when the group has been defined already, then it silently merges the existing documentation
with the new one.
If you don't want doxygen to enforce unique labels, then you can
use \ref cmdaddtogroup "\\addtogroup" instead of
\ref cmddefgroup "\\defgroup".
It can be used exactly like \ref cmddefgroup "\\defgroup",
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
\verbatim
/** \addtogroup <label> */
/*\@{*/
/*\@}*/
\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
be put into multiple groups, but members (like variable, functions, typedefs
and enums) can only be a member of one group
(this restriction is to avoid ambiguous linking targets).
Doxygen will put members into that group where the grouping definition had
the highest priority: f.i. \ref cmdingroup "\\ingroup" overrides any automatic
grouping definition via <code>\@{</code> <code>\@}</code>. Conflicting grouping
definitions with the same priority trigger a warning, 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
(this restriction is in place to avoid ambiguous linking targets in case
a member is not documented in the context of its class, namespace
or file, but only visible as part of a group).
Doxygen will put members into the group whose definition has
the highest "priority": e.g. An explicit \ref cmdingroup "\\ingroup" overrides
an implicit grouping definition via <code>\@{</code> <code>\@}</code>.
Conflicting grouping definitions with the same priority trigger a warning,
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:
\verbatim
......@@ -192,4 +201,20 @@ Go to the <a href="formulas.html">next</a> section or return to the
<a href="index.html">index</a>.
\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)
<h2>Introduction</h2>
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:
<ol>
......
......@@ -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.4.1-20050227), 30 languages
Currently (version 1.4.1-20050314), 30 languages
are supported (sorted alphabetically):
Afrikaans, Brazilian Portuguese, Catalan, Chinese, Chinese
Traditional, Croatian, Czech, Danish, Dutch, English, Finnish, French,
......@@ -90,7 +90,7 @@ when the translator was updated.
<td>Czech</td>
<td>Petr P&#x0159;ikryl</td>
<td>prikrylp at skil dot cz</td>
<td>1.4.1</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Danish</td>
......@@ -204,7 +204,7 @@ when the translator was updated.
<td>Russian</td>
<td>Alexandr Chelpanov</td>
<td>cav at cryptopro dot ru</td>
<td>1.4.1</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Serbian</td>
......@@ -234,7 +234,7 @@ when the translator was updated.
<td>Swedish</td>
<td>Mikael Hallin</td>
<td>mikaelhallin at yahoo dot se</td>
<td>1.4.1</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Ukrainian</td>
......@@ -271,7 +271,7 @@ when the translator was updated.
\hline
Croatian & Boris Bralo & {\tt\tiny boris.bralo@zg.htnet.hr} & 1.4.1 \\
\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
Danish & Erik S\o{}e S\o{}rensen & {\tt\tiny eriksoe+doxygen@daimi.au.dk} & 1.3.9 \\
\hline
......@@ -317,7 +317,7 @@ when the translator was updated.
\hline
Romanian & Alexandru Iosup & {\tt\tiny aiosup@yahoo.com} & 1.4.1 \\
\hline
Russian & Alexandr Chelpanov & {\tt\tiny cav@cryptopro.ru} & 1.4.1 \\
Russian & Alexandr Chelpanov & {\tt\tiny cav@cryptopro.ru} & up-to-date \\
\hline
Serbian & Dejan Milosavljevic & {\tt\tiny dmilos@email.com} & 1.4.1 \\
\hline
......@@ -327,7 +327,7 @@ when the translator was updated.
\hline
Spanish & Francisco Oltra Thennet & {\tt\tiny foltra@puc.cl} & 1.3.8 \\
\hline
Swedish & Mikael Hallin & {\tt\tiny mikaelhallin@yahoo.se} & 1.4.1 \\
Swedish & Mikael Hallin & {\tt\tiny mikaelhallin@yahoo.se} & up-to-date \\
\hline
Ukrainian & Olexij Tkatchenko & {\tt\tiny olexij.tkatchenko@parcs.de} & 1.4.1 \\
\hline
......
......@@ -74,7 +74,7 @@ Here is an example that speaks for itself:
If you like you can also use HTML commands inside the documentation
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:
\verbatim
......
(1.4.1-20050227)
(1.4.1-20050314)
Doxygen supports the following 30 languages (sorted alphabetically):
......@@ -8,7 +8,7 @@ German, Greek, Hungarian, Italian, Japanese (+En), Korean (+En),
Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, Serbian,
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.
----------------------------------------------------------------------
......@@ -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
still may be some details listed even for them:
TranslatorCzech
TranslatorDutch -- Remove the obsolete methods (never used).
TranslatorEnglish -- Remove the obsolete methods (never used).
TranslatorRussian
TranslatorSwedish
----------------------------------------------------------------------
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
must be implemented to become up-to-date:
TranslatorUkrainian 1.4.1 1 method to implement
TranslatorSwedish 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
TranslatorPolish 1.4.1 1 method to implement
TranslatorKorean 1.4.01 1 method to implement
......@@ -39,7 +40,6 @@ must be implemented to become up-to-date:
TranslatorHungarian 1.4.1 1 method to implement
TranslatorGerman 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
TranslatorChinese 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
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
----------------
......@@ -769,29 +759,6 @@ TranslatorRomanian (TranslatorAdapter_1_4_1) 1 method to implement
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
-----------------
......@@ -933,29 +900,6 @@ TranslatorSpanish (TranslatorAdapter_1_3_8) 8 methods to implement
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
-------------------
......
Summary: A documentation system for C/C++.
Name: doxygen
Version: 1.4.1_20050307
Version: 1.4.1_20050315
Release: 1
Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
......@@ -55,6 +55,11 @@ class BufStr
makeRoomFor(s);
m_writeOffset+=s;
}
void shrink( uint newlen )
{
m_writeOffset=newlen;
resize(newlen);
}
void resize( uint newlen )
{
m_size=newlen;
......
......@@ -1571,7 +1571,7 @@ void ClassDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
ol.writeString("href=\"");
ol.writeString(md->getOutputFileBase()+Doxygen::htmlFileExtension+"#"+md->anchor());
ol.writeString("\">");
ol.writeString(md->localName());
ol.writeString(md->name());
ol.writeString("</a>");
}
ol.writeString("</td></tr>\n");
......@@ -2076,12 +2076,9 @@ bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances,int level)
static bool isStandardFunc(MemberDef *md)
{
ClassDef *cd=md->getClassDef();
if (cd->templateMaster()) cd=cd->templateMaster();
return md->name()=="operator=" || // assignment operator
md->name()==cd->localName() || // constructor
(md->name().find('~')!=-1 &&
md->name().find("operator")==-1); // destructor
md->isConstructor() || // constructor
md->isDestructor(); // destructor
}
/*!
......
......@@ -73,6 +73,7 @@ CommandMap cmdMap[] =
{ "sa", CMD_SA },
{ "secreflist", CMD_SECREFLIST },
{ "section", CMD_SECTION },
{ "subpage", CMD_SUBPAGE },
{ "subsection", CMD_SUBSECTION },
{ "subsubsection", CMD_SUBSUBSECTION },
{ "paragraph", CMD_PARAGRAPH },
......
......@@ -66,27 +66,27 @@ enum CommandType
CMD_INTERNAL = 32,
CMD_INTERNALREF = 33,
CMD_INVARIANT = 34 | SIMPLESECT_BIT ,
//CMD_LANGSWITCH = 35,
CMD_LATEXONLY = 36,
CMD_LESS = 37,
CMD_LI = 38,
CMD_LINE = 39,
CMD_LINEBREAK = 40,
CMD_LINK = 41,
CMD_NOTE = 42 | SIMPLESECT_BIT,
CMD_PAR = 43 | SIMPLESECT_BIT,
CMD_PARAM = 44 | SIMPLESECT_BIT,
CMD_PERCENT = 45,
CMD_POST = 46 | SIMPLESECT_BIT,
CMD_PRE = 47 | SIMPLESECT_BIT ,
CMD_REF = 48,
CMD_SECREFITEM = 49,
CMD_REMARK = 50 | SIMPLESECT_BIT ,
CMD_RETURN = 51 | SIMPLESECT_BIT ,
CMD_RETVAL = 52 | SIMPLESECT_BIT,
CMD_SA = 53 | SIMPLESECT_BIT ,
CMD_SECREFLIST = 54,
CMD_SECTION = 55,
CMD_LATEXONLY = 35,
CMD_LESS = 36,
CMD_LI = 37,
CMD_LINE = 38,
CMD_LINEBREAK = 39,
CMD_LINK = 40,
CMD_NOTE = 41 | SIMPLESECT_BIT,
CMD_PAR = 42 | SIMPLESECT_BIT,
CMD_PARAM = 43 | SIMPLESECT_BIT,
CMD_PERCENT = 44,
CMD_POST = 45 | SIMPLESECT_BIT,
CMD_PRE = 46 | SIMPLESECT_BIT ,
CMD_REF = 47,
CMD_SECREFITEM = 48,
CMD_REMARK = 49 | SIMPLESECT_BIT ,
CMD_RETURN = 50 | SIMPLESECT_BIT ,
CMD_RETVAL = 51 | SIMPLESECT_BIT,
CMD_SA = 52 | SIMPLESECT_BIT ,
CMD_SECREFLIST = 53,
CMD_SECTION = 54,
CMD_SUBPAGE = 55,
CMD_SUBSECTION = 56,
CMD_SUBSUBSECTION= 57,
CMD_PARAGRAPH = 58,
......
......@@ -72,6 +72,7 @@ static void handleName(const QCString &);
static void handleTodo(const QCString &);
static void handleTest(const QCString &);
static void handleBug(const QCString &);
static void handleSubpage(const QCString &s);
static void handleDeprecated(const QCString &);
static void handleXRefItem(const QCString &);
static void handleRelated(const QCString &);
......@@ -153,6 +154,7 @@ static DocCmdMap docCmdMap[] =
{ "relatedalso", &handleRelatedAlso },
{ "relatesalso", &handleRelatedAlso },
{ "refitem", &handleRefItem },
{ "subpage", &handleSubpage },
{ "section", &handleSection },
{ "subsection", &handleSection },
{ "subsubsection", &handleSection },
......@@ -335,25 +337,25 @@ static QCString getDocSectionName(int s)
{
switch(s)
{
case Entry::CLASSDOC_SEC: return "@class";
case Entry::STRUCTDOC_SEC: return "@struct";
case Entry::UNIONDOC_SEC: return "@union";
case Entry::EXCEPTIONDOC_SEC: return "@exception";
case Entry::NAMESPACEDOC_SEC: return "@namespace";
case Entry::PROTOCOLDOC_SEC: return "@protocol";
case Entry::CATEGORYDOC_SEC: return "@category";
case Entry::ENUMDOC_SEC: return "@enum";
case Entry::PAGEDOC_SEC: return "@page";
case Entry::MEMBERDOC_SEC: return "@fn";
case Entry::OVERLOADDOC_SEC: return "@overload";
case Entry::FILEDOC_SEC: return "@file";
case Entry::DEFINEDOC_SEC: return "@def";
case Entry::GROUPDOC_SEC: return "@defgroup";
case Entry::MAINPAGEDOC_SEC: return "@mainpage";
case Entry::PACKAGEDOC_SEC: return "@package";
case Entry::DIRDOC_SEC: return "@dir";
case Entry::EXAMPLE_SEC: return "@example";
case Entry::MEMBERGRP_SEC: return "@name";
case Entry::CLASSDOC_SEC: return "\\class";
case Entry::STRUCTDOC_SEC: return "\\struct";
case Entry::UNIONDOC_SEC: return "\\union";
case Entry::EXCEPTIONDOC_SEC: return "\\exception";
case Entry::NAMESPACEDOC_SEC: return "\\namespace";
case Entry::PROTOCOLDOC_SEC: return "\\protocol";
case Entry::CATEGORYDOC_SEC: return "\\category";
case Entry::ENUMDOC_SEC: return "\\enum";
case Entry::PAGEDOC_SEC: return "\\page";
case Entry::MEMBERDOC_SEC: return "\\fn";
case Entry::OVERLOADDOC_SEC: return "\\overload";
case Entry::FILEDOC_SEC: return "\\file";
case Entry::DEFINEDOC_SEC: return "\\def";
case Entry::GROUPDOC_SEC: return "\\defgroup";
case Entry::MAINPAGEDOC_SEC: return "\\mainpage";
case Entry::PACKAGEDOC_SEC: return "\\package";
case Entry::DIRDOC_SEC: return "\\dir";
case Entry::EXAMPLE_SEC: return "\\example";
case Entry::MEMBERGRP_SEC: return "\\name";
default: return "";
}
}
......@@ -645,7 +647,18 @@ static int yyread(char *buf,int max_size)
/* start command character */
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]
TABLE [tT][aA][bB][lL][eE]
P [pP]
......@@ -672,7 +685,6 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
SCOPEID {ID}({ID}*{BN}*"::"{BN}*)*({ID}?)
SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
%option nounput
%option noyywrap
/* comment parsing states. */
......@@ -695,6 +707,8 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
%x GroupDocArg2
%x SectionLabel
%x SectionTitle
%x SubpageLabel
%x SubpageTitle
%x FormatBlock
%x LineParam
%x GuardParam
......@@ -736,7 +750,7 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
<Comment>("\\"[a-z_A-Z]+)+"\\" { // directory (or chain of commands!)
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);
// continue with the same input
REJECT;
......@@ -1262,6 +1276,36 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
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 ------- */
<AnchorLabel>{LABELID} { // found argument
......@@ -1771,6 +1815,20 @@ static void handleSection(const QCString &s)
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)
{
addOutput("@"+s+" ");
......@@ -1808,7 +1866,7 @@ static void handleElseIf(const QCString &)
if (guards.isEmpty())
{
warn(yyFileName,yyLineNr,
"Warning: found @else without matching start command");
"Warning: found \\else without matching start command");
}
else
{
......@@ -1822,7 +1880,7 @@ static void handleElse(const QCString &)
if (guards.isEmpty())
{
warn(yyFileName,yyLineNr,
"Warning: found @else without matching start command");
"Warning: found \\else without matching start command");
}
else
{
......@@ -1835,7 +1893,7 @@ static void handleEndIf(const QCString &)
if (guards.isEmpty())
{
warn(yyFileName,yyLineNr,
"Warning: found @endif without matching start command");
"Warning: found \\endif without matching start command");
}
else
{
......@@ -1960,6 +2018,7 @@ bool parseCommentBlock(/* in,out */ Entry *curEntry,
current = curEntry;
//previous = prevEntry;
inputString = comment;
if (inputString==0) return FALSE; // avoid empty strings
inputPosition = 0;
yyLineNr = lineNr;
yyFileName = fileName;
......@@ -1993,47 +2052,6 @@ bool parseCommentBlock(/* in,out */ Entry *curEntry,
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)
//----------------------------------------------------------------------------
......
......@@ -1094,6 +1094,7 @@ void Config::check()
filePatternList.append("*.cxx");
filePatternList.append("*.cpp");
filePatternList.append("*.c++");
filePatternList.append("*.d");
filePatternList.append("*.java");
filePatternList.append("*.ii");
filePatternList.append("*.ixx");
......
......@@ -29,6 +29,7 @@
#include "code.h"
#include "util.h"
#include "groupdef.h"
#include "pagedef.h"
#include "section.h"
#if defined(_MSC_VER) || defined(__BORLANDC__)
......@@ -789,6 +790,10 @@ void Definition::writePathFragment(OutputList &ol) const
{
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
{
ol.writeObjectLink(getReference(),getOutputFileBase(),0,m_localName);
......
......@@ -3620,6 +3620,7 @@ void DocPara::handleLink(const QString &cmdName,bool isJavaLink)
void DocPara::handleRef(const QString &cmdName)
{
DBG(("handleRef(%s)\n",cmdName.data()));
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
......@@ -3643,49 +3644,6 @@ endref:
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)
{
......@@ -4084,7 +4042,8 @@ int DocPara::handleCommand(const QString &cmdName)
case CMD_JAVALINK:
handleLink(cmdName,TRUE);
break;
case CMD_REF:
case CMD_REF: // fall through
case CMD_SUBPAGE:
handleRef(cmdName);
break;
case CMD_SECREFLIST:
......
......@@ -682,22 +682,22 @@ REFWORD ("#"|"::")?({ID}("."|"#"|"::"|"-"))*{ID}{FUNCARG}?
return 0;
}
<St_Ref>{REFWORD} {
<St_Ref>{REFWORD} { // label to refer to
g_token->name=yytext;
return TK_WORD;
}
<St_Ref>{BLANK}+ {
<St_Ref>{BLANK} { // white space
unput(' ');
return 0;
}
<St_Ref>{WS}+"\"" {
<St_Ref>{WS}+"\"" { // white space following by quoted string
BEGIN(St_Ref2);
}
<St_Ref>\n {
<St_Ref>\n { // new line
unput(*yytext);
return 0;
}
<St_Ref>. {
<St_Ref>. { // any other character
unput(*yytext);
return 0;
}
......
......@@ -221,9 +221,9 @@ static void addRelatedPage(Entry *root)
);
if (pd)
{
// see if the function is inside a namespace
Definition *ctx = 0;
// find the page's context
if (root->parent->section & Entry::COMPOUND_MASK ) // inside class
{
QCString fullName=removeRedundantWhiteSpace(root->parent->name);
......@@ -648,7 +648,7 @@ static void addClassToContext(Entry *root)
bool ambig;
NamespaceDef *nd = 0;
//NamespaceDef *nd = 0;
FileDef *fd = findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
// see if the using statement was found inside a namespace or inside
......@@ -657,18 +657,16 @@ static void addClassToContext(Entry *root)
if (root->parent->section == Entry::NAMESPACE_SEC)
{
scName=root->parent->name;
if (!scName.isEmpty())
{
nd = getResolvedNamespace(scName);
}
// if (!scName.isEmpty())
// {
// nd = getResolvedNamespace(scName);
// }
}
QCString fullName = root->name;
ClassDef *cd = getResolvedClass( nd,fd,
// 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.
scName.isEmpty() ? root->name : scName+"::"+root->name,
0,0,TRUE);
QCString qualifiedName = scName.isEmpty() ? root->name : scName+"::"+root->name;
ClassDef *cd = getClass(qualifiedName);
Debug::print(Debug::Classes,0, " Found class with name %s (cd=%p)\n",
cd ? cd->name().data() : root->name.data(), cd);
......@@ -1975,7 +1973,6 @@ static void buildVarList(Entry *root)
QCString classScope=stripAnonymousNamespaceScope(scope);
classScope=stripTemplateSpecifiersFromScope(classScope,FALSE);
QCString annScopePrefix=scope.left(scope.length()-classScope.length());
scope=classScope;
bool isRelated=FALSE;
if (!root->relates.isEmpty()) // related variable
......@@ -1991,6 +1988,7 @@ static void buildVarList(Entry *root)
{
// TODO: clean up this mess!
MemberDef *md=0;
#if 0
// if cd is an annonymous scope we insert the member
// into a non-annonymous scope as well.
//int indentDepth=0;
......@@ -2028,6 +2026,7 @@ static void buildVarList(Entry *root)
}
}
}
#endif
//printf("name=`%s' scope=%s scope.right=%s indentDepth=%d anonyScopes=%d\n",
// name.data(),scope.data(),
// scope.right(scope.length()-si).data(),
......@@ -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()
......@@ -6738,66 +6793,7 @@ static void generatePageDocs()
if (!pd->getGroupDef() && !pd->isReference())
{
msg("Generating docs for page %s...\n",pd->name().data());
//outputList->disable(OutputGenerator::Man);
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;
}
}
pd->writeDocumentation(*outputList);
}
}
}
......@@ -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);
if (newSize!=size) // we removed chars
{
dest.resize(oldPos+newSize); // resize the array
//printf(".......resizing from %d to %d\n",oldPos+size,oldPos+newSize);
dest.shrink(oldPos+newSize); // resize the array
//printf(".......resizing from %d to %d result=[%s]\n",oldPos+size,oldPos+newSize,dest.data());
}
}
......@@ -8529,7 +8525,11 @@ void parseInput()
msg("Building class list...\n");
buildClassList(root);
msg("Associating documentation with classes...\n");
buildClassDocList(root);
msg("Computing nesting relations for classes...\n");
resolveClassNestingRelations();
// calling buildClassList may result in cached relations that
// become invalid after resolveClassNestingRelation(), that's why
......@@ -8587,6 +8587,10 @@ void parseInput()
msg("Search for main page...\n");
findMainPage(root);
msg("Computing page relations...\n");
computePageRelations(root);
checkPageRelations();
msg("Sorting lists...\n");
Doxygen::memberNameSDict.sort();
Doxygen::functionNameSDict.sort();
......
......@@ -2404,9 +2404,10 @@ void countRelatedPages(int &docPages,int &indexPages)
PageDef *pd=0;
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++;
}
}
......@@ -2453,7 +2454,8 @@ void writePageIndex(OutputList &ol)
PageDef *pd=0;
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;
......
......@@ -428,6 +428,7 @@ MemberDef::MemberDef(const char *df,int dl,
m_hasDocumentedParams = FALSE;
m_hasDocumentedReturnType = FALSE;
m_docProvider = 0;
m_isDMember = m_defFileName.right(2).lower()==".d";
}
/*! Destroys the member definition. */
......@@ -2141,14 +2142,30 @@ Specifier MemberDef::virtualness() const
bool MemberDef::isConstructor() const
{
if (classDef)
return name()==classDef->localName();
{
if (m_isDMember) // for D
{
return name()=="this";
}
else // for other languages
{
return name()==classDef->localName();
}
}
else
return FALSE;
}
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,
......
......@@ -404,6 +404,8 @@ class MemberDef : public Definition
// to store the output file base from tag files
QCString explicitOutputFileBase;
bool m_isDMember;
};
#endif
#include "pagedef.h"
#include "groupdef.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,
......@@ -8,11 +12,12 @@ PageDef::PageDef(const char *f,int l,const char *n,
: Definition(f,l,n), m_title(t)
{
setDocumentation(d,f,l);
subPageDict = new PageSDict(7);
}
PageDef::~PageDef()
{
delete subPageDict;
}
void PageDef::findSectionsInDocumentation()
......@@ -33,3 +38,83 @@ QCString PageDef::getOutputFileBase() const
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 @@
#include "definition.h"
#include "sortdict.h"
class PageSDict;
class OutputList;
class PageDef : public Definition
{
public:
......@@ -32,18 +35,23 @@ class PageDef : public Definition
{
return isLinkableInProject() || isReference();
}
void addSubPage(PageDef *def);
void writeDocumentation(OutputList &ol);
// functions to get a uniform interface with Definitions
QCString getOutputFileBase() const;
void findSectionsInDocumentation();
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 addInnerCompound(Definition *d);
private:
QCString m_fileName;
QCString m_title;
GroupDef *m_inGroup;
PageSDict *subPageDict; // list of pages in the group
};
class PageSDict : public SDict<PageDef>
......
......@@ -473,9 +473,9 @@ static void setContext()
QCString fileName = yyFileName;
insideIDL = fileName.right(4)==".idl" || fileName.right(5)==".pidl" ||
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
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" ||
fileName.right(4)==".inc" || fileName.right(6)==".phtml";
insideObjC = fileName.right(2)==".m" || fileName.right(2)==".M" ||
......@@ -1188,9 +1188,14 @@ IDLATTR ("["[^\]]*"]"){BN}*
lineCount();
current->argList->getLast()->name=QCString(yytext).stripWhiteSpace();
}
<ObjCParams>"..." { // name of parameter
current->argList->getLast()->attrib="[,]";
current->argList->getLast()->type="...";
<ObjCParams>","{BN}*"..." { // name of parameter
lineCount();
// 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>":" {
......@@ -1567,9 +1572,16 @@ IDLATTR ("["[^\]]*"]"){BN}*
lineCount();
QCString scope=yytext;
current->name=removeRedundantWhiteSpace(substitute(scope,".","::"));
//printf("import name = %s -> %s\n",yytext,current->name.data());
current->fileName = yyFileName;
current->section=Entry::USINGDECL_SEC;
current->fileName = yyFileName;
if (insideD)
{
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 = new Entry ;
initEntry();
......@@ -1709,6 +1721,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
<FindMembers>"Q_PROPERTY" { // Qt property declaration
current->protection = protection = Public ;
current->mtype = mtype = Property;
current->type.resize(0);
BEGIN(QtPropType);
}
<QtPropType>"(" { // start of property arguments
......@@ -1717,8 +1730,14 @@ IDLATTR ("["[^\]]*"]"){BN}*
unput(';');
BEGIN(FindMembers);
}
<QtPropType>"const"|"volatile" {
current->type+=yytext;
}
<QtPropType>{B}+ {
current->type+=yytext;
}
<QtPropType>{ID} {
current->type=yytext;
current->type+=yytext;
BEGIN(QtPropName);
}
<QtPropName>{ID} {
......@@ -4384,11 +4403,11 @@ IDLATTR ("["[^\]]*"]"){BN}*
/* ---- Comments blocks ------ */
<DocBlock>"*/" { // end of comment block
<DocBlock>"*"*"*/" { // end of comment block
handleCommentBlock(docBlock,FALSE);
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+=yytext;
......@@ -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}+ {
......@@ -6121,8 +6138,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
}
<DefLineDoc,LineDoc,ClassDoc,PageDoc,Doc>"/*"|"//" { current->doc += yytext; }
/**** End of obsolete part */
/*** End of obsolete part ***/
/***********************************************************************/
......
......@@ -27,101 +27,33 @@
//
// Updates:
// --------
// 2000/06/20
// - The prototype version of Czech strings with diacritics. The
// translation was based on translator.h of Doxygen version
// 1.1.4 (from scratch).
//
// 2000/07/10
// - Updated version based on 1.1.5 sources (including important updates
// of the up-to-1.1.4 strings). Czech strings in this file were written
// in windows-1250 encoding. On-line decoding into iso-8859-2 ensured
// via conditional compilation if the sources are compiled under UNIX.
//
// 2000/07/19
// - Encoding conversion tables moved to the methods that use them.
// - Updates for "new since 1.1.5".
//
// 2000/08/02 (Petr Prikryl)
// - Updated for 1.2.0
//
// 2000/08/24
// - Changed trTodo() text from "Udelat" to "Planovane upravy"
// which seems more appropriate in the document context.
// - Typo corrected in trMemberTypedefDocumentation().
//
// 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.
//
// 2000/06/20 - Prototype: with diacritics; based on ver. 1.1.4 (from scratch).
// 2000/07/10 - Update to 1.1.5; conditionally decoding to iso-8859-2 for UNIX.
// 2000/07/19 - Updates for "new since 1.1.5"; encoding conversion separated.
// 2000/08/02 - Updated for 1.2.0
// 2000/08/24 - Corrections, updates.
// 2000/08/30 - Macro DECODE replaced by the inline (thanks to Boris Bralo).
// 2000/08/31 - ISOToWin() and WinToISO() moved to the base class.
// 2000/09/06 - Reimplementation of trInheritsList().
// 2000/09/11 - Update for "new since 1.2.1" version.
// 2000/10/17 - Update for "new since 1.2.2" version.
// 2001/01/09 - Update for "new since 1.2.4" version.
// 2001/02/15 - trMore() now returns only "..." (ellipsis).
// 2001/02/26 - Update for "new since 1.2.5" version (trBug(), trBugList()).
// 2001/03/12 - Minor correction of comments (synchronous with translator.h).
// 2001/04/10 - Updates (1.2.6-20010408), cleaning.
// 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 - Decode() inline changed to decode(); cleaning.
// 2001/05/18 - Updates, corrections.
// 2001/05/25 - Corrections.
// 2001/07/16 - trClassDocumentation() updated as in the English translator.
// 2001/11/06 - trReferences() implemented.
// 2002/01/23 - Two new methods "since 1.2.13" implemented.
// 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/10/15 - The new trEvents() and trEventDocumentation() implemented.
// 2003/04/28 - Five new methods "since 1.3" implemented.
......@@ -132,6 +64,7 @@
// 2004/06/16 - The new method "since 1.3.8" implemented.
// 2004/09/14 - The new methods "since 1.3.9" implemented.
// 2005/02/11 - The "never used" methods removed.
// 2005/03/08 - Update for "new since 1.4.1" (trOverloadText())
// Todo
// ----
......@@ -151,7 +84,7 @@
// Windows version. The version which does not call the function is
// probably slightly faster.
class TranslatorCzech : public TranslatorAdapter_1_4_1
class TranslatorCzech : public Translator
{
private:
/*! The decode() inline assumes the source written in the
......@@ -1673,6 +1606,20 @@ class TranslatorCzech : public TranslatorAdapter_1_4_1
result += "e";
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
......@@ -60,7 +60,7 @@
//
class TranslatorKorean : public TranslatorAdapter_1_3_9
class TranslatorKorean : public TranslatorAdapter_1_4_1
{
private:
/*! The decode() can change euc into sjis */
......
......@@ -49,10 +49,10 @@
#ifndef TRANSLATOR_RU_H
#define TRANSLATOR_RU_H
class TranslatorRussian : public TranslatorAdapter_1_4_1
class TranslatorRussian : public Translator
{
private:
/*! The Decode() inline assumes the source written in the
/*! The decode() inline assumes the source written in the
Koi8-R encoding (maintainer dependent).
*/
inline QCString decode(const QCString & sInput)
......@@ -216,10 +216,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
virtual QCString trFileList()
{ 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. */
virtual QCString trCompoundMembers()
{
......@@ -330,10 +326,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
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 */
virtual QCString trExamplesDescription()
{ return decode(" ."); }
......@@ -346,12 +338,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
virtual QCString trModulesDescription()
{ 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)
......@@ -501,12 +487,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
virtual QCString trEnumerationTypeDocumentation()
{ 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
* of documentation blocks for functions
*/
......@@ -566,20 +546,10 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
virtual QCString trForInternalUseOnly()
{ 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. */
virtual QCString trWarning()
{ 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. */
virtual QCString trVersion()
{ return decode(""); }
......@@ -881,10 +851,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
// new since 0.49-991106
//////////////////////////////////////////////////////////////////////////
virtual QCString trSources()
{
return decode(" .");
}
virtual QCString trDefinedAtLineInSourceFile()
{
return decode(". @1 @0");
......@@ -1192,11 +1158,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
// 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 */
virtual QCString trClasses()
{
......@@ -1229,11 +1190,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
{
return decode("");
}
/*! Used as a chapter title for Latex & RTF output */
virtual QCString trPackageDocumentation()
{
return decode("");
}
/*! Text shown before a multi-line define */
virtual QCString trDefineValue()
{
......@@ -1348,17 +1304,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
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
* be followed by a single name or by a list of names
* of the category.
......@@ -1616,6 +1561,20 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
if (singular) result+=""; else 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
......@@ -69,7 +69,7 @@ Problem!
#ifndef TRANSLATOR_SE_H
#define TRANSLATOR_SE_H
class TranslatorSwedish : public TranslatorAdapter_1_4_1
class TranslatorSwedish : public Translator
{
public:
......@@ -187,9 +187,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
virtual QCString trFileList()
{ return "Fillista"; }
virtual QCString trHeaderFiles()
{ return "Headerfiler"; }
virtual QCString trCompoundMembers()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
......@@ -314,9 +311,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
return result;
}
virtual QCString trHeaderFilesDescription()
{ return "Hr fljer headerfilerna som API:n bestr av:"; }
virtual QCString trExamplesDescription()
{ return "Hr fljer en lista med alla exempel:"; }
......@@ -326,9 +320,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
virtual QCString trModulesDescription()
{ return "Hr fljer en lista ver alla moduler:"; }
virtual QCString trNoDescriptionAvailable()
{ return "Beskrivning saknas"; }
virtual QCString trDocumentation()
{ return "Dokumentation"; }
......@@ -411,9 +402,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
virtual QCString trEnumerationTypeDocumentation()
{ return "Dokumentation ver egenupprknande typer"; }
virtual QCString trEnumerationValueDocumentation()
{ return "Dokumentation ver egenupprknande typers vrden"; }
virtual QCString trFunctionDocumentation()
{ return "Dokumentation ver funktioner"; }
......@@ -456,15 +444,9 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
virtual QCString trForInternalUseOnly()
{ return "Endast fr internt bruk."; }
virtual QCString trReimplementedForInternalReasons()
{ return "Omskriven av intern anledning; API:n pverkas inte.";}
virtual QCString trWarning()
{ return "Varning"; }
virtual QCString trBugsAndLimitations()
{ return "Fel och begrnsningar"; }
virtual QCString trVersion()
{ return "Version"; }
......@@ -704,10 +686,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
// new since 0.49-991003
//////////////////////////////////////////////////////////////////////////
virtual QCString trSources()
{
return "Kllor";
}
virtual QCString trDefinedAtLineInSourceFile()
{
return "Definition p rad @0 i filen @1.";
......@@ -1027,11 +1005,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
// 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 */
virtual QCString trClasses()
{
......@@ -1065,11 +1038,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
{
return "Paket";
}
/*! Used as a chapter title for Latex & RTF output */
virtual QCString trPackageDocumentation()
{
return "Paketdokumentation";
}
/*! Text shown before a multi-line define */
virtual QCString trDefineValue()
{
......@@ -1189,16 +1157,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
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
* be followed by a single name or by a list of names
* of the category.
......@@ -1458,6 +1416,20 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
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
Definition *cd;
for (cli.toFirst();(cd=cli.current());++cli)
{
//printf("Trying for class %s\n",cd->name().data());
i = isAccessibleFromWithExpScope(scope,fileScope,item,cd->name());
if (i!=-1)
{
......@@ -925,6 +926,7 @@ int isAccessibleFromWithExpScope(Definition *scope,FileDef *fileScope,Definition
{
if (g_visitedNamespaces.find(nd->name())==0)
{
//printf("Trying for namespace %s\n",nd->name().data());
i = isAccessibleFromWithExpScope(scope,fileScope,item,nd->name());
if (i!=-1)
{
......
......@@ -641,6 +641,21 @@ void XmlDocVisitor::visitPre(DocImage *img)
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 *)
......
......@@ -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)
{
......@@ -612,6 +624,7 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De
writeMemberTemplateLists(md,t);
}
QCString typeStr = md->typeString(); //replaceAnonymousScopes(md->typeString());
stripQualifiers(typeStr);
t << " <type>";
linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md->name(),typeStr);
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