Commit 64f0c97c authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.7.4-20110727

parent b6550378
DOXYGEN Version 1.7.4-20110629 DOXYGEN Version 1.7.4-20110727
Please read the installation section of the manual Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions. (http://www.doxygen.org/install.html) for instructions.
-------- --------
Dimitri van Heesch (29 June 2011) Dimitri van Heesch (27 July 2011)
...@@ -10,7 +10,7 @@ clean: FORCE ...@@ -10,7 +10,7 @@ clean: FORCE
cd qtools ; $(MAKE) clean cd qtools ; $(MAKE) clean
cd src ; $(MAKE) clean cd src ; $(MAKE) clean
cd libmd5 ; $(MAKE) clean cd libmd5 ; $(MAKE) clean
cd addon/doxywizard ; $(MAKE) clean -cd addon/doxywizard ; $(MAKE) clean
cd addon/doxmlparser/src ; $(MAKE) clean cd addon/doxmlparser/src ; $(MAKE) clean
cd addon/doxmlparser/test ; $(MAKE) clean cd addon/doxmlparser/test ; $(MAKE) clean
cd addon/doxmlparser/examples/metrics ; $(MAKE) clean cd addon/doxmlparser/examples/metrics ; $(MAKE) clean
...@@ -20,7 +20,7 @@ clean: FORCE ...@@ -20,7 +20,7 @@ clean: FORCE
distclean: clean distclean: clean
cd src ; $(MAKE) distclean cd src ; $(MAKE) distclean
cd libmd5 ; $(MAKE) distclean cd libmd5 ; $(MAKE) distclean
cd addon/doxywizard ; $(MAKE) distclean -cd addon/doxywizard ; $(MAKE) distclean
cd addon/doxmlparser/src ; $(MAKE) distclean cd addon/doxmlparser/src ; $(MAKE) distclean
cd addon/doxmlparser/test ; $(MAKE) distclean cd addon/doxmlparser/test ; $(MAKE) distclean
cd addon/doxmlparser/examples/metrics ; $(MAKE) distclean cd addon/doxmlparser/examples/metrics ; $(MAKE) distclean
......
DOXYGEN Version 1.7.4_20110629 DOXYGEN Version 1.7.4_20110727
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -26,4 +26,4 @@ forum. ...@@ -26,4 +26,4 @@ forum.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (29 June 2011) Dimitri van Heesch (dimitri@stack.nl) (27 July 2011)
...@@ -20,7 +20,7 @@ doxygen_version_minor=7 ...@@ -20,7 +20,7 @@ doxygen_version_minor=7
doxygen_version_revision=4 doxygen_version_revision=4
#NOTE: Setting version_mmn to "NO" will omit mmn info from the package. #NOTE: Setting version_mmn to "NO" will omit mmn info from the package.
doxygen_version_mmn=20110629 doxygen_version_mmn=20110727
bin_dirs=`echo $PATH | sed -e "s/:/ /g"` bin_dirs=`echo $PATH | sed -e "s/:/ /g"`
......
...@@ -51,6 +51,7 @@ documentation: ...@@ -51,6 +51,7 @@ documentation:
\refitem cmdcallgraph \\callgraph \refitem cmdcallgraph \\callgraph
\refitem cmdcallergraph \\callergraph \refitem cmdcallergraph \\callergraph
\refitem cmdcategory \\category \refitem cmdcategory \\category
\refitem cmdcite \\cite
\refitem cmdclass \\class \refitem cmdclass \\class
\refitem cmdcode \\code \refitem cmdcode \\code
\refitem cmdcond \\cond \refitem cmdcond \\cond
...@@ -1657,6 +1658,18 @@ Commands to create links ...@@ -1657,6 +1658,18 @@ Commands to create links
\sa section \ref cmdref "\\ref". \sa section \ref cmdref "\\ref".
<hr>
\section cmdcite \\cite <label>
\addindex \\cite
Adds a bibliographic reference in the text and in the list of bibliographic
references. The \<label\> must be a valid BibTeX label that can be found
in one of the .bib files listed in \ref cfg_cite_bib_files "CITE_BIB_FILES".
For the LaTeX output the formatting of the reference in the text can be
configured with \ref cfg_latex_bib_style "LATEX_BIB_STYLE". For other
output formats a fixed representation is used. Note that using this
command requires the \c bibtex tool to be present in the search path.
<hr> <hr>
\section cmdendlink \\endlink \section cmdendlink \\endlink
...@@ -2399,11 +2412,13 @@ class Receiver ...@@ -2399,11 +2412,13 @@ class Receiver
\note The second { is optional and is only to help editors (such as Vim) to \note The second { is optional and is only to help editors (such as Vim) to
do proper syntax highlighting by making the number of opening and closing braces do proper syntax highlighting by making the number of opening and closing braces
the same. the same.
\sa section \ref cmdfcurlyclose "\\f}" and section \ref formulas "formulas".
<hr> <hr>
\section cmdfcurlyclose \\f} \section cmdfcurlyclose \\f}
Marks the end of a formula that is in a specific environment. Marks the end of a formula that is in a specific environment.
\sa section \ref cmdfcurlyopen "\\f{" and section \ref formulas "formulas".
<hr> <hr>
\section cmdhtmlonly \\htmlonly \section cmdhtmlonly \\htmlonly
......
...@@ -68,6 +68,7 @@ followed by the descriptions of the tags grouped by category. ...@@ -68,6 +68,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_case_sense_names CASE_SENSE_NAMES \refitem cfg_case_sense_names CASE_SENSE_NAMES
\refitem cfg_chm_file CHM_FILE \refitem cfg_chm_file CHM_FILE
\refitem cfg_chm_index_encoding CHM_INDEX_ENCODING \refitem cfg_chm_index_encoding CHM_INDEX_ENCODING
\refitem cfg_cite_bib_files CITE_BIB_FILES
\refitem cfg_class_diagrams CLASS_DIAGRAMS \refitem cfg_class_diagrams CLASS_DIAGRAMS
\refitem cfg_class_graph CLASS_GRAPH \refitem cfg_class_graph CLASS_GRAPH
\refitem cfg_collaboration_graph COLLABORATION_GRAPH \refitem cfg_collaboration_graph COLLABORATION_GRAPH
...@@ -187,6 +188,7 @@ followed by the descriptions of the tags grouped by category. ...@@ -187,6 +188,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_internal_docs INTERNAL_DOCS \refitem cfg_internal_docs INTERNAL_DOCS
\refitem cfg_javadoc_autobrief JAVADOC_AUTOBRIEF \refitem cfg_javadoc_autobrief JAVADOC_AUTOBRIEF
\refitem cfg_latex_batchmode LATEX_BATCHMODE \refitem cfg_latex_batchmode LATEX_BATCHMODE
\refitem cfg_latex_bib_style LATEX_BIB_STYLE
\refitem cfg_latex_cmd_name LATEX_CMD_NAME \refitem cfg_latex_cmd_name LATEX_CMD_NAME
\refitem cfg_latex_footer LATEX_FOOTER \refitem cfg_latex_footer LATEX_FOOTER
\refitem cfg_latex_header LATEX_HEADER \refitem cfg_latex_header LATEX_HEADER
...@@ -199,6 +201,7 @@ followed by the descriptions of the tags grouped by category. ...@@ -199,6 +201,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_man_extension MAN_EXTENSION \refitem cfg_man_extension MAN_EXTENSION
\refitem cfg_man_links MAN_LINKS \refitem cfg_man_links MAN_LINKS
\refitem cfg_man_output MAN_OUTPUT \refitem cfg_man_output MAN_OUTPUT
\refitem cfg_mathjax_extensions MATHJAX_EXTENSIONS
\refitem cfg_mathjax_relpath MATHJAX_RELPATH \refitem cfg_mathjax_relpath MATHJAX_RELPATH
\refitem cfg_max_dot_graph_depth MAX_DOT_GRAPH_DEPTH \refitem cfg_max_dot_graph_depth MAX_DOT_GRAPH_DEPTH
\refitem cfg_max_initializer_lines MAX_INITIALIZER_LINES \refitem cfg_max_initializer_lines MAX_INITIALIZER_LINES
...@@ -951,6 +954,17 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn" ...@@ -951,6 +954,17 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn"
a file called DoxygenLayout.xml, doxygen will parse it automatically even if a file called DoxygenLayout.xml, doxygen will parse it automatically even if
the \c LAYOUT_FILE tag is left empty. the \c LAYOUT_FILE tag is left empty.
\anchor cfg_cite_bib_files
<dt>\c CITE_BIB_FILES <dd>
\addindex CITE_BIB_FILES
The \c CITE_BIB_FILES tag can be used to specify one or more bib files
containing the reference definitions. This must be a list of .bib files. The
.bib extension is automatically appended if omitted. This requires the
bibtex tool to be installed. See also http://en.wikipedia.org/wiki/BibTeX
for more info. For LaTeX the style of the bibliography can be controlled
using \ref cfg_latex_bib_style "LATEX_BIB_STYLE". See
also \ref cmdcite "\\cite" for info how to create references.
</dl> </dl>
\section messages_input Options related to warning and progress messages \section messages_input Options related to warning and progress messages
...@@ -1782,6 +1796,15 @@ and Class Hierarchy pages using a tree view instead of an ordered list. ...@@ -1782,6 +1796,15 @@ and Class Hierarchy pages using a tree view instead of an ordered list.
the http://www.mathjax.org site, so you can quickly see the result without installing the http://www.mathjax.org site, so you can quickly see the result without installing
MathJax, but it is strongly recommended to install a local copy of MathJax MathJax, but it is strongly recommended to install a local copy of MathJax
before deployment. before deployment.
\anchor cfg_mathjax_extensions
<dt>\c MATHJAX_EXTENSIONS <dd>
\addindex MATHJAX_EXTENSIONS
The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
names that should be enabled during MathJax rendering. For example
\verbatim
MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
\endverbatim
</dl> </dl>
\section latex_output LaTeX related options \section latex_output LaTeX related options
...@@ -1907,6 +1930,15 @@ EXTRA_PACKAGES = times ...@@ -1907,6 +1930,15 @@ EXTRA_PACKAGES = times
asking the user for help. This option is also used when generating formulas asking the user for help. This option is also used when generating formulas
in HTML. in HTML.
\anchor cfg_latex_bib_style
<dt>\c LATEX_BIB_STYLE <dd>
\addindex LATEX_BIB_STYLE
The \c LATEX_BIB_STYLE tag can be used to specify the style to use for the
bibliography, e.g. \c plainnat, or \c ieeetr. The default style is
\c plain. See http://en.wikipedia.org/wiki/BibTeX and \ref cmdcite "\\cite"
for more info.
\anchor cfg_latex_hide_indices \anchor cfg_latex_hide_indices
<dt>\c LATEX_HIDE_INDICES <dd> <dt>\c LATEX_HIDE_INDICES <dd>
\addindex LATEX_HIDE_INDICES \addindex LATEX_HIDE_INDICES
...@@ -2426,7 +2458,7 @@ The default size is 10pt. ...@@ -2426,7 +2458,7 @@ The default size is 10pt.
visible in IE 9+ (other browsers do not have this requirement). visible in IE 9+ (other browsers do not have this requirement).
\anchor cfg_interactive_svg \anchor cfg_interactive_svg
<dt>\c INTERACTIVE_SVG <dt>\c INTERACTIVE_SVG <dd>
If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
enable generation of interactive SVG images that allow zooming and panning. enable generation of interactive SVG images that allow zooming and panning.
Note that this requires a modern browser other than Internet Explorer. Note that this requires a modern browser other than Internet Explorer.
......
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
A special documentation block is a C or C++ style comment block with some A special documentation block is a C or C++ style comment block with some
additional markings, so doxygen knows it is a piece of documentation that additional markings, so doxygen knows it is a piece of documentation that
needs to end up in the generated documentation. For Python and VHDL needs to end up in the generated documentation. For Python, VHDL, and Fortran
code there are a different comment conventions, which can be found in section code there are different comment conventions, which can be found in sections
\ref pythonblocks and \ref vhdlblocks respectively. \ref pythonblocks, \ref vhdlblocks, and \ref fortranblocks respectively.
For each code item there are two (or in some cases three) types of descriptions, For each code item there are two (or in some cases three) types of descriptions,
which together form the documentation: a \e brief description and \e detailed which together form the documentation: a \e brief description and \e detailed
......
This diff is collapsed.
This diff is collapsed.
...@@ -131,9 +131,9 @@ IGNORE_PREFIX = Q ...@@ -131,9 +131,9 @@ IGNORE_PREFIX = Q
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
GENERATE_HTML = YES GENERATE_HTML = YES
HTML_OUTPUT = HTML_OUTPUT =
HTML_FILE_EXTENSION = .xhtml HTML_FILE_EXTENSION = .html
HTML_HEADER = HTML_HEADER =
HTML_FOOTER = HTML_FOOTER =
HTML_STYLESHEET = HTML_STYLESHEET =
HTML_EXTRA_FILES = HTML_EXTRA_FILES =
HTML_COLORSTYLE_HUE = 220 HTML_COLORSTYLE_HUE = 220
...@@ -175,7 +175,7 @@ FORMULA_TRANSPARENT = YES ...@@ -175,7 +175,7 @@ FORMULA_TRANSPARENT = YES
USE_MATHJAX = NO USE_MATHJAX = NO
MATHJAX_RELPATH = http://www.mathjax.org/mathjax MATHJAX_RELPATH = http://www.mathjax.org/mathjax
SEARCHENGINE = YES SEARCHENGINE = YES
SERVER_BASED_SEARCH = NO SERVER_BASED_SEARCH = YES
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options related to the LaTeX output # configuration options related to the LaTeX output
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
#include <sys/sysctl.h> #include <sys/sysctl.h>
#endif #endif
#include <unistd.h> #include <unistd.h>
#include <stdio.h>
#include "qthread.h" #include "qthread.h"
#include "qthread_p.h" #include "qthread_p.h"
......
/******************************************************************************
*
* Copyright (C) 2011 by Dimitri van Heesch
* Based on a patch by David Munger
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
#include "cite.h"
#include "portable.h"
#include "config.h"
#include "message.h"
#include "util.h"
#include "language.h"
#include "ftextstream.h"
#include <qdir.h>
//--------------------------------------------------------------------------
static const char *doxygen_bst =
#include "doxygen_bst.h"
;
//--------------------------------------------------------------------------
const QCString CiteConsts::fileName("citelist");
const QCString CiteConsts::anchorPrefix("CITEREF_");
//--------------------------------------------------------------------------
static bool writeBstFile(const QString &fileName)
{
QCString bstData = doxygen_bst;
QFile f(fileName);
if (!f.open(IO_WriteOnly))
{
err("error: could not open file %s for writing\n",fileName.data());
return FALSE;
}
f.writeBlock(bstData, strlen(bstData));
return TRUE;
}
//--------------------------------------------------------------------------
CiteDict::CiteDict(int size) : m_entries(size, FALSE)
{
m_ordering.setAutoDelete(TRUE);
m_entries.setAutoDelete(TRUE);
}
bool CiteDict::writeAux()
{
//msg("..writing aux file\n");
QCString auxFileName(m_baseFileName + ".aux");
QFile auxFile(auxFileName);
if (!auxFile.open(IO_WriteOnly))
// point it to something valid, because warn() relies on it
{
err("Error opening file %s for output\n", auxFileName.data());
return FALSE;
}
FTextStream t(&auxFile);
QDictIterator<CiteInfo> cdi(m_entries);
for (CiteInfo *ci = 0; (ci=cdi.current()); ++cdi)
{
t << "\\citation{" << ci->label << "}\n";
}
t << "\\bibstyle{" << m_baseFileName << "}\n";
t << "\\bibdata{";
QStrList &citeDataList = Config_getList("CITE_BIB_FILES");
const char *bibdata = citeDataList.first();
while (bibdata)
{
QCString bibFile = bibdata;
if (!bibFile.isEmpty() && bibFile.right(4)!=".bib") bibFile+=".bib";
if (!bibFile.isEmpty())
{
QFileInfo fi(bibFile);
if (fi.exists())
{
if (!copyFile(bibFile,m_baseFileName+"_"+bibFile))
{
return FALSE;
}
t << m_baseFileName+"_"+bibFile;
bibdata = citeDataList.next();
if (bibdata)
{
t << ",";
}
}
else
{
err("The file %s specified at CITE_BIB_FILES could not be read!\n",bibdata);
return FALSE;
}
}
else
{
bibdata = citeDataList.next();
}
}
t << "}\n";
return TRUE;
}
bool CiteDict::writeBst()
{
//msg("..writing bst file\n");
QCString bstFileName = m_baseFileName + ".bst";
return writeBstFile(bstFileName);
}
void CiteDict::writeDefaultBibStyle()
{
writeBstFile("doxygen.bst");
msg("wrote doxygen.bst\n");
}
void CiteDict::writeLatexBibliography(FTextStream &t)
{
if (m_entries.count()==0) return;
QCString style = Config_getString("LATEX_BIB_STYLE");
if (style.isEmpty()) style="plain";
t << "\\newpage \\bibliographystyle{" << style << "}" << endl;
t << "\\bibliography{";
QStrList &citeDataList = Config_getList("CITE_BIB_FILES");
const char *bibdata = citeDataList.first();
while (bibdata)
{
QCString bibFile = bibdata;
if (!bibFile.isEmpty())
{
t << bibFile;
bibdata = citeDataList.next();
if (bibdata)
{
t << ",";
}
}
else
{
bibdata = citeDataList.next();
}
}
t << "}" << endl;
}
void CiteDict::insert(const char *label)
{
m_entries.insert(label,new CiteInfo(label));
}
CiteInfo *CiteDict::find(const char *label) const
{
return label ? m_entries.find(label) : 0;
}
void CiteDict::clear()
{
m_entries.clear();
m_ordering.clear();
}
bool CiteDict::execute()
{
//msg("..running bibtex\n");
bool result=TRUE;
QCString auxFileName(m_baseFileName + ".aux");
int splitPoint = auxFileName.findRev('/');
QCString dirname = auxFileName.left(splitPoint);
QCString basename = auxFileName.mid(splitPoint + 1);
QCString oldDir = convertToQCString(QDir::currentDirPath());
QDir::setCurrent(dirname);
QCString args;
args += "-terse ";
args += basename;
portable_system("bibtex", args);
int exitCode;
if ((exitCode=portable_system("bibtex",args))!=0)
{
err("Problems running bibtex: exit code=%d, command='bibtex', arguments='%s'\n",
exitCode,args.data());
result=FALSE;
}
QDir::setCurrent(oldDir);
return result;
}
void CiteDict::parse()
{
//msg("..parsing bbl file\n");
QCString bblFileName(m_baseFileName + ".bbl");
QFile f(bblFileName);
if (!f.open(IO_ReadOnly))
{
err("error: could not open file %s\n",bblFileName.data());
return;
}
m_ordering.clear();
QTextStream t(&f);
QCString label;
QCString line;
while (!t.eof())
{
label=t.readLine();
if (label.isEmpty())
{
continue;
}
CiteInfo* ci = m_entries.find(label);
if (!ci) insert(label);
// BibTeX has its own way of sorting references,
// depending on the .bst file
m_ordering.append(new QCString(label));
ci->text=t.readLine();
while (!(line=t.readLine()).isEmpty())
{
ci->fullText += line + '\n';
}
// FIXME: process LaTeX-style accents properly
ci->fullText = substitute(substitute(substitute(ci->fullText,
"{", ""),
"}", ""),
"~", " ");
//printf("BIB ENTRY: %s -> %s: %s\n", ci->label.data(), ci->text.data(), ci->fullText.data());
}
}
void CiteDict::clean()
{
// clean
QDir thisDir;
QStrList &citeDataList = Config_getList("CITE_BIB_FILES");
const char *bibdata = citeDataList.first();
while (bibdata)
{
QCString bibFile = bibdata;
if (!bibFile.isEmpty() && bibFile.right(4)!=".bib") bibFile+=".bib";
if (!bibFile.isEmpty()) thisDir.remove(m_baseFileName+"_"+bibFile);
bibdata = citeDataList.next();
}
thisDir.remove(m_baseFileName + ".aux");
thisDir.remove(m_baseFileName + ".bbl");
thisDir.remove(m_baseFileName + ".blg");
thisDir.remove(m_baseFileName + ".tmp");
thisDir.remove(m_baseFileName + ".bst");
QCString &outputDirectory = Config_getString("OUTPUT_DIRECTORY");
if (outputDirectory.isEmpty())
{
outputDirectory=QDir::currentDirPath();
}
QDir d(outputDirectory);
d.rmdir("bib");
}
void CiteDict::resolve()
{
QStrList &citeBibFiles = Config_getList("CITE_BIB_FILES");
if (citeBibFiles.count()==0 || m_entries.count()==0) return; // nothing to cite
QCString &outputDirectory = Config_getString("OUTPUT_DIRECTORY");
if (outputDirectory.isEmpty())
{
outputDirectory=QDir::currentDirPath();
}
QDir d(outputDirectory);
d.mkdir("bib");
uint pid = portable_pid();
m_baseFileName.sprintf("doxygen_bibtex_%d",pid);
m_baseFileName.prepend(outputDirectory+"/bib/");
if (writeAux() && writeBst() && execute())
{
parse();
clean();
}
if (Config_getBool("GENERATE_LATEX"))
{
// copy bib files to the latex output dir
QStrList &citeDataList = Config_getList("CITE_BIB_FILES");
QCString latexOutputDir = Config_getString("LATEX_OUTPUT")+"/";
const char *bibdata = citeDataList.first();
while (bibdata)
{
QCString bibFile = bibdata;
if (!bibFile.isEmpty() && bibFile.right(4)!=".bib") bibFile+=".bib";
if (!bibFile.isEmpty())
{
copyFile(bibFile,latexOutputDir+bibFile);
}
bibdata = citeDataList.next();
}
}
}
bool CiteDict::isEmpty() const
{
QStrList &citeBibFiles = Config_getList("CITE_BIB_FILES");
return (citeBibFiles.count()==0 || m_ordering.isEmpty());
}
void CiteDict::generatePage() const
{
//printf("** CiteDict::generatePage() count=%d\n",m_ordering.count());
// do not generate an empty citations page
if (isEmpty()) return; // nothing to cite
QCString doc;
doc += "<dl class=\"citelist\">";
QListIterator<QCString> it(m_ordering);
QCString *s;
for (it.toFirst();(s=it.current());++it)
{
CiteInfo* ci = m_entries.find(*s);
doc += " <dt>";
doc += "\\anchor ";
doc += CiteConsts::anchorPrefix + ci->label;
doc += "\n";
doc += ci->text;
doc += "</dt><dd> ";
doc += ci->fullText;
doc += "</dd>";
}
doc += "</dl>\n";
//printf("addRelatedPage with doc='%s'\n",doc.data());
addRelatedPage(CiteConsts::fileName,
theTranslator->trCiteReferences(),doc,0,CiteConsts::fileName,1,0,0,0);
}
/******************************************************************************
*
*
*
* Copyright (C) 2011 by Dimitri van Heesch
* Based on a patch by David Munger
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
#ifndef CITEDB_H
#define CITEDB_H
#include "qtbc.h"
#include <qdict.h>
#include <qlist.h>
class FTextStream;
/// String constants for citations
struct CiteConsts
{
static const QCString fileName;
static const QCString anchorPrefix;
};
/// Citation-related data.
struct CiteInfo
{
CiteInfo(const char *label_, const char *text_=0, const char *fullText_=0,
const char *ref_=0) :
label(label_), text(text_), fullText(fullText_), ref(ref_)
{ }
CiteInfo(const CiteInfo &o)
{ label=o.label.copy(); text=o.text.copy(); fullText=o.fullText.copy(); ref=o.ref.copy(); }
QCString label;
QCString text;
QCString fullText;
QCString ref;
};
/**
* @brief Cite database access class.
* @details This class provides access do the database of bibliographic
* references through the bibtex backend.
*/
class CiteDict
{
public:
/** Create the database, with an expected maximum of \a size entries */
CiteDict(int size);
/** Resolve references to citations */
void resolve();
/** Insert a citation identified by \a label into the database */
void insert(const char *label);
/** Return the citation info for a given \a label */
CiteInfo *find(const char *label) const;
/** Generate the citations page */
void generatePage() const;
/** clears the database */
void clear();
/** return TRUE if there are no citations.
* Only valid after calling resolve()
*/
bool isEmpty() const;
/** writes the latex code for the standard bibliography
* section to text stream \a t
*/
void writeLatexBibliography(FTextStream &t);
/** writes the default bibliography style to the output */
static void writeDefaultBibStyle();
private:
bool writeAux();
bool writeBst();
bool execute();
void parse();
void clean();
QDict<CiteInfo> m_entries;
QList<QCString> m_ordering;
QCString m_baseFileName;
};
#endif
This diff is collapsed.
...@@ -265,10 +265,12 @@ class ClassDef : public Definition ...@@ -265,10 +265,12 @@ class ClassDef : public Definition
bool isUsedOnly() const; bool isUsedOnly() const;
QCString anchor() const; QCString anchor() const;
bool isEmbeddedInGroupDocs() const; bool isEmbeddedInOuterScope() const;
SrcLangExt getLanguage() const; SrcLangExt getLanguage() const;
bool isSimple() const;
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
// --- setters ---- // --- setters ----
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
...@@ -345,6 +347,7 @@ class ClassDef : public Definition ...@@ -345,6 +347,7 @@ class ClassDef : public Definition
void writeMemberDeclarations(OutputList &ol,MemberList::ListType lt,const QCString &title, void writeMemberDeclarations(OutputList &ol,MemberList::ListType lt,const QCString &title,
const char *subTitle=0,bool showInline=FALSE); const char *subTitle=0,bool showInline=FALSE);
void writeMemberDocumentation(OutputList &ol,MemberList::ListType lt,const QCString &title,bool showInline=FALSE); void writeMemberDocumentation(OutputList &ol,MemberList::ListType lt,const QCString &title,bool showInline=FALSE);
void writeSimpleMemberDocumentation(OutputList &ol,MemberList::ListType lt);
void writePlainMemberDeclaration(OutputList &ol,MemberList::ListType lt,bool inGroup); void writePlainMemberDeclaration(OutputList &ol,MemberList::ListType lt,bool inGroup);
void writeBriefDescription(OutputList &ol,bool exampleFlag); void writeBriefDescription(OutputList &ol,bool exampleFlag);
void writeDetailedDescription(OutputList &ol,const QCString &pageType,bool exampleFlag, void writeDetailedDescription(OutputList &ol,const QCString &pageType,bool exampleFlag,
...@@ -355,6 +358,7 @@ class ClassDef : public Definition ...@@ -355,6 +358,7 @@ class ClassDef : public Definition
void writeCollaborationGraph(OutputList &ol); void writeCollaborationGraph(OutputList &ol);
void writeMemberGroups(OutputList &ol,bool showInline=FALSE); void writeMemberGroups(OutputList &ol,bool showInline=FALSE);
void writeNestedClasses(OutputList &ol,const QCString &title); void writeNestedClasses(OutputList &ol,const QCString &title);
void writeInlineClasses(OutputList &ol);
void startMemberDeclarations(OutputList &ol); void startMemberDeclarations(OutputList &ol);
void endMemberDeclarations(OutputList &ol); void endMemberDeclarations(OutputList &ol);
void startMemberDocumentation(OutputList &ol); void startMemberDocumentation(OutputList &ol);
......
...@@ -96,8 +96,6 @@ bool ClassSDict::declVisible(const ClassDef::CompoundType *filter) const ...@@ -96,8 +96,6 @@ bool ClassSDict::declVisible(const ClassDef::CompoundType *filter) const
void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *filter, void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *filter,
const char *header,bool localNames) const char *header,bool localNames)
{ {
// static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES");
// bool first=TRUE;
if (count()>0) if (count()>0)
{ {
ClassSDict::Iterator sdi(*this); ClassSDict::Iterator sdi(*this);
...@@ -110,45 +108,48 @@ void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *f ...@@ -110,45 +108,48 @@ void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *f
(filter==0 || *filter==cd->compoundType()) (filter==0 || *filter==cd->compoundType())
) )
{ {
// //bool isLink = cd->isLinkable(); cd->writeDeclarationLink(ol,found,header,localNames);
// if (inlineGroupedClasses && cd->partOfGroups()->count()>0)
// {
// cd->writeInlineDeclaration(ol,first);
// first=FALSE;
// }
// else // show link's only
// {
cd->writeDeclarationLink(ol,found,header,localNames);
// }
} }
} }
if (found) ol.endMemberList(); if (found) ol.endMemberList();
} }
} }
void ClassSDict::writeDocumentation(OutputList &ol) void ClassSDict::writeDocumentation(OutputList &ol,Definition *container)
{ {
static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN"); static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES"); static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES");
if (!inlineGroupedClasses) return; static bool inlineSimpleClasses = Config_getBool("INLINE_SIMPLE_STRUCTS");
if (!inlineGroupedClasses && !inlineSimpleClasses) return;
if (count()>0) if (count()>0)
{ {
ol.writeRuler(); bool found=FALSE;
ol.startGroupHeader();
ol.parseText(fortranOpt?theTranslator->trTypeDocumentation():
theTranslator->trClassDocumentation());
ol.endGroupHeader();
ClassSDict::Iterator sdi(*this); ClassSDict::Iterator sdi(*this);
ClassDef *cd=0; ClassDef *cd=0;
for (sdi.toFirst();(cd=sdi.current());++sdi) for (sdi.toFirst();(cd=sdi.current());++sdi)
{ {
if (cd->name().find('@')==-1 && //printf("%s:writeDocumentation() %p=%p embedded=%d\n",
cd->partOfGroups()->count()==1 // cd->name().data(),container,cd->getOuterScope(),cd->isEmbeddedInOuterScope());
if (cd->name().find('@')==-1 && cd->isEmbeddedInOuterScope() &&
(container==0 || // no container -> used for groups
cd->getOuterScope()==container || // correct container -> used for namespaces and classes
(container->definitionType()==Definition::TypeFile && cd->getOuterScope()==Doxygen::globalScope && cd->partOfGroups()==0) // non grouped class with file scope -> used for files
)
) )
{ {
if (!found)
{
ol.writeRuler();
ol.startGroupHeader();
ol.parseText(fortranOpt?theTranslator->trTypeDocumentation():
theTranslator->trClassDocumentation());
ol.endGroupHeader();
found=TRUE;
}
cd->writeInlineDocumentation(ol); cd->writeInlineDocumentation(ol);
} }
} }
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
#include "classdef.h" #include "classdef.h"
#include "sortdict.h" #include "sortdict.h"
class Definition;
class ClassList : public QList<ClassDef> class ClassList : public QList<ClassDef>
{ {
public: public:
...@@ -54,7 +56,7 @@ class ClassSDict : public SDict<ClassDef> ...@@ -54,7 +56,7 @@ class ClassSDict : public SDict<ClassDef>
int compareItems(GCI item1,GCI item2); int compareItems(GCI item1,GCI item2);
void writeDeclaration(OutputList &ol,const ClassDef::CompoundType *filter=0, void writeDeclaration(OutputList &ol,const ClassDef::CompoundType *filter=0,
const char *header=0,bool localNames=FALSE); const char *header=0,bool localNames=FALSE);
void writeDocumentation(OutputList &ol); void writeDocumentation(OutputList &ol,Definition *container=0);
bool declVisible(const ClassDef::CompoundType *filter=0) const; bool declVisible(const ClassDef::CompoundType *filter=0) const;
}; };
......
...@@ -29,6 +29,7 @@ CommandMap cmdMap[] = ...@@ -29,6 +29,7 @@ CommandMap cmdMap[] =
{ "authors", CMD_AUTHORS }, { "authors", CMD_AUTHORS },
{ "b", CMD_BOLD }, { "b", CMD_BOLD },
{ "c", CMD_CODE }, { "c", CMD_CODE },
{ "cite", CMD_CITE },
{ "code", CMD_STARTCODE }, { "code", CMD_STARTCODE },
{ "copydoc", CMD_COPYDOC }, { "copydoc", CMD_COPYDOC },
{ "copybrief", CMD_COPYBRIEF }, { "copybrief", CMD_COPYBRIEF },
......
...@@ -117,6 +117,7 @@ enum CommandType ...@@ -117,6 +117,7 @@ enum CommandType
CMD_MSCFILE = 83, CMD_MSCFILE = 83,
CMD_DCOLON = 84, CMD_DCOLON = 84,
CMD_COPYRIGHT = 85 | SIMPLESECT_BIT, CMD_COPYRIGHT = 85 | SIMPLESECT_BIT,
CMD_CITE = 86,
}; };
enum HtmlTagType enum HtmlTagType
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include "reflist.h" #include "reflist.h"
#include "debug.h" #include "debug.h"
#include "parserintf.h" #include "parserintf.h"
#include "cite.h"
// forward declarations // forward declarations
static bool handleBrief(const QCString &); static bool handleBrief(const QCString &);
...@@ -83,6 +84,7 @@ static bool handleMemberOf(const QCString &); ...@@ -83,6 +84,7 @@ static bool handleMemberOf(const QCString &);
static bool handleRefItem(const QCString &); static bool handleRefItem(const QCString &);
static bool handleSection(const QCString &); static bool handleSection(const QCString &);
static bool handleAnchor(const QCString &); static bool handleAnchor(const QCString &);
static bool handleCite(const QCString &);
static bool handleFormatBlock(const QCString &); static bool handleFormatBlock(const QCString &);
static bool handleAddIndex(const QCString &); static bool handleAddIndex(const QCString &);
static bool handleIf(const QCString &); static bool handleIf(const QCString &);
...@@ -161,6 +163,7 @@ static DocCmdMap docCmdMap[] = ...@@ -161,6 +163,7 @@ static DocCmdMap docCmdMap[] =
{ "relatedalso", &handleRelatedAlso, TRUE }, { "relatedalso", &handleRelatedAlso, TRUE },
{ "relatesalso", &handleRelatedAlso, TRUE }, { "relatesalso", &handleRelatedAlso, TRUE },
{ "refitem", &handleRefItem, TRUE }, { "refitem", &handleRefItem, TRUE },
{ "cite", &handleCite, TRUE },
{ "subpage", &handleSubpage, TRUE }, { "subpage", &handleSubpage, TRUE },
{ "section", &handleSection, TRUE }, { "section", &handleSection, TRUE },
{ "subsection", &handleSection, TRUE }, { "subsection", &handleSection, TRUE },
...@@ -602,6 +605,13 @@ static void addSection() ...@@ -602,6 +605,13 @@ static void addSection()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static void addCite()
{
Doxygen::citeDict->insert(yytext);
}
//-----------------------------------------------------------------------------
// strip trailing whitespace (excluding newlines) from string s // strip trailing whitespace (excluding newlines) from string s
static void stripTrailingWhiteSpace(QCString &s) static void stripTrailingWhiteSpace(QCString &s)
{ {
...@@ -780,7 +790,7 @@ static int yyread(char *buf,int max_size) ...@@ -780,7 +790,7 @@ static int yyread(char *buf,int max_size)
/* start command character */ /* start command character */
CMD ("\\"|"@") CMD ("\\"|"@")
DCMD1 ("arg"|"attention"|"author"|"code") DCMD1 ("arg"|"attention"|"author"|"cite"|"code")
DCMD2 ("date"|"dot"|"msc"|"dotfile"|"example") DCMD2 ("date"|"dot"|"msc"|"dotfile"|"example")
DCMD3 ("htmlinclude"|"htmlonly"|"image"|"include") DCMD3 ("htmlinclude"|"htmlonly"|"image"|"include")
DCMD4 ("includelineno"|"internal"|"invariant") DCMD4 ("includelineno"|"internal"|"invariant")
...@@ -861,6 +871,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" ...@@ -861,6 +871,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
%x AnchorLabel %x AnchorLabel
%x HtmlComment %x HtmlComment
%x SkipLang %x SkipLang
%x CiteLabel
%% %%
...@@ -1953,6 +1964,29 @@ RCSTAG "$"{ID}":"[^\n$]+"$" ...@@ -1953,6 +1964,29 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
<SkipLang>. { /* any other character */ <SkipLang>. { /* any other character */
} }
/* ----- handle arguments of the cite command ------- */
<CiteLabel>{LABELID} { // found argyment
addCite();
addOutput(yytext);
BEGIN(Comment);
}
<CiteLabel>{DOCNL} { // missing argument
warn(yyFileName,yyLineNr,
"warning: \\cite command has no label"
);
if (*yytext=='\n') yyLineNr++;
addOutput('\n');
BEGIN( Comment );
}
<CiteLabel>. { // invalid character for cite label
warn(yyFileName,yyLineNr,
"warning: Invalid or missing cite label"
);
BEGIN(Comment);
}
%% %%
...@@ -2259,6 +2293,13 @@ static bool handleAnchor(const QCString &s) ...@@ -2259,6 +2293,13 @@ static bool handleAnchor(const QCString &s)
return FALSE; return FALSE;
} }
static bool handleCite(const QCString &s)
{
addOutput(" @"+s+" ");
BEGIN(CiteLabel);
return FALSE;
}
static bool handleFormatBlock(const QCString &s) static bool handleFormatBlock(const QCString &s)
{ {
addOutput(" @"+s+" "); addOutput(" @"+s+" ");
......
...@@ -8,8 +8,9 @@ iconv built into libc) for the transcoding. See ...@@ -8,8 +8,9 @@ iconv built into libc) for the transcoding. See
http://www.gnu.org/software/libiconv for the list of possible encodings. http://www.gnu.org/software/libiconv for the list of possible encodings.
' defval='UTF-8'/> ' defval='UTF-8'/>
<option type='string' id='PROJECT_NAME' format='string' docs=' <option type='string' id='PROJECT_NAME' format='string' docs='
The PROJECT_NAME tag is a single word (or a sequence of words surrounded The PROJECT_NAME tag is a single word (or sequence of words) that should
by quotes) that should identify the project. ' defval=''/> identify the project. Note that if you do not use Doxywizard you need
to put quotes around the project name if it contains spaces.' defval=''/>
<option type='string' id='PROJECT_NUMBER' format='string' docs=' <option type='string' id='PROJECT_NUMBER' format='string' docs='
The PROJECT_NUMBER tag can be used to enter a project or revision number. The PROJECT_NUMBER tag can be used to enter a project or revision number.
This could be handy for archiving the generated documentation or This could be handy for archiving the generated documentation or
...@@ -288,6 +289,13 @@ unions are shown inside the group in which they are included (e.g. using ...@@ -288,6 +289,13 @@ unions are shown inside the group in which they are included (e.g. using
@ingroup) instead of on a separate page (for HTML and Man pages) or @ingroup) instead of on a separate page (for HTML and Man pages) or
section (for LaTeX and RTF). section (for LaTeX and RTF).
' defval='0'/> ' defval='0'/>
<option type='bool' id='INLINE_SIMPLE_STRUCTS' docs='
When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and
unions with only public data fields will be shown inline in the documentation
of the scope in which they are defined (i.e. file, namespace, or group
documentation), provided this scope is documented. If set to NO (the default),
structs, classes, and unions are shown on a separate page (for HTML and Man
pages) or section (for LaTeX and RTF).' defval='0'/>
<option type='bool' id='TYPEDEF_HIDES_STRUCT' docs=' <option type='bool' id='TYPEDEF_HIDES_STRUCT' docs='
When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
is documented as struct, union, or enum with the name of the typedef. So is documented as struct, union, or enum with the name of the typedef. So
...@@ -515,6 +523,14 @@ output files in an output format independent way. The create the layout file ...@@ -515,6 +523,14 @@ output files in an output format independent way. The create the layout file
that represents doxygen&apos;s defaults, run doxygen with the -l option. that represents doxygen&apos;s defaults, run doxygen with the -l option.
You can optionally specify a file name after the option, if omitted You can optionally specify a file name after the option, if omitted
DoxygenLayout.xml will be used as the name of the layout file. DoxygenLayout.xml will be used as the name of the layout file.
' defval=''/>
<option type='list' id='CITE_BIB_FILES' format='file' docs='
The CITE_BIB_FILES tag can be used to specify one or more bib files
containing the references data. This must be a list of .bib files. The
.bib extension is automatically appended if omitted. Using this command
requires the bibtex tool to be installed. See also
http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style
of the bibliography can be controlled using LATEX_BIB_STYLE.
' defval=''/> ' defval=''/>
</group> </group>
<group name='Messages' docs='configuration options related to warning and progress messages'> <group name='Messages' docs='configuration options related to warning and progress messages'>
...@@ -789,13 +805,13 @@ doxygen will generate files with .html extension. ...@@ -789,13 +805,13 @@ doxygen will generate files with .html extension.
<option type='string' id='HTML_HEADER' format='file' docs=' <option type='string' id='HTML_HEADER' format='file' docs='
The HTML_HEADER tag can be used to specify a personal HTML header for The HTML_HEADER tag can be used to specify a personal HTML header for
each generated HTML page. If it is left blank doxygen will generate a each generated HTML page. If it is left blank doxygen will generate a
standard header. Note that when using a custom header you are responsible standard header. Note that when using a custom header you are responsible
for the proper inclusion of any scripts and style sheets that doxygen for the proper inclusion of any scripts and style sheets that doxygen
needs, which is dependent on the configuration options used. needs, which is dependent on the configuration options used.
It is adviced to generate a default header using "doxygen -w html It is adviced to generate a default header using "doxygen -w html
header.html footer.html stylesheet.css YourConfigFile" and then modify header.html footer.html stylesheet.css YourConfigFile" and then modify
that header. Note that the header is subject to change so you typically that header. Note that the header is subject to change so you typically
have to redo this when upgrading to a newer version of doxygen or when have to redo this when upgrading to a newer version of doxygen or when
changing the value of configuration settings such as GENERATE_TREEVIEW! changing the value of configuration settings such as GENERATE_TREEVIEW!
' defval='' depends='GENERATE_HTML'/> ' defval='' depends='GENERATE_HTML'/>
<option type='string' id='HTML_FOOTER' format='file' docs=' <option type='string' id='HTML_FOOTER' format='file' docs='
...@@ -1052,6 +1068,11 @@ mathjax.org site, so you can quickly see the result without installing ...@@ -1052,6 +1068,11 @@ mathjax.org site, so you can quickly see the result without installing
MathJax, but it is strongly recommended to install a local copy of MathJax MathJax, but it is strongly recommended to install a local copy of MathJax
before deployment. before deployment.
' defval='http://www.mathjax.org/mathjax'/> ' defval='http://www.mathjax.org/mathjax'/>
<option type='list' id='MATHJAX_EXTENSIONS' format='string' docs='
The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
names that should be enabled during MathJax rendering.
' depends='USE_MATHJAX'>
</option>
<option type='bool' id='SEARCHENGINE' docs=' <option type='bool' id='SEARCHENGINE' docs='
When the SEARCHENGINE tag is enabled doxygen will generate a search box When the SEARCHENGINE tag is enabled doxygen will generate a search box
for the HTML output. The underlying search engine uses javascript for the HTML output. The underlying search engine uses javascript
...@@ -1154,6 +1175,11 @@ source code with syntax highlighting in the LaTeX output. ...@@ -1154,6 +1175,11 @@ source code with syntax highlighting in the LaTeX output.
Note that which sources are shown also depends on other settings Note that which sources are shown also depends on other settings
such as SOURCE_BROWSER. such as SOURCE_BROWSER.
' defval='0' depends='GENERATE_LATEX'/> ' defval='0' depends='GENERATE_LATEX'/>
<option type='string' id='LATEX_BIB_STYLE' format='string' docs='
The LATEX_BIB_STYLE tag can be used to specify the style to use for the
bibliography, e.g. plainnat, or ieeetr. The default style is &quot;plain&quot;. See
http://en.wikipedia.org/wiki/BibTeX for more info.
' defval='plain'/>
</group> </group>
<group name='RTF' docs='configuration options related to the RTF output'> <group name='RTF' docs='configuration options related to the RTF output'>
<option type='bool' id='GENERATE_RTF' docs=' <option type='bool' id='GENERATE_RTF' docs='
...@@ -1405,7 +1431,7 @@ explicitly to a value larger than 0 to get control over the balance ...@@ -1405,7 +1431,7 @@ explicitly to a value larger than 0 to get control over the balance
between CPU load and processing speed. between CPU load and processing speed.
' defval='0' minval='0' maxval='32'/> ' defval='0' minval='0' maxval='32'/>
<option type='string' id='DOT_FONTNAME' format='string' docs=' <option type='string' id='DOT_FONTNAME' format='string' docs='
By default doxygen will use the Helvetica font for all dot files that By default doxygen will use the Helvetica font for all dot files that
doxygen generates. When you want a differently looking font you can specify doxygen generates. When you want a differently looking font you can specify
the font name using DOT_FONTNAME. You need to make sure dot is able to find the font name using DOT_FONTNAME. You need to make sure dot is able to find
the font, which can be done by putting it in a standard location or by setting the font, which can be done by putting it in a standard location or by setting
...@@ -1418,7 +1444,7 @@ The default size is 10pt. ...@@ -1418,7 +1444,7 @@ The default size is 10pt.
' minval='4' maxval='24' defval='10' depends='HAVE_DOT'/> ' minval='4' maxval='24' defval='10' depends='HAVE_DOT'/>
<option type='string' id='DOT_FONTPATH' format='string' docs=' <option type='string' id='DOT_FONTPATH' format='string' docs='
By default doxygen will tell dot to use the Helvetica font. By default doxygen will tell dot to use the Helvetica font.
If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to
set the path where dot can find it. set the path where dot can find it.
' defval='' depends='HAVE_DOT'/> ' defval='' depends='HAVE_DOT'/>
<option type='bool' id='CLASS_GRAPH' docs=' <option type='bool' id='CLASS_GRAPH' docs='
...@@ -1486,7 +1512,7 @@ relations between the files in the directories. ...@@ -1486,7 +1512,7 @@ relations between the files in the directories.
The DOT_IMAGE_FORMAT tag can be used to set the image format of the images The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
generated by dot. Possible values are svg, png, jpg, or gif. generated by dot. Possible values are svg, png, jpg, or gif.
If left blank png will be used. If you choose svg you need to set If left blank png will be used. If you choose svg you need to set
HTML_FILE_EXTENSION to xhtml in order to make the SVG files HTML_FILE_EXTENSION to xhtml in order to make the SVG files
visible in IE 9+ (other browsers do not have this requirement). visible in IE 9+ (other browsers do not have this requirement).
' depends='HAVE_DOT'> ' depends='HAVE_DOT'>
<value name='png'/> <value name='png'/>
...@@ -1494,13 +1520,13 @@ visible in IE 9+ (other browsers do not have this requirement). ...@@ -1494,13 +1520,13 @@ visible in IE 9+ (other browsers do not have this requirement).
<value name='gif'/> <value name='gif'/>
<value name='svg'/> <value name='svg'/>
</option> </option>
<option type='bool' id='INTERACTIVE_SVG' doc=' <option type='bool' id='INTERACTIVE_SVG' docs='
If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
enable generation of interactive SVG images that allow zooming and panning. enable generation of interactive SVG images that allow zooming and panning.
Note that this requires a modern browser other than Internet Explorer. Note that this requires a modern browser other than Internet Explorer.
Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you
need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files
visible. Older versions of IE do not have SVG support. visible. Older versions of IE do not have SVG support.
' defval='0' depends='HAVE_DOT'/> ' defval='0' depends='HAVE_DOT'/>
<option type='string' id='DOT_PATH' format='dir' docs=' <option type='string' id='DOT_PATH' format='dir' docs='
The tag DOT_PATH can be used to specify the path where the dot tool can be The tag DOT_PATH can be used to specify the path where the dot tool can be
......
...@@ -32,8 +32,9 @@ void addConfigOptions(Config *cfg) ...@@ -32,8 +32,9 @@ void addConfigOptions(Config *cfg)
//---- //----
cs = cfg->addString( cs = cfg->addString(
"PROJECT_NAME", "PROJECT_NAME",
"The PROJECT_NAME tag is a single word (or a sequence of words surrounded\n" "The PROJECT_NAME tag is a single word (or sequence of words) that should\n"
"by quotes) that should identify the project." "identify the project. Note that if you do not use Doxywizard you need\n"
"to put quotes around the project name if it contains spaces."
); );
//---- //----
cs = cfg->addString( cs = cfg->addString(
...@@ -404,6 +405,17 @@ void addConfigOptions(Config *cfg) ...@@ -404,6 +405,17 @@ void addConfigOptions(Config *cfg)
FALSE FALSE
); );
//---- //----
cb = cfg->addBool(
"INLINE_SIMPLE_STRUCTS",
"When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and\n"
"unions with only public data fields will be shown inline in the documentation\n"
"of the scope in which they are defined (i.e. file, namespace, or group\n"
"documentation), provided this scope is documented. If set to NO (the default),\n"
"structs, classes, and unions are shown on a separate page (for HTML and Man\n"
"pages) or section (for LaTeX and RTF).",
FALSE
);
//----
cb = cfg->addBool( cb = cfg->addBool(
"TYPEDEF_HIDES_STRUCT", "TYPEDEF_HIDES_STRUCT",
"When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum\n" "When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum\n"
...@@ -741,6 +753,17 @@ void addConfigOptions(Config *cfg) ...@@ -741,6 +753,17 @@ void addConfigOptions(Config *cfg)
"DoxygenLayout.xml will be used as the name of the layout file." "DoxygenLayout.xml will be used as the name of the layout file."
); );
cs->setWidgetType(ConfigString::File); cs->setWidgetType(ConfigString::File);
//----
cl = cfg->addList(
"CITE_BIB_FILES",
"The CITE_BIB_FILES tag can be used to specify one or more bib files\n"
"containing the references data. This must be a list of .bib files. The\n"
".bib extension is automatically appended if omitted. Using this command\n"
"requires the bibtex tool to be installed. See also\n"
"http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style\n"
"of the bibliography can be controlled using LATEX_BIB_STYLE."
);
cl->setWidgetType(ConfigList::File);
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
cfg->addInfo("Messages","configuration options related to warning and progress messages"); cfg->addInfo("Messages","configuration options related to warning and progress messages");
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -1130,12 +1153,13 @@ void addConfigOptions(Config *cfg) ...@@ -1130,12 +1153,13 @@ void addConfigOptions(Config *cfg)
"The HTML_HEADER tag can be used to specify a personal HTML header for\n" "The HTML_HEADER tag can be used to specify a personal HTML header for\n"
"each generated HTML page. If it is left blank doxygen will generate a\n" "each generated HTML page. If it is left blank doxygen will generate a\n"
"standard header. Note that when using a custom header you are responsible\n" "standard header. Note that when using a custom header you are responsible\n"
"for the proper inclusion of any scripts and style sheets that doxygen\n" " for the proper inclusion of any scripts and style sheets that doxygen\n"
"needs, which is dependent on the configuration options used.\n" "needs, which is dependent on the configuration options used.\n"
"It is adviced to generate a default header using \"doxygen -w html\n" "It is adviced to generate a default header using \"doxygen -w html\n"
"header.html footer.html stylesheet.css YourConfigFile\" and then modify\n" "header.html footer.html stylesheet.css YourConfigFile\" and then modify\n"
"that header. Note that the header is subject to change so you typically\n" "that header. Note that the header is subject to change so you typically\n"
"have to redo this when upgrading to a newer version of doxygen or when changing the value of configuration settings such as GENERATE_TREEVIEW!" "have to redo this when upgrading to a newer version of doxygen or when\n"
"changing the value of configuration settings such as GENERATE_TREEVIEW!"
); );
cs->setWidgetType(ConfigString::File); cs->setWidgetType(ConfigString::File);
cs->addDependency("GENERATE_HTML"); cs->addDependency("GENERATE_HTML");
...@@ -1551,6 +1575,13 @@ void addConfigOptions(Config *cfg) ...@@ -1551,6 +1575,13 @@ void addConfigOptions(Config *cfg)
); );
cs->setDefaultValue("http://www.mathjax.org/mathjax"); cs->setDefaultValue("http://www.mathjax.org/mathjax");
//---- //----
cl = cfg->addList(
"MATHJAX_EXTENSIONS",
"The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension\n"
"names that should be enabled during MathJax rendering."
);
cl->addDependency("USE_MATHJAX");
//----
cb = cfg->addBool( cb = cfg->addBool(
"SEARCHENGINE", "SEARCHENGINE",
"When the SEARCHENGINE tag is enabled doxygen will generate a search box\n" "When the SEARCHENGINE tag is enabled doxygen will generate a search box\n"
...@@ -1717,6 +1748,14 @@ void addConfigOptions(Config *cfg) ...@@ -1717,6 +1748,14 @@ void addConfigOptions(Config *cfg)
FALSE FALSE
); );
cb->addDependency("GENERATE_LATEX"); cb->addDependency("GENERATE_LATEX");
//----
cs = cfg->addString(
"LATEX_BIB_STYLE",
"The LATEX_BIB_STYLE tag can be used to specify the style to use for the\n"
"bibliography, e.g. plainnat, or ieeetr. The default style is \"plain\". See\n"
"http://en.wikipedia.org/wiki/BibTeX for more info."
);
cs->setDefaultValue("plain");
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
cfg->addInfo("RTF","configuration options related to the RTF output"); cfg->addInfo("RTF","configuration options related to the RTF output");
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -2123,7 +2162,8 @@ void addConfigOptions(Config *cfg) ...@@ -2123,7 +2162,8 @@ void addConfigOptions(Config *cfg)
//---- //----
cs = cfg->addString( cs = cfg->addString(
"DOT_FONTNAME", "DOT_FONTNAME",
"By default doxygen will use the Helvetica font for all dot files that doxygen generates. When you want a differently looking font you can specify\n" "By default doxygen will use the Helvetica font for all dot files that\n"
"doxygen generates. When you want a differently looking font you can specify\n"
"the font name using DOT_FONTNAME. You need to make sure dot is able to find\n" "the font name using DOT_FONTNAME. You need to make sure dot is able to find\n"
"the font, which can be done by putting it in a standard location or by setting\n" "the font, which can be done by putting it in a standard location or by setting\n"
"the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the\n" "the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the\n"
...@@ -2143,7 +2183,8 @@ void addConfigOptions(Config *cfg) ...@@ -2143,7 +2183,8 @@ void addConfigOptions(Config *cfg)
cs = cfg->addString( cs = cfg->addString(
"DOT_FONTPATH", "DOT_FONTPATH",
"By default doxygen will tell dot to use the Helvetica font.\n" "By default doxygen will tell dot to use the Helvetica font.\n"
"If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to set the path where dot can find it." "If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to\n"
"set the path where dot can find it."
); );
cs->addDependency("HAVE_DOT"); cs->addDependency("HAVE_DOT");
//---- //----
...@@ -2257,7 +2298,8 @@ void addConfigOptions(Config *cfg) ...@@ -2257,7 +2298,8 @@ void addConfigOptions(Config *cfg)
"The DOT_IMAGE_FORMAT tag can be used to set the image format of the images\n" "The DOT_IMAGE_FORMAT tag can be used to set the image format of the images\n"
"generated by dot. Possible values are svg, png, jpg, or gif.\n" "generated by dot. Possible values are svg, png, jpg, or gif.\n"
"If left blank png will be used. If you choose svg you need to set\n" "If left blank png will be used. If you choose svg you need to set\n"
"HTML_FILE_EXTENSION to xhtml in order to make the SVG files visible in IE 9+ (other browsers do not have this requirement).", "HTML_FILE_EXTENSION to xhtml in order to make the SVG files\n"
"visible in IE 9+ (other browsers do not have this requirement).",
"png" "png"
); );
ce->addValue("png"); ce->addValue("png");
...@@ -2268,7 +2310,12 @@ void addConfigOptions(Config *cfg) ...@@ -2268,7 +2310,12 @@ void addConfigOptions(Config *cfg)
//---- //----
cb = cfg->addBool( cb = cfg->addBool(
"INTERACTIVE_SVG", "INTERACTIVE_SVG",
"", "If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to\n"
"enable generation of interactive SVG images that allow zooming and panning.\n"
"Note that this requires a modern browser other than Internet Explorer.\n"
"Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you\n"
"need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files\n"
"visible. Older versions of IE do not have SVG support.",
FALSE FALSE
); );
cb->addDependency("HAVE_DOT"); cb->addDependency("HAVE_DOT");
......
...@@ -1343,7 +1343,6 @@ void Definition::writePathFragment(OutputList &ol) const ...@@ -1343,7 +1343,6 @@ void Definition::writePathFragment(OutputList &ol) const
void Definition::writeNavigationPath(OutputList &ol) const void Definition::writeNavigationPath(OutputList &ol) const
{ {
static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
static bool hasCustomFooter = !Config_getString("HTML_FOOTER").isEmpty();
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
...@@ -1356,13 +1355,7 @@ void Definition::writeNavigationPath(OutputList &ol) const ...@@ -1356,13 +1355,7 @@ void Definition::writeNavigationPath(OutputList &ol) const
ol.writeString(" <div id=\"nav-path\" class=\"navpath\">\n"); ol.writeString(" <div id=\"nav-path\" class=\"navpath\">\n");
ol.writeString(" <ul>\n"); ol.writeString(" <ul>\n");
writePathFragment(ol); writePathFragment(ol);
if (!hasCustomFooter && generateTreeView) // write the doxygen logo as part of the navigation bar if (!generateTreeView)
{
ol.writeString(" <li class=\"footer\">");
ol.writeLogo();
ol.writeString("</li>\n");
}
if (!hasCustomFooter || !generateTreeView)
{ {
ol.writeString(" </ul>\n"); ol.writeString(" </ul>\n");
ol.writeString(" </div>\n"); ol.writeString(" </div>\n");
......
...@@ -193,8 +193,7 @@ void DirDef::writeDirectoryGraph(OutputList &ol) ...@@ -193,8 +193,7 @@ void DirDef::writeDirectoryGraph(OutputList &ol)
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
//ol.startParagraph(); //ol.startParagraph();
ol.startDirDepGraph(); ol.startDirDepGraph();
//TODO: ol.parseText(theTranslator->trDirDepGraph()); ol.parseText(theTranslator->trDirDepGraph(displayName()));
ol.parseText((QCString)"Directory dependency graph for "+displayName()+":");
ol.endDirDepGraph(dirDep); ol.endDirDepGraph(dirDep);
//ol.endParagraph(); //ol.endParagraph();
ol.enableAll(); ol.enableAll();
...@@ -381,6 +380,7 @@ void DirDef::writeDocumentation(OutputList &ol) ...@@ -381,6 +380,7 @@ void DirDef::writeDocumentation(OutputList &ol)
} }
break; break;
case LayoutDocEntry::ClassIncludes: case LayoutDocEntry::ClassIncludes:
case LayoutDocEntry::ClassInlineClasses:
case LayoutDocEntry::ClassInheritanceGraph: case LayoutDocEntry::ClassInheritanceGraph:
case LayoutDocEntry::ClassNestedClasses: case LayoutDocEntry::ClassNestedClasses:
case LayoutDocEntry::ClassCollaborationGraph: case LayoutDocEntry::ClassCollaborationGraph:
...@@ -388,12 +388,14 @@ void DirDef::writeDocumentation(OutputList &ol) ...@@ -388,12 +388,14 @@ void DirDef::writeDocumentation(OutputList &ol)
case LayoutDocEntry::ClassUsedFiles: case LayoutDocEntry::ClassUsedFiles:
case LayoutDocEntry::NamespaceNestedNamespaces: case LayoutDocEntry::NamespaceNestedNamespaces:
case LayoutDocEntry::NamespaceClasses: case LayoutDocEntry::NamespaceClasses:
case LayoutDocEntry::NamespaceInlineClasses:
case LayoutDocEntry::FileClasses: case LayoutDocEntry::FileClasses:
case LayoutDocEntry::FileNamespaces: case LayoutDocEntry::FileNamespaces:
case LayoutDocEntry::FileIncludes: case LayoutDocEntry::FileIncludes:
case LayoutDocEntry::FileIncludeGraph: case LayoutDocEntry::FileIncludeGraph:
case LayoutDocEntry::FileIncludedByGraph: case LayoutDocEntry::FileIncludedByGraph:
case LayoutDocEntry::FileSourceLink: case LayoutDocEntry::FileSourceLink:
case LayoutDocEntry::FileInlineClasses:
case LayoutDocEntry::GroupClasses: case LayoutDocEntry::GroupClasses:
case LayoutDocEntry::GroupInlineClasses: case LayoutDocEntry::GroupInlineClasses:
case LayoutDocEntry::GroupNamespaces: case LayoutDocEntry::GroupNamespaces:
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include "searchindex.h" #include "searchindex.h"
#include "language.h" #include "language.h"
#include "portable.h" #include "portable.h"
#include "cite.h"
// debug off // debug off
#define DBG(x) do {} while(0) #define DBG(x) do {} while(0)
...@@ -1163,11 +1164,10 @@ static DocInternalRef *handleInternalRef(DocNode *parent) ...@@ -1163,11 +1164,10 @@ static DocInternalRef *handleInternalRef(DocNode *parent)
static DocAnchor *handleAnchor(DocNode *parent) static DocAnchor *handleAnchor(DocNode *parent)
{ {
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
QCString tokenName = g_token->name;
if (tok!=TK_WHITESPACE) if (tok!=TK_WHITESPACE)
{ {
warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected whitespace after %s command", warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected whitespace after %s command",
qPrint(tokenName)); qPrint(g_token->name));
return 0; return 0;
} }
doctokenizerYYsetStateAnchor(); doctokenizerYYsetStateAnchor();
...@@ -1175,13 +1175,13 @@ static DocAnchor *handleAnchor(DocNode *parent) ...@@ -1175,13 +1175,13 @@ static DocAnchor *handleAnchor(DocNode *parent)
if (tok==0) if (tok==0)
{ {
warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected end of comment block while parsing the " warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected end of comment block while parsing the "
"argument of command %s",qPrint(tokenName)); "argument of command %s",qPrint(g_token->name));
return 0; return 0;
} }
else if (tok!=TK_WORD && tok!=TK_LNKWORD) else if (tok!=TK_WORD && tok!=TK_LNKWORD)
{ {
warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected token %s as the argument of %s", warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected token %s as the argument of %s",
tokToString(tok),qPrint(tokenName)); tokToString(tok),qPrint(g_token->name));
return 0; return 0;
} }
doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara();
...@@ -1689,6 +1689,21 @@ DocAnchor::DocAnchor(DocNode *parent,const QCString &id,bool newAnchor) ...@@ -1689,6 +1689,21 @@ DocAnchor::DocAnchor(DocNode *parent,const QCString &id,bool newAnchor)
{ {
m_anchor = id; m_anchor = id;
} }
else if (id.left(CiteConsts::anchorPrefix.length()) == CiteConsts::anchorPrefix)
{
CiteInfo *cite = Doxygen::citeDict->find(id.mid(CiteConsts::anchorPrefix.length()));
if (cite)
{
m_file = CiteConsts::fileName;
m_anchor = id;
}
else
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Invalid cite anchor id `%s'",qPrint(id));
m_anchor = "invalid";
m_file = "invalid";
}
}
else // found \anchor label else // found \anchor label
{ {
SectionInfo *sec = Doxygen::sectionDict[id]; SectionInfo *sec = Doxygen::sectionDict[id];
...@@ -2385,6 +2400,33 @@ void DocRef::parse() ...@@ -2385,6 +2400,33 @@ void DocRef::parse()
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
DocCite::DocCite(DocNode *parent,const QCString &target,const QCString &) //context)
{
static uint numBibFiles = Config_getList("CITE_BIB_FILES").count();
m_parent = parent;
QCString anchor;
//printf("DocCite::DocCite(target=%s,context=%s\n",target.data(),context.data());
ASSERT(!target.isEmpty());
m_relPath = g_relPath;
CiteInfo *cite = Doxygen::citeDict->find(target);
if (numBibFiles>0 && cite) // ref to citation
{
m_text = cite->text;
if (m_text.isEmpty()) m_text = cite->label;
m_ref = cite->ref;
m_anchor = CiteConsts::anchorPrefix+cite->label;
m_file = CiteConsts::fileName;
//printf("CITE ==> m_text=%s,m_ref=%s,m_file=%s,m_anchor=%s\n",
// m_text.data(),m_ref.data(),m_file.data(),m_anchor.data());
return;
}
m_text = linkToText(target,FALSE);
warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unable to resolve reference to `%s' for \\cite command",
qPrint(target));
}
//---------------------------------------------------------------------------
DocLink::DocLink(DocNode *parent,const QCString &target) DocLink::DocLink(DocNode *parent,const QCString &target)
{ {
m_parent = parent; m_parent = parent;
...@@ -4420,6 +4462,38 @@ int DocPara::handleParamSection(const QCString &cmdName, ...@@ -4420,6 +4462,38 @@ int DocPara::handleParamSection(const QCString &cmdName,
return (rv!=TK_NEWPARA) ? rv : RetVal_OK; return (rv!=TK_NEWPARA) ? rv : RetVal_OK;
} }
void DocPara::handleCite()
{
// get the argument of the cite command.
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected whitespace after %s command",
qPrint("cite"));
return;
}
tok=doctokenizerYYlex();
if (tok==0)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected end of comment block while parsing the "
"argument of command %s\n", qPrint("cite"));
return;
}
else if (tok!=TK_WORD && tok!=TK_LNKWORD)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected token %s as the argument of %s",
tokToString(tok),qPrint("cite"));
return;
}
g_token->sectionId = g_token->name;
doctokenizerYYsetStateCite();
DocCite *cite = new DocCite(this,g_token->name,g_context);
m_children.append(cite);
//cite->parse();
doctokenizerYYsetStatePara();
}
int DocPara::handleXRefItem() int DocPara::handleXRefItem()
{ {
int retval=doctokenizerYYlex(); int retval=doctokenizerYYlex();
...@@ -5103,6 +5177,9 @@ int DocPara::handleCommand(const QCString &cmdName) ...@@ -5103,6 +5177,9 @@ int DocPara::handleCommand(const QCString &cmdName)
case CMD_JAVALINK: case CMD_JAVALINK:
handleLink(cmdName,TRUE); handleLink(cmdName,TRUE);
break; break;
case CMD_CITE:
handleCite();
break;
case CMD_REF: // fall through case CMD_REF: // fall through
case CMD_SUBPAGE: case CMD_SUBPAGE:
handleRef(cmdName); handleRef(cmdName);
......
...@@ -272,8 +272,8 @@ class DocAnchor : public DocNode ...@@ -272,8 +272,8 @@ class DocAnchor : public DocNode
public: public:
DocAnchor(DocNode *parent,const QCString &id,bool newAnchor); DocAnchor(DocNode *parent,const QCString &id,bool newAnchor);
Kind kind() const { return Kind_Anchor; } Kind kind() const { return Kind_Anchor; }
QCString anchor() const { return m_anchor; } QCString anchor() const { return m_anchor; }
QCString file() const { return m_file; } QCString file() const { return m_file; }
void accept(DocVisitor *v) { v->visit(this); } void accept(DocVisitor *v) { v->visit(this); }
private: private:
...@@ -281,6 +281,28 @@ class DocAnchor : public DocNode ...@@ -281,6 +281,28 @@ class DocAnchor : public DocNode
QCString m_file; QCString m_file;
}; };
/*! @brief Node representing a citation of some bibliographic reference */
class DocCite : public DocNode
{
public:
DocCite(DocNode *parent,const QCString &target,const QCString &context);
Kind kind() const { return Kind_Ref; }
QCString file() const { return m_file; }
QCString relPath() const { return m_relPath; }
QCString ref() const { return m_ref; }
QCString anchor() const { return m_anchor; }
QCString text() const { return m_text; }
void accept(DocVisitor *v) { v->visit(this); }
private:
QCString m_file;
QCString m_relPath;
QCString m_ref;
QCString m_anchor;
QCString m_text;
};
/*! @brief Node representing a style change */ /*! @brief Node representing a style change */
class DocStyleChange : public DocNode class DocStyleChange : public DocNode
{ {
...@@ -980,6 +1002,7 @@ class DocPara : public CompAccept<DocPara>, public DocNode ...@@ -980,6 +1002,7 @@ class DocPara : public CompAccept<DocPara>, public DocNode
void handleMscFile(const QCString &cmdName); void handleMscFile(const QCString &cmdName);
void handleInclude(const QCString &cmdName,DocInclude::Type t); void handleInclude(const QCString &cmdName,DocInclude::Type t);
void handleLink(const QCString &cmdName,bool isJavaLink); void handleLink(const QCString &cmdName,bool isJavaLink);
void handleCite();
void handleRef(const QCString &cmdName); void handleRef(const QCString &cmdName);
void handleSection(const QCString &cmdName); void handleSection(const QCString &cmdName);
void handleInheritDoc(); void handleInheritDoc();
......
...@@ -141,6 +141,7 @@ void doctokenizerYYsetStateXRefItem(); ...@@ -141,6 +141,7 @@ void doctokenizerYYsetStateXRefItem();
void doctokenizerYYsetStateFile(); void doctokenizerYYsetStateFile();
void doctokenizerYYsetStatePattern(); void doctokenizerYYsetStatePattern();
void doctokenizerYYsetStateLink(); void doctokenizerYYsetStateLink();
void doctokenizerYYsetStateCite();
void doctokenizerYYsetStateRef(); void doctokenizerYYsetStateRef();
void doctokenizerYYsetStateInternalRef(); void doctokenizerYYsetStateInternalRef();
void doctokenizerYYsetStateText(); void doctokenizerYYsetStateText();
......
...@@ -337,7 +337,7 @@ CHARWORDQ [^ \t\n\r\\@<>()\[\]:;\?{}&%$#,."=] ...@@ -337,7 +337,7 @@ CHARWORDQ [^ \t\n\r\\@<>()\[\]:;\?{}&%$#,."=]
ESCWORD "%"{ID}(("::"|"."){ID})* ESCWORD "%"{ID}(("::"|"."){ID})*
WORD1 {ESCWORD}|{CHARWORDQ}+|"{"|"}"|"'\"'"|("\""[^"\n]*\n?[^"\n]*"\"") WORD1 {ESCWORD}|{CHARWORDQ}+|"{"|"}"|"'\"'"|("\""[^"\n]*\n?[^"\n]*"\"")
WORD2 "."|","|"("|")"|"["|"]"|":"|";"|"\?"|"=" WORD2 "."|","|"("|")"|"["|"]"|":"|";"|"\?"|"="
WORD1NQ {ESCWORD}|{CHARWORDQ}+ WORD1NQ {ESCWORD}|{CHARWORDQ}+|"{"|"}"
WORD2NQ "."|","|"("|")"|"["|"]"|":"|";"|"\?"|"=" WORD2NQ "."|","|"("|")"|"["|"]"|":"|";"|"\?"|"="
HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*{WS}*(("/")?)">" HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*{WS}*(("/")?)">"
HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"sup"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p" HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"sup"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p"
...@@ -372,6 +372,7 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3} ...@@ -372,6 +372,7 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}
%x St_File %x St_File
%x St_Pattern %x St_Pattern
%x St_Link %x St_Link
%x St_Cite
%x St_Ref %x St_Ref
%x St_Ref2 %x St_Ref2
%x St_IntRef %x St_IntRef
...@@ -733,6 +734,22 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3} ...@@ -733,6 +734,22 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}
unput(*yytext); unput(*yytext);
return 0; return 0;
} }
<St_Cite>{LABELID} { // label to cite
g_token->name=yytext;
return TK_WORD;
}
<St_Cite>{BLANK} { // white space
unput(' ');
return 0;
}
<St_Cite>\n { // new line
unput(*yytext);
return 0;
}
<St_Cite>. { // any other character
unput(*yytext);
return 0;
}
<St_Ref>{REFWORD} { // label to refer to <St_Ref>{REFWORD} { // label to refer to
g_token->name=yytext; g_token->name=yytext;
return TK_WORD; return TK_WORD;
...@@ -1079,6 +1096,11 @@ void doctokenizerYYsetStateLink() ...@@ -1079,6 +1096,11 @@ void doctokenizerYYsetStateLink()
BEGIN(St_Link); BEGIN(St_Link);
} }
void doctokenizerYYsetStateCite()
{
BEGIN(St_Cite);
}
void doctokenizerYYsetStateRef() void doctokenizerYYsetStateRef()
{ {
BEGIN(St_Ref); BEGIN(St_Ref);
......
...@@ -67,6 +67,7 @@ class DocImage; ...@@ -67,6 +67,7 @@ class DocImage;
class DocDotFile; class DocDotFile;
class DocMscFile; class DocMscFile;
class DocLink; class DocLink;
class DocCite;
class DocRef; class DocRef;
class DocFormula; class DocFormula;
class DocSecRefItem; class DocSecRefItem;
...@@ -108,6 +109,7 @@ class DocVisitor ...@@ -108,6 +109,7 @@ class DocVisitor
virtual void visit(DocLinkedWord *) = 0; virtual void visit(DocLinkedWord *) = 0;
virtual void visit(DocIndexEntry *) = 0; virtual void visit(DocIndexEntry *) = 0;
virtual void visit(DocSimpleSectSep *) = 0; virtual void visit(DocSimpleSectSep *) = 0;
virtual void visit(DocCite *) = 0;
/*! @} */ /*! @} */
/*! @name Visitor functions for internal nodes /*! @name Visitor functions for internal nodes
......
...@@ -3808,6 +3808,7 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir, ...@@ -3808,6 +3808,7 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir,
* \param relPath relative path the to root of the output dir * \param relPath relative path the to root of the output dir
* \param baseName the base name of the output files * \param baseName the base name of the output files
* \param context the scope in which this graph is found (for resolving links) * \param context the scope in which this graph is found (for resolving links)
* \param graphId a unique id for this graph, use for dynamic sections
*/ */
void writeDotImageMapFromFile(FTextStream &t, void writeDotImageMapFromFile(FTextStream &t,
const QCString &inFile, const QCString &outDir, const QCString &inFile, const QCString &outDir,
......
This diff is collapsed.
...@@ -78,6 +78,7 @@ ...@@ -78,6 +78,7 @@
#include "vhdlscanner.h" #include "vhdlscanner.h"
#include "vhdldocgen.h" #include "vhdldocgen.h"
#include "eclipsehelp.h" #include "eclipsehelp.h"
#include "cite.h"
#include "layout.h" #include "layout.h"
...@@ -108,6 +109,7 @@ FormulaDict Doxygen::formulaNameDict(1009); // the label name of all form ...@@ -108,6 +109,7 @@ FormulaDict Doxygen::formulaNameDict(1009); // the label name of all form
PageSDict *Doxygen::pageSDict = 0; PageSDict *Doxygen::pageSDict = 0;
PageSDict *Doxygen::exampleSDict = 0; PageSDict *Doxygen::exampleSDict = 0;
SectionDict Doxygen::sectionDict(257); // all page sections SectionDict Doxygen::sectionDict(257); // all page sections
CiteDict *Doxygen::citeDict=0; // database of bibliographic references
StringDict Doxygen::aliasDict(257); // aliases StringDict Doxygen::aliasDict(257); // aliases
FileNameDict *Doxygen::includeNameDict = 0; // include names FileNameDict *Doxygen::includeNameDict = 0; // include names
FileNameDict *Doxygen::exampleNameDict = 0; // examples FileNameDict *Doxygen::exampleNameDict = 0; // examples
...@@ -180,6 +182,7 @@ void clearAll() ...@@ -180,6 +182,7 @@ void clearAll()
Doxygen::formulaDict.clear(); Doxygen::formulaDict.clear();
Doxygen::formulaNameDict.clear(); Doxygen::formulaNameDict.clear();
Doxygen::tagDestinationDict.clear(); Doxygen::tagDestinationDict.clear();
delete Doxygen::citeDict;
delete Doxygen::mainPage; Doxygen::mainPage=0; delete Doxygen::mainPage; Doxygen::mainPage=0;
} }
...@@ -7408,7 +7411,7 @@ static void generateClassList(ClassSDict &classSDict) ...@@ -7408,7 +7411,7 @@ static void generateClassList(ClassSDict &classSDict)
//printf("cd=%s getOuterScope=%p global=%p\n",cd->name().data(),cd->getOuterScope(),Doxygen::globalScope); //printf("cd=%s getOuterScope=%p global=%p\n",cd->name().data(),cd->getOuterScope(),Doxygen::globalScope);
if ((cd->getOuterScope()==0 || // <-- should not happen, but can if we read an old tag file if ((cd->getOuterScope()==0 || // <-- should not happen, but can if we read an old tag file
cd->getOuterScope()==Doxygen::globalScope // only look at global classes cd->getOuterScope()==Doxygen::globalScope // only look at global classes
) && !cd->isHidden() && !cd->isEmbeddedInGroupDocs() ) && !cd->isHidden() && !cd->isEmbeddedInOuterScope()
) )
{ {
// skip external references, anonymous compounds and // skip external references, anonymous compounds and
...@@ -8177,6 +8180,7 @@ static void resolveUserReferences() ...@@ -8177,6 +8180,7 @@ static void resolveUserReferences()
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// generate all separate documentation pages // generate all separate documentation pages
...@@ -8348,7 +8352,7 @@ static void generateNamespaceDocs() ...@@ -8348,7 +8352,7 @@ static void generateNamespaceDocs()
cd->templateMaster()==0 cd->templateMaster()==0
) // skip external references, anonymous compounds and ) // skip external references, anonymous compounds and
// template instances and nested classes // template instances and nested classes
&& !cd->isHidden() && !cd->isHidden() && !cd->isEmbeddedInOuterScope()
) )
{ {
msg("Generating docs for compound %s...\n",cd->name().data()); msg("Generating docs for compound %s...\n",cd->name().data());
...@@ -8609,36 +8613,9 @@ static void readTagFile(Entry *root,const char *tl) ...@@ -8609,36 +8613,9 @@ static void readTagFile(Entry *root,const char *tl)
msg("Reading tag file `%s'...\n",fileName.data()); msg("Reading tag file `%s'...\n",fileName.data());
parseTagFile(root,fi.absFilePath(),fi.fileName()); parseTagFile(root,fi.absFilePath(),fi.fileName());
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static void copyFile(const QCString &src,const QCString &dest)
{
QFile sf(src);
if (sf.open(IO_ReadOnly))
{
QFileInfo fi(src);
QFile df(dest);
if (df.open(IO_WriteOnly))
{
char *buffer = new char[fi.size()];
sf.readBlock(buffer,fi.size());
df.writeBlock(buffer,fi.size());
df.flush();
delete[] buffer;
}
else
{
err("error: could not write to file %s\n",dest.data());
}
}
else
{
err("error: could not open user specified file %s\n",src.data());
}
}
static void copyStyleSheet() static void copyStyleSheet()
{ {
QCString &htmlStyleSheet = Config_getString("HTML_STYLESHEET"); QCString &htmlStyleSheet = Config_getString("HTML_STYLESHEET");
...@@ -9231,9 +9208,9 @@ static void usage(const char *name) ...@@ -9231,9 +9208,9 @@ static void usage(const char *name)
msg(" generated documentation:\n"); msg(" generated documentation:\n");
msg(" %s -l layoutFileName.xml\n\n",name); msg(" %s -l layoutFileName.xml\n\n",name);
msg("5) Use doxygen to generate a template style sheet file for RTF, HTML or Latex.\n"); msg("5) Use doxygen to generate a template style sheet file for RTF, HTML or Latex.\n");
msg(" RTF: %s -w rtf styleSheetFile\n",name); msg(" RTF: %s -w rtf styleSheetFile\n",name);
msg(" HTML: %s -w html headerFile footerFile styleSheetFile [configFile]\n",name); msg(" HTML: %s -w html headerFile footerFile styleSheetFile [configFile]\n",name);
msg(" LaTeX: %s -w latex headerFile footerFile styleSheetFile [configFile]\n\n",name); msg(" LaTeX: %s -w latex headerFile footerFile styleSheetFile [configFile]\n\n",name);
msg("6) Use doxygen to generate an rtf extensions file\n"); msg("6) Use doxygen to generate an rtf extensions file\n");
msg(" RTF: %s -e rtf extensionsFile\n\n",name); msg(" RTF: %s -e rtf extensionsFile\n\n",name);
msg("If -s is specified the comments in the config file will be omitted.\n"); msg("If -s is specified the comments in the config file will be omitted.\n");
...@@ -9320,6 +9297,7 @@ void initDoxygen() ...@@ -9320,6 +9297,7 @@ void initDoxygen()
Doxygen::tagDestinationDict.setAutoDelete(TRUE); Doxygen::tagDestinationDict.setAutoDelete(TRUE);
Doxygen::lookupCache.setAutoDelete(TRUE); Doxygen::lookupCache.setAutoDelete(TRUE);
Doxygen::dirRelations.setAutoDelete(TRUE); Doxygen::dirRelations.setAutoDelete(TRUE);
Doxygen::citeDict = new CiteDict(256);
} }
void cleanUpDoxygen() void cleanUpDoxygen()
...@@ -9578,9 +9556,9 @@ void readConfiguration(int argc, char **argv) ...@@ -9578,9 +9556,9 @@ void readConfiguration(int argc, char **argv)
cleanUpDoxygen(); cleanUpDoxygen();
exit(0); exit(0);
} }
else else
{ {
err("error: Illegal format specifier %s: should be one of rtf, html, or latex\n",formatName); err("error: Illegal format specifier %s: should be one of rtf, html, latex, or bst\n",formatName);
cleanUpDoxygen(); cleanUpDoxygen();
exit(1); exit(1);
} }
...@@ -10399,6 +10377,12 @@ void parseInput() ...@@ -10399,6 +10377,12 @@ void parseInput()
computeDirDependencies(); computeDirDependencies();
} }
msg("Resolving citations...\n");
Doxygen::citeDict->resolve();
msg("Generating citations page...\n");
Doxygen::citeDict->generatePage();
msg("Counting data structures...\n"); msg("Counting data structures...\n");
countDataStructures(); countDataStructures();
...@@ -10569,7 +10553,7 @@ void generateOutput() ...@@ -10569,7 +10553,7 @@ void generateOutput()
} }
//statistics(); //statistics();
// count the number of documented elements in the lists we have built. // count the number of documented elements in the lists we have built.
// If the result is 0 we do not generate the lists and omit the // If the result is 0 we do not generate the lists and omit the
// corresponding links in the index. // corresponding links in the index.
......
...@@ -629,6 +629,58 @@ table.doxtable th { ...@@ -629,6 +629,58 @@ table.doxtable th {
text-align:left; text-align:left;
} }
table.fieldtable {
width: 100%;
margin-bottom: 10px;
border: 1px solid ##B4;
border-spacing: 0px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
-moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
-webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
}
.fieldtable td, .fieldtable th {
padding: 3px 7px 2px;
}
.fieldtable td.fieldtype, .fieldtable td.fieldname {
white-space: nowrap;
border-right: 1px solid ##B4;
border-bottom: 1px solid ##B4;
vertical-align: top;
}
.fieldtable td.fielddoc {
border-bottom: 1px solid ##B4;
width: 100%;
}
.fieldtable tr:last-child td {
border-bottom: none;
}
.fieldtable th {
background-image:url('nav_f.png');
background-repeat:repeat-x;
background-color: ##E6;
font-size: 90%;
color: ##2B;
padding-bottom: 4px;
padding-top: 5px;
text-align:left;
-moz-border-radius-topleft: 4px;
-moz-border-radius-topright: 4px;
-webkit-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
border-bottom: 1px solid ##B4;
}
.tabsearch { .tabsearch {
top: 0px; top: 0px;
left: 10px; left: 10px;
...@@ -846,6 +898,23 @@ div.zoom ...@@ -846,6 +898,23 @@ div.zoom
border: 1px solid ##A0; border: 1px solid ##A0;
} }
dl.citelist {
margin-bottom:50px;
}
dl.citelist dt {
color:##40;
float:left;
font-weight:bold;
margin-right:10px;
padding:5px;
}
dl.citelist dd {
margin:2px 0;
padding:5px 0;
}
@media print @media print
{ {
#top { display: none; } #top { display: none; }
......
...@@ -48,6 +48,7 @@ class ObjCache; ...@@ -48,6 +48,7 @@ class ObjCache;
class Store; class Store;
class QFileInfo; class QFileInfo;
class BufStr; class BufStr;
class CiteDict;
typedef QList<QCString> StringList; typedef QList<QCString> StringList;
typedef QDict<FileDef> FileDict; typedef QDict<FileDef> FileDict;
...@@ -126,6 +127,7 @@ class Doxygen ...@@ -126,6 +127,7 @@ class Doxygen
static Store *symbolStorage; static Store *symbolStorage;
static QCString objDBFileName; static QCString objDBFileName;
static QCString entryDBFileName; static QCString entryDBFileName;
static CiteDict *citeDict;
static bool gatherDefines; static bool gatherDefines;
static bool userComments; static bool userComments;
static IndexList indexList; static IndexList indexList;
......
This diff is collapsed.
...@@ -629,6 +629,58 @@ ...@@ -629,6 +629,58 @@
" text-align:left;\n" " text-align:left;\n"
"}\n" "}\n"
"\n" "\n"
"table.fieldtable {\n"
" width: 100%;\n"
" margin-bottom: 10px;\n"
" border: 1px solid ##B4;\n"
" border-spacing: 0px;\n"
" -moz-border-radius: 4px;\n"
" -webkit-border-radius: 4px;\n"
" border-radius: 4px;\n"
" -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;\n"
" -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);\n"
" box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);\n"
"}\n"
"\n"
".fieldtable td, .fieldtable th {\n"
" padding: 3px 7px 2px;\n"
"}\n"
"\n"
".fieldtable td.fieldtype, .fieldtable td.fieldname {\n"
" white-space: nowrap;\n"
" border-right: 1px solid ##B4;\n"
" border-bottom: 1px solid ##B4;\n"
" vertical-align: top;\n"
"}\n"
"\n"
".fieldtable td.fielddoc {\n"
" border-bottom: 1px solid ##B4;\n"
" width: 100%;\n"
"}\n"
"\n"
".fieldtable tr:last-child td {\n"
" border-bottom: none;\n"
"}\n"
"\n"
".fieldtable th {\n"
" background-image:url('nav_f.png');\n"
" background-repeat:repeat-x;\n"
" background-color: ##E6;\n"
" font-size: 90%;\n"
" color: ##2B;\n"
" padding-bottom: 4px;\n"
" padding-top: 5px;\n"
" text-align:left;\n"
" -moz-border-radius-topleft: 4px;\n"
" -moz-border-radius-topright: 4px;\n"
" -webkit-border-top-left-radius: 4px;\n"
" -webkit-border-top-right-radius: 4px;\n"
" border-top-left-radius: 4px;\n"
" border-top-right-radius: 4px;\n"
" border-bottom: 1px solid ##B4;\n"
"}\n"
"\n"
"\n"
".tabsearch {\n" ".tabsearch {\n"
" top: 0px;\n" " top: 0px;\n"
" left: 10px;\n" " left: 10px;\n"
...@@ -846,6 +898,23 @@ ...@@ -846,6 +898,23 @@
" border: 1px solid ##A0;\n" " border: 1px solid ##A0;\n"
"}\n" "}\n"
"\n" "\n"
"dl.citelist {\n"
" margin-bottom:50px;\n"
"}\n"
"\n"
"dl.citelist dt {\n"
" color:##40;\n"
" float:left;\n"
" font-weight:bold;\n"
" margin-right:10px;\n"
" padding:5px;\n"
"}\n"
"\n"
"dl.citelist dd {\n"
" margin:2px 0;\n"
" padding:5px 0;\n"
"}\n"
"\n"
"@media print\n" "@media print\n"
"{\n" "{\n"
" #top { display: none; }\n" " #top { display: none; }\n"
......
...@@ -360,6 +360,12 @@ void Entry::addSpecialListItem(const char *listName,int itemId) ...@@ -360,6 +360,12 @@ void Entry::addSpecialListItem(const char *listName,int itemId)
sli->append(ili); sli->append(ili);
} }
Entry *Entry::removeSubEntry(Entry *e)
{
int i = m_sublist->find(e);
return i!=-1 ? m_sublist->take(i) : 0;
}
//------------------------------------------------------------------ //------------------------------------------------------------------
......
...@@ -289,23 +289,43 @@ class Entry ...@@ -289,23 +289,43 @@ class Entry
Entry(); Entry();
Entry(const Entry &); Entry(const Entry &);
~Entry(); ~Entry();
/*! Returns the static size of the Entry (so excluding any dynamic memory) */
int getSize(); int getSize();
void addSpecialListItem(const char *listName,int index); void addSpecialListItem(const char *listName,int index);
void createNavigationIndex(EntryNav *rootNav,FileStorage *storage,FileDef *fd); void createNavigationIndex(EntryNav *rootNav,FileStorage *storage,FileDef *fd);
// while parsing a file these function can be used to navigate/build the tree // while parsing a file these function can be used to navigate/build the tree
void setParent(Entry *parent) { m_parent = parent; } void setParent(Entry *parent) { m_parent = parent; }
/*! Returns the parent for this Entry or 0 if this entry has no parent. */
Entry *parent() const { return m_parent; } Entry *parent() const { return m_parent; }
/*! Returns the list of children for this Entry
* @see addSubEntry() and removeSubEntry()
*/
const QList<Entry> *children() const { return m_sublist; } const QList<Entry> *children() const { return m_sublist; }
/*! Adds entry \e as a child to this entry */ /*! Adds entry \a e as a child to this entry */
void addSubEntry (Entry* e) ; void addSubEntry (Entry* e) ;
/*! Removes entry \a e from the list of children.
* Returns a pointer to the entry or 0 if the entry was not a child.
* Note the entry will not be deleted.
*/
Entry *removeSubEntry(Entry *e);
/*! Restore the state of this Entry to the default value it has /*! Restore the state of this Entry to the default value it has
* at construction time. * at construction time.
*/ */
void reset(); void reset();
/*! Serialize this entry to a persistent storage stream. */
void marshall(StorageIntf *); void marshall(StorageIntf *);
/*! Reinitialize this entry from a persistent storage stream. */
void unmarshall(StorageIntf *); void unmarshall(StorageIntf *);
public: public:
...@@ -366,6 +386,7 @@ class Entry ...@@ -366,6 +386,7 @@ class Entry
bool artificial; //!< Artificially introduced item bool artificial; //!< Artificially introduced item
GroupDocType groupDocType; GroupDocType groupDocType;
static int num; //!< counts the total number of entries static int num; //!< counts the total number of entries
/// return the command name used to define GROUPDOC_SEC /// return the command name used to define GROUPDOC_SEC
......
...@@ -398,6 +398,11 @@ void FileDef::writeClassDeclarations(OutputList &ol,const QCString &title) ...@@ -398,6 +398,11 @@ void FileDef::writeClassDeclarations(OutputList &ol,const QCString &title)
if (classSDict) classSDict->writeDeclaration(ol,0,title,FALSE); if (classSDict) classSDict->writeDeclaration(ol,0,title,FALSE);
} }
void FileDef::writeInlineClasses(OutputList &ol)
{
if (classSDict) classSDict->writeDocumentation(ol,this);
}
void FileDef::startMemberDeclarations(OutputList &ol) void FileDef::startMemberDeclarations(OutputList &ol)
{ {
ol.startMemberSections(); ol.startMemberSections();
...@@ -636,6 +641,9 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -636,6 +641,9 @@ void FileDef::writeDocumentation(OutputList &ol)
case LayoutDocEntry::MemberDefStart: case LayoutDocEntry::MemberDefStart:
startMemberDocumentation(ol); startMemberDocumentation(ol);
break; break;
case LayoutDocEntry::FileInlineClasses:
writeInlineClasses(ol);
break;
case LayoutDocEntry::MemberDef: case LayoutDocEntry::MemberDef:
{ {
LayoutDocEntryMemberDef *lmd = (LayoutDocEntryMemberDef*)lde; LayoutDocEntryMemberDef *lmd = (LayoutDocEntryMemberDef*)lde;
...@@ -654,8 +662,10 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -654,8 +662,10 @@ void FileDef::writeDocumentation(OutputList &ol)
case LayoutDocEntry::ClassCollaborationGraph: case LayoutDocEntry::ClassCollaborationGraph:
case LayoutDocEntry::ClassAllMembersLink: case LayoutDocEntry::ClassAllMembersLink:
case LayoutDocEntry::ClassUsedFiles: case LayoutDocEntry::ClassUsedFiles:
case LayoutDocEntry::ClassInlineClasses:
case LayoutDocEntry::NamespaceNestedNamespaces: case LayoutDocEntry::NamespaceNestedNamespaces:
case LayoutDocEntry::NamespaceClasses: case LayoutDocEntry::NamespaceClasses:
case LayoutDocEntry::NamespaceInlineClasses:
case LayoutDocEntry::GroupClasses: case LayoutDocEntry::GroupClasses:
case LayoutDocEntry::GroupInlineClasses: case LayoutDocEntry::GroupInlineClasses:
case LayoutDocEntry::GroupNamespaces: case LayoutDocEntry::GroupNamespaces:
......
...@@ -198,6 +198,7 @@ class FileDef : public Definition ...@@ -198,6 +198,7 @@ class FileDef : public Definition
void writeSourceLink(OutputList &ol); void writeSourceLink(OutputList &ol);
void writeNamespaceDeclarations(OutputList &ol,const QCString &title); void writeNamespaceDeclarations(OutputList &ol,const QCString &title);
void writeClassDeclarations(OutputList &ol,const QCString &title); void writeClassDeclarations(OutputList &ol,const QCString &title);
void writeInlineClasses(OutputList &ol);
void startMemberDeclarations(OutputList &ol); void startMemberDeclarations(OutputList &ol);
void endMemberDeclarations(OutputList &ol); void endMemberDeclarations(OutputList &ol);
void startMemberDocumentation(OutputList &ol); void startMemberDocumentation(OutputList &ol);
......
<!--BEGIN GENERATE_TREEVIEW-->
<li class="footer">$generatedby
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> $doxygenversion </li>
</ul>
</div>
<!--END GENERATE_TREEVIEW-->
<!--BEGIN !GENERATE_TREEVIEW-->
<hr class="footer"/><address class="footer"><small>
$generatedby &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="$relpath$doxygen.png" alt="doxygen"/>
</a> $doxygenversion
</small></address>
<!--END !GENERATE_TREEVIEW-->
</body>
</html>
\ No newline at end of file
"<!--BEGIN GENERATE_TREEVIEW-->\n"
" <li class=\"footer\">$generatedby\n"
" <a href=\"http://www.doxygen.org/index.html\">\n"
" <img class=\"footer\" src=\"doxygen.png\" alt=\"doxygen\"/></a> $doxygenversion </li>\n"
" </ul>\n"
" </div>\n"
"<!--END GENERATE_TREEVIEW-->\n"
"<!--BEGIN !GENERATE_TREEVIEW-->\n"
"<hr class=\"footer\"/><address class=\"footer\"><small>\n"
"$generatedby &#160;<a href=\"http://www.doxygen.org/index.html\">\n"
"<img class=\"footer\" src=\"$relpath$doxygen.png\" alt=\"doxygen\"/>\n"
"</a> $doxygenversion\n"
"</small></address>\n"
"<!--END !GENERATE_TREEVIEW-->\n"
"</body>\n"
"</html>\n"
\ No newline at end of file
...@@ -496,6 +496,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA ...@@ -496,6 +496,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA
/*------ module handling ------------------------------------------------------------*/ /*------ module handling ------------------------------------------------------------*/
<Start>module|program{BS_} { // <Start>module|program{BS_} { //
v_type = V_IGNORE;
if(yytext[0]=='m' || yytext[0]=='M') if(yytext[0]=='m' || yytext[0]=='M')
yy_push_state(Module); yy_push_state(Module);
else else
...@@ -903,6 +904,7 @@ private { ...@@ -903,6 +904,7 @@ private {
<SubprogPrefix>{BS}{SUBPROG}{BS_} { <SubprogPrefix>{BS}{SUBPROG}{BS_} {
// Fortran subroutine or function found // Fortran subroutine or function found
v_type = V_IGNORE;
result=yytext; result=yytext;
result=result.stripWhiteSpace(); result=result.stripWhiteSpace();
addSubprogram(result); addSubprogram(result);
...@@ -1572,84 +1574,84 @@ static QCString applyModifiers(QCString typeName, SymbolModifiers& mdfs) ...@@ -1572,84 +1574,84 @@ static QCString applyModifiers(QCString typeName, SymbolModifiers& mdfs)
{ {
if (!mdfs.dimension.isNull()) if (!mdfs.dimension.isNull())
{ {
typeName += ","; typeName += ", ";
typeName += mdfs.dimension; typeName += mdfs.dimension;
} }
if (mdfs.direction!=SymbolModifiers::NONE_D) if (mdfs.direction!=SymbolModifiers::NONE_D)
{ {
typeName += ","; typeName += ", ";
typeName += directionStrs[mdfs.direction]; typeName += directionStrs[mdfs.direction];
} }
if (mdfs.optional) if (mdfs.optional)
{ {
typeName += ","; typeName += ", ";
typeName += "optional"; typeName += "optional";
} }
if (mdfs.allocatable) if (mdfs.allocatable)
{ {
typeName += ","; typeName += ", ";
typeName += "allocatable"; typeName += "allocatable";
} }
if (mdfs.external) if (mdfs.external)
{ {
typeName += ","; typeName += ", ";
typeName += "external"; typeName += "external";
} }
if (mdfs.intrinsic) if (mdfs.intrinsic)
{ {
typeName += ","; typeName += ", ";
typeName += "intrinsic"; typeName += "intrinsic";
} }
if (mdfs.parameter) if (mdfs.parameter)
{ {
typeName += ","; typeName += ", ";
typeName += "parameter"; typeName += "parameter";
} }
if (mdfs.pointer) if (mdfs.pointer)
{ {
typeName += ","; typeName += ", ";
typeName += "pointer"; typeName += "pointer";
} }
if (mdfs.target) if (mdfs.target)
{ {
typeName += ","; typeName += ", ";
typeName += "target"; typeName += "target";
} }
if (mdfs.save) if (mdfs.save)
{ {
typeName += ","; typeName += ", ";
typeName += "save"; typeName += "save";
} }
if (mdfs.deferred) if (mdfs.deferred)
{ {
typeName += ","; typeName += ", ";
typeName += "deferred"; typeName += "deferred";
} }
if (mdfs.nonoverridable) if (mdfs.nonoverridable)
{ {
typeName += ","; typeName += ", ";
typeName += "non_overridable"; typeName += "non_overridable";
} }
if (mdfs.nopass) if (mdfs.nopass)
{ {
typeName += ","; typeName += ", ";
typeName += "nopass"; typeName += "nopass";
} }
if (mdfs.pass) if (mdfs.pass)
{ {
typeName += ","; typeName += ", ";
typeName += "pass"; typeName += "pass";
if (!mdfs.passVar.isEmpty()) if (!mdfs.passVar.isEmpty())
typeName += "(" + mdfs.passVar + ")"; typeName += "(" + mdfs.passVar + ")";
} }
if (mdfs.protection == SymbolModifiers::PUBLIC) if (mdfs.protection == SymbolModifiers::PUBLIC)
{ {
typeName += ","; typeName += ", ";
typeName += "public"; typeName += "public";
} }
else if (mdfs.protection == SymbolModifiers::PRIVATE) else if (mdfs.protection == SymbolModifiers::PRIVATE)
{ {
typeName += ","; typeName += ", ";
typeName += "private"; typeName += "private";
} }
...@@ -1739,8 +1741,11 @@ static bool endScope(Entry *scope, bool isGlobalRoot) ...@@ -1739,8 +1741,11 @@ static bool endScope(Entry *scope, bool isGlobalRoot)
//cout<<"Search in "<<scope->name<<endl; //cout<<"Search in "<<scope->name<<endl;
EntryListIterator eli(*scope->children()); EntryListIterator eli(*scope->children());
Entry *ce; Entry *ce;
int count = 0;
int found = FALSE;
for (;(ce=eli.current());++eli) for (;(ce=eli.current());++eli)
{ {
count++;
if (ce->section != Entry::FUNCTION_SEC) if (ce->section != Entry::FUNCTION_SEC)
continue; continue;
...@@ -1751,6 +1756,15 @@ static bool endScope(Entry *scope, bool isGlobalRoot) ...@@ -1751,6 +1756,15 @@ static bool endScope(Entry *scope, bool isGlobalRoot)
arg->name = arg->type; arg->name = arg->type;
arg->type = scope->name; arg->type = scope->name;
} }
if (ce->name.lower() == scope->name.lower()) found = TRUE;
}
if ((count == 1) && found)
{
// clear all modifiers of the scope
modifiers.remove(scope);
delete scope->parent()->removeSubEntry(scope);
scope = 0;
return TRUE;
} }
} }
} }
......
This diff is collapsed.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
<link href="$relpath$$stylesheet" rel="stylesheet" type="text/css" />
$treeview
$search
$mathjax
</head>
<body>
<div id="top"><!-- do not remove this div! -->
<!--BEGIN TITLEAREA-->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<!--BEGIN PROJECT_LOGO-->
<td id="projectlogo"><img alt="Logo" src="$relpath$$projectlogo"/></td>
<!--END PROJECT_LOGO-->
<!--BEGIN PROJECT_NAME-->
<td style="padding-left: 0.5em;">
<div id="projectname">$projectname
<!--BEGIN PROJECT_NUMBER-->&#160;<span id="projectnumber">$projectnumber</span><!--END PROJECT_NUMBER-->
</div>
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
</td>
<!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME-->
<!--BEGIN PROJECT_BRIEF-->
<td style="padding-left: 0.5em;">
<div id="projectbrief">$projectbrief</div>
</td>
<!--END PROJECT_BRIEF-->
<!--END !PROJECT_NAME-->
<!--BEGIN DISABLE_INDEX-->
<!--BEGIN SEARCHENGINE-->
<td>$searchbox</td>
<!--END SEARCHENGINE-->
<!--END DISABLE_INDEX-->
</tr>
</tbody>
</table>
</div>
<!--END TITLEAREA-->
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"
"<html xmlns=\"http://www.w3.org/1999/xhtml\">\n"
"<head>\n"
"<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n"
"<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->\n"
"<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->\n"
"<link href=\"$relpath$tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n"
"<link href=\"$relpath$$stylesheet\" rel=\"stylesheet\" type=\"text/css\" />\n"
"$treeview\n"
"$search\n"
"$mathjax\n"
"</head>\n"
"<body>\n"
"<div id=\"top\"><!-- do not remove this div! -->\n"
"\n"
"<!--BEGIN TITLEAREA-->\n"
"<div id=\"titlearea\">\n"
"<table cellspacing=\"0\" cellpadding=\"0\">\n"
" <tbody>\n"
" <tr style=\"height: 56px;\">\n"
" <!--BEGIN PROJECT_LOGO-->\n"
" <td id=\"projectlogo\"><img alt=\"Logo\" src=\"$relpath$$projectlogo\"/></td>\n"
" <!--END PROJECT_LOGO-->\n"
" <!--BEGIN PROJECT_NAME-->\n"
" <td style=\"padding-left: 0.5em;\">\n"
" <div id=\"projectname\">$projectname\n"
" <!--BEGIN PROJECT_NUMBER-->&#160;<span id=\"projectnumber\">$projectnumber</span><!--END PROJECT_NUMBER-->\n"
" </div>\n"
" <!--BEGIN PROJECT_BRIEF--><div id=\"projectbrief\">$projectbrief</div><!--END PROJECT_BRIEF-->\n"
" </td>\n"
" <!--END PROJECT_NAME-->\n"
" <!--BEGIN !PROJECT_NAME-->\n"
" <!--BEGIN PROJECT_BRIEF-->\n"
" <td style=\"padding-left: 0.5em;\">\n"
" <div id=\"projectbrief\">$projectbrief</div>\n"
" </td>\n"
" <!--END PROJECT_BRIEF-->\n"
" <!--END !PROJECT_NAME-->\n"
" <!--BEGIN DISABLE_INDEX-->\n"
" <!--BEGIN SEARCHENGINE-->\n"
" <td>$searchbox</td>\n"
" <!--END SEARCHENGINE-->\n"
" <!--END DISABLE_INDEX-->\n"
" </tr>\n"
" </tbody>\n"
"</table>\n"
"</div>\n"
"<!--END TITLEAREA-->\n"
...@@ -551,6 +551,29 @@ void HtmlDocVisitor::visit(DocSimpleSectSep *) ...@@ -551,6 +551,29 @@ void HtmlDocVisitor::visit(DocSimpleSectSep *)
m_t << "<dd>" << endl; m_t << "<dd>" << endl;
} }
void HtmlDocVisitor::visit(DocCite *cite)
{
if (m_hide) return;
if (!cite->file().isEmpty())
{
startLink(cite->ref(),cite->file(),cite->relPath(),cite->anchor());
}
else
{
m_t << "<b>[";
}
filter(cite->text());
if (!cite->file().isEmpty())
{
endLink();
}
else
{
m_t << "]</b>";
}
}
//-------------------------------------- //--------------------------------------
// visitor functions for compound nodes // visitor functions for compound nodes
//-------------------------------------- //--------------------------------------
...@@ -913,7 +936,7 @@ void HtmlDocVisitor::visitPre(DocSimpleSect *s) ...@@ -913,7 +936,7 @@ void HtmlDocVisitor::visitPre(DocSimpleSect *s)
case DocSimpleSect::Post: case DocSimpleSect::Post:
m_t << theTranslator->trPostcondition(); break; m_t << theTranslator->trPostcondition(); break;
case DocSimpleSect::Copyright: case DocSimpleSect::Copyright:
m_t << "Copyright" /* TODO: theTranslator->trCopyright() */; break; m_t << theTranslator->trCopyright(); break;
case DocSimpleSect::Invar: case DocSimpleSect::Invar:
m_t << theTranslator->trInvariant(); break; m_t << theTranslator->trInvariant(); break;
case DocSimpleSect::Remark: case DocSimpleSect::Remark:
......
...@@ -52,6 +52,7 @@ class HtmlDocVisitor : public DocVisitor ...@@ -52,6 +52,7 @@ class HtmlDocVisitor : public DocVisitor
void visit(DocFormula *); void visit(DocFormula *);
void visit(DocIndexEntry *); void visit(DocIndexEntry *);
void visit(DocSimpleSectSep *); void visit(DocSimpleSectSep *);
void visit(DocCite *);
//-------------------------------------- //--------------------------------------
// visitor functions for compound nodes // visitor functions for compound nodes
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -176,7 +176,7 @@ bool setTranslator(const char *langName) ...@@ -176,7 +176,7 @@ bool setTranslator(const char *langName)
} }
#endif #endif
#ifdef LANG_AM #ifdef LANG_AM
else if (L_EQUAL("amerenian")) else if (L_EQUAL("armenian"))
{ {
theTranslator=new TranslatorArmenian; theTranslator=new TranslatorArmenian;
} }
......
This diff is collapsed.
...@@ -53,6 +53,7 @@ class LatexDocVisitor : public DocVisitor ...@@ -53,6 +53,7 @@ class LatexDocVisitor : public DocVisitor
void visit(DocFormula *); void visit(DocFormula *);
void visit(DocIndexEntry *); void visit(DocIndexEntry *);
void visit(DocSimpleSectSep *); void visit(DocSimpleSectSep *);
void visit(DocCite *);
//-------------------------------------- //--------------------------------------
// visitor functions for compound nodes // visitor functions for compound nodes
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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