Commit 2f790207 authored by dimitri's avatar dimitri

Release-1.2.9-20010819

parent eed68005
DOXYGEN Version 1.2.9-20010812
DOXYGEN Version 1.2.9-20010819
Please read the installation section of the manual for instructions.
--------
Dimitri van Heesch (12 August 2001)
Dimitri van Heesch (19 August 2001)
......@@ -11,6 +11,7 @@ irix-dcc
irix-g++
irix-n32
linux-g++
macosx-c++
netbsd-g++
openbsd-g++
osf1-cxx
......
DOXYGEN Version 1.2.9_20010812
DOXYGEN Version 1.2.9_20010819
Please read INSTALL for compilation instructions.
......@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (12 August 2001)
Dimitri van Heesch (dimitri@stack.nl) (19 August 2001)
1.2.9-20010812
1.2.9-20010819
......@@ -232,7 +232,9 @@ class SimpleSectHandler : public DocNode,
enum Types { See, Return, Author, Version,
Since, Date, Bug, Note,
Warning, Par, Deprecated, Pre,
Post, Invar, Remark, Attention
Post, Invar, Remark, Attention,
Todo, Test, RCS, EnumValues,
Examples
};
SimpleSectHandler(IBaseHandler *parent);
virtual ~SimpleSectHandler();
......
......@@ -21,6 +21,13 @@
#include <qdict.h>
#include <qlist.h>
//#define USE_DOM
#define USE_SAX
#ifdef USE_DOM
#include <qdom.h>
#endif
class ErrorHandler : public QXmlErrorHandler
{
public:
......@@ -55,9 +62,13 @@ int main(int argc,char **argv)
exit(1);
}
//for (;;)
//{
QFile xmlFile(argv[1]);
if (!xmlFile.open( IO_ReadOnly ))
{
qFatal("Could not read %s",argv[1] );
}
#ifdef USE_SAX
MainHandler handler;
ErrorHandler errorHandler;
QXmlInputSource source( xmlFile );
......@@ -65,7 +76,32 @@ int main(int argc,char **argv)
reader.setContentHandler( &handler );
reader.setErrorHandler( &errorHandler );
reader.parse( source );
//}
#endif
#ifdef USE_DOM
QDomDocument doc;
doc.setContent( &xmlFile );
QDomElement de = doc.documentElement();
printf("docElem=%s\n",de.tagName().data());
QDomNode n = de.firstChild();
while( !n.isNull() )
{
QDomElement e = n.toElement(); // try to convert the node to an element.
if( !e.isNull() )
{ // the node was really an element.
printf("direct child %s id=%s kind=%s\n",
e.tagName().data(),
e.attribute("id").data(),
e.attribute("kind").data()
);
}
n = n.nextSibling();
}
#endif
return 0;
}
......
......@@ -27,6 +27,7 @@ f_prefix=/usr
f_insttool=NO
f_english=NO
f_wizard=NO
f_langs=nl,se,cz,fr,it,de,jp,es,fi,ru,hr,pl,pt,hu,kr,ro,si,cn,no,br,dk,sk,ua
while test -n "$1"; do
case $1 in
......@@ -51,6 +52,9 @@ while test -n "$1"; do
--english-only | -english-only)
f_english=YES
;;
--enable-langs | -enable-langs)
shift; f_langs=$1
;;
--platform | -platform)
shift; f_platform=$1
;;
......@@ -86,7 +90,7 @@ if test "$f_help" = y; then
Usage: $0 [--help] [--shared] [--static] [--release] [--debug]
[--perl name] [--make name] [--dot name] [--platform target]
[--prefix dir] [--docdir dir] [--install name] [--english-only]
[--with-doxywizard]
[----enable-langs list] [--with-doxywizard]
Options:
......@@ -112,6 +116,8 @@ Options:
--install name Use \`name' as the name of the GNU install tool
[default: autodetect]
--english-only Include support for English only.
--enable-langs list Include support for output languages listed in list.
[default: $f_langs]
--with-doxywizard Build the GUI frontend for doxygen. This
requires Qt 2.x.x
......@@ -344,6 +350,7 @@ if test "$f_perl" = NO; then
fi
echo "using $f_perl";
# -----------------------------------------------------------------------------
test -f .makeconfig && rm .makeconfig
......@@ -450,3 +457,20 @@ EOF
echo " Created $DST from $SRC..."
done
# - generating src/lang_cfg.h
echo -n " Generating src/lang_cfg.h..."
echo $f_langs | $f_perl -e '@l=split(/,/,<STDIN>);
chomp @l;
@allowed=(NL,SE,CZ,FR,IT,DE,JP,ES,FI,RU,HR,PL,PT,HU,KR,RO,SI,CN,NO,BR,
DK,SK,UA);
foreach my $elem (@l){
$elem =~ tr/a-z/A-Z/;
$r=0;
foreach my $tst (@allowed){
if ($tst eq $elem) { $r=1; last; }
}
if ($r!=1) { die "ERROR: Invalid language $elem was selected!\n"; }
print "#define LANG_$elem\n";
};' > ./src/lang_cfg.h
echo
......@@ -61,6 +61,7 @@ documentation:
<li> \refitem cmddefgroup \defgroup
<li> \refitem cmddeprecated \deprecated
<li> \refitem cmddontinclude \dontinclude
<li> \refitem cmddotfile \dotfile
<li> \refitem cmde \e
<li> \refitem cmdelse \else
<li> \refitem cmdelseif \elseif
......@@ -758,6 +759,32 @@ Public/Protected/Private/... section.
*/
\endverbatim
You can also use conditional commands inside aliases. To
document a class in two languages you could for instance use:
\par Example 2:
\verbatim
/*! \english
* This is English.
* \endenglish
* \dutch
* Dit is Nederlands.
* \enddutch
*/
class Example
{
};
\endverbatim
<p>Where the following aliases are defined in the configuration file:<p>
\verbatim
ALIASES = "english=\if english" \
"endenglish=\endif" \
"dutch=\if dutch" \
"enddutch=\endif"
\endverbatim
and \c ENABLED_SECTIONS can be used to enable either \c english or \c dutch.
\sa sections \ref cmdendif "\\endif", \ref cmdifnot "\\ifnot",
\ref cmdelse "\\else", and \ref cmdelseif "\\elseif".
......@@ -1331,6 +1358,24 @@ Public/Protected/Private/... section.
\sa section \ref cmdendcode "\\endcode", section \ref cmdverbatim "\\verbatim"
<hr>
\subsection cmddotfile \dotfile <file> ["caption"]
\addindex \dotfile
Inserts an image generated by dot from \<file\> into the documentation.
The first argument specifies the file name of the image.
doxygen will look for files in the paths (or files) that you specified
after the \ref cfg_dotfile_dirs "DOTFILE_DIRS" tag.
If the dot file is found it will be used as an input file to the dot tool.
The resulting image will be put into the correct output directory.
If the dot file name contains spaces you'll have to put quotes (") around it.
The second argument is optional and can be used to specify the caption
that is displayed below the image. This argument has to be specified
between quotes even if it does not contain any spaces. The quotes are
stripped before the caption is displayed.
<hr>
\subsection cmde \e <word>
......@@ -1443,7 +1488,7 @@ Public/Protected/Private/... section.
\ref cmdlatexonly "\\latexonly".
<hr>
\subsection cmdimage \image <format> <file> ["<caption>"] [<sizeindication>=<size>]
\subsection cmdimage \image <format> <file> ["caption"] [<sizeindication>=<size>]
\addindex \image
Inserts an image into the documentation. This command is format
......
......@@ -84,6 +84,7 @@ followed by the descriptions of the tags grouped by category.
<li> \refitem cfg_doc_abspath DOC_ABSPATH
<li> \refitem cfg_doc_url DOC_URL
<li> \refitem cfg_dot_path DOT_PATH
<li> \refitem cfg_dotfile_dirs DOTFILE_DIRS
<li> \refitem cfg_enable_preprocessing ENABLE_PREPROCESSING
<li> \refitem cfg_enum_values_per_line ENUM_VALUES_PER_LINE
<li> \refitem cfg_enabled_sections ENABLED_SECTIONS
......@@ -1184,6 +1185,13 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre>
This tag can be used to specify the path where the dot tool can be found.
If left blank, it is assumed the dot tool can be found on the path.
\anchor cfg_dotfile_dirs
<dt>\c DOTFILE_DIRS <dd>
\addindex DOTFILE_DIRS
This tag can be used to specify one or more directories that
contain dot files that are included in the documentation (see the
\\dotfile command).
\anchor cfg_max_dot_graph_height
<dt>\c MAX_DOT_GRAPH_HEIGHT <dd>
\addindex MAX_DOT_GRAPH_HEIGHT
......
......@@ -25,7 +25,7 @@ Doxygen has built-in support for multiple languages. This means
that the text fragments that doxygen generates can be produced in
languages other than English (the default) at configuration time.
Currently (version 1.2.8-20010726), 24 languages
Currently (version 1.2.9-20010812), 24 languages
are supported (sorted alphabetically):
Brazilian Portuguese, Chinese, Croatian, Czech, Danish,
Dutch, English, Finnish, French, German,
......@@ -70,8 +70,8 @@ when the translator was updated.
</TR>
<TR BGCOLOR="#ffffff">
<TD>Czech</TD>
<TD>Petr P&#x0159;ikryl<br>Vlastimil Havran</TD>
<TD>prikrylp@NOSPAM.skil.cz<br>havran@NOSPAM.fel.cvut.cz</TD>
<TD>Petr P&#x0159;ikryl</TD>
<TD>prikrylp@NOSPAM.skil.cz</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
......@@ -120,7 +120,7 @@ when the translator was updated.
<TD>Italian</TD>
<TD>Ahmed Aldo Faisal<br>Alessandro Falappa</TD>
<TD>aaf23@NOSPAM.cam.ac.uk<br>a.falappa@NOSPAM.flashnet.it</TD>
<TD>1.2.7</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Japanese</TD>
......@@ -212,7 +212,6 @@ when the translator was updated.
Croatian & Boris Bralo & {\tt boris.bralo@zg.tel.hr} & up-to-date \\
\hline
Czech & Petr P\v{r}ikryl & {\tt prikrylp@skil.cz} & up-to-date \\
& Vlastimil Havran & {\tt havran@fel.cvut.cz} & \\
\hline
Danish & Erik S\o{}e S\o{}rensen & {\tt erik@mail.nu} & 1.2.7 \\
\hline
......@@ -229,7 +228,7 @@ when the translator was updated.
\hline
Hungarian & F\"{o}ldv\'{a}ri Gy\"{o}rgy & {\tt foldvari@diatronltd.com} & 1.2.1 \\
\hline
Italian & Ahmed Aldo Faisal & {\tt aaf23@cam.ac.uk} & 1.2.7 \\
Italian & Ahmed Aldo Faisal & {\tt aaf23@cam.ac.uk} & up-to-date \\
& Alessandro Falappa & {\tt a.falappa@flashnet.it} & \\
\hline
Japanese & Kenji Nagamatsu & {\tt naga@joyful.club.ne.jp} & 1.2.5 \\
......
......@@ -12,7 +12,6 @@ Boris Bralo: boris.bralo@zg.tel.hr
Czech
Petr P&rcaron;ikryl: prikrylp@skil.cz
Vlastimil Havran: havran@fel.cvut.cz
Danish
Erik S&oslash;e S&oslash;rensen: erik@mail.nu
......
......@@ -202,7 +202,16 @@ PREDEFINED = "DECLARE_INTERFACE(name)=class name" \
"ASSERT_VALID(x)=assert(x)" \
"TRACE0(x)=printf(x)" \
"OS_ERR(A,B)={ #A, B }" \
__cplusplus
__cplusplus \
"DECLARE_OLECREATE(class)= " \
"BEGIN_DISPATCH_MAP(class1, class2)= " \
"BEGIN_INTERFACE_MAP(class1, class2)= " \
"INTERFACE_PART(class, id, name)= " \
"END_INTERFACE_MAP()=" \
"DISP_FUNCTION(class, name, function, result, id)=" \
"END_DISPATCH_MAP()=" \
"IMPLEMENT_OLECREATE2(class, name, id1, id2, id3, id4,\
id5, id6, id7, id8, id9, id10, id11)="
\endverbatim
As you can see doxygen's preprocessor is quite powerful, but if you want
......
Name: doxygen
Version: 1.2.9_20010812
Version: 1.2.9_20010819
Summary: documentation system for C, C++ and IDL
Release: 4
Source: doxygen-%{version}.src.tar.gz
......
......@@ -1072,7 +1072,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
// write examples
if (exampleFlag)
{
ol.startDescList();
ol.startDescList(BaseOutputDocInterface::Examples);
ol.startBold();
parseText(ol,theTranslator->trExamples()+": ");
ol.endBold();
......@@ -1199,6 +1199,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
{
msg("Generating docs for nested compound %s...\n",innerCd->name().data());
innerCd->writeDocumentation(ol);
innerCd->writeMemberList(ol);
}
}
}
......@@ -1541,6 +1542,7 @@ bool ClassDef::isLinkableInProject() const
{
return !name().isEmpty() && /* no name */
//m_isTemplBaseClass==-1 && /* template base class */
!m_artificial &&
name().find('@')==-1 && /* anonymous compound */
(m_prot!=Private || Config_getBool("EXTRACT_PRIVATE")) && /* private */
hasDocumentation() && /* documented */
......
......@@ -36,8 +36,8 @@
#define YY_NEVER_INTERACTIVE 1
#define SCOPEBLOCK (void *)1
#define INNERBLOCK (void *)2
#define SCOPEBLOCK (int *)4
#define INNERBLOCK (int *)8
/*! local class definition, used for classes that are defined
* inside code fragments.
......@@ -109,7 +109,7 @@ static QCString g_parmName;
static bool g_inClass;
static QCString g_classScope;
static QCString g_realScope;
static QStack<void> g_scopeStack; // 1 if bracket starts a scope, 2 for internal blocks
static QStack<int> g_scopeStack; // 1 if bracket starts a scope, 2 for internal blocks
static CodeClassDef g_ccd;
static CodeVarDef g_cvd;
static bool g_exampleBlock;
......@@ -939,7 +939,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
}
else
{
g_scopeStack.push((void *)2);
g_scopeStack.push(INNERBLOCK);
}
BEGIN( Body );
}
......
......@@ -1413,11 +1413,6 @@ void Config::create()
"Doxygen uses this value to replace tabs by spaces in code fragments. \n",
1,16,8
);
cl = addList(
"ENABLED_SECTIONS",
"The ENABLED_SECTIONS tag can be used to enable conditional \n"
"documentation sections, marked by \\if sectionname ... \\endif. \n"
);
cb = addBool(
"GENERATE_TODOLIST",
"The GENERATE_TODOLIST tag can be used to enable (YES) or \n"
......@@ -1448,6 +1443,11 @@ void Config::create()
"will result in a user defined paragraph with heading \"Side Effects:\". \n"
"You can put \\n's in the value part of an alias to insert newlines. \n"
);
cl = addList(
"ENABLED_SECTIONS",
"The ENABLED_SECTIONS tag can be used to enable conditional \n"
"documentation sections, marked by \\if sectionname ... \\endif. \n"
);
ci = addInt(
"MAX_INITIALIZER_LINES",
"The MAX_INITIALIZER_LINES tag determines the maximum number of lines \n"
......@@ -2076,6 +2076,14 @@ void Config::create()
);
cs->setWidgetType(ConfigString::Dir);
cs->addDependency("HAVE_DOT");
cl = addList(
"DOTFILE_DIRS",
"The DOTFILE_DIRS tag can be used to specify one or more directories that \n"
"contain dot files that are included in the documentation (see the \n"
"\\dotfile command). \n"
);
cl->setWidgetType(ConfigList::Dir);
cl->addDependency("HAVE_DOT");
ci = addInt(
"MAX_DOT_GRAPH_WIDTH",
"The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width \n"
......
......@@ -95,6 +95,8 @@ static bool insidePre = FALSE;
static int depthIf;
static QCString curImageName;
static QCString curImageCaption;
static QCString curDotFileName;
static QCString curDotFileCaption;
static QCString internalRefFile;
static QCString internalRefAnchor;
static QStack<char> currentListIndent; // indent stack of all list items
......@@ -674,9 +676,10 @@ enum ImageTypes
IT_RTF
};
// search for an image in the imageNameDict and if found
// copies the image to the output directory (which is the
// html directory if type==0 or the latex directory if type==1)
/*! search for an image in the imageNameDict and if found
* copies the image to the output directory (which is the
* html directory if type==0 or the latex directory if type==1)
*/
static QCString findAndCopyImage(const char *fileName,ImageTypes type)
{
QCString result;
......@@ -794,6 +797,39 @@ void writeImage(ImageTypes it,const char *size)
outDoc->popGeneratorState();
}
// search for a dot file in the dotFileNameDict, and if found
// generates the graph in the output directories.
static void writeDotFile(const char *fileName, const char *captionText)
{
bool ambig;
FileDef *fd;
bool hasCaption = captionText!=0;
if ((fd=findFileDef(Doxygen::dotFileNameDict,fileName,ambig)))
{
outDoc->startDotFile(fd->absFilePath(),hasCaption);
if (hasCaption)
{
scanString(captionText);
}
outDoc->endDotFile(hasCaption);
}
else if (ambig)
{
QCString text;
text.sprintf("Warning: dot file name %s is ambigious.\n",fileName);
text+="Possible candidates:\n";
text+=showFileDefMatches(Doxygen::dotFileNameDict,fileName);
warn(yyFileName,yyLineNr,text);
}
else
{
warn(yyFileName,yyLineNr,
"Warning: dot file %s is not found in DOTFILE_DIRS! ",fileName
);
}
}
/* ----------------------------------------------------------------- */
#undef YY_INPUT
......@@ -928,6 +964,8 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
%x DocLatexImageOpt
%x DocRtfImageName
%x DocRtfImageOpt
%x DocDotFile
%x DocDotFileOpt
%%
......@@ -1131,7 +1169,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (b) endBlock();
inParBlock=TRUE;
currentListIndent.push("D");
outDoc->startDescList();
outDoc->startDescList(BaseOutputDocInterface::Par);
outDoc->startBold();
outDoc->docify(title);
outDoc->endBold();
......@@ -1151,7 +1189,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inWarningBlock=TRUE;
currentListIndent.push("D");
outDoc->startDescList();
outDoc->startDescList(BaseOutputDocInterface::Warning);
outDoc->startBold();
scanString(theTranslator->trWarning()+": ");
outDoc->endBold();
......@@ -1170,7 +1208,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inRemarkBlock=TRUE;
currentListIndent.push("D");
outDoc->startDescList();
outDoc->startDescList(BaseOutputDocInterface::Remark);
outDoc->startBold();
scanString(theTranslator->trRemarks()+": ");
outDoc->endBold();
......@@ -1189,7 +1227,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inAttentionBlock=TRUE;
currentListIndent.push("D");
outDoc->startDescList();
outDoc->startDescList(BaseOutputDocInterface::Attention);
outDoc->startBold();
scanString(theTranslator->trAttention()+": ");
outDoc->endBold();
......@@ -1208,7 +1246,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inNoteBlock=TRUE;
currentListIndent.push("D");
outDoc->startDescList();
outDoc->startDescList(BaseOutputDocInterface::Note);
outDoc->startBold();
scanString(theTranslator->trNote()+": ");
outDoc->endBold();
......@@ -1227,7 +1265,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inPreBlock=TRUE;
currentListIndent.push("D");
outDoc->startDescList();
outDoc->startDescList(BaseOutputDocInterface::Pre);
outDoc->startBold();
scanString(theTranslator->trPrecondition()+": ");
outDoc->endBold();
......@@ -1246,7 +1284,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inPostBlock=TRUE;
currentListIndent.push("D");
outDoc->startDescList();
outDoc->startDescList(BaseOutputDocInterface::Post);
outDoc->startBold();
scanString(theTranslator->trPostcondition()+": ");
outDoc->endBold();
......@@ -1265,7 +1303,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inInvarBlock=TRUE;
currentListIndent.push("D");
outDoc->startDescList();
outDoc->startDescList(BaseOutputDocInterface::Invar);
outDoc->startBold();
scanString(theTranslator->trInvariant()+": ");
outDoc->endBold();
......@@ -1284,7 +1322,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inVersionBlock=TRUE;
currentListIndent.push("D");
outDoc->startDescList();
outDoc->startDescList(BaseOutputDocInterface::Version);
outDoc->startBold();
scanString(theTranslator->trVersion()+": ");
outDoc->endBold();
......@@ -1303,7 +1341,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inSinceBlock=TRUE;
currentListIndent.push("D");
outDoc->startDescList();
outDoc->startDescList(BaseOutputDocInterface::Since);
outDoc->startBold();
scanString(theTranslator->trSince()+": ");
outDoc->endBold();
......@@ -1322,7 +1360,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inDateBlock=TRUE;
currentListIndent.push("D");
outDoc->startDescList();
outDoc->startDescList(BaseOutputDocInterface::Date);
outDoc->startBold();
scanString(theTranslator->trDate()+": ");
outDoc->endBold();
......@@ -1345,7 +1383,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
endArgumentList();
if (inBlock()) endBlock();
currentListIndent.push("D");
outDoc->startDescList();
outDoc->startDescList(BaseOutputDocInterface::Todo);
outDoc->startBold();
outDoc->writeObjectLink(0,"todo",item->listAnchor,theTranslator->trTodo()+": ");
outDoc->endBold();
......@@ -1367,7 +1405,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
endArgumentList();
if (inBlock()) endBlock();
currentListIndent.push("D");
outDoc->startDescList();
outDoc->startDescList(BaseOutputDocInterface::Test);
outDoc->startBold();
outDoc->writeObjectLink(0,"test",item->listAnchor,theTranslator->trTest()+": ");
outDoc->endBold();
......@@ -1389,7 +1427,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
endArgumentList();
if (inBlock()) endBlock();
currentListIndent.push("D");
outDoc->startDescList();
outDoc->startDescList(BaseOutputDocInterface::Bug);
outDoc->startBold();
outDoc->writeObjectLink(0,"bug",item->listAnchor,theTranslator->trBug()+": ");
outDoc->endBold();
......@@ -1407,7 +1445,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inDeprecatedBlock=TRUE;
currentListIndent.push("D");
outDoc->startDescList();
outDoc->startDescList(BaseOutputDocInterface::Deprecated);
outDoc->startBold();
scanString(theTranslator->trDeprecated()+": ");
outDoc->endBold();
......@@ -1428,7 +1466,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
endArgumentList();
if (inBlock()) endBlock();
currentListIndent.push("D");
outDoc->startDescList();
outDoc->startDescList(BaseOutputDocInterface::RCS);
outDoc->startBold();
scanString(tagName+": ");
outDoc->endBold();
......@@ -1445,7 +1483,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inAuthorBlock=TRUE;
currentListIndent.push("D");
outDoc->startDescList();
outDoc->startDescList(BaseOutputDocInterface::Author);
outDoc->startBold();
bool singular = ((QString)yytext).find('s')==-1;
scanString(theTranslator->trAuthor(TRUE,singular)+": ");
......@@ -1465,7 +1503,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inReturnBlock=TRUE;
currentListIndent.push("D");
outDoc->startDescList();
outDoc->startDescList(BaseOutputDocInterface::Return);
outDoc->startBold();
scanString(theTranslator->trReturns()+": ");
outDoc->endBold();
......@@ -1480,7 +1518,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inSeeBlock=TRUE;
currentListIndent.push("D");
outDoc->startDescList();
outDoc->startDescList(BaseOutputDocInterface::See);
outDoc->startBold();
scanString(theTranslator->trSeeAlso()+": ");
outDoc->endBold();
......@@ -1832,6 +1870,30 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
outDoc->enableAll();
BEGIN(DocScan);
}
<DocScan>{CMD}"dotfile"{B}* {
BEGIN(DocDotFile);
}
<DocDotFile>{FILE} {
curDotFileName = stripQuotes(yytext);
curDotFileCaption.resize(0);
if (curDotFileName.isEmpty())
{
BEGIN(DocScan);
}
else
{
BEGIN(DocDotFileOpt);
}
}
<DocDotFileOpt>\n {
writeDotFile(curDotFileName,curDotFileCaption);
BEGIN(DocScan);
}
<DocDotFileOpt>\"[^\n"]*\" {
curDotFileCaption = stripQuotes(yytext);
writeDotFile(curDotFileName,curDotFileCaption);
BEGIN(DocScan);
}
<DocScan>{CMD}"code"({BN}*"\n"|{B}*) {
outDoc->startCodeFragment();
codeBlock.resize(0);
......
......@@ -1506,3 +1506,23 @@ void generateGraphLegend(const char *path)
QDir::setCurrent(oldDir);
}
void writeDotGraphFromFile(const char *inFile,const char *outFile,
GraphOutputFormat format)
{
QCString dotArgs(4096);
if (format==GIF)
{
dotArgs.sprintf("-Tgif \"%s\" -o \"%s.gif\"",inFile,outFile);
}
else // format==EPS
{
dotArgs.sprintf("-Tps \"%s\" -o \"%s.eps\"",inFile,outFile);
}
QCString dotExe = Config_getString("DOT_PATH")+"dot";
//printf("Running: %s %s\n",dotExe.data(),dotArgs.data());
if (iSystem(dotExe,dotArgs)!=0)
{
err("Problems running dot. Check your installation!\n");
}
}
......@@ -160,4 +160,6 @@ class DotInclDepGraph
};
void generateGraphLegend(const char *path);
void writeDotGraphFromFile(const char *inFile,const char *outFile,
GraphOutputFormat format);
......@@ -98,7 +98,7 @@ StringDict Doxygen::aliasDict(257); // aliases
FileNameDict *Doxygen::includeNameDict; // include names
FileNameDict *Doxygen::exampleNameDict; // examples
FileNameDict *Doxygen::imageNameDict; // images
//TypedefDict Doxygen::typedefDict(1009); // all typedefs
FileNameDict *Doxygen::dotFileNameDict; // dot files
StringDict Doxygen::namespaceAliasDict(257); // all namespace aliases
StringDict Doxygen::tagDestinationDict(257); // all tag locations
// a member group
......@@ -140,7 +140,7 @@ void clearAll()
Doxygen::includeNameDict->clear();
Doxygen::exampleNameDict->clear();
Doxygen::imageNameDict->clear();
//Doxygen::typedefDict.clear();
Doxygen::dotFileNameDict->clear();
Doxygen::groupDict.clear();
Doxygen::formulaDict.clear();
Doxygen::formulaNameDict.clear();
......@@ -159,8 +159,8 @@ void statistics()
Doxygen::exampleNameDict->statistics();
fprintf(stderr,"--- imageNameDict stats ----\n");
Doxygen::imageNameDict->statistics();
//fprintf(stderr,"--- classDict stats ----\n");
//Doxygen::classSDict.statistics();
fprintf(stderr,"--- dotFileNameDict stats ----\n");
Doxygen::dotFileNameDict->statistics();
fprintf(stderr,"--- namespaceDict stats ----\n");
Doxygen::namespaceDict.statistics();
fprintf(stderr,"--- memberNameDict stats ----\n");
......@@ -6702,6 +6702,7 @@ void parseInput()
Doxygen::includeNameDict = new FileNameDict(1009);
Doxygen::exampleNameDict = new FileNameDict(1009);
Doxygen::imageNameDict = new FileNameDict(257);
Doxygen::dotFileNameDict = new FileNameDict(257);
if (!Config_getString("DOC_URL").isEmpty())
{
......@@ -6768,6 +6769,16 @@ void parseInput()
s=imagePathList.next();
}
msg("Searching for dot files...\n");
QStrList &dotFileList=Config_getList("DOTFILE_DIRS");
s=dotFileList.first();
while (s)
{
readFileOrDirectory(s,0,Doxygen::dotFileNameDict,0,0,
0,0,0);
s=dotFileList.next();
}
msg("Searching for files to exclude\n");
QStrList &excludeList = Config_getList("EXCLUDE");
s=excludeList.first();
......
......@@ -68,6 +68,7 @@ class Doxygen
static FileNameDict *exampleNameDict;
static FileNameDict *inputNameDict;
static FileNameDict *imageNameDict;
static FileNameDict *dotFileNameDict;
static QStrList tagfileList;
static MemberNameList memberNameList;
static MemberNameList functionNameList;
......@@ -79,7 +80,6 @@ class Doxygen
static QTextStream tagFile;
static SectionDict sectionDict;
static FileNameList inputNameList;
//static TypedefDict typedefDict;
static StringDict namespaceAliasDict;
static GroupList groupList;
static GroupDict groupDict;
......
......@@ -858,6 +858,39 @@ void HtmlGenerator::endImage(bool hasCaption)
t << "</div>" << endl;
}
void HtmlGenerator::startDotFile(const char *name,bool hasCaption)
{
QCString baseName=name;
int i;
if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
QCString outName = Config_getString("HTML_OUTPUT")+
#ifdef _WIN32
"\\"
#else
"/"
#endif
+baseName;
writeDotGraphFromFile(name,outName,GIF);
t << "<div align=\"center\">" << endl;
t << "<img src=\"" << baseName << ".gif\" alt=\"" << baseName << "\">" << endl;
if (hasCaption)
{
t << "<p><strong>";
}
}
void HtmlGenerator::endDotFile(bool hasCaption)
{
if (hasCaption)
{
t << "</strong></p>" << endl;
}
t << "</div>" << endl;
}
void HtmlGenerator::startMemberDoc(const char *,const char *,const char *,const char *)
{
DBG_HTML(t << "<!-- startMemberDoc -->" << endl;)
......
......@@ -176,11 +176,10 @@ class HtmlGenerator : public OutputGenerator
void writeRing(char c) { t << "&" << c << "ring;"; }
void writeSharpS() { t << "&szlig;"; }
void writeCCedil(char c) { t << "&" << c << "cedil;"; }
void startDescList() { t << "<dl compact><dt><b>" << endl; }
void startDescList(SectionTypes) { t << "<dl compact><dt><b>" << endl; }
void endDescList() { t << "</dl>"; }
void startParamList(ParamListTypes)
{ startDescList(); }
void endParamList() { endDescList(); }
void startParamList(ParamListTypes) { t << "<dl compact><dt><b>" << endl; }
void endParamList() { t << "</dl>"; }
void endDescTitle() { t << "</b>"; }
void writeDescItem() { t << "<dd>" << endl; }
void startSection(const char *,const char *,bool);
......@@ -204,6 +203,8 @@ class HtmlGenerator : public OutputGenerator
void writeNonBreakableSpace(int);
void startImage(const char *,const char *,bool);
void endImage(bool);
void startDotFile(const char *,bool);
void endDotFile(bool);
void startDescTable()
{ t << "<table border=0 cellspacing=2 cellpadding=0>" << endl; }
......
#define LANG_NL
#define LANG_SE
#define LANG_CZ
#define LANG_FR
#define LANG_IT
#define LANG_DE
#define LANG_JP
#define LANG_ES
#define LANG_FI
#define LANG_RU
#define LANG_HR
#define LANG_PL
#define LANG_PT
#define LANG_HU
#define LANG_KR
#define LANG_RO
#define LANG_SI
#define LANG_CN
#define LANG_NO
#define LANG_BR
#define LANG_DK
#define LANG_SK
#define LANG_UA
......@@ -17,34 +17,81 @@
#include "message.h"
#include "language.h"
#include "lang_cfg.h"
#include "translator.h"
#include "translator_en.h"
#if !defined(ENGLISH_ONLY)
#include "translator_adapter.h"
#ifdef LANG_NL
#include "translator_nl.h"
#endif
#ifdef LANG_SE
#include "translator_se.h"
#endif
#ifdef LANG_CZ
#include "translator_cz.h"
#endif
#ifdef LANG_FR
#include "translator_fr.h"
#endif
#ifdef LANG_IT
#include "translator_it.h"
#endif
#ifdef LANG_DE
#include "translator_de.h"
#endif
#ifdef LANG_JP
#include "translator_jp.h"
#endif
#ifdef LANG_ES
#include "translator_es.h"
#endif
#ifdef LANG_FI
#include "translator_fi.h"
#endif
#ifdef LANG_RU
#include "translator_ru.h"
#endif
#ifdef LANG_HR
#include "translator_hr.h"
#endif
#ifdef LANG_PL
#include "translator_pl.h"
#endif
#ifdef LANG_PT
#include "translator_pt.h"
#endif
#ifdef LANG_HU
#include "translator_hu.h"
#endif
#ifdef LANG_KR
#include "translator_kr.h"
#endif
#ifdef LANG_RO
#include "translator_ro.h"
#endif
#ifdef LANG_SI
#include "translator_si.h"
#endif
#ifdef LANG_CN
#include "translator_cn.h"
#endif
#ifdef LANG_NO
#include "translator_no.h"
#endif
#ifdef LANG_BR
#include "translator_br.h"
#endif
#ifdef LANG_DK
#include "translator_dk.h"
#endif
#ifdef LANG_SK
#include "translator_sk.h"
#endif
#ifdef LANG_UA
#include "translator_ua.h"
#endif
#endif
#define L_EQUAL(a) !stricmp(langName,a)
......@@ -57,98 +104,144 @@ bool setTranslator(const char *langName)
theTranslator=new TranslatorEnglish;
}
#if !defined(ENGLISH_ONLY)
#ifdef LANG_NL
else if (L_EQUAL("dutch"))
{
theTranslator=new TranslatorDutch;
}
#endif
#ifdef LANG_SE
else if (L_EQUAL("swedish"))
{
theTranslator=new TranslatorSwedish;
}
#endif
#ifdef LANG_CZ
else if (L_EQUAL("czech"))
{
theTranslator=new TranslatorCzech;
}
#endif
#ifdef LANG_FR
else if (L_EQUAL("french"))
{
theTranslator=new TranslatorFrench;
}
#endif
#ifdef LANG_IT
else if (L_EQUAL("italian"))
{
theTranslator=new TranslatorItalian;
}
#endif
#ifdef LANG_DE
else if (L_EQUAL("german"))
{
theTranslator=new TranslatorGerman;
}
#endif
#ifdef LANG_JP
else if (L_EQUAL("japanese"))
{
theTranslator=new TranslatorJapanese;
}
#endif
#ifdef LANG_ES
else if (L_EQUAL("spanish"))
{
theTranslator=new TranslatorSpanish;
}
#endif
#ifdef LANG_FI
else if (L_EQUAL("finnish"))
{
theTranslator=new TranslatorFinnish;
}
#endif
#ifdef LANG_RU
else if (L_EQUAL("russian"))
{
theTranslator=new TranslatorRussian;
}
#endif
#ifdef LANG_HR
else if (L_EQUAL("croatian"))
{
theTranslator=new TranslatorCroatian;
}
#endif
#ifdef LANG_PL
else if (L_EQUAL("polish"))
{
theTranslator=new TranslatorPolish;
}
#endif
#ifdef LANG_PT
else if (L_EQUAL("portuguese"))
{
theTranslator=new TranslatorPortuguese;
}
#endif
#ifdef LANG_HU
else if (L_EQUAL("hungarian"))
{
theTranslator=new TranslatorHungarian;
}
#endif
#ifdef LANG_KR
else if (L_EQUAL("korean"))
{
theTranslator=new TranslatorKorean;
}
#endif
#ifdef LANG_RO
else if (L_EQUAL("romanian"))
{
theTranslator=new TranslatorRomanian;
}
#endif
#ifdef LANG_SI
else if (L_EQUAL("slovene"))
{
theTranslator=new TranslatorSlovene;
}
#endif
#ifdef LANG_CN
else if (L_EQUAL("chinese"))
{
theTranslator=new TranslatorChinese;
}
#endif
#ifdef LANG_NO
else if (L_EQUAL("norwegian"))
{
theTranslator=new TranslatorNorwegian;
}
#endif
#ifdef LANG_BR
else if (L_EQUAL("brazilian"))
{
theTranslator=new TranslatorBrazilian;
}
#endif
#ifdef LANG_DK
else if (L_EQUAL("danish"))
{
theTranslator=new TranslatorDanish;
}
#endif
#ifdef LANG_SK
else if (L_EQUAL("slovak"))
{
theTranslator=new TranslatorSlovak;
}
#endif
#ifdef LANG_UA
else if (L_EQUAL("ukrainian"))
{
theTranslator=new TranslatorUkrainian;
}
#endif
#endif
else // use the default language (i.e. english)
{
......
......@@ -223,8 +223,7 @@ static void writeDefaultHeaderPart1(QTextStream &t)
"\\usepackage{fancyhdr}\n"
"\\usepackage{graphicx}\n"
"\\usepackage{float}\n"
"\\usepackage{alltt}\n"
"\\usepackage{doxygen}\n";
"\\usepackage{alltt}\n";
if (Config_getBool("PDF_HYPERLINKS"))
{
t << "\\usepackage{times}" << endl;
......@@ -254,6 +253,7 @@ static void writeDefaultHeaderPart1(QTextStream &t)
t << sLanguageSupportCommand;
}
t << "\\usepackage{doxygen}\n";
QStrList &extraPackages = Config_getList("EXTRA_PACKAGES");
const char *s=extraPackages.first();
while (s)
......@@ -1553,6 +1553,43 @@ void LatexGenerator::endImage(bool hasCaption)
}
}
void LatexGenerator::startDotFile(const char *name,bool hasCaption)
{
QCString baseName=name;
int i;
if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
QCString outName = Config_getString("LATEX_OUTPUT")+
#ifdef _WIN32
"\\"
#else
"/"
#endif
+baseName;
writeDotGraphFromFile(name,outName,EPS);
if (hasCaption)
t << "\\begin{figure}[H]" << endl;
else
t << "\\mbox{";
t << "\\includegraphics";
t << "{" << baseName << ".eps}";
if (hasCaption)
t << "\\caption{";
else
t << "}" << endl;
}
void LatexGenerator::endDotFile(bool hasCaption)
{
if (hasCaption)
{
t << "}" << endl;
t << "\\end{figure}" << endl;
}
}
void LatexGenerator::startMemberGroupHeader(bool hasHeader)
{
......
......@@ -183,11 +183,10 @@ class LatexGenerator : public OutputGenerator
void writeCCedil(char c) { t << "\\c{" << c << "}"; }
void startMemberDescription() { t << "\\begin{CompactList}\\small\\item\\em "; }
void endMemberDescription() { t << "\\item\\end{CompactList}"; }
void startDescList() { t << "\\begin{Desc}\n\\item["; }
void startDescList(SectionTypes) { t << "\\begin{Desc}\n\\item["; }
void endDescList() { t << "\\end{Desc}" << endl; }
void startParamList(ParamListTypes)
{ startDescList(); }
void endParamList() { endDescList(); }
void startParamList(ParamListTypes) { t << "\\begin{Desc}\n\\item["; }
void endParamList() { t << "\\end{Desc}" << endl; }
void endDescTitle() { t << "]"; }
void writeDescItem() { t << "\\par" << endl; }
void startSection(const char *,const char *,bool);
......@@ -212,6 +211,8 @@ class LatexGenerator : public OutputGenerator
void writeNonBreakableSpace(int);
void startImage(const char *,const char *,bool);
void endImage(bool);
void startDotFile(const char *,bool);
void endDotFile(bool);
void startDescTable()
{ t << "\\begin{description}" << endl; }
......
......@@ -308,7 +308,17 @@ void ManGenerator::writeChar(char c)
paragraph=FALSE;
}
void ManGenerator::startDescList()
void ManGenerator::startDescList(SectionTypes)
{
if (!firstCol)
{ t << endl << ".PP" << endl;
firstCol=TRUE; paragraph=TRUE;
col=0;
}
paragraph=FALSE;
}
void ManGenerator::startParamList(ParamListTypes)
{
if (!firstCol)
{ t << endl << ".PP" << endl;
......
......@@ -170,10 +170,10 @@ class ManGenerator : public OutputGenerator
firstCol=FALSE; }
void startMemberDescription() { t << "\n.RI \"\\fI"; firstCol=FALSE; }
void endMemberDescription() { t << "\\fP\""; firstCol=FALSE; }
void startDescList();
void startDescList(SectionTypes);
void endDescList() {}
void startParamList(ParamListTypes) { startDescList(); }
void endParamList() { endDescList(); }
void startParamList(ParamListTypes);
void endParamList() {}
void endDescTitle();
void writeDescItem();
void startSection(const char *,const char *,bool);
......@@ -198,6 +198,8 @@ class ManGenerator : public OutputGenerator
void writeNonBreakableSpace(int n) { int i; for (i=0;i<n;i++) t << " "; }
void startImage(const char *,const char *,bool) {}
void endImage(bool) {}
void startDotFile(const char *,bool) {}
void endDotFile(bool) {}
void startDescTable() {}
void endDescTable() {}
......
......@@ -813,8 +813,9 @@ void MemberDef::writeDeclaration(OutputList &ol,
{
linkifyText(TextGeneratorOLImpl(ol),cname,name(),bitfields.simplifyWhiteSpace());
}
else if (!init.isEmpty() && initLines==0 && // one line initializer
((maxInitLines>0 && userInitLines==-1) || userInitLines>0) // enabled by default or explicitly
else if (hasOneLineInitializer()
//!init.isEmpty() && initLines==0 && // one line initializer
//((maxInitLines>0 && userInitLines==-1) || userInitLines>0) // enabled by default or explicitly
) // add initializer
{
if (!isDefine())
......@@ -889,7 +890,8 @@ bool MemberDef::isDetailedSectionLinkable() const
)
) ||
// has a multi-line initialization block
(initLines>0 && initLines<maxInitLines) ||
//(initLines>0 && initLines<maxInitLines) ||
hasMultiLineInitializer() ||
// has one or more documented arguments
(argList!=0 && argList->hasDocumentation());
......@@ -1081,8 +1083,9 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.startMemberDocName();
linkifyText(TextGeneratorOLImpl(ol),scopeName,name(),ldef);
writeDefArgumentList(ol,cd,scopeName,this);
if (!init.isEmpty() && initLines==0 && // one line initializer
((maxInitLines>0 && userInitLines==-1) || userInitLines>0) // enabled by default or explicitly
if (hasOneLineInitializer()
//!init.isEmpty() && initLines==0 && // one line initializer
// ((maxInitLines>0 && userInitLines==-1) || userInitLines>0) // enabled by default or explicitly
) // add initializer
{
if (!isDefine())
......@@ -1160,9 +1163,10 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.popGeneratorState();
/* write multi-line initializer (if any) */
if (initLines>0 && ((initLines<maxInitLines && userInitLines==-1) // implicitly enabled
|| initLines<userInitLines // explicitly enabled
)
if (hasMultiLineInitializer()
//initLines>0 && ((initLines<maxInitLines && userInitLines==-1) // implicitly enabled
// || initLines<userInitLines // explicitly enabled
// )
)
{
//printf("md=%s initLines=%d init=`%s'\n",name().data(),initLines,init.data());
......@@ -1205,10 +1209,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if (argList && argList->hasDocumentation())
{
//printf("***** argumentList is documented\n");
ol.startDescList();
ol.startBold();
ol.startParamList(BaseOutputDocInterface::Param);
parseText(ol,theTranslator->trParameters()+": ");
ol.endBold();
ol.endDescTitle();
ol.writeDescItem();
ol.startDescTable();
......@@ -1244,7 +1246,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if (first)
{
//ol.newParagraph();
ol.startDescList();
ol.startDescList(BaseOutputDocInterface::EnumValues);
ol.startBold();
parseText(ol,theTranslator->trEnumerationValues());
ol.docify(":");
......@@ -1441,7 +1443,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
// write the list of examples that use this member
if (hasExamples())
{
ol.startDescList();
ol.startDescList(BaseOutputDocInterface::Examples);
ol.startBold();
parseText(ol,theTranslator->trExamples()+": ");
//ol.writeBoldString("Examples: ");
......@@ -1637,3 +1639,16 @@ MemberDef *MemberDef::createTemplateInstanceMember(
return imd;
}
bool MemberDef::hasOneLineInitializer() const
{
return !init.isEmpty() && initLines==0 && // one line initializer
((maxInitLines>0 && userInitLines==-1) || userInitLines>0); // enabled by default or explicitly
}
bool MemberDef::hasMultiLineInitializer() const
{
return initLines>0 &&
((initLines<maxInitLines && userInitLines==-1) // implicitly enabled
|| initLines<userInitLines // explicitly enabled
);
}
......@@ -119,6 +119,8 @@ class MemberDef : public Definition
bool isExplicit() const { return (memSpec&Entry::Explicit)!=0; }
bool isMutable() const { return (memSpec&Entry::Mutable)!=0; }
bool isExternal() const { return explExt; }
bool hasOneLineInitializer() const;
bool hasMultiLineInitializer() const;
// output info
bool isLinkableInProject() const;
......
......@@ -228,16 +228,30 @@ void MemberList::writePlainDeclarations(OutputList &ol,
int enumMemCount=0;
QList<MemberDef> *fmdl=md->enumFieldList();
uint numVisibleEnumValues=0;
if (fmdl)
{
MemberDef *fmd=fmdl->first();
while (fmd)
{
if (fmd->isBriefSectionVisible()) numVisibleEnumValues++;
fmd=fmdl->next();
}
}
if (numVisibleEnumValues==0 && !md->isBriefSectionVisible()) break;
if (numVisibleEnumValues>0)
{
uint enumValuesPerLine = (uint)Config_getInt("ENUM_VALUES_PER_LINE");
typeDecl.docify("{ ");
QList<MemberDef> *fmdl=md->enumFieldList();
if (fmdl)
{
MemberDef *fmd=fmdl->first();
bool fmdVisible = fmd->isBriefSectionVisible();
while (fmd)
{
/* in html we start a new line after a number of items */
if (fmdl->count()>enumValuesPerLine
if (numVisibleEnumValues>enumValuesPerLine
&& (enumMemCount%enumValuesPerLine)==0
)
{
......@@ -248,6 +262,8 @@ void MemberList::writePlainDeclarations(OutputList &ol,
typeDecl.popGeneratorState();
}
if (fmdVisible)
{
if (fmd->hasDocumentation()) // enum value has docs
{
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
......@@ -266,20 +282,28 @@ void MemberList::writePlainDeclarations(OutputList &ol,
typeDecl.docify(fmd->name());
typeDecl.endBold();
}
if (!fmd->initializer().isEmpty()) // enum value has initializer
if (fmd->hasOneLineInitializer()) // enum value has initializer
{
typeDecl.writeString(" = ");
parseText(typeDecl,fmd->initializer());
}
}
bool prevVisible = fmdVisible;
fmd=fmdl->next();
if (fmd) typeDecl.writeString(", ");
if (fmd && (fmdVisible=fmd->isBriefSectionVisible()))
{
typeDecl.writeString(", ");
}
if (prevVisible)
{
typeDecl.disable(OutputGenerator::Man);
typeDecl.writeString("\n"); // to prevent too long lines in LaTeX
typeDecl.enable(OutputGenerator::Man);
enumMemCount++;
}
if (fmdl->count()>enumValuesPerLine)
}
if (numVisibleEnumValues>enumValuesPerLine)
{
typeDecl.pushGeneratorState();
typeDecl.disableAllBut(OutputGenerator::Html);
......@@ -289,6 +313,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
}
typeDecl.docify(" }");
md->setEnumDecl(typeDecl);
}
int enumVars=0;
MemberListIterator vmli(*this);
MemberDef *vmd;
......
......@@ -41,6 +41,13 @@ class BaseOutputDocInterface
{
public:
enum ParamListTypes { Param, RetVal, Exception };
enum SectionTypes { See, Return, Author, Version,
Since, Date, Bug, Note,
Warning, Par, Deprecated, Pre,
Post, Invar, Remark, Attention,
Todo, Test, RCS, EnumValues,
Examples
};
/*! Start of a bullet list: e.g. \c <ul> in html. writeListItem() is
* Used for the bullet items.
......@@ -207,7 +214,7 @@ class BaseOutputDocInterface
virtual void writeRing(char) = 0;
virtual void writeSharpS() = 0;
virtual void writeCCedil(char) = 0;
virtual void startDescList() = 0;
virtual void startDescList(SectionTypes t) = 0;
virtual void endDescList() = 0;
virtual void startParamList(ParamListTypes t) = 0;
virtual void endParamList() = 0;
......@@ -227,6 +234,8 @@ class BaseOutputDocInterface
virtual void writeNonBreakableSpace(int) = 0;
virtual void startImage(const char *,const char *,bool) = 0;
virtual void endImage(bool) = 0;
virtual void startDotFile(const char *,bool) = 0;
virtual void endDotFile(bool) = 0;
virtual void startDescTable() = 0;
virtual void endDescTable() = 0;
virtual void startDescTableTitle() = 0;
......
......@@ -262,6 +262,7 @@ FORALL1(DotClassGraph &a1,a1)
FORALL1(DotInclDepGraph &a1,a1)
FORALL1(DotGfxHierarchyTable &a1,a1)
FORALL1(ParamListTypes a1,a1)
FORALL1(SectionTypes a1,a1)
#if defined(HAS_BOOL_TYPE) || defined(Q_HAS_BOOL_TYPE)
FORALL1(bool a1,a1)
FORALL2(bool a1,int a2,a1,a2)
......
......@@ -306,8 +306,8 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startMemberDescription); }
void endMemberDescription()
{ forall(&OutputGenerator::endMemberDescription); }
void startDescList()
{ forall(&OutputGenerator::startDescList); }
void startDescList(SectionTypes t)
{ forall(&OutputGenerator::startDescList,t); }
void endDescList()
{ forall(&OutputGenerator::endDescList); }
void startParamList(ParamListTypes t)
......@@ -361,6 +361,10 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startImage,n,s,c); }
void endImage(bool c)
{ forall(&OutputGenerator::endImage,c); }
void startDotFile(const char *n,bool c)
{ forall(&OutputGenerator::startDotFile,n,c); }
void endDotFile(bool c)
{ forall(&OutputGenerator::endDotFile,c); }
void startDescTable()
{ forall(&OutputGenerator::startDescTable); }
......@@ -456,6 +460,7 @@ class OutputList : public OutputDocInterface
FORALLPROTO1(DotInclDepGraph &);
FORALLPROTO1(DotGfxHierarchyTable &);
FORALLPROTO1(ParamListTypes);
FORALLPROTO1(SectionTypes);
#if defined(HAS_BOOL_TYPE) || defined(Q_HAS_BOOL_TYPE)
FORALLPROTO1(bool);
FORALLPROTO2(bool,int);
......
......@@ -1926,7 +1926,7 @@ void RTFGenerator::endMemberDescription()
t << "\\par}" << endl;
}
void RTFGenerator::startDescList()
void RTFGenerator::startDescList(SectionTypes)
{
DBG_RTF(t << "{\\comment (startDescList)}" << endl)
t << "{";
......@@ -1942,6 +1942,24 @@ void RTFGenerator::endDescTitle()
t << Rtf_Style_Reset << Rtf_DList_DepthStyle();
}
void RTFGenerator::startParamList(ParamListTypes)
{
DBG_RTF(t << "{\\comment (startParamList)}" << endl)
t << "{";
newParagraph();
}
void RTFGenerator::endParamList()
{
DBG_RTF(t << "{\\comment (endParamList)}" << endl)
newParagraph();
t << "}";
decrementIndentLevel();
m_omitParagraph = TRUE;
//t << Rtf_Style_Reset << styleStack.top() << endl;
}
void RTFGenerator::writeDescItem()
{
DBG_RTF(t << "{\\comment (writeDescItem) }" << endl)
......@@ -2209,6 +2227,36 @@ void RTFGenerator::endImage(bool)
// not yet implemented
}
void RTFGenerator::startDotFile(const char *name,bool)
{
QCString baseName=name;
int i;
if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
QCString outName = Config_getString("RTF_OUTPUT")+
#ifdef _WIN32
"\\"
#else
"/"
#endif
+baseName;
writeDotGraphFromFile(name,outName,GIF);
newParagraph();
t << "{" << endl;
t << Rtf_Style_Reset << endl;
t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE ";
t << outName;
t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl;
}
void RTFGenerator::endDotFile(bool)
{
// not yet implemented
}
void RTFGenerator::startDescTable()
{
DBG_RTF(t << "{\\comment (startDescTable) }" << endl)
......
......@@ -166,10 +166,10 @@ class RTFGenerator : public OutputGenerator
void startMemberDescription();
void endMemberDescription();
void startDescList();
void startDescList(SectionTypes);
void endDescList();
void startParamList(ParamListTypes) { startDescList(); }
void endParamList() { endDescList(); }
void startParamList(ParamListTypes);
void endParamList();
void endDescTitle();
void writeDescItem();
void startSection(const char *,const char *,bool);
......@@ -194,6 +194,8 @@ class RTFGenerator : public OutputGenerator
void writeNonBreakableSpace(int);
void startImage(const char *,const char *,bool);
void endImage(bool);
void startDotFile(const char *,bool);
void endDotFile(bool);
void startDescTable();
void endDescTable();
......
......@@ -149,6 +149,7 @@ static bool insideFormula;
static bool insideTryBlock=FALSE;
static int depthIf;
static int initializerSharpCount;
//-----------------------------------------------------------------------------
......@@ -1320,6 +1321,7 @@ TITLE [tT][iI][tT][lL][eE]
<FindMembers>"=" {
current->bodyLine = yyLineNr;
lastInitializerContext = YY_START;
initializerSharpCount=0;
BEGIN(ReadInitializer);
}
/* Read initializer rules */
......@@ -1339,9 +1341,16 @@ TITLE [tT][iI][tT][lL][eE]
}
<ReadInitializer>[;,] {
//printf(">> initializer `%s' <<\n",current->initializer.data());
if (initializerSharpCount==0)
{
unput(*yytext);
BEGIN(lastInitializerContext);
}
else
{
current->initializer+=*yytext;
}
}
<ReadInitializer>\" {
if (insideIDL && insideCppQuote)
{
......@@ -1355,9 +1364,23 @@ TITLE [tT][iI][tT][lL][eE]
BEGIN(CopyString);
}
}
<ReadInitializer>"'"\\[0-7]{1,3}"'"
<ReadInitializer>"'"\\."'"
<ReadInitializer>"'".{1,4}"'"
<ReadInitializer>"<<" {
current->initializer+=yytext;
}
<ReadInitializer>">>" {
current->initializer+=yytext;
}
<ReadInitializer>\< {
initializerSharpCount++;
current->initializer+=*yytext;
}
<ReadInitializer>\> {
initializerSharpCount--;
current->initializer+=*yytext;
}
<ReadInitializer>"'"\\[0-7]{1,3}"'" |
<ReadInitializer>"'"\\."'" |
<ReadInitializer>"'".{1,4}"'" { current->initializer+=yytext; }
<ReadInitializer>\n {
current->initializer+=*yytext;
yyLineNr++;
......@@ -1547,6 +1570,7 @@ TITLE [tT][iI][tT][lL][eE]
}
<FindFields>"=" {
lastInitializerContext = YY_START;
initializerSharpCount=0;
BEGIN(ReadInitializer);
}
<FindFields>"," {
......@@ -1760,6 +1784,7 @@ TITLE [tT][iI][tT][lL][eE]
}
<MemberSpec>"=" {
lastInitializerContext=YY_START;
initializerSharpCount=0;
BEGIN(ReadInitializer);
/* BEGIN(MemberSpecSkip); */
}
......@@ -3834,7 +3859,7 @@ TITLE [tT][iI][tT][lL][eE]
<Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc>"\\"[a-z_A-Z][a-z_A-Z0-9]*[\\] { // directory type of text
current->doc+=yytext;
}
<Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc>{CMD}[a-z_A-Z][a-z_A-Z0-9]* {
<Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc,SkipSection>{CMD}[a-z_A-Z][a-z_A-Z0-9]* {
QCString *pValue=Doxygen::aliasDict[yytext+1];
if (pValue)
{
......
......@@ -22,6 +22,8 @@
* Initial Italian Translation by Ahmed Aldo Faisal
* Revised and completed by Alessandro Falappa (since June 1999)
* Updates:
* 2001/08: corrected the translation fixing the issues reported by the translator.pl script
* translated new items used since version 1.2.7
* 2001/05: adopted new translation mechanism (trough adapters),
* translated new items used since version 1.2.5 and 1.2.6,
* revised those function returning strings in OPTIMIZE_OTPUT_FOR_C case,
......@@ -57,7 +59,7 @@
#ifndef TRANSLATOR_IT_H
#define TRANSLATOR_IT_H
class TranslatorItalian : public TranslatorAdapter_1_2_7
class TranslatorItalian : public Translator
{
public:
......@@ -168,12 +170,6 @@ class TranslatorItalian : public TranslatorAdapter_1_2_7
QCString trDefinedIn()
{ return "definito in"; }
/*! put as in introduction in the verbatim header file of a class.
* parameter f is the name of the include file.
*/
QCString trVerbatimText(const char *f)
{ return (QCString)"Questo è il contenuto integrale del file include "+f+"."; }
// quick reference sections
/*! This is put above each page as a link to the list of all groups of
......@@ -462,10 +458,6 @@ class TranslatorItalian : public TranslatorAdapter_1_2_7
QCString trEnumerationValues()
{ return "Valori dei tipi enumerati"; }
/*! This is used in man pages as the author section. */
QCString trAuthor()
{ return "Autore"; }
/*! This is used in the documentation of a file before the list of
* documentation blocks for defines
*/
......@@ -523,12 +515,6 @@ class TranslatorItalian : public TranslatorAdapter_1_2_7
}
}
/*! This is used in the documentation of a group before the list of
* links to documented files
*/
QCString trFiles()
{ return "File"; }
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
......@@ -576,10 +562,6 @@ class TranslatorItalian : public TranslatorAdapter_1_2_7
QCString trDate()
{ return "Data"; }
/*! this text is generated when the \\author command is used. */
QCString trAuthors()
{ return "Autore(i)"; }
/*! this text is generated when the \\return command is used. */
QCString trReturns()
{ return "Restituisce"; }
......@@ -1313,6 +1295,19 @@ class TranslatorItalian : public TranslatorAdapter_1_2_7
result+=(singular ? "e" : "i");
return result;
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.7
//////////////////////////////////////////////////////////////////////////
/*! This text is generated when the \\author command is used and
* for the author section in man pages. */
virtual QCString trAuthor(bool first_capital, bool singular)
{
QCString result((first_capital ? "Autor" : "autor"));
result+=(singular ? "e" : "i");
return result;
}
};
#endif
......@@ -43,6 +43,8 @@
* Compounds , .
*
* ?? .
*
* : Vitaly A. Repin <vitaly@radio.hop.stu.neva.ru>
*/
#ifndef TRANSLATOR_RU_H
......@@ -678,13 +680,13 @@ class TranslatorRussian : public Translator
}
virtual QCString trPublicMembers()
{ return decode(" "); }
{ return decode(" "); }
virtual QCString trPublicSlots()
{ return decode(" "); }
{ return decode(" "); }
virtual QCString trSignals()
{ return decode(""); }
virtual QCString trStaticPublicMembers()
{ return decode(" "); }
{ return decode(" "); }
virtual QCString trProtectedMembers()
{ return decode(" "); }
virtual QCString trProtectedSlots()
......@@ -692,11 +694,11 @@ class TranslatorRussian : public Translator
virtual QCString trStaticProtectedMembers()
{ return decode(" "); }
virtual QCString trPrivateMembers()
{ return decode(" "); }
{ return decode(" "); }
virtual QCString trPrivateSlots()
{ return decode(" "); }
{ return decode(" "); }
virtual QCString trStaticPrivateMembers()
{ return decode(" "); }
{ return decode(" "); }
/*! this function is used to produce a comma-separated list of items.
* use generateMarker(i) to indicate where item i should be put.
......@@ -957,7 +959,7 @@ class TranslatorRussian : public Translator
}
virtual QCString trPublicTypes()
{
return decode(" ");
return decode(" ");
}
virtual QCString trPublicAttribs()
{
......@@ -972,7 +974,7 @@ class TranslatorRussian : public Translator
}
virtual QCString trStaticPublicAttribs()
{
return decode(" ");
return decode(" ");
}
virtual QCString trProtectedTypes()
{
......@@ -988,15 +990,15 @@ class TranslatorRussian : public Translator
}
virtual QCString trPrivateTypes()
{
return decode(" ");
return decode(" ");
}
virtual QCString trPrivateAttribs()
{
return decode(" ");
return decode(" ");
}
virtual QCString trStaticPrivateAttribs()
{
return decode(" ");
return decode(" ");
}
......@@ -1065,11 +1067,11 @@ class TranslatorRussian : public Translator
"class Truncated : public Invisible { };\n\n"
"/* */\n"
"class Undocumented { };\n\n"
"/*! */\n"
"/*! */\n"
"class PublicBase : public Truncated { };\n\n"
"/*! */\n"
"class ProtectedBase { };\n\n"
"/*! */\n"
"/*! */\n"
"class PrivateBase { };\n\n"
"/*! , Inherited */\n"
"class Used { };\n\n"
......@@ -1099,10 +1101,10 @@ class TranslatorRussian : public Translator
"</ul>\n"
" :\n"
"<ul>\n"
"<li> "
"<li> "
" .\n"
"<li> .\n"
"<li> .\n"
"<li> .\n"
"<li> , "
" ."
" , "
......
......@@ -33,6 +33,35 @@
#include <qfile.h>
#include <qtextstream.h>
static QCString sectionTypeToString(BaseOutputDocInterface::SectionTypes t)
{
switch (t)
{
case BaseOutputDocInterface::See: return "see";
case BaseOutputDocInterface::Return: return "return";
case BaseOutputDocInterface::Author: return "author";
case BaseOutputDocInterface::Version: return "version";
case BaseOutputDocInterface::Since: return "since";
case BaseOutputDocInterface::Date: return "date";
case BaseOutputDocInterface::Bug: return "bug";
case BaseOutputDocInterface::Note: return "note";
case BaseOutputDocInterface::Warning: return "warning";
case BaseOutputDocInterface::Par: return "par";
case BaseOutputDocInterface::Deprecated: return "deprecated";
case BaseOutputDocInterface::Pre: return "pre";
case BaseOutputDocInterface::Post: return "post";
case BaseOutputDocInterface::Invar: return "invariant";
case BaseOutputDocInterface::Remark: return "remark";
case BaseOutputDocInterface::Attention: return "attention";
case BaseOutputDocInterface::Todo: return "todo";
case BaseOutputDocInterface::Test: return "test";
case BaseOutputDocInterface::RCS: return "rcs";
case BaseOutputDocInterface::EnumValues: return "enumvalues";
case BaseOutputDocInterface::Examples: return "examples";
}
return "illegal";
}
static inline void writeXMLString(QTextStream &t,const char *s)
{
t << convertToXML(s);
......@@ -320,9 +349,10 @@ class XMLGenerator : public OutputDocInterface
m_t << "</term></varlistentry><listitem>";
startNestedPar();
}
void startDescList()
void startDescList(SectionTypes st)
{
m_t << "<simplesect><title>";
m_t << "<simplesect kind=\"" << sectionTypeToString(st);
m_t << "\"><title>";
}
void endDescList()
{
......@@ -350,6 +380,7 @@ class XMLGenerator : public OutputDocInterface
{
m_t << "</title>";
if (!m_inParamList) startNestedPar();
printf("endDescTitle %d\n",m_inParamList);
}
void writeDescItem() { }
void startDescTable() { }
......@@ -559,6 +590,15 @@ class XMLGenerator : public OutputDocInterface
{
m_t << "</image>";
}
void startDotFile(const char *name,bool caption)
{
m_t << "<dotfile name=\"" << name << "\" "
<< "caption=\"" << (caption ? "1" : "0") << "\">"; // non docbook
}
void endDotFile(bool)
{
m_t << "</dotfile>";
}
void startTextLink(const char *name,const char *anchor)
{
m_t << "<ulink url=\"" << name << "#" << anchor << "\">";
......@@ -636,6 +676,7 @@ class XMLGenerator : public OutputDocInterface
m_b.open( IO_WriteOnly );
m_t.setDevice(&m_b);
m_t.setEncoding(QTextStream::Latin1);
m_inParamList = FALSE;
}
/*! copy constructor */
XMLGenerator(const XMLGenerator *xg)
......@@ -908,7 +949,8 @@ void generateXMLForClass(ClassDef *cd,QTextStream &t)
// detailed documentation
// detailed member documentation
if (cd->name().find('@')!=-1) return; // skip anonymous compounds
if (cd->name().find('@')!=-1) return; // skip anonymous compounds.
if (cd->templateMaster()!=0) return; // skip generated template instances.
t << " <compounddef id=\""
<< cd->getOutputFileBase() << "\" kind=\""
<< cd->compoundTypeString() << "\">" << endl;
......
......@@ -9,7 +9,7 @@ CONFIG = qt warn_on release
TMAKE_CC = gcc
TMAKE_CFLAGS = -pipe
TMAKE_CFLAGS_WARN_ON = -Wall -W
TMAKE_CFLAGS_WARN_ON = -Wall -W -fno-exceptions
TMAKE_CFLAGS_WARN_OFF =
TMAKE_CFLAGS_RELEASE = -O2
TMAKE_CFLAGS_DEBUG = -g
......
#! Use the common Unix template
#$ IncludeTemplate("../unix/app.t");
#! Use the common Unix template
#$ IncludeTemplate("../unix/lib.t");
#! Use the common Unix template
#$ IncludeTemplate("../unix/subdirs.t");
#
#
#
# tmake configuration for macosx-c++
#
TEMPLATE = app
CONFIG = qt warn_on release
TMAKE_CC = cc
TMAKE_CFLAGS = -pipe
TMAKE_CFLAGS_WARN_ON = -Wall -W
TMAKE_CFLAGS_WARN_OFF =
TMAKE_CFLAGS_RELEASE = -O2
TMAKE_CFLAGS_DEBUG = -g
TMAKE_CFLAGS_SHLIB = -fPIC
TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
TMAKE_CXX = c++
TMAKE_CXXFLAGS = $$TMAKE_CFLAGS -D__FreeBSD__
TMAKE_CXXFLAGS_WARN_ON = $$TMAKE_CFLAGS_WARN_ON
TMAKE_CXXFLAGS_WARN_OFF = $$TMAKE_CFLAGS_WARN_OFF
TMAKE_CXXFLAGS_RELEASE = $$TMAKE_CFLAGS_RELEASE
TMAKE_CXXFLAGS_DEBUG = $$TMAKE_CFLAGS_DEBUG
TMAKE_CXXFLAGS_SHLIB = $$TMAKE_CFLAGS_SHLIB
TMAKE_CXXFLAGS_YACC = $$TMAKE_CFLAGS_YACC
TMAKE_INCDIR =
TMAKE_LIBDIR =
TMAKE_INCDIR_X11 = /usr/X11R6/include
TMAKE_LIBDIR_X11 = /usr/X11R6/lib
TMAKE_INCDIR_QT = $(QTDIR)/include
TMAKE_LIBDIR_QT = $(QTDIR)/lib
TMAKE_INCDIR_OPENGL = /usr/X11R6/include
TMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
TMAKE_LINK = c++
TMAKE_LINK_SHLIB = c++
TMAKE_LFLAGS =
TMAKE_LFLAGS_RELEASE =
TMAKE_LFLAGS_DEBUG =
TMAKE_LFLAGS_SHLIB = -shared
# soname does not work on fbsd 2.x
#TMAKE_LFLAGS_SONAME = -Wl,-soname
TMAKE_LIBS =
TMAKE_LIBS_X11 = -lXext -lX11 -lm
TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl
TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu
TMAKE_MOC = moc
TMAKE_AR = ar cq
TMAKE_RANLIB = ranlib
TMAKE_TAR = tar -cf
TMAKE_GZIP = gzip -9f
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