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

Release-1.3.6-20040222

parent 2bf4cfed
DOXYGEN Version 1.3.6
DOXYGEN Version 1.3.6-20040222
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
--------
Dimitri van Heesch (12 February 2004)
Dimitri van Heesch (22 February 2004)
DOXYGEN Version 1.3.6
DOXYGEN Version 1.3.6_20040222
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) (12 February 2004)
Dimitri van Heesch (dimitri@stack.nl) (22 February 2004)
1.3.6
1.3.6-20040222
......@@ -204,7 +204,8 @@ int main(int argc,char **argv)
{
numParams++;
}
if (strcmp(mem->typeString()->latin1(),"void")!=0)
const char *type = mem->typeString()->latin1();
if (type && strcmp(type, "void"))
{
numParams++; // count non-void return types as well
}
......
......@@ -224,30 +224,33 @@ fi
#- check for qt --------------------------------------------------------------
if test "$f_wizard" = YES; then
echo -n " Checking for Qt..."
if test -d "/usr/lib/qt3/lib"; then
if test -d "/usr/lib/qt3/include"; then
if test -x "/usr/lib/qt3/bin/moc"; then
QTDIR="/usr/lib/qt3";
if test -z "$QTDIR"; then
echo " QTDIR environment variable not set!"
echo -n " Checking for Qt..."
if test -d "/usr/lib/qt3/lib"; then
if test -d "/usr/lib/qt3/include"; then
if test -x "/usr/lib/qt3/bin/moc"; then
QTDIR="/usr/lib/qt3";
fi
fi
fi
fi
if test -d "/usr/lib/qt2/lib"; then
if test -d "/usr/lib/qt2/include"; then
if test -x "/usr/lib/qt2/bin/moc"; then
QTDIR="/usr/lib/qt2";
if test -d "/usr/lib/qt2/lib"; then
if test -d "/usr/lib/qt2/include"; then
if test -x "/usr/lib/qt2/bin/moc"; then
QTDIR="/usr/lib/qt2";
fi
fi
fi
fi
if test -d "/usr/lib/qt/lib"; then
if test -d "/usr/lib/qt/include"; then
if test -x "/usr/lib/qt/bin/moc"; then
QTDIR="/usr/lib/qt";
if test -d "/usr/lib/qt/lib"; then
if test -d "/usr/lib/qt/include"; then
if test -x "/usr/lib/qt/bin/moc"; then
QTDIR="/usr/lib/qt";
fi
fi
fi
fi
if test -z "$QTDIR"; then
echo "QTDIR not set!"
echo "QTDIR not set and Qt not found at standard locations!"
echo
echo "tmake requires the QTDIR environment variable to be set."
echo "check your Qt installation!"
......
......@@ -30,7 +30,7 @@ clean:
language: language.doc
language.doc: $(wildcard ../src/translator*.h) maintainers.txt language.tpl translator.pl
$(ENV) VERSION=$(VERSION) DOXYGEN_DOCDIR=. $(PERL) translator.pl
language.doc: $(wildcard ../src/translator*.h) maintainers.txt language.tpl translator.py
python translator.pl
FORCE:
......@@ -68,6 +68,7 @@ documentation:
\refitem cmdendif \\endif
\refitem cmdendlatexonly \\endlatexonly
\refitem cmdendlink \\endlink
\refitem cmdendmanonly \\endmanonly
\refitem cmdendverbatim \\endverbatim
\refitem cmdendxmlonly \\endxmlonly
\refitem cmdenum \\enum
......@@ -94,6 +95,7 @@ documentation:
\refitem cmdline \\line
\refitem cmdlink \\link
\refitem cmdmainpage \\mainpage
\refitem cmdmanonly \\manonly
\refitem cmdn \\n
\refitem cmdname \\name
\refitem cmdnamespace \\namespace
......@@ -1626,6 +1628,14 @@ class C {};
\sa section \ref cmdlatexonly "\\latexonly".
<hr>
\section cmdendmanonly \endmanonly
\addindex \\endmanonly
Ends a block of text that was started with a \\manonly command.
\sa section \ref cmdmanonly "\\manonly".
<hr>
\section cmdendverbatim \endverbatim
......@@ -1685,7 +1695,7 @@ class C {};
environment variables (like \$(HOME) ) are resolved inside a
HTML-only block.
\sa section \ref cmdhtmlonly "\\htmlonly" and section
\sa section \ref cmdmanonly "\\manonly" and section
\ref cmdlatexonly "\\latexonly".
<hr>
......@@ -1763,6 +1773,22 @@ class C {};
\sa section \ref cmdlatexonly "\\latexonly"
and section \ref cmdhtmlonly "\\htmlonly".
<hr>
\section cmdmanonly \manonly
\addindex \\manonly
Starts a block of text that will be verbatim included in the
generated MAN documentation only. The block ends with a
endmanonly command.
This command can be used to include groff code directly into
MAN pages. You can use the \\htmlonly and \\latexonly and
\\endhtmlonly and \\endlatexonly pairs to provide proper
HTML and \f$\mbox{\LaTeX}\f$ alternatives.
\sa section \ref cmdhtmlonly "\\htmlonly" and section
\ref cmdlatexonly "\\latexonly".
<hr>
\section cmdli \li { item-description }
......
......@@ -676,7 +676,7 @@ function's detailed documentation block.
in the directories. If left blank the following patterns are tested:
<code>
*.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp
*.h++ *.idl *.odl *.cs
*.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
</code>
\anchor cfg_recursive
......
This diff is collapsed.
ATTENTION! This is the template for generating language.doc. If you want to
change the language.doc, make the changes here and inside maintainers.txt.
/******************************************************************************
* <notice>This is the template for generating language.doc.
* Edit manually this file, not the language.doc!</notice>
*
* %(editnote)s
*
* Copyright (C) 1997-2004 by Dimitri van Heesch.
*
......@@ -14,25 +16,27 @@
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
* $Id$
*/
/*! \page langhowto Internationalization
<h3>Support for multiple languages</h3>
Doxygen has built-in support for multiple languages. This means
that the text fragments that doxygen generates can be produced in
languages other than English (the default) at configuration time.
Doxygen has built-in support for multiple languages. This means that the
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 $version), $numlang languages
are supported (sorted alphabetically):
$languages.
Currently (version %(doxVersion)s), %(numLangStr)s languages
are supported (sorted alphabetically):
%(supportedLangReadableStr)s.
The table of information related to the supported languages follows.
It is sorted by language alphabetically. The <b>Status</b> column
was generated from sources and shows approximately the last version
when the translator was updated.
$information_table
%(informationTable)s
Most people on the list have indicated that they were also busy
doing other things, so if you want to help to speed things up please
......@@ -44,7 +48,7 @@ please read the next section.
<h3>Adding a new language to doxygen</h3>
This short HOWTO explains how to add support for a new language to Doxygen:
This short HOWTO explains how to add support for the new language to Doxygen:
Just follow these steps:
<ol>
......@@ -73,7 +77,7 @@ Just follow these steps:
\endverbatim
Remember to use the same symbol LANG_xx that you added to \c lang_cfg.h.
I.e., the \c xx should be capital letters that identify your language.
On the other hand, the \c xx inside your \c translator_xx.h should be
On the other hand, the \c xx inside your \c translator_xx.h should use
lower case.
<p>Now, in <code>setTranslator()</code> add
\verbatim
......@@ -248,18 +252,18 @@ maintainers should try to reach the state with the minimal number of
translator adapter classes.
<b>To simplify the maintenance of the language translator classes</b>
for the supported languages, the \c translator.pl perl
for the supported languages, the \c translator.py Python
script was developed (located in \c doxygen/doc directory).
It extracts the important information about obsolete and
new methods from the source files for each of the languages.
The information is stored in the <em>translator report</em> ASCII file
($translator_report_file_name). \htmlonly If you compiled this documentation
(%(translatorReportFileName)s). \htmlonly If you compiled this documentation
from sources and if you have also doxygen sources available the
link $translator_report_link should be valid.\endhtmlonly
link %(translatorReportLink)s should be valid.\endhtmlonly
Looking at the base class of the language translator, the script
guesses also the status of the translator -- see the last column of
the table with languages above. The \c translator.pl is called
the table with languages above. The \c translator.py is called
automatically when the doxygen documentation is generated. You can
also run the script manualy whenever you feel that it can help you.
Of course, you are not forced to use the results of the script. You
......@@ -294,49 +298,48 @@ implement anything else than the methods required by the Translator
class (i.e. the pure virtual methods of the \c Translator -- they
end with <code>=0;</code>).
If everything compiles fine, try to run \c translator.pl, and have a
If everything compiles fine, try to run \c translator.py, and have a
look at the translator report (ASCII file) at the \c doxygen/doc
directory. Even if your translator is marked as up-to-date, there
still may be some remarks related to your souce code. Namely, the
directory. Even if your translator is marked as up-to-date, there
still may be some remarks related to your souce code. Namely, the
obsolete methods--that are not used at all--may be listed in the
section for your language. Simply, remove their code (and run the
\c translator.pl again).
section for your language. Simply, remove their code (and run the \c
translator.py again). Also, you will be informed when you forgot to
change the base class of your translator class to some newer adapter
class or directly to the Translator class.
<b>If you do not have time to finish all the updates</b> you should
still start with <em>the most radical approach</em> as described
above. You can always change the base class to the translator
adapter class that implements all of the not-yet-implemented methods.
<b>If you prefer to update your translator gradually</b>, look
at the <em>translator report</em> generated by the \c translator.pl script
and choose one of the missing method that is implemented by the
translator adapter, that is used as your base class. When there is
not such a method in your translator adapter base class, you probably
can change the translator adapter base to the newer one.
Probably the easiest approach of the gradual update is to look at
the translator report to the part where the list of the implemented
translator adapters is shown. Then:
- Look how many required methods each adapter implements and guess
how many methods you are willing to update (to spend the time
with).
- Choose the related oldest translator adapters to be removed (i.e.
not used by your translator).
- Change the base class of your translator class to the translator
adapter that you want to use.
- Implement the methods that were implemented by the older translator
adapters.
Notice: Do not blindly implement all methods that are implemented by
your translator adapter base class. The reason is that the adapter
classes implement also obsolete methods. Another reason is that
some of the methods could become obsolete from some newer adapter
on. Focus on the methods listed as \e required.
<b>The really obsolete language translators</b> may lead to too much
complicated adapters. Because of that, doxygen developers may decide
to derive such translators from the \c TranslatorEnglish class, which
is by definition always up-to-date.
<b>If you prefer to update your translator gradually</b>, have a look
at \c TranslatorEnglish (the \c translator_en.h file). Inside, you
will find the comments like <code>new since 1.2.4</code> that separate
always a number of methods that were implemented in the stated
version. Do implement the group of methods that are placed below the
comment that uses the same version numbers as your translator adapter
class. (For example, your translator class have to use the \c
TranslatorAdapter_1_2_4, if it does not implement the methods below
the comment <code>new since 1.2.4</code>. When you implement them,
your class should use newer translator adapter.
Run the \c translator.py script occasionaly and give it your \c xx
identification (from \c translator_xx.h) to create the translator
report shorter (also produced faster) -- it will contain only the
information related to your translator. Once you reach the state when
the base class should be changed to some newer adapter, you will see
the note in the translator report.
Warning: Don't forget to compile Doxygen to discover, whether it is
compilable. The \c translator.py does not check if everything is
correct with respect to the compiler. Because of that, it may lie
sometimes about the necessary base class.
<b>The most obsolete language translators</b> would lead to
implementation of too complicated adapters. Because of that, doxygen
developers may decide to derive such translators from the \c
TranslatorEnglish class, which is by definition always up-to-date.
When doing so, all the missing methods will be replaced by the
English translation. This means that not-implemented methods will
......
% $Id$
%
% Comments start with % sign at the beginning.
% XML entities like &auml; are used for special characters.
% There is one record for each language. The records are separated
% by the empty line and they do not contain empty lines.
% First line of the record identifies the language.
% First line of the record identifies the translator class for the language.
% The following one or more lines contain information about
% the maintainer(s) for the language (one line, one maintainer)
% in the form: <readable name><colon><e-mail>
Brazilian
TranslatorBrazilian
Fabio "FJTC" Jun Takada Chino: chino@icmc.sc.usp.br
Catalan
TranslatorCatalan
Albert Mora: amora@iua.upf.es
Chinese
TranslatorChinese
Wei Liu: liuwei@asiainfo.com
Wang Weihan: wangweihan@capinfo.com.cn
ChineseTraditional
TranslatorChinesetraditional
Daniel YC Lin: daniel@twpda.com
Gary Lee: garylee@ecosine.com.tw
Croatian
TranslatorCroatian
Boris Bralo: boris.bralo@zg.tel.hr
Czech
TranslatorCzech
Petr P&rcaron;ikryl: prikrylp@skil.cz
Danish
TranslatorDanish
Erik S&oslash;e S&oslash;rensen: erik@mail.nu
Dutch
TranslatorDutch
Dimitri van Heesch: dimitri@stack.nl
English
TranslatorEnglish
Dimitri van Heesch: dimitri@stack.nl
Finnish
TranslatorFinnish
Olli Korhonen: Olli.Korhonen@ccc.fi
French
TranslatorFrench
Xavier Outhier: xouthier@yahoo.fr
German
TranslatorGerman
Jens Seidel: jensseidel@users.sf.net
Greek
TranslatorGreek
Harry Kalogirou: harkal@rainbow.cs.unipi.gr
Hungarian
TranslatorHungarian
F&ouml;ldv&aacute;ri Gy&ouml;rgy: foldvari@diatronltd.com
&Aacute;kos Kiss: akiss@users.sourceforge.net
Italian
TranslatorItalian
Alessandro Falappa: alessandro@falappa.net
Ahmed Aldo Faisal: aaf23@cam.ac.uk
Japanese
TranslatorJapanese
Ryunosuke Satoh: sun594@hotmail.com
Kenji Nagamatsu: naga@joyful.club.ne.jp
Korean
TranslatorKorean
Richard Kim: ryk@dspwiz.com
Norwegian
TranslatorNorwegian
Lars Erik Jordet: lej@circuitry.no
Polish
TranslatorPolish
Piotr Kaminski: Piotr.Kaminski@ctm.gdynia.pl
Grzegorz Kowal: g_kowal@poczta.onet.pl
Portuguese
TranslatorPortuguese
Rui Godinho Lopes: ruiglopes@yahoo.com
Romanian
TranslatorRomanian
Alexandru Iosup: aiosup@yahoo.com
Russian
TranslatorRussian
Alexandr Chelpanov: cav@cryptopro.ru
Serbian
TranslatorSerbian
Dejan Milosavljevic: dmilos@email.com
Slovak
TranslatorSlovak
Stanislav Kudl&aacute;&ccaron;: skudlac@pobox.sk
Slovene
TranslatorSlovene
Matjaz Ostroversnik: matjaz.ostroversnik@zrs-tk.si
Spanish
TranslatorSpanish
Francisco Oltra Thennet: foltra@puc.cl
Swedish
TranslatorSwedish
Mikael Hallin: mikaelhallin@yahoo.se
Ukrainian
TranslatorUkrainian
Olexij Tkatchenko: olexij.tkatchenko@gmx.de
@call perl -w translator.pl
This diff is collapsed.
This diff is collapsed.
Summary: A documentation system for C/C++.
Name: doxygen
Version: 1.3.6_20040222
Release: 1
Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
Patch: doxygen-1.2.7-redhat.patch
Patch1: doxygen-1.2.12-qt2.patch
Group: Development/Tools
License: GPL
Url: http://www.stack.nl/~dimitri/doxygen/index.html
Prefix: %{_prefix}
BuildPrereq: libstdc++-devel >= 2.96, /usr/bin/perl
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Doxygen can generate an online class browser (in HTML) and/or a
reference manual (in LaTeX) from a set of documented source files. The
documentation is extracted directly from the sources. Doxygen can
also be configured to extract the code structure from undocumented
source files.
%package doxywizard
Summary: A GUI for creating and editing configuration files.
Group: User Interface/X
Requires: %{name} = %{version}
BuildPrereq: qt-devel => 2.3.0
Requires: qt >= 2.3.0
%description doxywizard
Doxywizard is a GUI for creating and editing configuration files that
are used by doxygen.
%prep
%setup -q
%patch -p1 -b .redhat
%patch1 -p1 -b .qt2
%build
QTDIR="" && . /etc/profile.d/qt.sh
export OLD_PO_FILE_INPUT=yes
./configure --prefix %{_prefix} --shared --release --with-doxywizard
make all docs
%install
rm -rf ${RPM_BUILD_ROOT}
export OLD_PO_FILE_INPUT=yes
make install INSTALL=$RPM_BUILD_ROOT%{_prefix}
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(-,root,root)
%doc LANGUAGE.HOWTO README examples html
%{_bindir}/doxygen
%{_bindir}/doxytag
%files doxywizard
%defattr(-,root,root)
%{_bindir}/doxywizard
%changelog
* Sun Jan 06 2002 Than Ngo <than@redhat.com> 1.2.13.1-1
- update to 1.2.13.1
* Sun Dec 30 2001 Jeff Johnson <jbj@redhat.com> 1.2.13-1
- update to 1.2.13
* Sun Nov 18 2001 Than Ngo <than@redhat.com> 1.2.12-1
- update to 1.2.12
- s/Copyright/License
* Wed Sep 12 2001 Tim Powers <timp@redhat.com>
- rebuild with new gcc and binutils
* Wed Jun 13 2001 Than Ngo <than@redhat.com>
- update tp 1.2.8.1
- make doxywizard as separat package
- fix to use install as default
* Tue Jun 05 2001 Than Ngo <than@redhat.com>
- update to 1.2.8
* Tue May 01 2001 Than Ngo <than@redhat.com>
- update to 1.2.7
- clean up specfile
- patch to use RPM_OPT_FLAG
* Wed Mar 14 2001 Jeff Johnson <jbj@redhat.com>
- update to 1.2.6
* Wed Feb 28 2001 Trond Eivind Glomsrd <teg@redhat.com>
- rebuild
* Tue Dec 26 2000 Than Ngo <than@redhat.com>
- update to 1.2.4
- remove excludearch ia64
- bzip2 sources
* Mon Dec 11 2000 Than Ngo <than@redhat.com>
- rebuild with the fixed fileutils
* Mon Oct 30 2000 Jeff Johnson <jbj@redhat.com>
- update to 1.2.3.
* Sun Oct 8 2000 Jeff Johnson <jbj@redhat.com>
- update to 1.2.2.
- enable doxywizard.
* Sat Aug 19 2000 Preston Brown <pbrown@redhat.com>
- 1.2.1 is latest stable, so we upgrade before Winston is released.
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild
* Tue Jul 4 2000 Jakub Jelinek <jakub@redhat.com>
- Rebuild with new C++
* Fri Jun 30 2000 Florian La Roche <laroche@redhat.de>
- fix QTDIR detection
* Fri Jun 09 2000 Preston Brown <pbrown@redhat.com>
- compile on x86 w/o optimization, revert when compiler fixed!!
* Wed Jun 07 2000 Preston Brown <pbrown@redhat.com>
- use newer RPM macros
* Tue Jun 6 2000 Jeff Johnson <jbj@redhat.com>
- add to distro.
* Tue May 9 2000 Tim Powers <timp@redhat.com>
- rebuilt for 7.0
* Wed Feb 2 2000 Bernhard Rosenkraenzer <bero@redhat.com>
- recompile with current Qt (2.1.0/1.45)
* Wed Jan 5 2000 Jeff Johnson <jbj@redhat.com>
- update to 1.0.0.
- recompile with qt-2.0.1 if available.
- relocatable package.
* Mon Nov 8 1999 Tim Powers <timp@redhat.com>
-updated to 0.49-991106
* Tue Jul 13 1999 Tim Powers <timp@redhat.com>
- updated source
- cleaned up some stuff in the spec file
* Thu Apr 22 1999 Jeff Johnson <jbj@redhat.com>
- Create Power Tools 6.0 package.
......@@ -934,6 +934,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
QCString pageTitle=displayName().copy();
QCString pageType;
QCString cType=compoundTypeString();
//printf("ClassDef::writeDocumentation() cType=%s\n",cType.data());
toupper(cType.at(0));
pageType+=" ";
pageType+=cType;
......@@ -941,7 +942,9 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (m_tempArgs) pageTitle.prepend(" Template");
startFile(ol,getOutputFileBase(),name(),pageTitle);
startTitle(ol,getOutputFileBase());
ol.parseText(theTranslator->trCompoundReference(displayName(),m_compType,m_tempArgs!=0));
ol.parseText(theTranslator->trCompoundReference(displayName(),
m_isObjC && m_compType==Interface ? Class : m_compType,
m_tempArgs!=0));
addGroupListToTitle(ol,this);
endTitle(ol,getOutputFileBase(),name());
......@@ -1039,7 +1042,9 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
Doxygen::tagFile << " <compound kind=\"" << compoundTypeString();
Doxygen::tagFile << "\">" << endl;
Doxygen::tagFile << "\"";
if (isObjectiveC()) { Doxygen::tagFile << " objc=\"yes\""; }
Doxygen::tagFile << ">" << endl;
Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl;
if (m_tempArgs)
......@@ -1371,7 +1376,9 @@ void ClassDef::writeDocumentation(OutputList &ol)
{
ol.disable(OutputGenerator::Man);
ol.writeRuler();
ol.parseText(theTranslator->trGeneratedFromFiles(m_compType,m_files.count()==1));
ol.parseText(theTranslator->trGeneratedFromFiles(
m_isObjC && m_compType==Interface ? Class : m_compType,
m_files.count()==1));
bool first=TRUE;
const char *file = m_files.first();
......@@ -1498,7 +1505,7 @@ void ClassDef::writeMemberList(OutputList &ol)
ol.parseText(theTranslator->trIncludingInheritedMembers());
//ol.startItemList();
ol.writeString("<table>\n");
ol.writeString("<p><table>\n");
//MemberNameInfo *mni=m_allMemberNameInfoList->first();
MemberNameInfoSDict::Iterator mnii(*m_allMemberNameInfoSDict);
......@@ -1526,24 +1533,45 @@ void ClassDef::writeMemberList(OutputList &ol)
QCString name=mi->ambiguityResolutionScope+md->name();
//ol.writeListItem();
ol.writeString(" <tr class=\"memlist\"><td>");
//Definition *bd = md->getGroupDef();
//if (bd==0) bd=cd;
ol.writeObjectLink(md->getReference(),
md->getOutputFileBase(),
md->anchor(),name);
if ( md->isFunction() || md->isSignal() || md->isSlot() ||
(md->isFriend() && md->argsString()))
ol.docify(md->argsString());
else if (md->isEnumerate())
ol.parseText(" "+theTranslator->trEnumName());
else if (md->isEnumValue())
ol.parseText(" "+theTranslator->trEnumValue());
else if (md->isTypedef())
ol.docify(" typedef");
else if (md->isFriend() && !strcmp(md->typeString(),"friend class"))
ol.docify(" class");
//ol.writeString("\n");
if (cd->isObjectiveC())
{
if (md->isObjCMethod())
{
if (md->isStatic())
ol.writeString("+&nbsp;</td><td>");
else
ol.writeString("-&nbsp;</td><td>");
}
else
ol.writeString("</td><td>");
}
if (md->isObjCMethod())
{
ol.writeObjectLink(md->getReference(),
md->getOutputFileBase(),
md->anchor(),md->name());
}
else
{
//Definition *bd = md->getGroupDef();
//if (bd==0) bd=cd;
ol.writeObjectLink(md->getReference(),
md->getOutputFileBase(),
md->anchor(),name);
if ( md->isFunction() || md->isSignal() || md->isSlot() ||
(md->isFriend() && md->argsString()))
ol.docify(md->argsString());
else if (md->isEnumerate())
ol.parseText(" "+theTranslator->trEnumName());
else if (md->isEnumValue())
ol.parseText(" "+theTranslator->trEnumValue());
else if (md->isTypedef())
ol.docify(" typedef");
else if (md->isFriend() && !strcmp(md->typeString(),"friend class"))
ol.docify(" class");
//ol.writeString("\n");
}
ol.writeString("</td>");
memberWritten=TRUE;
}
......@@ -1554,17 +1582,32 @@ void ClassDef::writeMemberList(OutputList &ol)
{
//ol.writeListItem();
ol.writeString(" <tr bgcolor=\"#f0f0f0\"><td>");
if (cd->isObjectiveC())
{
if (md->isObjCMethod())
{
if (md->isStatic())
ol.writeString("+&nbsp;</td><td>");
else
ol.writeString("-&nbsp;</td><td>");
}
else
ol.writeString("</td><td>");
}
ol.startBold();
ol.docify(md->name());
ol.endBold();
if ( md->isFunction() || md->isSignal() || md->isSlot() )
ol.docify(md->argsString());
else if (md->isEnumerate())
ol.parseText(" "+theTranslator->trEnumName());
else if (md->isEnumValue())
ol.parseText(" "+theTranslator->trEnumValue());
else if (md->isTypedef())
ol.docify(" typedef");
if (!md->isObjCMethod())
{
if ( md->isFunction() || md->isSignal() || md->isSlot() )
ol.docify(md->argsString());
else if (md->isEnumerate())
ol.parseText(" "+theTranslator->trEnumName());
else if (md->isEnumValue())
ol.parseText(" "+theTranslator->trEnumValue());
else if (md->isTypedef())
ol.docify(" typedef");
}
ol.writeString(" (");
ol.parseText(theTranslator->trDefinedIn()+" ");
if (cd->isLinkable())
......@@ -1589,7 +1632,8 @@ void ClassDef::writeMemberList(OutputList &ol)
ol.writeString("</td>");
ol.writeString("<td>");
}
if ((prot!=Public || virt!=Normal ||
if (
(prot!=Public || virt!=Normal ||
md->isFriend() || md->isRelated() || md->isExplicit() ||
md->isMutable() || (md->isInline() && Config_getBool("INLINE_INFO")) ||
md->isSignal() || md->isSlot() ||
......
......@@ -103,6 +103,8 @@ CommandMap cmdMap[] =
{ "_internalref", CMD_INTERNALREF },
{ "dot", CMD_DOT },
{ "enddot", CMD_ENDDOT },
{ "manonly", CMD_MANONLY },
{ "endmanonly", CMD_ENDMANONLY },
{ 0, 0 }
};
......
......@@ -103,7 +103,9 @@ enum CommandType
CMD_XREFITEM = 69 | SIMPLESECT_BIT,
CMD_XMLONLY = 70,
CMD_DOT = 71,
CMD_ENDDOT = 72
CMD_ENDDOT = 72,
CMD_MANONLY = 73,
CMD_ENDMANONLY = 74
};
enum HtmlTagType
......
......@@ -1100,6 +1100,8 @@ void Config::check()
filePatternList.append("*.php");
filePatternList.append("*.php3");
filePatternList.append("*.inc");
filePatternList.append("*.m");
filePatternList.append("*.mm");
}
// add default pattern if needed
......@@ -1819,7 +1821,7 @@ void Config::create()
"and *.h) to filter out the source-files in the directories. If left \n"
"blank the following patterns are tested: \n"
"*.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp \n"
"*.h++ *.idl *.odl *.cs *.php *.php3 *.inc\n"
"*.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm\n"
);
cb = addBool(
"RECURSIVE",
......
......@@ -128,6 +128,9 @@ ID ([a-z_A-Z][a-z_A-Z0-9]*)|(@[0-9]+)
}
name.resize(0);
}
<Start>":" { // Objective-C argument separator
name+=yytext;
}
<Start>[*&]+ {
addType();
type+=yytext;
......
......@@ -826,6 +826,15 @@ reparsetoken:
doctokenizerYYsetStatePara();
}
break;
case CMD_MANONLY:
{
doctokenizerYYsetStateManOnly();
tok = doctokenizerYYlex();
children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::ManOnly,g_isExample,g_exampleName));
if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: manonly section ended without end marker");
doctokenizerYYsetStatePara();
}
break;
case CMD_LATEXONLY:
{
doctokenizerYYsetStateLatexOnly();
......@@ -3664,6 +3673,15 @@ int DocPara::handleCommand(const QString &cmdName)
doctokenizerYYsetStatePara();
}
break;
case CMD_MANONLY:
{
doctokenizerYYsetStateManOnly();
retval = doctokenizerYYlex();
m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::ManOnly,g_isExample,g_exampleName));
if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: manonly section ended without end marker");
doctokenizerYYsetStatePara();
}
break;
case CMD_LATEXONLY:
{
doctokenizerYYsetStateLatexOnly();
......@@ -3702,6 +3720,7 @@ int DocPara::handleCommand(const QString &cmdName)
break;
case CMD_ENDCODE:
case CMD_ENDHTMLONLY:
case CMD_ENDMANONLY:
case CMD_ENDLATEXONLY:
case CMD_ENDXMLONLY:
case CMD_ENDLINK:
......
......@@ -349,7 +349,7 @@ class DocWhiteSpace : public DocNode
class DocVerbatim : public DocNode
{
public:
enum Type { Code, HtmlOnly, LatexOnly, XmlOnly, Verbatim, Dot };
enum Type { Code, HtmlOnly, ManOnly, LatexOnly, XmlOnly, Verbatim, Dot };
DocVerbatim(DocNode *parent,const QString &context,
const QString &text, Type t,bool isExample,
const QString &exampleFile) :
......
......@@ -120,6 +120,7 @@ void doctokenizerYYsetStatePara();
void doctokenizerYYsetStateTitle();
void doctokenizerYYsetStateCode();
void doctokenizerYYsetStateHtmlOnly();
void doctokenizerYYsetStateManOnly();
void doctokenizerYYsetStateLatexOnly();
void doctokenizerYYsetStateXmlOnly();
void doctokenizerYYsetStateVerbatim();
......
......@@ -324,6 +324,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
%x St_TitleV
%x St_Code
%x St_HtmlOnly
%x St_ManOnly
%x St_LatexOnly
%x St_XmlOnly
%x St_Verbatim
......@@ -502,6 +503,14 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
<St_HtmlOnly>. {
g_token->verb+=yytext;
}
<St_ManOnly>{CMD}"endmanonly" {
return RetVal_OK;
}
<St_ManOnly>[^\\@\n$]+ |
<St_ManOnly>\n |
<St_ManOnly>. {
g_token->verb+=yytext;
}
<St_LatexOnly>{CMD}"endlatexonly" {
return RetVal_OK;
}
......@@ -880,6 +889,12 @@ void doctokenizerYYsetStateHtmlOnly()
BEGIN(St_HtmlOnly);
}
void doctokenizerYYsetStateManOnly()
{
g_token->verb="";
BEGIN(St_ManOnly);
}
void doctokenizerYYsetStateXmlOnly()
{
g_token->verb="";
......
......@@ -491,7 +491,7 @@ static void addIncludeFile(ClassDef *cd,FileDef *ifd,Entry *root)
}
else // put #include in the class documentation without link
{
cd->setIncludeFile(0,iName,local,FALSE);
cd->setIncludeFile(0,iName,local,TRUE);
}
}
}
......@@ -729,6 +729,10 @@ static void addClassToContext(Entry *root)
case Entry::PROTOCOLDOC_SEC:
sec=ClassDef::Protocol;
break;
case Entry::CATEGORY_SEC:
case Entry::CATEGORYDOC_SEC:
sec=ClassDef::Category;
break;
case Entry::EXCEPTION_SEC:
case Entry::EXCEPTIONDOC_SEC:
sec=ClassDef::Exception;
......@@ -811,6 +815,22 @@ static void addClassToContext(Entry *root)
cd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
cd->insertUsedFile(root->fileName);
//int bi;
//if (root->objc && (bi=fullName.find('<'))!=-1 && root->extends->count()==0)
//{
// // add protocols as base classes
// int be=fullName.find('>'),len;
// static QRegExp re("[A-Z_a-z][A-Z_a-z0-9]*");
// int p=0;
// while ((p=re.match(fullName,bi+1,&len))!=-1 && p<be)
// {
// QCString baseName = fullName.mid(p,len);
// printf("Adding artifical base class %s to %s\n",baseName.data(),fullName.data());
// root->extends->append(new BaseInfo(baseName,Public,Normal));
// bi=p+len;
// }
//}
// add class to the list
//printf("ClassDict.insert(%s)\n",resolveDefines(fullName).data());
Doxygen::classSDict.append(fullName,cd);
......@@ -824,7 +844,8 @@ static void addClassToContext(Entry *root)
static void buildClassList(Entry *root)
{
if (
(root->section & Entry::COMPOUND_MASK) && !root->name.isEmpty()
((root->section & Entry::COMPOUND_MASK) ||
root->section==Entry::OBJCIMPL_SEC) && !root->name.isEmpty()
)
{
addClassToContext(root);
......@@ -2232,11 +2253,12 @@ static void buildFunctionList(Entry *root)
)
)
{
Debug::print(Debug::Functions,0,"--> member of class %s!\n",rname.data(),cd->name().data());
Debug::print(Debug::Functions,0,"--> member %s of class %s!\n",
rname.data(),cd->name().data());
addMethodToClass(root,cd,rname,isFriend);
}
else if (root->parent &&
!(root->parent->section & Entry::COMPOUND_MASK) &&
!((root->parent->section & Entry::COMPOUND_MASK) || root->parent->section==Entry::OBJCIMPL_SEC) &&
!isMember &&
(root->relates.isEmpty() || root->relatesDup) &&
root->type.left(7)!="extern " &&
......@@ -2310,24 +2332,6 @@ static void buildFunctionList(Entry *root)
md->setDocsForDefinition(!root->proto);
ArgumentList *argList = new ArgumentList;
stringToArgumentList(root->args,argList);
//printf("root->argList=%p\n",root->argList);
//if (root->argList)
//{
// ArgumentListIterator ali1(*root->argList);
// ArgumentListIterator ali2(*argList);
// Argument *sa,*da;
// for (;(sa=ali1.current()) && (da=ali2.current());++ali1,++ali2)
// {
// printf("sa->name=%s (doc=%s) da->name=%s (doc=%s)\n",
// sa->name.data(),sa->docs.data(),
// da->name.data(),da->docs.data()
// );
// if (!sa->docs.isEmpty() && da->docs.isEmpty())
// {
// da->docs=sa->docs.copy();
// }
// }
//}
if (root->proto)
{
//printf("setDeclArgumentList to %p\n",argList);
......@@ -2359,19 +2363,6 @@ static void buildFunctionList(Entry *root)
// merge ingroup specifiers
if (md->getGroupDef()==0 && root->groups->first()!=0)
{
//printf("new member is grouped, existing member not\n");
// if we do addMemberToGroups here an undocumented declaration may prevent
// the documented implementation below it from being added
//addMemberToGroups(root,md);
//GroupDef *gd=Doxygen::groupSDict[root->groups->first()->groupname.data()];
//if (gd)
//{
// bool success = gd->insertMember(md);
// if (success)
// {
// md->setGroupDef(gd, root->groups->first()->pri, root->fileName, root->startLine, !root->doc.isEmpty());
// }
//}
addMemberToGroups(root,md);
}
else if (md->getGroupDef()!=0 && root->groups->count()==0)
......@@ -3302,6 +3293,7 @@ static bool findTemplateInstanceRelation(Entry *root,
ClassDef *instanceClass = templateClass->insertTemplateInstance(
root->fileName,root->startLine,templSpec,freshInstance);
if (isArtificial) instanceClass->setClassIsArtificial();
instanceClass->setIsObjectiveC(root->objc);
if (freshInstance)
{
......@@ -4207,9 +4199,16 @@ static bool findGlobalMember(Entry *root,
}
else // got docs for an undefined member!
{
warn(root->fileName,root->startLine,
"Warning: documented function `%s' was not defined.",decl
);
if (root->parent && root->parent->section==Entry::OBJCIMPL_SEC)
{
// probably a local member ObjC method not found in the interface
}
else
{
warn(root->fileName,root->startLine,
"Warning: documented function `%s' was not defined.",decl
);
}
}
return TRUE;
}
......@@ -4752,7 +4751,9 @@ static void findMember(Entry *root,
delete nl;
}
}
if (count==0 && !(isFriend && funcType=="class"))
if (count==0 && !(isFriend && funcType=="class") &&
(root->parent==0 || root->parent->section!=Entry::OBJCIMPL_SEC)
)
{
int candidates=0;
if (mn->count()>0)
......@@ -5192,6 +5193,32 @@ static void findMemberDocumentation(Entry *root)
}
}
//----------------------------------------------------------------------
static void findObjCMethodDefinitions(Entry *root)
{
EntryListIterator eli(*root->sublist);
Entry *objCImpl;
for (;(objCImpl=eli.current());++eli)
{
if (objCImpl->section==Entry::OBJCIMPL_SEC)
{
//printf("Found ObjC class implementation %s\n",objCImpl->name.data());
EntryListIterator seli(*objCImpl->sublist);
Entry *objCMethod;
for (;(objCMethod=seli.current());++seli)
{
if (objCMethod->section==Entry::FUNCTION_SEC)
{
//Printf(" Found ObjC method definition %s\n",objCMethod->name.data());
findMember(objCMethod, objCMethod->type+" "+objCImpl->name+"::"+objCMethod->name+" "+objCMethod->args, FALSE,TRUE);
objCMethod->section=Entry::EMPTY_SEC;
}
}
}
}
}
//----------------------------------------------------------------------
// find and add the enumeration to their classes, namespaces or files
......@@ -8129,6 +8156,7 @@ void parseInput()
findEnumDocumentation(root);
msg("Searching for member function documentation...\n");
findObjCMethodDefinitions(root);
findMemberDocumentation(root); // may introduce new members !
transferRelatedFunctionDocumentation();
transferFunctionDocumentation();
......
......@@ -200,8 +200,9 @@ Entry::~Entry()
void Entry::addSubEntry(Entry *current)
{
//printf("Entry %d with name %s type 0x%x added\n",
// current->num,current->name.data(),current->section);
//printf("Entry %d with name %s type 0x%x added to %s type 0x%x\n",
// current->num,current->name.data(),current->section,
// name.data(),section);
//printf("Entry::addSubEntry(%s) %p\n",current->name.data(),current->tArgList);
current->parent=this;
sublist->append(current);
......
......@@ -191,42 +191,45 @@ class Entry
PROTOCOL_SEC | CATEGORY_SEC,
SCOPE_MASK = COMPOUND_MASK | NAMESPACE_SEC,
CLASSDOC_SEC = 0x00000100,
STRUCTDOC_SEC = 0x00000200,
UNIONDOC_SEC = 0x00000400,
EXCEPTIONDOC_SEC = 0x00000800,
NAMESPACEDOC_SEC = 0x00001000,
INTERFACEDOC_SEC = 0x00002000,
PROTOCOLDOC_SEC = 0x00004000,
CLASSDOC_SEC = 0x00000800,
STRUCTDOC_SEC = 0x00001000,
UNIONDOC_SEC = 0x00002000,
EXCEPTIONDOC_SEC = 0x00004000,
NAMESPACEDOC_SEC = 0x00008000,
INTERFACEDOC_SEC = 0x00010000,
PROTOCOLDOC_SEC = 0x00020000,
CATEGORYDOC_SEC = 0x00040000,
COMPOUNDDOC_MASK = CLASSDOC_SEC | STRUCTDOC_SEC | UNIONDOC_SEC |
INTERFACEDOC_SEC | EXCEPTIONDOC_SEC | PROTOCOLDOC_SEC,
INTERFACEDOC_SEC | EXCEPTIONDOC_SEC | PROTOCOLDOC_SEC |
CATEGORYDOC_SEC,
SOURCE_SEC = 0x00010000,
HEADER_SEC = 0x00020000,
SOURCE_SEC = 0x00400000,
HEADER_SEC = 0x00800000,
FILE_MASK = SOURCE_SEC | HEADER_SEC,
ENUMDOC_SEC = 0x00100000,
ENUM_SEC = 0x00200000,
EMPTY_SEC = 0x00300000,
PAGEDOC_SEC = 0x00400000,
VARIABLE_SEC = 0x00500000,
FUNCTION_SEC = 0x00600000,
TYPEDEF_SEC = 0x00700000,
MEMBERDOC_SEC = 0x00800000,
OVERLOADDOC_SEC = 0x00900000,
EXAMPLE_SEC = 0x00a00000,
VARIABLEDOC_SEC = 0x00b00000,
FILEDOC_SEC = 0x00c00000,
DEFINEDOC_SEC = 0x00d00000,
INCLUDE_SEC = 0x00e00000,
DEFINE_SEC = 0x00f00000,
GROUPDOC_SEC = 0x01000000,
USINGDIR_SEC = 0x01100000,
MAINPAGEDOC_SEC = 0x01200000,
MEMBERGRP_SEC = 0x01300000,
USINGDECL_SEC = 0x01400000,
PACKAGE_SEC = 0x01500000,
PACKAGEDOC_SEC = 0x01600000
ENUMDOC_SEC = 0x01000000,
ENUM_SEC = 0x02000000,
EMPTY_SEC = 0x03000000,
PAGEDOC_SEC = 0x04000000,
VARIABLE_SEC = 0x05000000,
FUNCTION_SEC = 0x06000000,
TYPEDEF_SEC = 0x07000000,
MEMBERDOC_SEC = 0x08000000,
OVERLOADDOC_SEC = 0x09000000,
EXAMPLE_SEC = 0x0a000000,
VARIABLEDOC_SEC = 0x0b000000,
FILEDOC_SEC = 0x0c000000,
DEFINEDOC_SEC = 0x0d000000,
INCLUDE_SEC = 0x0e000000,
DEFINE_SEC = 0x0f000000,
GROUPDOC_SEC = 0x10000000,
USINGDIR_SEC = 0x11000000,
MAINPAGEDOC_SEC = 0x12000000,
MEMBERGRP_SEC = 0x13000000,
USINGDECL_SEC = 0x14000000,
PACKAGE_SEC = 0x15000000,
PACKAGEDOC_SEC = 0x16000000,
OBJCIMPL_SEC = 0x17000000
};
enum MemberSpecifier
{
......
......@@ -200,6 +200,7 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::HtmlOnly:
m_t << s->text();
break;
case DocVerbatim::ManOnly:
case DocVerbatim::LatexOnly:
case DocVerbatim::XmlOnly:
/* nothing */
......
......@@ -43,7 +43,7 @@
static const char *defaultStyleSheet =
"H1 {\n"
" text-align: center;\n"
" font-family: Arial, Helvetica, sans-serif;\n"
" font-family: Geneva, Arial, Helvetica, sans-serif;\n"
"}\n"
"H2 {\n"
" font-family: Geneva, Arial, Helvetica, sans-serif;\n"
......@@ -56,6 +56,7 @@ static const char *defaultStyleSheet =
" text-align: center;\n"
" margin: 2px;\n"
" padding: 2px;\n"
" line-height: 120%;\n"
"}\n"
"A.qindex {\n"
" text-decoration: none;\n"
......@@ -79,9 +80,9 @@ static const char *defaultStyleSheet =
" font-weight: bold;\n"
" background-color: #6666cc;\n"
" color: #ffffff;\n"
" padding: 2 6px;\n"
" padding: 2px 6px;\n"
" border: 1px double #9295C2;\n"
" }\n"
"}\n"
"A.qindexHL:hover {\n"
" text-decoration: none;\n"
" background-color: #6666cc;\n"
......@@ -116,7 +117,13 @@ static const char *defaultStyleSheet =
"TD.md { background-color: #F4F4FB; font-weight: bold; }\n"
"TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; }\n"
"TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; }\n"
"DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold }\n"
"DIV.groupHeader {\n"
" margin-left: 16px;\n"
" margin-top: 12px;\n"
" margin-bottom: 6px;\n"
" font-weight: bold;\n"
" font-family: Geneva, Arial, Helvetica, sans-serif;\n"
"}\n"
"DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller }\n"
"BODY {\n"
" background: white;\n"
......@@ -172,7 +179,7 @@ static const char *defaultStyleSheet =
"}\n"
".mdescLeft {\n"
" font-size: smaller;\n"
" font-family: Arial, Helvetica, sans-serif;\n"
" font-style: italic;\n"
" background-color: #FAFAFA;\n"
" padding-left: 8px;\n"
" border-top: 1px none #E0E0E0;\n"
......@@ -183,7 +190,6 @@ static const char *defaultStyleSheet =
"}\n"
".mdescRight {\n"
" font-size: smaller;\n"
" font-family: Arial, Helvetica, sans-serif;\n"
" font-style: italic;\n"
" background-color: #FAFAFA;\n"
" padding-left: 4px;\n"
......@@ -282,8 +288,16 @@ void HtmlGenerator::init()
exit(1);
}
writeLogo(dname);
if (!Config_getString("HTML_HEADER").isEmpty()) g_header=fileToString(Config_getString("HTML_HEADER"));
if (!Config_getString("HTML_FOOTER").isEmpty()) g_footer=fileToString(Config_getString("HTML_FOOTER"));
if (!Config_getString("HTML_HEADER").isEmpty())
{
g_header=fileToString(Config_getString("HTML_HEADER"));
//printf("g_header='%s'\n",g_header.data());
}
if (!Config_getString("HTML_FOOTER").isEmpty())
{
g_footer=fileToString(Config_getString("HTML_FOOTER"));
//printf("g_footer='%s'\n",g_footer.data());
}
}
void HtmlGenerator::writeStyleSheetFile(QFile &file)
......@@ -422,8 +436,7 @@ static void writePageFooter(QTextStream &t,const QCString lastTitle)
);
t << endl << "<a href=\"http://www.doxygen.org/index.html\">";
t << endl << "<img src=\"doxygen.png\" alt=\"doxygen\" "
<< "align=\"middle\" border=0 > " << endl <<
"</a>" << versionString <<" ";
<< "align=\"middle\" border=0 > " << "</a>" << versionString << " ";
t << "</small></address>\n</body>\n</html>\n";
}
else
......
......@@ -258,6 +258,7 @@ void LatexDocVisitor::visit(DocVerbatim *s)
break;
case DocVerbatim::HtmlOnly:
case DocVerbatim::XmlOnly:
case DocVerbatim::ManOnly:
/* nothing */
break;
case DocVerbatim::LatexOnly:
......
......@@ -198,6 +198,9 @@ void ManDocVisitor::visit(DocVerbatim *s)
m_t << ".PP" << endl;
m_firstCol=TRUE;
break;
case DocVerbatim::ManOnly:
m_t << s->text();
break;
case DocVerbatim::HtmlOnly:
case DocVerbatim::XmlOnly:
case DocVerbatim::LatexOnly:
......
......@@ -153,6 +153,8 @@ void ManGenerator::endTitleHead(const char *,const char *name)
{
t << ".TH \"" << name << "\" " << getExtension() << " \""
<< dateToString(FALSE) << "\" \"";
if (!Config_getString("PROJECT_NUMBER").isEmpty())
t << "Version " << Config_getString("PROJECT_NUMBER") << "\" \"";
if (Config_getString("PROJECT_NAME").isEmpty())
t << "Doxygen";
else
......
......@@ -144,21 +144,24 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
{
QCString n=a->type;
if (md->isObjCMethod()) { n.prepend("("); n.append(")"); }
if (!cName.isEmpty()) n=addTemplateNames(n,cd->name(),cName);
linkifyText(TextGeneratorOLImpl(ol),cd,md->getBodyDef(),md->name(),n);
if (a->type!="...")
{
if (!cName.isEmpty()) n=addTemplateNames(n,cd->name(),cName);
linkifyText(TextGeneratorOLImpl(ol),cd,md->getBodyDef(),md->name(),n);
}
}
if (!md->isDefine())
{
ol.endParameterType();
ol.startParameterName(defArgList->count()<2);
}
if (!a->name.isEmpty()) // argument has a name
if (!a->name.isEmpty() || (a->name.isEmpty() && a->type=="...")) // argument has a name
{
ol.docify(" ");
ol.disable(OutputGenerator::Man);
ol.startEmphasis();
ol.enable(OutputGenerator::Man);
ol.docify(a->name);
if (a->name.isEmpty()) ol.docify(a->type); else ol.docify(a->name);
ol.disable(OutputGenerator::Man);
ol.endEmphasis();
ol.enable(OutputGenerator::Man);
......@@ -191,7 +194,8 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
{
//printf("Found parameter keyword %s\n",a->attrib.data());
// strip [ and ]
key=a->attrib.mid(1,a->attrib.length()-2)+":";
key=a->attrib.mid(1,a->attrib.length()-2);
if (key!=",") key+=":"; // for normal keywords add colon
}
ol.endParameterName(FALSE,FALSE);
ol.startParameterType(FALSE,key);
......@@ -800,9 +804,9 @@ void MemberDef::writeDeclaration(OutputList &ol,
if (prot!=Public)
{
Doxygen::tagFile << "\" protection=\"";
if (prot==Protected) Doxygen::tagFile << "public";
if (prot==Protected) Doxygen::tagFile << "protected";
else if (prot==Package) Doxygen::tagFile << "package";
else /* Private */ Doxygen::tagFile << "protected";
else /* Private */ Doxygen::tagFile << "private";
}
if (virt!=Normal)
{
......@@ -1321,6 +1325,17 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.startMemberDocName(isObjCMethod());
if (isObjCMethod())
{
// strip scope name
int ep = ldef.find("::");
if (ep!=-1)
{
int sp=ldef.findRev(' ',ep);
if (sp!=-1)
{
ldef=ldef.left(sp+1)+ldef.mid(ep+2);
}
}
// strip keywords
int dp = ldef.find(':');
if (dp!=-1)
{
......
......@@ -619,6 +619,7 @@ void PerlModDocVisitor::visit(DocVerbatim *s)
return;
case DocVerbatim::Verbatim: type = "preformatted"; break;
case DocVerbatim::HtmlOnly: type = "htmlonly"; break;
case DocVerbatim::ManOnly: type = "manonly"; break;
case DocVerbatim::LatexOnly: type = "latexonly"; break;
case DocVerbatim::XmlOnly: type = "xmlonly"; break;
case DocVerbatim::Dot: type = "dot"; break;
......
......@@ -141,6 +141,7 @@ class PrintDocVisitor : public DocVisitor
case DocVerbatim::Code: printf("<code>"); break;
case DocVerbatim::Verbatim: printf("<verbatim>"); break;
case DocVerbatim::HtmlOnly: printf("<htmlonly>"); break;
case DocVerbatim::ManOnly: printf("<manonly>"); break;
case DocVerbatim::LatexOnly: printf("<latexonly>"); break;
case DocVerbatim::XmlOnly: printf("<xmlonly>"); break;
case DocVerbatim::Dot: printf("<dot>"); break;
......@@ -151,6 +152,7 @@ class PrintDocVisitor : public DocVisitor
case DocVerbatim::Code: printf("</code>"); break;
case DocVerbatim::Verbatim: printf("</verbatim>"); break;
case DocVerbatim::HtmlOnly: printf("</htmlonly>"); break;
case DocVerbatim::ManOnly: printf("</manonly>"); break;
case DocVerbatim::LatexOnly: printf("</latexonly>"); break;
case DocVerbatim::XmlOnly: printf("</xmlonly>"); break;
case DocVerbatim::Dot: printf("</dot>"); break;
......
......@@ -313,6 +313,7 @@ void RTFDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::HtmlOnly:
case DocVerbatim::LatexOnly:
case DocVerbatim::XmlOnly:
case DocVerbatim::ManOnly:
/* nothing */
break;
case DocVerbatim::Dot:
......
......@@ -167,6 +167,7 @@ static QCString oldStyleArgType;
static QCString docBackup;
static QCString briefBackup;
//-----------------------------------------------------------------------------
static void initParser()
......@@ -439,11 +440,12 @@ static void setContext()
insideIDL = fileName.right(4)==".idl" || fileName.right(5)==".pidl" ||
fileName.right(4)==".odl";
insideJava = fileName.right(5)==".java";
insideCS = fileName.right(3)==".cs";
insideD = fileName.right(3)==".d";
insideCS = fileName.right(3)==".cs"; // for normal keywords add colon
insideD = fileName.right(3)==".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";
insideObjC = fileName.right(2)==".m" || fileName.right(2)==".M" ||
fileName.right(3)==".mm";
if ( insidePHP )
{
useOverrideCommands = TRUE;
......@@ -1024,6 +1026,11 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
}
else
{
lineCount();
current->fileName = yyFileName;
current->startLine = yyLineNr;
current->bodyLine = yyLineNr;
current->section = Entry::FUNCTION_SEC;
current->protection = protection = Public ;
current->stat=yytext[0]=='+';
current->mtype = mtype = Method;
......@@ -1044,7 +1051,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
}
current->name = yytext;
}
<ObjCMethod>":" { // start of parameter list
<ObjCMethod>":"{B}* { // start of parameter list
current->name += ':';
Argument *a = new Argument;
current->argList->append(a);
......@@ -1060,11 +1067,13 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->argList->getLast()->attrib=(QCString)"["+yytext+"]";
current->name += yytext;
}
<ObjCParams>{ID} { // name of parameter
current->argList->getLast()->name=yytext;
<ObjCParams>{ID}{BN}* { // name of parameter
lineCount();
current->argList->getLast()->name=QCString(yytext).stripWhiteSpace();
}
<ObjCParams>"..." { // name of parameter
current->argList->getLast()->name=yytext;
current->argList->getLast()->attrib="[,]";
current->argList->getLast()->type="...";
}
<ObjCParams>":" {
current->name += ':';
......@@ -1084,7 +1093,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<ObjCParamType>[^)]* {
current->argList->last()->type=yytext;
}
<ObjCParamType>")" {
<ObjCParamType>")"{B}* {
BEGIN( ObjCParams );
}
<ObjCMethod,ObjCParams>";" { // end of method declaration
......@@ -1093,6 +1102,10 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
unput(';');
BEGIN( Function );
}
<ObjCMethod,ObjCParams>"{" { // start of a method body
unput('{');
BEGIN( Function );
}
<FindMembers>{BN}{1,80} {
lineCount();
}
......@@ -1226,7 +1239,20 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->name = QCString(yytext).stripWhiteSpace();
}
}
<FindMembers>{B}*"@interface"{BN}+ { // Objective-C interface
<FindMembers>{B}*"@implementation"{BN}+ { // Objective-C class implementation
lineCount();
isTypedef=FALSE;
current->section = Entry::OBJCIMPL_SEC;
current->objc = insideObjC = TRUE;
current->protection = protection = Public ;
addType( current ) ;
current->type += " implementation" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
current->bodyLine = yyLineNr;
BEGIN( CompoundName );
}
<FindMembers>{B}*"@interface"{BN}+ { // Objective-C class interface
lineCount();
isTypedef=FALSE;
current->section = Entry::INTERFACE_SEC;
......@@ -3327,10 +3353,19 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<ClassTemplSpec>. {
current->name += yytext;
}
<CompoundName>{SCOPENAME}{BN}*";" { // forward declaration
unput(';');
if (isTypedef) // typedef of a class, put typedef keyword back
{
current->type.prepend("typedef");
}
BEGIN( FindMembers );
}
<CompoundName>{SCOPENAME} {
current->name = yytext ;
lineCount();
if (current->section == Entry::PROTOCOL_SEC)
if (current->section == Entry::PROTOCOL_SEC ||
current->section == Entry::OBJCIMPL_SEC)
{
unput('{'); // fake start of body
}
......@@ -3454,16 +3489,17 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->name.sprintf("@%d",anonCount++);
}
curlyCount=0;
if (current->section==Entry::PROTOCOL_SEC)
{
if (current->section==Entry::PROTOCOL_SEC ||
current->section==Entry::OBJCIMPL_SEC)
{ // ObjC body that ends with @end
BEGIN( ReadBodyIntf );
}
else if (current->section==Entry::NAMESPACE_SEC)
{
{ // namespace body
BEGIN( ReadNSBody );
}
else
{
{ // class body
BEGIN( ReadBody ) ;
}
}
......
......@@ -55,8 +55,8 @@ class TagMemberInfo
class TagClassInfo
{
public:
enum Kind { Class, Struct, Union, Interface, Exception };
TagClassInfo() { bases=0, templateArguments=0; members.setAutoDelete(TRUE); }
enum Kind { Class, Struct, Union, Interface, Exception, Protocol, Category };
TagClassInfo() { bases=0, templateArguments=0; members.setAutoDelete(TRUE); isObjC=FALSE; }
~TagClassInfo() { delete bases; delete templateArguments; }
QString name;
QString filename;
......@@ -65,6 +65,7 @@ class TagClassInfo
QList<TagMemberInfo> members;
QList<QString> *templateArguments;
Kind kind;
bool isObjC;
};
/*! Container for namespace specific info that can be read from a tagfile */
......@@ -194,6 +195,7 @@ class TagFileParser : public QXmlDefaultHandler
{
m_curString = "";
QString kind = attrib.value("kind");
QString isObjC = attrib.value("objc");
if (kind=="class")
{
m_curClass = new TagClassInfo;
......@@ -224,6 +226,18 @@ class TagFileParser : public QXmlDefaultHandler
m_curClass->kind = TagClassInfo::Exception;
m_state = InClass;
}
else if (kind=="protocol")
{
m_curClass = new TagClassInfo;
m_curClass->kind = TagClassInfo::Protocol;
m_state = InClass;
}
else if (kind=="category")
{
m_curClass = new TagClassInfo;
m_curClass->kind = TagClassInfo::Category;
m_state = InClass;
}
else if (kind=="file")
{
m_curFile = new TagFileInfo;
......@@ -253,6 +267,10 @@ class TagFileParser : public QXmlDefaultHandler
{
err("Error: Unknown compound attribute `%s' found!\n",kind.data());
}
if (isObjC=="yes" && m_curClass)
{
m_curClass->isObjC = TRUE;
}
}
void endCompound()
{
......@@ -1004,6 +1022,8 @@ void TagFileParser::buildLists(Entry *root)
case TagClassInfo::Union: ce->section = Entry::UNION_SEC; break;
case TagClassInfo::Interface: ce->section = Entry::INTERFACE_SEC; break;
case TagClassInfo::Exception: ce->section = Entry::EXCEPTION_SEC; break;
case TagClassInfo::Protocol: ce->section = Entry::PROTOCOL_SEC; break;
case TagClassInfo::Category: ce->section = Entry::CATEGORY_SEC; break;
}
ce->name = tci->name;
addDocAnchors(ce,tci->docAnchors);
......@@ -1011,6 +1031,7 @@ void TagFileParser::buildLists(Entry *root)
ti->tagName = m_tagName;
ti->fileName = tci->filename;
ce->tagInfo = ti;
ce->objc = tci->isObjC;
// transfer base class list
if (tci->bases)
{
......
......@@ -557,6 +557,7 @@ NamespaceDef *getResolvedNamespace(const char *name)
}
static QDict<MemberDef> g_resolvedTypedefs;
static QDict<Definition> g_visitedNamespaces;
// forward declaration
ClassDef *getResolvedClassRec(Definition *scope,
......@@ -746,12 +747,13 @@ bool accessibleViaUsingNamespace(const NamespaceSDict *nl,
//printf("Trying via used namespace %s\n",und->name().data());
Definition *sc = explicitScopePart.isEmpty() ? und : followPath(und,fileScope,explicitScopePart);
if (sc && item->getOuterScope()==sc) return TRUE;
//printf("Try via used namespac done\n");
//printf("Try via used namespace done\n");
}
}
return FALSE;
}
/* Returns the "distance" (=number of levels up) from item to scope, or -1
* if item in not inside scope.
*/
......@@ -857,6 +859,7 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item,
int i=-1;
if (newScope->definitionType()==Definition::TypeNamespace)
{
g_visitedNamespaces.insert(newScope->name(),newScope);
// this part deals with the case where item is a class
// A::B::C but is explicit referenced as A::C, where B is imported
// in A via a using directive.
......@@ -884,11 +887,14 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item,
NamespaceDef *nd;
for (nli.toFirst();(nd=nli.current());++nli)
{
i = isAccessibleFrom(scope,fileScope,item,nd->name());
if (i!=-1)
if (g_visitedNamespaces.find(nd->name())==0)
{
//printf("> found via explicit scope of used namespace\n");
goto done;
i = isAccessibleFrom(scope,fileScope,item,nd->name());
if (i!=-1)
{
//printf("> found via explicit scope of used namespace\n");
goto done;
}
}
}
}
......@@ -1009,6 +1015,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
if (d->definitionType()==Definition::TypeClass ||
d->definitionType()==Definition::TypeMember)
{
g_visitedNamespaces.clear();
// test accessibility of definition within scope.
int distance = isAccessibleFrom(scope,fileScope,d,explicitScopePart);
if (distance!=-1) // definition is accessible
......@@ -1525,6 +1532,10 @@ int filterCRLF(char *buf,int len)
if (src<len && buf[src] == '\n')
++src; // skip LF just after CR (DOS)
}
else if ( c == '\0' && src<len-1) // filter out internal \0 characters, as it will confuse the parser
{
c = ' '; // turn into a space
}
buf[dest++] = c; // copy the (modified) character to dest
}
return dest; // length of the valid part of the buf
......
......@@ -181,6 +181,11 @@ void XmlDocVisitor::visit(DocVerbatim *s)
filter(s->text());
m_t << "</htmlonly>";
break;
case DocVerbatim::ManOnly:
m_t << "<manonly>";
filter(s->text());
m_t << "</manonly>";
break;
case DocVerbatim::LatexOnly:
m_t << "<latexonly>";
filter(s->text());
......
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