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

Release-1.2.0-20000806

parent 5ad8b41e
DOXYGEN Version 1.2.0-20000731 DOXYGEN Version 1.2.0-20000806
Please read the installation section of the manual for instructions. Please read the installation section of the manual for instructions.
-------- --------
Dimitri van Heesch (31 July 2000) Dimitri van Heesch (06 August 2000)
DOXYGEN Version 1.2.0-20000731 DOXYGEN Version 1.2.0-20000806
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at ...@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at
Enjoy, Enjoy,
Dimitri van Heesch (31 July 2000) Dimitri van Heesch (06 August 2000)
1.2.0-20000731 1.2.0-20000806
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <qstrlist.h> #include <qstrlist.h>
#include <qfile.h> #include <qfile.h>
extern void parseConfig(const QCString &config); extern void parseConfig(const QCString &config,const char *fn);
extern void writeTemplateConfig(QFile *f,bool shortList); extern void writeTemplateConfig(QFile *f,bool shortList);
extern void checkConfig(); extern void checkConfig();
extern void configStrToVal(); extern void configStrToVal();
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <qdir.h> #include <qdir.h>
#include <qtextstream.h> #include <qtextstream.h>
#include <qregexp.h> #include <qregexp.h>
#include <qstack.h>
#include "config.h" #include "config.h"
#include "version.h" #include "version.h"
...@@ -58,6 +59,7 @@ void initWarningFormat() ...@@ -58,6 +59,7 @@ void initWarningFormat()
#include "language.h" #include "language.h"
#endif #endif
#define MAX_INCLUDE_DEPTH 10
#define YY_NEVER_INTERACTIVE 1 #define YY_NEVER_INTERACTIVE 1
#define YY_NO_UNPUT #define YY_NO_UNPUT
...@@ -72,16 +74,31 @@ void initWarningFormat() ...@@ -72,16 +74,31 @@ void initWarningFormat()
* *
* static variables * static variables
*/ */
static const char * inputString; struct ConfigFileState
static int inputPosition; {
static int yyLineNr; int lineNr;
static QCString tmpString; FILE *filePtr;
static QCString * s=0; YY_BUFFER_STATE oldState;
static bool * b=0; YY_BUFFER_STATE newState;
static QStrList * l=0; QCString fileName;
static int lastState; };
static QCString elemStr;
static const char *inputString;
static int inputPosition;
static int yyLineNr;
static QCString yyFileName;
static QCString tmpString;
static QCString *s=0;
static bool *b=0;
static QStrList *l=0;
static int lastState;
static QCString elemStr;
static QCString includeName;
static QStrList includePathList;
static QStack<ConfigFileState> includeStack;
static int includeDepth;
#CONFIG Static #CONFIG Static
/* ----------------------------------------------------------------- /* -----------------------------------------------------------------
...@@ -91,15 +108,100 @@ static QCString elemStr; ...@@ -91,15 +108,100 @@ static QCString elemStr;
static int yyread(char *buf,int max_size) static int yyread(char *buf,int max_size)
{ {
int c=0; // no file included
while( c < max_size && inputString[inputPosition] ) if (includeStack.isEmpty())
{ {
*buf = inputString[inputPosition++] ; int c=0;
c++; buf++; while( c < max_size && inputString[inputPosition] )
{
*buf = inputString[inputPosition++] ;
c++; buf++;
}
return c;
}
else
{
//assert(includeStack.current()->newState==YY_CURRENT_BUFFER);
return fread(buf,1,max_size,includeStack.current()->filePtr);
} }
return c;
} }
static FILE *tryPath(const char *path,const char *fileName)
{
QCString absName=(QCString)path+"/"+fileName;
QFileInfo fi(absName);
if (fi.exists() && fi.isFile())
{
FILE *f=fopen(absName,"r");
if (!f) err("Error: could not open file %s for reading\n",absName.data());
return f;
}
return 0;
}
static FILE *findFile(const char *fileName)
{
char *s=includePathList.first();
while (s) // try each of the include paths
{
FILE *f = tryPath(s,fileName);
if (f) return f;
s=includePathList.next();
}
// try cwd if includePathList fails
return tryPath(".",fileName);
}
static void readIncludeFile(const char *incName)
{
if (includeDepth==MAX_INCLUDE_DEPTH) {
err("Error: maximum include depth (%d) reached, %s is not included. Aborting...\n",
MAX_INCLUDE_DEPTH,incName);
exit(1);
}
QCString inc = incName;
inc = inc.stripWhiteSpace();
uint incLen = inc.length();
if (inc.at(0)=='"' && inc.at(incLen-1)=='"') // strip quotes
{
inc=inc.mid(1,incLen-2);
}
FILE *f;
//printf("Searching for `%s'\n",incFileName.data());
if ((f=findFile(inc))) // see if the include file can be found
{
// For debugging
#if SHOW_INCLUDES
for (i=0;i<includeStack.count();i++) msg(" ");
msg("@INCLUDE = %s: parsing...\n",inc.data());
#endif
// store the state of the old file
ConfigFileState *fs=new ConfigFileState;
fs->oldState=YY_CURRENT_BUFFER;
fs->lineNr=yyLineNr;
fs->fileName=yyFileName;
fs->filePtr=f;
// push the state on the stack
includeStack.push(fs);
// set the scanner to the include file
yy_switch_to_buffer(yy_create_buffer(f, YY_BUF_SIZE));
fs->newState=YY_CURRENT_BUFFER;
yyFileName=inc;
includeDepth++;
}
else
{
err("Error: @INCLUDE = %s: not found!\n",inc.data());
exit(1);
}
}
%} %}
%option noyywrap %option noyywrap
...@@ -111,13 +213,44 @@ static int yyread(char *buf,int max_size) ...@@ -111,13 +213,44 @@ static int yyread(char *buf,int max_size)
%x GetStrList %x GetStrList
%x GetQuotedString %x GetQuotedString
%x GetEnvVar %x GetEnvVar
%x Include
%% %%
<*>\0x0d <*>\0x0d
<Start,GetString,GetStrList,GetBool>"#" { BEGIN(SkipComment); } <Start,GetString,GetStrList,GetBool>"#" { BEGIN(SkipComment); }
#CONFIG Rules #CONFIG Rules
<Start>[a-z_A-Z0-9]+ { err("Warning: ignoring unknown tag `%s' at line %d\n",yytext,yyLineNr); }
<Start>"@INCLUDE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&includePathList; l->clear(); elemStr=""; }
/* include a config file */
<Start>"@INCLUDE"[ \t]*"=" { BEGIN(Include);}
<Include>([^ \"\t\r\n]+)|("\""[^\n\"]+"\"") {
readIncludeFile(yytext);
BEGIN(Start);
}
<<EOF>> {
//printf("End of include file\n");
//printf("Include stack depth=%d\n",g_includeStack.count());
if (includeStack.isEmpty())
{
//printf("Terminating scanner!\n");
yyterminate();
}
else
{
ConfigFileState *fs=includeStack.pop();
pclose(fs->filePtr);
YY_BUFFER_STATE oldBuf = YY_CURRENT_BUFFER;
yy_switch_to_buffer( fs->oldState );
yy_delete_buffer( oldBuf );
yyLineNr=fs->lineNr;
yyFileName=fs->fileName;
delete fs; fs=0;
includeDepth--;
}
}
<Start>[a-z_A-Z0-9]+ { err("Warning: ignoring unknown tag `%s' at line %d, file %s\n",yytext,yyLineNr,yyFileName.data()); }
<GetString,GetBool>\n { yyLineNr++; BEGIN(Start); } <GetString,GetBool>\n { yyLineNr++; BEGIN(Start); }
<GetStrList>\n { <GetStrList>\n {
yyLineNr++; yyLineNr++;
...@@ -141,22 +274,6 @@ static int yyread(char *buf,int max_size) ...@@ -141,22 +274,6 @@ static int yyread(char *buf,int max_size)
BEGIN(GetQuotedString); BEGIN(GetQuotedString);
tmpString.resize(0); tmpString.resize(0);
} }
/*
<GetString,GetStrList,GetQuotedString>"\$\(" {
//printf(">> Enter env\n");
lastEnvState=YY_START;
BEGIN(GetEnvVar);
}
<GetEnvVar>[a-z_A-Z0-9]+")" {
yytext[yyleng-1]='\0';
const char *env=getenv(yytext);
int i;
int l=strlen(env);
//printf("env name=`%s' text=`%s'\n",yytext,env);
for (i=l-1;i>=0;i--) unput(env[i]);
BEGIN(lastEnvState);
}
*/
<GetQuotedString>"\""|"\n" { <GetQuotedString>"\""|"\n" {
//printf("Quoted String = `%s'\n",tmpString.data()); //printf("Quoted String = `%s'\n",tmpString.data());
if (lastState==GetString) if (lastState==GetString)
...@@ -165,7 +282,7 @@ static int yyread(char *buf,int max_size) ...@@ -165,7 +282,7 @@ static int yyread(char *buf,int max_size)
elemStr+=tmpString; elemStr+=tmpString;
if (*yytext=='\n') if (*yytext=='\n')
{ {
err("Warning: Missing end quote (\") on line %d\n",yyLineNr); err("Warning: Missing end quote (\") on line %d, file %s\n",yyLineNr,yyFileName.data());
yyLineNr++; yyLineNr++;
} }
BEGIN(lastState); BEGIN(lastState);
...@@ -185,8 +302,8 @@ static int yyread(char *buf,int max_size) ...@@ -185,8 +302,8 @@ static int yyread(char *buf,int max_size)
{ {
*b=FALSE; *b=FALSE;
warn_cont("Warning: Invalid value `%s' for " warn_cont("Warning: Invalid value `%s' for "
"boolean tag in line %d; use YES or NO\n", "boolean tag in line %d, file %s; use YES or NO\n",
bs.data(),yyLineNr); bs.data(),yyLineNr,yyFileName.data());
} }
} }
<GetStrList>[^ \#\"\t\r\n]+ { <GetStrList>[^ \#\"\t\r\n]+ {
...@@ -249,7 +366,7 @@ static void writeStringList(QTextStream &t,QStrList &l) ...@@ -249,7 +366,7 @@ static void writeStringList(QTextStream &t,QStrList &l)
const char *s=p; const char *s=p;
bool hasBlanks=FALSE; bool hasBlanks=FALSE;
while ((c=*p++)!=0 && !hasBlanks) hasBlanks = (c==' ' || c=='\n' || c=='\t'); while ((c=*p++)!=0 && !hasBlanks) hasBlanks = (c==' ' || c=='\n' || c=='\t');
if (!first) t << " "; if (!first) t << " ";
first=FALSE; first=FALSE;
if (hasBlanks) t << "\"" << s << "\""; else t << s; if (hasBlanks) t << "\"" << s << "\""; else t << s;
p = l.next(); p = l.next();
...@@ -378,7 +495,7 @@ static void substEnvVarsInString(QCString &s) ...@@ -378,7 +495,7 @@ static void substEnvVarsInString(QCString &s)
QCString env=getenv(s.mid(i+2,l-3)); QCString env=getenv(s.mid(i+2,l-3));
substEnvVarsInString(env); // recursively expand variables if needed. substEnvVarsInString(env); // recursively expand variables if needed.
s = s.left(i)+env+s.right(s.length()-i-l); s = s.left(i)+env+s.right(s.length()-i-l);
p=i+l; p=i+env.length(); // next time start at the end of the expanded string
} }
//printf("substEnvVarInString(%s) end\n",s.data()); //printf("substEnvVarInString(%s) end\n",s.data());
} }
...@@ -866,11 +983,15 @@ void checkConfig() ...@@ -866,11 +983,15 @@ void checkConfig()
} }
void parseConfig(const QCString &s) void parseConfig(const QCString &s,const char *fn)
{ {
inputString = s; inputString = s;
inputPosition = 0; inputPosition = 0;
yyLineNr = 1; yyLineNr = 1;
yyFileName=fn;
includeStack.setAutoDelete(TRUE);
includeStack.clear();
includeDepth = 0;
configYYrestart( configYYin ); configYYrestart( configYYin );
BEGIN( Start ); BEGIN( Start );
configYYlex(); configYYlex();
......
...@@ -78,7 +78,7 @@ static bool loadConfig( QString loadFile ) ...@@ -78,7 +78,7 @@ static bool loadConfig( QString loadFile )
// parse the config file // parse the config file
// this will initialize the various Config data members // this will initialize the various Config data members
parseConfig(contents); parseConfig(contents,loadFile);
configStrToVal(); configStrToVal();
f.close(); f.close();
......
...@@ -909,7 +909,7 @@ Public/Protected/Private/... section. ...@@ -909,7 +909,7 @@ Public/Protected/Private/... section.
\sa section \ref cmdlink "\\link". \sa section \ref cmdlink "\\link".
<hr> <hr>
\subsection cmdlink \link <link-object> \subsection cmdlink \link <link-object>
\addindex \link \addindex \link
The links that are automatically generated by Doxygen always have the The links that are automatically generated by Doxygen always have the
...@@ -924,10 +924,6 @@ Public/Protected/Private/... section. ...@@ -924,10 +924,6 @@ Public/Protected/Private/... section.
See section \ref autolink "autolink" for more information on automatically See section \ref autolink "autolink" for more information on automatically
generated links and valid link-objects. generated links and valid link-objects.
\b Note:
Keep in mind that links are only meaningful in HTML text;
in \f$\mbox{\LaTeX}\f$ text, the link text is just written to the output.
<hr> <hr>
\subsection cmdref \ref <name> ["(text)"] \subsection cmdref \ref <name> ["(text)"]
...@@ -1315,7 +1311,7 @@ Public/Protected/Private/... section. ...@@ -1315,7 +1311,7 @@ Public/Protected/Private/... section.
\ref cmdlatexonly "\\latexonly". \ref cmdlatexonly "\\latexonly".
<hr> <hr>
\subsection cmdimage \image <format> <file> [<sizeindication>=<size>] \subsection cmdimage \image <format> <file> ["<caption>"] [<sizeindication>=<size>]
\addindex \image \addindex \image
Inserts an image into the documentation. This command is format Inserts an image into the documentation. This command is format
...@@ -1327,27 +1323,36 @@ Public/Protected/Private/... section. ...@@ -1327,27 +1323,36 @@ Public/Protected/Private/... section.
The second argument specifies the file name of the image. The second argument specifies the file name of the image.
Doxygen will look for files in the paths (or files) that you specified Doxygen will look for files in the paths (or files) that you specified
after the \ref cfg_image_path "IMAGE_PATH" tag. after the \ref cfg_image_path "IMAGE_PATH" tag.
If the image is found it will be copied to the correct output directory. If the image is found it will be copied to the correct output directory.
If the image name contains spaces you'll have to put quotes (") around it. If the image name contains spaces you'll have to put quotes (") around it.
You can also specify an absolute URL instead of a file name, but then
The third argument can be used to specify the width or height of the doxygen does not copy the image or check its existance.
image. This is only useful for \f$\mbox{\LaTeX}\f$ output
(i.e. format=latex). \c sizeindication can be either The third argument is optional and can be used to specify the caption
\c width or \c height. The size should be a valid 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.
The fourth argument is also optional and can be used to specify the
width or height of the image. This is only useful
for \f$\mbox{\LaTeX}\f$ output
(i.e. format=<code>latex</code>). The \c sizeindication can be
either \c width or \c height. The size should be a valid
size specifier in \f$\mbox{\LaTeX}\f$ (for example <code>10cm</code> or size specifier in \f$\mbox{\LaTeX}\f$ (for example <code>10cm</code> or
<code>6in</code>). <code>6in</code> or a symbolic width like <code>\\textwidth</code>).
Here is example of a comment block: Here is example of a comment block:
\verbatim \verbatim
/*! Here is a snapshot of my new application: /*! Here is a snapshot of my new application:
* \image html application.jpg * \image html application.jpg
* \image latex application.eps width=10cm * \image latex application.eps "My application" width=10cm
*/ */
\endverbatim \endverbatim
And this is an example of how the configuration file may look: And this is an example of how the relevant part of the configuration file
may look:
\verbatim \verbatim
IMAGE_PATH = my_image_dir IMAGE_PATH = my_image_dir
......
...@@ -40,6 +40,19 @@ Multiple lines can be concatenated by inserting a backslash (\\) ...@@ -40,6 +40,19 @@ Multiple lines can be concatenated by inserting a backslash (\\)
as the last character of a line. Environment variables can be expanded as the last character of a line. Environment variables can be expanded
using the pattern \c $(ENV_VARIABLE_NAME). using the pattern \c $(ENV_VARIABLE_NAME).
You can also include part of a configuration file from another configuration
file using a <code>\@INCLUDE</code> tag as follows:
\verbatim
@INCLUDE = config_file_name
\endverbatim
The include file is searched in the current working directory. You can
also specify a list of directories that should be searched before looking
in the current working directory. Do this by putting a <code>\@INCLUDEPATH</code> tag
with these paths before the <code>\@INCLUDE</code> tag, e.g:
\verbatim
@INCLUDEPATH = my_config_dir
\endverbatim
The configuration options can be divided into several categories. The configuration options can be divided into several categories.
Below is an alphabetical index of the tags that are recognized Below is an alphabetical index of the tags that are recognized
followed by the descriptions of the tags grouped by category. followed by the descriptions of the tags grouped by category.
......
...@@ -197,21 +197,22 @@ During parsing the following steps take place: ...@@ -197,21 +197,22 @@ During parsing the following steps take place:
See section \ref htmlcmds for an overview of all supported HTML tags. See section \ref htmlcmds for an overview of all supported HTML tags.
</ul> </ul>
Using a number of column-aligned minus signs at the start of a By putting a number of column-aligned minus signs at the start of a
line in a comment block will generate a bullet list. line, a bullet list will automatically be generated.
Nested lists are also possible. Numbered lists can also be generated by using a minus followed by a hash.
Nesting of lists is allowed.<p>
Here is an example: Here is an example:
\verbatim \verbatim
/*! /*!
* A list of events: * A list of events:
* - mouse events * - mouse events
* - mouse move event * -# mouse move event
* - mouse click event * -# mouse click event\n
* - mouse double click event\n * More info about the click event.
* More info about the click event. * -# mouse double click event
* - keyboard events * - keyboard events
* - key down event * -# key down event
* - key up event * -# key up event
* *
* More text here. * More text here.
*/ */
...@@ -220,13 +221,13 @@ Using a number of column-aligned minus signs at the start of a ...@@ -220,13 +221,13 @@ Using a number of column-aligned minus signs at the start of a
A list of events: A list of events:
- mouse events - mouse events
- mouse move event -# mouse move event
- mouse click event\n -# mouse click event\n
More info about the click event. More info about the click event.
- mouse double click event -# mouse double click event
- keyboard events - keyboard events
- key down event -# key down event
- key up event -# key up event
More text here. More text here.
......
Name: doxygen Name: doxygen
Version: 1.2.0-20000731 Version: 1.2.0-20000806
Summary: documentation system for C, C++ and IDL Summary: documentation system for C, C++ and IDL
Release: 1 Release: 1
Source0: doxygen-%{version}.src.tar.gz Source0: doxygen-%{version}.src.tar.gz
......
...@@ -39,7 +39,7 @@ clean: Makefile.doxygen Makefile.doxytag Makefile.doxysearch ...@@ -39,7 +39,7 @@ clean: Makefile.doxygen Makefile.doxytag Makefile.doxysearch
$(MAKE) -f Makefile.doxysearch clean $(MAKE) -f Makefile.doxysearch clean
distclean: clean distclean: clean
-$(RM) scanner.cpp code.cpp config.cpp pre.cpp ce_lex.cpp \ -$(RM) scanner.cpp doc.cpp code.cpp config.cpp pre.cpp ce_lex.cpp \
ce_parse.cpp ce_parse.h doxytag.cpp tag.cpp \ ce_parse.cpp ce_parse.h doxytag.cpp tag.cpp \
declinfo.cpp defargs.cpp declinfo.cpp defargs.cpp
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "classdef.h" #include "classdef.h"
#include "classlist.h" #include "classlist.h"
#include "entry.h" #include "entry.h"
#include "scanner.h" #include "doc.h"
#include "doxygen.h" #include "doxygen.h"
#include "membername.h" #include "membername.h"
#include "message.h" #include "message.h"
...@@ -974,7 +974,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -974,7 +974,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trMemberTypedefDocumentation()); parseText(ol,theTranslator->trMemberTypedefDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
typedefMembers.writeDocumentation(ol,name()); typedefMembers.writeDocumentation(ol,name(),this);
} }
enumMembers.countDocMembers(); enumMembers.countDocMembers();
...@@ -984,7 +984,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -984,7 +984,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trMemberEnumerationDocumentation()); parseText(ol,theTranslator->trMemberEnumerationDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
enumMembers.writeDocumentation(ol,name()); enumMembers.writeDocumentation(ol,name(),this);
} }
//enumValMembers.countDocMembers(); //enumValMembers.countDocMembers();
...@@ -1004,7 +1004,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1004,7 +1004,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trConstructorDocumentation()); parseText(ol,theTranslator->trConstructorDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
constructors.writeDocumentation(ol,name()); constructors.writeDocumentation(ol,name(),this);
} }
functionMembers.countDocMembers(); functionMembers.countDocMembers();
...@@ -1014,7 +1014,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1014,7 +1014,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trMemberFunctionDocumentation()); parseText(ol,theTranslator->trMemberFunctionDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
functionMembers.writeDocumentation(ol,name()); functionMembers.writeDocumentation(ol,name(),this);
} }
relatedMembers.countDocMembers(); relatedMembers.countDocMembers();
...@@ -1024,7 +1024,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1024,7 +1024,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trRelatedFunctionDocumentation()); parseText(ol,theTranslator->trRelatedFunctionDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
relatedMembers.writeDocumentation(ol,name()); relatedMembers.writeDocumentation(ol,name(),this);
} }
variableMembers.countDocMembers(); variableMembers.countDocMembers();
...@@ -1034,7 +1034,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1034,7 +1034,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trMemberDataDocumentation()); parseText(ol,theTranslator->trMemberDataDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
variableMembers.writeDocumentation(ol,name()); variableMembers.writeDocumentation(ol,name(),this);
} }
ol.startTextBlock(); ol.startTextBlock();
...@@ -1601,7 +1601,7 @@ void ClassDef::determineImplUsageRelation() ...@@ -1601,7 +1601,7 @@ void ClassDef::determineImplUsageRelation()
MemberDef *md=mi->memberDef; MemberDef *md=mi->memberDef;
if (md->isVariable()) // for each member variable in this class if (md->isVariable()) // for each member variable in this class
{ {
QCString type=md->typeString(); QCString type=removeRedundantWhiteSpace(md->typeString());
int typeLen=type.length(); int typeLen=type.length();
static const QRegExp re("[a-z_A-Z][a-z_A-Z0-9:]*"); static const QRegExp re("[a-z_A-Z][a-z_A-Z0-9:]*");
//printf("in class %s found var type=`%s' name=`%s'\n", //printf("in class %s found var type=`%s' name=`%s'\n",
......
...@@ -203,6 +203,7 @@ struct UsesClassDef ...@@ -203,6 +203,7 @@ struct UsesClassDef
UsesClassDef(ClassDef *cd) : classDef(cd) UsesClassDef(ClassDef *cd) : classDef(cd)
{ {
accessors = new QDict<void>(17); accessors = new QDict<void>(17);
containment = TRUE;
} }
~UsesClassDef() ~UsesClassDef()
{ {
...@@ -218,6 +219,7 @@ struct UsesClassDef ...@@ -218,6 +219,7 @@ struct UsesClassDef
ClassDef *classDef; ClassDef *classDef;
QDict<void> *accessors; QDict<void> *accessors;
QCString templSpecifiers; QCString templSpecifiers;
bool containment;
}; };
class UsesClassDict : public QDict<UsesClassDef> class UsesClassDict : public QDict<UsesClassDef>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "util.h" #include "util.h"
#include "outputlist.h" #include "outputlist.h"
#include "language.h" #include "language.h"
#include "scanner.h" #include "doc.h"
ClassList::ClassList() : QList<ClassDef>() ClassList::ClassList() : QList<ClassDef>()
{ {
......
...@@ -410,7 +410,7 @@ static bool getLink(const char *className, ...@@ -410,7 +410,7 @@ static bool getLink(const char *className,
FileDef *fd; FileDef *fd;
NamespaceDef *nd; NamespaceDef *nd;
GroupDef *gd; GroupDef *gd;
QCString m=memberName; QCString m=removeRedundantWhiteSpace(memberName);
QCString c=className; QCString c=className;
//printf("Trying `%s'::`%s'\n",c.data(),m.data()); //printf("Trying `%s'::`%s'\n",c.data(),m.data());
if (getDefs(c,m,"()",md,cd,fd,nd,gd) && md->isLinkable()) if (getDefs(c,m,"()",md,cd,fd,nd,gd) && md->isLinkable())
...@@ -574,39 +574,6 @@ static void generateMemberLink(OutputList &ol,const char *varName, ...@@ -574,39 +574,6 @@ static void generateMemberLink(OutputList &ol,const char *varName,
if (mcd && mcd->isLinkable()) if (mcd && mcd->isLinkable())
{ {
if (generateClassMemberLink(ol,mcd,memName)) return; if (generateClassMemberLink(ol,mcd,memName)) return;
#if 0
//printf("Found class `%s'\n",mcd->name().data());
MemberName *mmn=memberNameDict[memName];
if (mmn)
{
MemberNameIterator mmni(*mmn);
MemberDef *mmd,*xmd=0;
ClassDef *xcd=0;
const int maxInheritanceDepth = 100000;
int mdist=maxInheritanceDepth;
for (;(mmd=mmni.current());++mmni)
{
int m=minClassDistance(mcd,mmd->getClassDef());
if (m<mdist && mmd->getClassDef()->isLinkable())
{
mdist=m;
xcd=mmd->getClassDef();
xmd=mmd;
}
}
if (mdist!=maxInheritanceDepth)
{
if (g_currentDefinition && g_currentMemberDef &&
xmd!=g_currentMemberDef && g_insideBody)
{
xmd->addSourceReference(g_currentMemberDef);
}
writeMultiLineCodeLink(ol,xcd->getReference(),
xcd->getOutputFileBase(),xmd->anchor(),memName);
return;
}
}
#endif
} }
} }
} }
...@@ -617,27 +584,12 @@ static void generateMemberLink(OutputList &ol,const char *varName, ...@@ -617,27 +584,12 @@ static void generateMemberLink(OutputList &ol,const char *varName,
return; return;
} }
static QCString removeWhiteSpace(const char *s)
{
QCString result;
if (s)
{
const char *p=s;
int c;
while ((c=*p++))
{
if (c!=' ' && c!='\n' && c!='\r' && c!='\t') result+=c;
}
}
return result;
}
static void generateFunctionLink(OutputList &ol,char *funcName) static void generateFunctionLink(OutputList &ol,char *funcName)
{ {
OutputList result(&ol); OutputList result(&ol);
CodeClassDef *ccd=0; CodeClassDef *ccd=0;
QCString locScope=g_classScope.copy(); QCString locScope=g_classScope.copy();
QCString locFunc=removeWhiteSpace(funcName); QCString locFunc=removeRedundantWhiteSpace(funcName);
int i=locFunc.findRev("::"); int i=locFunc.findRev("::");
if (i>0) if (i>0)
{ {
...@@ -970,7 +922,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" ...@@ -970,7 +922,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
addType(); addType();
g_name+=yytext; g_name+=yytext;
} }
<Body>{SCOPENAME}{B}*"<"[^\n\>]*">"/{B}* { // A<T> *pt; <Body>{SCOPENAME}{B}*"<"[^\n\"\>]*">"/{B}* { // A<T> *pt;
generateClassLink(*g_code,yytext); generateClassLink(*g_code,yytext);
addType(); addType();
g_name+=yytext; g_name+=yytext;
......
/* This file was generated by configgen on Mon Jul 31 16:07:18 2000 /* This file was generated by configgen on Sat Aug 5 20:49:38 2000
* from config_templ.h * from config_templ.h
* *
* DO NOT EDIT! * DO NOT EDIT!
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <qstrlist.h> #include <qstrlist.h>
#include <qfile.h> #include <qfile.h>
extern void parseConfig(const QCString &config); extern void parseConfig(const QCString &config,const char *fn);
extern void writeTemplateConfig(QFile *f,bool shortList); extern void writeTemplateConfig(QFile *f,bool shortList);
extern void checkConfig(); extern void checkConfig();
extern void configStrToVal(); extern void configStrToVal();
......
/* This file was generated by configgen on Mon Jul 31 16:11:27 2000 /* This file was generated by configgen on Sun Aug 6 16:28:57 2000
* from config_templ.l * from config_templ.l
* *
* DO NOT EDIT! * DO NOT EDIT!
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <qdir.h> #include <qdir.h>
#include <qtextstream.h> #include <qtextstream.h>
#include <qregexp.h> #include <qregexp.h>
#include <qstack.h>
#include "config.h" #include "config.h"
#include "version.h" #include "version.h"
...@@ -64,6 +65,7 @@ void initWarningFormat() ...@@ -64,6 +65,7 @@ void initWarningFormat()
#include "language.h" #include "language.h"
#endif #endif
#define MAX_INCLUDE_DEPTH 10
#define YY_NEVER_INTERACTIVE 1 #define YY_NEVER_INTERACTIVE 1
#define YY_NO_UNPUT #define YY_NO_UNPUT
...@@ -178,16 +180,31 @@ QStrList Config::extDocPathList; ...@@ -178,16 +180,31 @@ QStrList Config::extDocPathList;
* *
* static variables * static variables
*/ */
static const char * inputString; struct ConfigFileState
static int inputPosition; {
static int yyLineNr; int lineNr;
static QCString tmpString; FILE *filePtr;
static QCString * s=0; YY_BUFFER_STATE oldState;
static bool * b=0; YY_BUFFER_STATE newState;
static QStrList * l=0; QCString fileName;
static int lastState; };
static QCString elemStr;
static const char *inputString;
static int inputPosition;
static int yyLineNr;
static QCString yyFileName;
static QCString tmpString;
static QCString *s=0;
static bool *b=0;
static QStrList *l=0;
static int lastState;
static QCString elemStr;
static QCString includeName;
static QStrList includePathList;
static QStack<ConfigFileState> includeStack;
static int includeDepth;
static QCString tabSizeString; static QCString tabSizeString;
static QCString colsInAlphaIndexString; static QCString colsInAlphaIndexString;
static QCString maxDotGraphWidthString; static QCString maxDotGraphWidthString;
...@@ -200,15 +217,100 @@ static QCString maxDotGraphHeightString; ...@@ -200,15 +217,100 @@ static QCString maxDotGraphHeightString;
static int yyread(char *buf,int max_size) static int yyread(char *buf,int max_size)
{ {
int c=0; // no file included
while( c < max_size && inputString[inputPosition] ) if (includeStack.isEmpty())
{
int c=0;
while( c < max_size && inputString[inputPosition] )
{
*buf = inputString[inputPosition++] ;
c++; buf++;
}
return c;
}
else
{ {
*buf = inputString[inputPosition++] ; //assert(includeStack.current()->newState==YY_CURRENT_BUFFER);
c++; buf++; return fread(buf,1,max_size,includeStack.current()->filePtr);
} }
return c;
} }
static FILE *tryPath(const char *path,const char *fileName)
{
QCString absName=(QCString)path+"/"+fileName;
QFileInfo fi(absName);
if (fi.exists() && fi.isFile())
{
FILE *f=fopen(absName,"r");
if (!f) err("Error: could not open file %s for reading\n",absName.data());
return f;
}
return 0;
}
static FILE *findFile(const char *fileName)
{
char *s=includePathList.first();
while (s) // try each of the include paths
{
FILE *f = tryPath(s,fileName);
if (f) return f;
s=includePathList.next();
}
// try cwd if includePathList fails
return tryPath(".",fileName);
}
static void readIncludeFile(const char *incName)
{
if (includeDepth==MAX_INCLUDE_DEPTH) {
err("Error: maximum include depth (%d) reached, %s is not included. Aborting...\n",
MAX_INCLUDE_DEPTH,incName);
exit(1);
}
QCString inc = incName;
inc = inc.stripWhiteSpace();
uint incLen = inc.length();
if (inc.at(0)=='"' && inc.at(incLen-1)=='"') // strip quotes
{
inc=inc.mid(1,incLen-2);
}
FILE *f;
//printf("Searching for `%s'\n",incFileName.data());
if ((f=findFile(inc))) // see if the include file can be found
{
// For debugging
#if SHOW_INCLUDES
for (i=0;i<includeStack.count();i++) msg(" ");
msg("@INCLUDE = %s: parsing...\n",inc.data());
#endif
// store the state of the old file
ConfigFileState *fs=new ConfigFileState;
fs->oldState=YY_CURRENT_BUFFER;
fs->lineNr=yyLineNr;
fs->fileName=yyFileName;
fs->filePtr=f;
// push the state on the stack
includeStack.push(fs);
// set the scanner to the include file
yy_switch_to_buffer(yy_create_buffer(f, YY_BUF_SIZE));
fs->newState=YY_CURRENT_BUFFER;
yyFileName=inc;
includeDepth++;
}
else
{
err("Error: @INCLUDE = %s: not found!\n",inc.data());
exit(1);
}
}
%} %}
%option noyywrap %option noyywrap
...@@ -220,6 +322,7 @@ static int yyread(char *buf,int max_size) ...@@ -220,6 +322,7 @@ static int yyread(char *buf,int max_size)
%x GetStrList %x GetStrList
%x GetQuotedString %x GetQuotedString
%x GetEnvVar %x GetEnvVar
%x Include
%% %%
...@@ -343,7 +446,37 @@ static int yyread(char *buf,int max_size) ...@@ -343,7 +446,37 @@ static int yyread(char *buf,int max_size)
<Start>"BIN_ABSPATH"[ \t]*"=" { BEGIN(GetString); s=&Config::binAbsPath; s->resize(0); } <Start>"BIN_ABSPATH"[ \t]*"=" { BEGIN(GetString); s=&Config::binAbsPath; s->resize(0); }
<Start>"EXT_DOC_PATHS"[ \t]*"=" { BEGIN(GetStrList); l=&Config::extDocPathList; l->clear(); elemStr=""; } <Start>"EXT_DOC_PATHS"[ \t]*"=" { BEGIN(GetStrList); l=&Config::extDocPathList; l->clear(); elemStr=""; }
<Start>"EXT_DOC_PATHS"[ \t]*"+=" { BEGIN(GetStrList); l=&Config::extDocPathList; elemStr=""; } <Start>"EXT_DOC_PATHS"[ \t]*"+=" { BEGIN(GetStrList); l=&Config::extDocPathList; elemStr=""; }
<Start>[a-z_A-Z0-9]+ { err("Warning: ignoring unknown tag `%s' at line %d\n",yytext,yyLineNr); }
<Start>"@INCLUDE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&includePathList; l->clear(); elemStr=""; }
/* include a config file */
<Start>"@INCLUDE"[ \t]*"=" { BEGIN(Include);}
<Include>([^ \"\t\r\n]+)|("\""[^\n\"]+"\"") {
readIncludeFile(yytext);
BEGIN(Start);
}
<<EOF>> {
//printf("End of include file\n");
//printf("Include stack depth=%d\n",g_includeStack.count());
if (includeStack.isEmpty())
{
//printf("Terminating scanner!\n");
yyterminate();
}
else
{
ConfigFileState *fs=includeStack.pop();
pclose(fs->filePtr);
YY_BUFFER_STATE oldBuf = YY_CURRENT_BUFFER;
yy_switch_to_buffer( fs->oldState );
yy_delete_buffer( oldBuf );
yyLineNr=fs->lineNr;
yyFileName=fs->fileName;
delete fs; fs=0;
includeDepth--;
}
}
<Start>[a-z_A-Z0-9]+ { err("Warning: ignoring unknown tag `%s' at line %d, file %s\n",yytext,yyLineNr,yyFileName.data()); }
<GetString,GetBool>\n { yyLineNr++; BEGIN(Start); } <GetString,GetBool>\n { yyLineNr++; BEGIN(Start); }
<GetStrList>\n { <GetStrList>\n {
yyLineNr++; yyLineNr++;
...@@ -367,22 +500,6 @@ static int yyread(char *buf,int max_size) ...@@ -367,22 +500,6 @@ static int yyread(char *buf,int max_size)
BEGIN(GetQuotedString); BEGIN(GetQuotedString);
tmpString.resize(0); tmpString.resize(0);
} }
/*
<GetString,GetStrList,GetQuotedString>"\$\(" {
//printf(">> Enter env\n");
lastEnvState=YY_START;
BEGIN(GetEnvVar);
}
<GetEnvVar>[a-z_A-Z0-9]+")" {
yytext[yyleng-1]='\0';
const char *env=getenv(yytext);
int i;
int l=strlen(env);
//printf("env name=`%s' text=`%s'\n",yytext,env);
for (i=l-1;i>=0;i--) unput(env[i]);
BEGIN(lastEnvState);
}
*/
<GetQuotedString>"\""|"\n" { <GetQuotedString>"\""|"\n" {
//printf("Quoted String = `%s'\n",tmpString.data()); //printf("Quoted String = `%s'\n",tmpString.data());
if (lastState==GetString) if (lastState==GetString)
...@@ -391,7 +508,7 @@ static int yyread(char *buf,int max_size) ...@@ -391,7 +508,7 @@ static int yyread(char *buf,int max_size)
elemStr+=tmpString; elemStr+=tmpString;
if (*yytext=='\n') if (*yytext=='\n')
{ {
err("Warning: Missing end quote (\") on line %d\n",yyLineNr); err("Warning: Missing end quote (\") on line %d, file %s\n",yyLineNr,yyFileName.data());
yyLineNr++; yyLineNr++;
} }
BEGIN(lastState); BEGIN(lastState);
...@@ -411,8 +528,8 @@ static int yyread(char *buf,int max_size) ...@@ -411,8 +528,8 @@ static int yyread(char *buf,int max_size)
{ {
*b=FALSE; *b=FALSE;
warn_cont("Warning: Invalid value `%s' for " warn_cont("Warning: Invalid value `%s' for "
"boolean tag in line %d; use YES or NO\n", "boolean tag in line %d, file %s; use YES or NO\n",
bs.data(),yyLineNr); bs.data(),yyLineNr,yyFileName.data());
} }
} }
<GetStrList>[^ \#\"\t\r\n]+ { <GetStrList>[^ \#\"\t\r\n]+ {
...@@ -807,7 +924,7 @@ static void writeStringList(QTextStream &t,QStrList &l) ...@@ -807,7 +924,7 @@ static void writeStringList(QTextStream &t,QStrList &l)
const char *s=p; const char *s=p;
bool hasBlanks=FALSE; bool hasBlanks=FALSE;
while ((c=*p++)!=0 && !hasBlanks) hasBlanks = (c==' ' || c=='\n' || c=='\t'); while ((c=*p++)!=0 && !hasBlanks) hasBlanks = (c==' ' || c=='\n' || c=='\t');
if (!first) t << " "; if (!first) t << " ";
first=FALSE; first=FALSE;
if (hasBlanks) t << "\"" << s << "\""; else t << s; if (hasBlanks) t << "\"" << s << "\""; else t << s;
p = l.next(); p = l.next();
...@@ -2160,7 +2277,7 @@ static void substEnvVarsInString(QCString &s) ...@@ -2160,7 +2277,7 @@ static void substEnvVarsInString(QCString &s)
QCString env=getenv(s.mid(i+2,l-3)); QCString env=getenv(s.mid(i+2,l-3));
substEnvVarsInString(env); // recursively expand variables if needed. substEnvVarsInString(env); // recursively expand variables if needed.
s = s.left(i)+env+s.right(s.length()-i-l); s = s.left(i)+env+s.right(s.length()-i-l);
p=i+l; p=i+env.length(); // next time start at the end of the expanded string
} }
//printf("substEnvVarInString(%s) end\n",s.data()); //printf("substEnvVarInString(%s) end\n",s.data());
} }
...@@ -2689,11 +2806,15 @@ void checkConfig() ...@@ -2689,11 +2806,15 @@ void checkConfig()
} }
void parseConfig(const QCString &s) void parseConfig(const QCString &s,const char *fn)
{ {
inputString = s; inputString = s;
inputPosition = 0; inputPosition = 0;
yyLineNr = 1; yyLineNr = 1;
yyFileName=fn;
includeStack.setAutoDelete(TRUE);
includeStack.clear();
includeDepth = 0;
configYYrestart( configYYin ); configYYrestart( configYYin );
BEGIN( Start ); BEGIN( Start );
configYYlex(); configYYlex();
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
#include "language.h" #include "language.h"
#include "message.h" #include "message.h"
#include "outputlist.h" #include "outputlist.h"
#include "scanner.h" #include "doc.h"
#include "code.h"
#include <qregexp.h> #include <qregexp.h>
Definition::Definition(const char *df,int dl, Definition::Definition(const char *df,int dl,
...@@ -39,6 +40,8 @@ Definition::Definition(const char *df,int dl, ...@@ -39,6 +40,8 @@ Definition::Definition(const char *df,int dl,
bodyDef=0; bodyDef=0;
sourceRefList=0; sourceRefList=0;
sourceRefDict=0; sourceRefDict=0;
m_todoId=0;
m_testId=0;
} }
Definition::~Definition() Definition::~Definition()
......
...@@ -101,6 +101,10 @@ class Definition ...@@ -101,6 +101,10 @@ class Definition
void writeSourceRefs(OutputList &ol,const char *scopeName); void writeSourceRefs(OutputList &ol,const char *scopeName);
void addSourceReference(MemberDef *d); void addSourceReference(MemberDef *d);
void setRefItems(int todoId,int testId) { m_todoId=todoId; m_testId=testId; }
int todoId() const { return m_todoId; }
int testId() const { return m_testId; }
/*! returns the file in which this definition was found */ /*! returns the file in which this definition was found */
QCString getDefFileName() const { return defFileName; } QCString getDefFileName() const { return defFileName; }
/*! returns the line number at which the definition was found */ /*! returns the line number at which the definition was found */
...@@ -124,6 +128,8 @@ class Definition ...@@ -124,6 +128,8 @@ class Definition
MemberList *sourceRefList; // list of entities that refer to this MemberList *sourceRefList; // list of entities that refer to this
// entity in their definition // entity in their definition
MemberDict *sourceRefDict; MemberDict *sourceRefDict;
int m_testId; // id for test case
int m_todoId; // id for todo case
}; };
......
...@@ -475,7 +475,8 @@ void TreeDiagram::computeExtremes(uint *maxLabelLen,uint *maxXPos) ...@@ -475,7 +475,8 @@ void TreeDiagram::computeExtremes(uint *maxLabelLen,uint *maxXPos)
void TreeDiagram::drawBoxes(QTextStream &t,Image *image, void TreeDiagram::drawBoxes(QTextStream &t,Image *image,
bool doBase,bool bitmap, bool doBase,bool bitmap,
uint baseRows,uint superRows, uint baseRows,uint superRows,
uint cellWidth,uint cellHeight) uint cellWidth,uint cellHeight,
bool generateMap)
{ {
DiagramRow *dr=first(); DiagramRow *dr=first();
if (!doBase) dr=next(); if (!doBase) dr=next();
...@@ -543,7 +544,8 @@ void TreeDiagram::drawBoxes(QTextStream &t,Image *image, ...@@ -543,7 +544,8 @@ void TreeDiagram::drawBoxes(QTextStream &t,Image *image,
bool hasDocs=di->getClassDef()->isLinkable(); bool hasDocs=di->getClassDef()->isLinkable();
writeBitmapBox(di,image,x,y,cellWidth,cellHeight,firstRow, writeBitmapBox(di,image,x,y,cellWidth,cellHeight,firstRow,
hasDocs,di->getChildren()->count()>0); hasDocs,di->getChildren()->count()>0);
if (!firstRow) writeMapArea(t,di->getClassDef(),x,y,cellWidth,cellHeight); if (!firstRow && generateMap)
writeMapArea(t,di->getClassDef(),x,y,cellWidth,cellHeight);
} }
else else
{ {
...@@ -575,7 +577,8 @@ void TreeDiagram::drawBoxes(QTextStream &t,Image *image, ...@@ -575,7 +577,8 @@ void TreeDiagram::drawBoxes(QTextStream &t,Image *image,
} }
bool hasDocs=di->getClassDef()->isLinkable(); bool hasDocs=di->getClassDef()->isLinkable();
writeBitmapBox(di,image,x,y,cellWidth,cellHeight,firstRow,hasDocs); writeBitmapBox(di,image,x,y,cellWidth,cellHeight,firstRow,hasDocs);
if (!firstRow) writeMapArea(t,di->getClassDef(),x,y,cellWidth,cellHeight); if (!firstRow && generateMap)
writeMapArea(t,di->getClassDef(),x,y,cellWidth,cellHeight);
} }
else else
{ {
...@@ -1244,7 +1247,7 @@ void ClassDiagram::writeFigure(QTextStream &output,const char *path, ...@@ -1244,7 +1247,7 @@ void ClassDiagram::writeFigure(QTextStream &output,const char *path,
void ClassDiagram::writeImageMap(QTextStream &t,const char *path, void ClassDiagram::writeImageMap(QTextStream &t,const char *path,
const char *fileName) const char *fileName, bool generateMap)
{ {
uint baseRows=base->computeRows(); uint baseRows=base->computeRows();
uint superRows=super->computeRows(); uint superRows=super->computeRows();
...@@ -1271,13 +1274,13 @@ void ClassDiagram::writeImageMap(QTextStream &t,const char *path, ...@@ -1271,13 +1274,13 @@ void ClassDiagram::writeImageMap(QTextStream &t,const char *path,
Image image(imageWidth,imageHeight); Image image(imageWidth,imageHeight);
base->drawBoxes(t,&image,TRUE,TRUE,baseRows,superRows,cellWidth,cellHeight); base->drawBoxes(t,&image,TRUE,TRUE,baseRows,superRows,cellWidth,cellHeight,generateMap);
super->drawBoxes(t,&image,FALSE,TRUE,baseRows,superRows,cellWidth,cellHeight); super->drawBoxes(t,&image,FALSE,TRUE,baseRows,superRows,cellWidth,cellHeight,generateMap);
base->drawConnectors(t,&image,TRUE,TRUE,baseRows,superRows,cellWidth,cellHeight); base->drawConnectors(t,&image,TRUE,TRUE,baseRows,superRows,cellWidth,cellHeight);
super->drawConnectors(t,&image,FALSE,TRUE,baseRows,superRows,cellWidth,cellHeight); super->drawConnectors(t,&image,FALSE,TRUE,baseRows,superRows,cellWidth,cellHeight);
image.save((QCString)path+"/"+fileName+".gif"); image.save((QCString)path+"/"+fileName+".gif");
t << "</map>" << endl; if (generateMap) t << "</map>" << endl;
} }
...@@ -104,7 +104,8 @@ class TreeDiagram : public QList<DiagramRow> ...@@ -104,7 +104,8 @@ class TreeDiagram : public QList<DiagramRow>
void drawBoxes(QTextStream &t,Image *image, void drawBoxes(QTextStream &t,Image *image,
bool doBase,bool bitmap, bool doBase,bool bitmap,
uint baseRows,uint superRows, uint baseRows,uint superRows,
uint cellWidth,uint cellHeight); uint cellWidth,uint cellHeight,
bool generateMap=TRUE);
void drawConnectors(QTextStream &t,Image *image, void drawConnectors(QTextStream &t,Image *image,
bool doBase,bool bitmap, bool doBase,bool bitmap,
uint baseRows,uint superRows, uint baseRows,uint superRows,
...@@ -123,7 +124,7 @@ class ClassDiagram ...@@ -123,7 +124,7 @@ class ClassDiagram
void writeFigure(QTextStream &t,const char *path, void writeFigure(QTextStream &t,const char *path,
const char *file); const char *file);
void writeImageMap(QTextStream &t,const char *path, void writeImageMap(QTextStream &t,const char *path,
const char *file); const char *file,bool generateMap=TRUE);
private: private:
TreeDiagram *base; TreeDiagram *base;
TreeDiagram *super; TreeDiagram *super;
......
/******************************************************************************
*
*
*
* Copyright (C) 1997-2000 by Dimitri van Heesch.
*
* 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 DOC_H
#define DOC_H
#include "qtbc.h"
class OutputList;
extern void parseDoc(OutputList &ol,
const char *fileName,int startLine,
const char *clName, const char *memName,
const QCString &docString);
extern void parseExample(OutputList &ol,const QCString &docString,
const char *fileName);
extern void parseText(OutputList &ol,const QCString &txtString);
#endif
This diff is collapsed.
This diff is collapsed.
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include "classlist.h" #include "classlist.h"
#include "membername.h" #include "membername.h"
#include "filename.h" #include "filename.h"
//#include "define.h"
#include "namespacedef.h" #include "namespacedef.h"
#include "formula.h" #include "formula.h"
#include "section.h" #include "section.h"
...@@ -37,7 +36,8 @@ ...@@ -37,7 +36,8 @@
struct PageInfo struct PageInfo
{ {
PageInfo(const char *f, int l,const char *n,const char *d,const char *t) : PageInfo(const char *f, int l,const char *n,const char *d,const char *t) :
defFileName(f), defLine(l), name(n), doc(d), title(t) {} defFileName(f), defLine(l), name(n), doc(d), title(t),
todoId(0), testId(0) {}
// where the page definition was found // where the page definition was found
QCString defFileName; QCString defFileName;
...@@ -47,6 +47,10 @@ struct PageInfo ...@@ -47,6 +47,10 @@ struct PageInfo
QCString name; QCString name;
QCString doc; QCString doc;
QCString title; QCString title;
// ids
int todoId;
int testId;
}; };
class PageList : public QList<PageInfo> class PageList : public QList<PageInfo>
...@@ -104,7 +108,6 @@ extern MemberNameDict functionNameDict; ...@@ -104,7 +108,6 @@ extern MemberNameDict functionNameDict;
extern StringDict substituteDict; extern StringDict substituteDict;
extern FileList fileList; extern FileList fileList;
extern FileDict fileDict; extern FileDict fileDict;
//extern DefineDict defineDict;
extern ClassDef unrelatedClass; extern ClassDef unrelatedClass;
extern QTextStream tagFile; extern QTextStream tagFile;
extern SectionDict sectionDict; extern SectionDict sectionDict;
...@@ -113,7 +116,6 @@ extern FileNameDict *includeNameDict; ...@@ -113,7 +116,6 @@ extern FileNameDict *includeNameDict;
extern FileNameDict *exampleNameDict; extern FileNameDict *exampleNameDict;
extern FileNameDict *inputNameDict; extern FileNameDict *inputNameDict;
extern FileNameDict *imageNameDict; extern FileNameDict *imageNameDict;
//extern FileList includeFiles;
extern StringDict typedefDict; extern StringDict typedefDict;
extern GroupList groupList; extern GroupList groupList;
extern GroupDict groupDict; extern GroupDict groupDict;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
TEMPLATE = doxygen.t TEMPLATE = doxygen.t
CONFIG = console qt warn_on $extraopts CONFIG = console qt warn_on $extraopts
HEADERS = doxygen.h scanner.h classdef.h classlist.h memberdef.h \ HEADERS = doxygen.h scanner.h doc.h classdef.h classlist.h memberdef.h \
membername.h index.h memberlist.h definition.h \ membername.h index.h memberlist.h definition.h \
entry.h logos.h instdox.h message.h code.h \ entry.h logos.h instdox.h message.h code.h \
filedef.h util.h cppvalue.h constexp.h \ filedef.h util.h cppvalue.h constexp.h \
...@@ -27,8 +27,8 @@ HEADERS = doxygen.h scanner.h classdef.h classlist.h memberdef.h \ ...@@ -27,8 +27,8 @@ HEADERS = doxygen.h scanner.h classdef.h classlist.h memberdef.h \
translator_it.h formula.h debug.h membergroup.h htmlhelp.h \ translator_it.h formula.h debug.h membergroup.h htmlhelp.h \
translator_ru.h translator_pl.h dot.h rtfgen.h xml.h xml_dtd.h \ translator_ru.h translator_pl.h dot.h rtfgen.h xml.h xml_dtd.h \
reflist.h reflist.h
SOURCES = doxygen.cpp scanner.cpp classdef.cpp classlist.cpp memberdef.cpp \ SOURCES = doxygen.cpp scanner.cpp doc.cpp classdef.cpp classlist.cpp \
membername.cpp index.cpp memberlist.cpp \ memberdef.cpp membername.cpp index.cpp memberlist.cpp \
entry.cpp logos.cpp instdox.cpp message.cpp code.cpp \ entry.cpp logos.cpp instdox.cpp message.cpp code.cpp \
config.cpp filedef.cpp util.cpp groupdef.cpp \ config.cpp filedef.cpp util.cpp groupdef.cpp \
outputgen.cpp outputlist.cpp htmlgen.cpp latexgen.cpp mangen.cpp \ outputgen.cpp outputlist.cpp htmlgen.cpp latexgen.cpp mangen.cpp \
......
...@@ -65,6 +65,9 @@ sub GenerateDep { ...@@ -65,6 +65,9 @@ sub GenerateDep {
#$ GenerateDep("defargs.cpp","defargs.l"); #$ GenerateDep("defargs.cpp","defargs.l");
$(LEX) -PdefargsYY -t defargs.l >defargs.cpp $(LEX) -PdefargsYY -t defargs.l >defargs.cpp
#$ GenerateDep("doc.cpp","doc.l");
$(LEX) -PdocYY -t doc.l >doc.cpp
#$ GenerateDep("ce_lex.cpp","constexp.l","ce_parse.h"); #$ GenerateDep("ce_lex.cpp","constexp.l","ce_parse.h");
$(LEX) -PcppExpYY -t constexp.l >ce_lex.cpp $(LEX) -PcppExpYY -t constexp.l >ce_lex.cpp
...@@ -77,3 +80,4 @@ sub GenerateDep { ...@@ -77,3 +80,4 @@ sub GenerateDep {
xml_dtd.h: doxygen.dtd xml_dtd.h: doxygen.dtd
cat doxygen.dtd | sed -e "s/\"/\\\\\"/g" -e "s/^/\"/g" -e "s/$$/\\\\n\"/g" >xml_dtd.h cat doxygen.dtd | sed -e "s/\"/\\\\\"/g" -e "s/^/\"/g" -e "s/$$/\\\\n\"/g" >xml_dtd.h
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include "memberlist.h" #include "memberlist.h"
#include "classlist.h" #include "classlist.h"
#include "filedef.h" #include "filedef.h"
#include "scanner.h" #include "doc.h"
#include "doxygen.h" #include "doxygen.h"
#include "memberdef.h" #include "memberdef.h"
#include "classdef.h" #include "classdef.h"
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
#include "outputlist.h" #include "outputlist.h"
#include "dot.h" #include "dot.h"
#include "message.h" #include "message.h"
#include "code.h"
#include "xml.h"
/*! create a new file definition, where \a p is the file path, /*! create a new file definition, where \a p is the file path,
\a the file name, and \a ref is an HTML anchor name if the \a the file name, and \a ref is an HTML anchor name if the
...@@ -355,7 +357,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -355,7 +357,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trDefineDocumentation()); parseText(ol,theTranslator->trDefineDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
defineMembers.writeDocumentation(ol,name()); defineMembers.writeDocumentation(ol,name(),this);
} }
protoMembers.countDocMembers(); protoMembers.countDocMembers();
...@@ -365,7 +367,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -365,7 +367,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trFunctionPrototypeDocumentation()); parseText(ol,theTranslator->trFunctionPrototypeDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
protoMembers.writeDocumentation(ol,name()); protoMembers.writeDocumentation(ol,name(),this);
} }
typedefMembers.countDocMembers(); typedefMembers.countDocMembers();
...@@ -375,7 +377,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -375,7 +377,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trTypedefDocumentation()); parseText(ol,theTranslator->trTypedefDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
typedefMembers.writeDocumentation(ol,name()); typedefMembers.writeDocumentation(ol,name(),this);
} }
enumMembers.countDocMembers(); enumMembers.countDocMembers();
...@@ -385,7 +387,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -385,7 +387,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trEnumerationTypeDocumentation()); parseText(ol,theTranslator->trEnumerationTypeDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
enumMembers.writeDocumentation(ol,name()); enumMembers.writeDocumentation(ol,name(),this);
} }
funcMembers.countDocMembers(); funcMembers.countDocMembers();
...@@ -395,7 +397,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -395,7 +397,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trFunctionDocumentation()); parseText(ol,theTranslator->trFunctionDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
funcMembers.writeDocumentation(ol,name()); funcMembers.writeDocumentation(ol,name(),this);
} }
varMembers.countDocMembers(); varMembers.countDocMembers();
...@@ -405,7 +407,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -405,7 +407,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trVariableDocumentation()); parseText(ol,theTranslator->trVariableDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
varMembers.writeDocumentation(ol,name()); varMembers.writeDocumentation(ol,name(),this);
} }
// write Author section (Man only) // write Author section (Man only)
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "filedef.h" #include "filedef.h"
#include "classlist.h" #include "classlist.h"
#include "outputlist.h" #include "outputlist.h"
#include "scanner.h" #include "doc.h"
#include "namespacedef.h" #include "namespacedef.h"
#include "language.h" #include "language.h"
#include "util.h" #include "util.h"
...@@ -373,7 +373,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -373,7 +373,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trDefineDocumentation()); parseText(ol,theTranslator->trDefineDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
defineMembers.writeDocumentation(ol,name()); defineMembers.writeDocumentation(ol,name(),this);
} }
protoMembers.countDocMembers(); protoMembers.countDocMembers();
...@@ -383,7 +383,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -383,7 +383,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trFunctionPrototypeDocumentation()); parseText(ol,theTranslator->trFunctionPrototypeDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
protoMembers.writeDocumentation(ol,name()); protoMembers.writeDocumentation(ol,name(),this);
} }
typedefMembers.countDocMembers(); typedefMembers.countDocMembers();
...@@ -393,7 +393,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -393,7 +393,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trTypedefDocumentation()); parseText(ol,theTranslator->trTypedefDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
typedefMembers.writeDocumentation(ol,name()); typedefMembers.writeDocumentation(ol,name(),this);
} }
enumMembers.countDocMembers(); enumMembers.countDocMembers();
...@@ -403,7 +403,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -403,7 +403,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trEnumerationTypeDocumentation()); parseText(ol,theTranslator->trEnumerationTypeDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
enumMembers.writeDocumentation(ol,name()); enumMembers.writeDocumentation(ol,name(),this);
} }
//enumValMembers.countDocMembers(); //enumValMembers.countDocMembers();
...@@ -423,7 +423,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -423,7 +423,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trFunctionDocumentation()); parseText(ol,theTranslator->trFunctionDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
funcMembers.writeDocumentation(ol,name()); funcMembers.writeDocumentation(ol,name(),this);
} }
varMembers.countDocMembers(); varMembers.countDocMembers();
...@@ -433,7 +433,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -433,7 +433,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trVariableDocumentation()); parseText(ol,theTranslator->trVariableDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
varMembers.writeDocumentation(ol,name()); varMembers.writeDocumentation(ol,name(),this);
} }
endFile(ol); endFile(ol);
......
...@@ -277,13 +277,13 @@ void HtmlGenerator::writeStyleInfo(int part) ...@@ -277,13 +277,13 @@ void HtmlGenerator::writeStyleInfo(int part)
} }
} }
void HtmlGenerator::startDoxyAnchor(const char *,const char *, void HtmlGenerator::startDoxyAnchor(const char *,
const char *anchor, const char *name) const char *anchor, const char *name)
{ {
t << "<a name=\"" << anchor << "\" doxytag=\"" << name << "\"></a>"; t << "<a name=\"" << anchor << "\" doxytag=\"" << name << "\"></a>";
} }
void HtmlGenerator::endDoxyAnchor() void HtmlGenerator::endDoxyAnchor(const char *,const char *)
{ {
} }
...@@ -789,12 +789,11 @@ void HtmlGenerator::endAlphabeticalIndexList() ...@@ -789,12 +789,11 @@ void HtmlGenerator::endAlphabeticalIndexList()
void HtmlGenerator::writeIndexHeading(const char *s) void HtmlGenerator::writeIndexHeading(const char *s)
{ {
//t << "<dt><b><big>" << s << "</big></b><dd>" << endl;
t << "<div class=\"ah\"><font color=\"white\"><b>&nbsp;&nbsp;" << s t << "<div class=\"ah\"><font color=\"white\"><b>&nbsp;&nbsp;" << s
<< "&nbsp;&nbsp;</b></font></div>"; << "&nbsp;&nbsp;</b></font></div>";
} }
void HtmlGenerator::writeImage(const char *name,const char *,const char *) void HtmlGenerator::startImage(const char *name,const char *,bool hasCaption)
{ {
QCString baseName=name; QCString baseName=name;
int i; int i;
...@@ -802,7 +801,21 @@ void HtmlGenerator::writeImage(const char *name,const char *,const char *) ...@@ -802,7 +801,21 @@ void HtmlGenerator::writeImage(const char *name,const char *,const char *)
{ {
baseName=baseName.right(baseName.length()-i-1); baseName=baseName.right(baseName.length()-i-1);
} }
t << "<div align=\"center\">" << endl;
t << "<img src=\"" << name << "\" alt=\"" << baseName << "\">" << endl; t << "<img src=\"" << name << "\" alt=\"" << baseName << "\">" << endl;
if (hasCaption)
{
t << "<p><strong>";
}
}
void HtmlGenerator::endImage(bool hasCaption)
{
if (hasCaption)
{
t << "</strong></p>" << endl;
}
t << "</div>" << endl;
} }
void HtmlGenerator::startMemberDoc(const char *,const char *,const char *,const char *) void HtmlGenerator::startMemberDoc(const char *,const char *,const char *,const char *)
......
...@@ -142,9 +142,8 @@ class HtmlGenerator : public OutputGenerator ...@@ -142,9 +142,8 @@ class HtmlGenerator : public OutputGenerator
void endMemberDoc(); void endMemberDoc();
//void writeDoxyAnchor(const char *fName,const char *clName, //void writeDoxyAnchor(const char *fName,const char *clName,
// const char *anchor,const char *name); // const char *anchor,const char *name);
void startDoxyAnchor(const char *fName,const char *clName, void startDoxyAnchor(const char *fName,const char *anchor,const char *name);
const char *anchor,const char *name); void endDoxyAnchor(const char *fName,const char *anchor);
void endDoxyAnchor();
void startCodeAnchor(const char *label) { t << "<a name=\"" << label << "\"></a>"; } void startCodeAnchor(const char *label) { t << "<a name=\"" << label << "\"></a>"; }
void endCodeAnchor() { } void endCodeAnchor() { }
void writeLatexSpacing() {} void writeLatexSpacing() {}
...@@ -201,7 +200,8 @@ class HtmlGenerator : public OutputGenerator ...@@ -201,7 +200,8 @@ class HtmlGenerator : public OutputGenerator
void endQuickIndexItem(); void endQuickIndexItem();
void writeFormula(const char *,const char *); void writeFormula(const char *,const char *);
void writeNonBreakableSpace() { t << "&nbsp;&nbsp;&nbsp;"; } void writeNonBreakableSpace() { t << "&nbsp;&nbsp;&nbsp;"; }
void writeImage(const char *,const char *,const char *); void startImage(const char *,const char *,bool);
void endImage(bool);
void startDescTable() void startDescTable()
{ t << "<table border=0 cellspacing=2 cellpadding=0>" << endl; } { t << "<table border=0 cellspacing=2 cellpadding=0>" << endl; }
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "message.h" #include "message.h"
#include "index.h" #include "index.h"
#include "doxygen.h" #include "doxygen.h"
#include "scanner.h" #include "doc.h"
#include "code.h" #include "code.h"
#include "config.h" #include "config.h"
#include "filedef.h" #include "filedef.h"
...@@ -634,7 +634,7 @@ void writeNamespaceIndex(OutputList &ol) ...@@ -634,7 +634,7 @@ void writeNamespaceIndex(OutputList &ol)
ol.endEmphasis(); ol.endEmphasis();
} }
ol.docify(")"); ol.docify(")");
ol.writeEndAnnoItem(nd->name()); ol.writeEndAnnoItem(nd->getOutputFileBase());
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
htmlHelp->addContentsItem(nd->name(),nd->getOutputFileBase()); htmlHelp->addContentsItem(nd->name(),nd->getOutputFileBase());
...@@ -710,7 +710,7 @@ void writeAnnotatedClassList(OutputList &ol) ...@@ -710,7 +710,7 @@ void writeAnnotatedClassList(OutputList &ol)
ol.endEmphasis(); ol.endEmphasis();
} }
ol.docify(")"); ol.docify(")");
ol.writeEndAnnoItem(cd->name()); ol.writeEndAnnoItem(cd->getOutputFileBase());
if (Config::generateHtml && Config::htmlHelpFlag) if (Config::generateHtml && Config::htmlHelpFlag)
{ {
HtmlHelp::getInstance()->addContentsItem( HtmlHelp::getInstance()->addContentsItem(
...@@ -1521,7 +1521,11 @@ void writeGraphInfo(OutputList &ol) ...@@ -1521,7 +1521,11 @@ void writeGraphInfo(OutputList &ol)
startTitle(ol,0); startTitle(ol,0);
parseText(ol,theTranslator->trLegendTitle()); parseText(ol,theTranslator->trLegendTitle());
endTitle(ol,0,0); endTitle(ol,0,0);
bool oldStripCommentsState = Config::stripCommentsFlag;
// temporarily disable the stripping of comments for our own code example!
Config::stripCommentsFlag = FALSE;
parseDoc(ol,"graph_legend",1,0,0,theTranslator->trLegendDocs()); parseDoc(ol,"graph_legend",1,0,0,theTranslator->trLegendDocs());
Config::stripCommentsFlag = oldStripCommentsState;
endFile(ol); endFile(ol);
ol.popGeneratorState(); ol.popGeneratorState();
} }
......
...@@ -800,7 +800,7 @@ void LatexGenerator::writeIndexItem(const char *ref,const char *fn, ...@@ -800,7 +800,7 @@ void LatexGenerator::writeIndexItem(const char *ref,const char *fn,
{ {
t << "\\contentsline{section}{"; t << "\\contentsline{section}{";
docify(name); docify(name);
t << "}{\\pageref{" << name << "}}{}" << endl; t << "}{\\pageref{" << fn << "}}{}" << endl;
} }
else else
docify(name); docify(name);
...@@ -871,14 +871,15 @@ void LatexGenerator::startTextLink(const char *f,const char *anchor) ...@@ -871,14 +871,15 @@ void LatexGenerator::startTextLink(const char *f,const char *anchor)
if (anchor) t << "_" << anchor; if (anchor) t << "_" << anchor;
t << "}{"; t << "}{";
} }
else
{
t << "{\\bf ";
}
} }
void LatexGenerator::endTextLink() void LatexGenerator::endTextLink()
{ {
if (Config::pdfHyperFlag) t << "}";
{
t << "}";
}
} }
void LatexGenerator::writeObjectLink(const char *ref, const char *f, void LatexGenerator::writeObjectLink(const char *ref, const char *f,
...@@ -936,7 +937,7 @@ void LatexGenerator::endTitleHead(const char *fileName,const char *name) ...@@ -936,7 +937,7 @@ void LatexGenerator::endTitleHead(const char *fileName,const char *name)
t << "}" << endl; t << "}" << endl;
if (name) if (name)
{ {
t << "\\label{" << name << "}\\index{" t << "\\label{" << fileName << "}\\index{"
<< name << "@{"; << name << "@{";
docify(name); docify(name);
t << "}}" << endl; t << "}}" << endl;
...@@ -1012,13 +1013,9 @@ void LatexGenerator::endMemberDoc() ...@@ -1012,13 +1013,9 @@ void LatexGenerator::endMemberDoc()
if (Config::compactLatexFlag) t << "\\hfill"; if (Config::compactLatexFlag) t << "\\hfill";
} }
void LatexGenerator::startDoxyAnchor(const char *fName,const char *clname, void LatexGenerator::startDoxyAnchor(const char *fName,const char *anchor,
const char *anchor,const char *) const char *)
{ {
t << "\\label{";
if (clname) t << clname;
if (anchor) t << "_" << anchor;
t << "}" << endl;
if (Config::pdfHyperFlag) if (Config::pdfHyperFlag)
{ {
t << "\\hypertarget{"; t << "\\hypertarget{";
...@@ -1028,12 +1025,16 @@ void LatexGenerator::startDoxyAnchor(const char *fName,const char *clname, ...@@ -1028,12 +1025,16 @@ void LatexGenerator::startDoxyAnchor(const char *fName,const char *clname,
} }
} }
void LatexGenerator::endDoxyAnchor() void LatexGenerator::endDoxyAnchor(const char *fName,const char *anchor)
{ {
if (Config::pdfHyperFlag) if (Config::pdfHyperFlag)
{ {
t << "}" << endl; t << "}" << endl;
} }
t << "\\label{";
if (fName) t << fName;
if (anchor) t << "_" << anchor;
t << "}" << endl;
} }
void LatexGenerator::writeAnchor(const char *fName,const char *name) void LatexGenerator::writeAnchor(const char *fName,const char *name)
...@@ -1406,20 +1407,34 @@ void LatexGenerator::endMemberList() ...@@ -1406,20 +1407,34 @@ void LatexGenerator::endMemberList()
t << "\\end{CompactItemize}" << endl; t << "\\end{CompactItemize}" << endl;
} }
void LatexGenerator::writeImage(const char *name,const char *w,const char *h) void LatexGenerator::startImage(const char *name,const char *size,bool hasCaption)
{ {
t << "\\mbox{"; if (hasCaption)
t << "\\begin{figure}[H]" << endl;
else
t << "\\mbox{";
QCString gfxName = name; QCString gfxName = name;
if (gfxName.right(4)==".eps") gfxName.left(gfxName.length()-4); if (gfxName.right(4)==".eps") gfxName.left(gfxName.length()-4);
// "\\epsfig{file=" << name; // "\\epsfig{file=" << name;
t << "\\includegraphics"; t << "\\includegraphics";
if (w || h) t << "["; if (size) t << "[" << size << "]";
if (w) t << "width=" << w; else if (h) t << "height=" << h;
if (w || h) t << "]";
t << "{" << gfxName << "}"; t << "{" << gfxName << "}";
t << "}" << endl; if (hasCaption)
t << "\\caption{";
else
t << "}" << endl;
} }
void LatexGenerator::endImage(bool hasCaption)
{
if (hasCaption)
{
t << "}" << endl;
t << "\\end{figure}" << endl;
}
}
void LatexGenerator::startMemberGroupHeader(bool hasHeader) void LatexGenerator::startMemberGroupHeader(bool hasHeader)
{ {
if (hasHeader) t << "\\begin{Indent}"; if (hasHeader) t << "\\begin{Indent}";
......
...@@ -125,8 +125,8 @@ class LatexGenerator : public OutputGenerator ...@@ -125,8 +125,8 @@ class LatexGenerator : public OutputGenerator
void lineBreak() { t << "\\par\n"; } void lineBreak() { t << "\\par\n"; }
void startMemberDoc(const char *,const char *,const char *,const char *); void startMemberDoc(const char *,const char *,const char *,const char *);
void endMemberDoc(); void endMemberDoc();
void startDoxyAnchor(const char *,const char *,const char *,const char *); void startDoxyAnchor(const char *,const char *,const char *);
void endDoxyAnchor(); void endDoxyAnchor(const char *,const char *);
void startCodeAnchor(const char *) {} void startCodeAnchor(const char *) {}
void endCodeAnchor() {} void endCodeAnchor() {}
void writeChar(char c); void writeChar(char c);
...@@ -197,7 +197,8 @@ class LatexGenerator : public OutputGenerator ...@@ -197,7 +197,8 @@ class LatexGenerator : public OutputGenerator
void endQuickIndexItem() {} void endQuickIndexItem() {}
void writeFormula(const char *,const char *); void writeFormula(const char *,const char *);
void writeNonBreakableSpace(); void writeNonBreakableSpace();
void writeImage(const char *,const char *,const char *); void startImage(const char *,const char *,bool);
void endImage(bool);
void startDescTable() void startDescTable()
{ t << "\\begin{description}" << endl; } { t << "\\begin{description}" << endl; }
......
...@@ -122,9 +122,8 @@ class ManGenerator : public OutputGenerator ...@@ -122,9 +122,8 @@ class ManGenerator : public OutputGenerator
void writeChar(char c); void writeChar(char c);
void startMemberDoc(const char *,const char *,const char *,const char *); void startMemberDoc(const char *,const char *,const char *,const char *);
void endMemberDoc() {} void endMemberDoc() {}
void startDoxyAnchor(const char *,const char *, void startDoxyAnchor(const char *,const char *,const char *) {}
const char *,const char *) {} void endDoxyAnchor(const char *,const char *) {}
void endDoxyAnchor() {}
void startCodeAnchor(const char *) {} void startCodeAnchor(const char *) {}
void endCodeAnchor() {} void endCodeAnchor() {}
void writeLatexSpacing() {} void writeLatexSpacing() {}
...@@ -188,7 +187,8 @@ class ManGenerator : public OutputGenerator ...@@ -188,7 +187,8 @@ class ManGenerator : public OutputGenerator
void endQuickIndexItem() {} void endQuickIndexItem() {}
void writeFormula(const char *,const char *) {} void writeFormula(const char *,const char *) {}
void writeNonBreakableSpace() { t << " "; } void writeNonBreakableSpace() { t << " "; }
void writeImage(const char *,const char *,const char *) {} void startImage(const char *,const char *,bool) {}
void endImage(bool) {}
void startDescTable() {} void startDescTable() {}
void endDescTable() {} void endDescTable() {}
......
...@@ -21,13 +21,14 @@ ...@@ -21,13 +21,14 @@
#include "membername.h" #include "membername.h"
#include "doxygen.h" #include "doxygen.h"
#include "util.h" #include "util.h"
#include "code.h"
#include "message.h" #include "message.h"
#include "htmlhelp.h" #include "htmlhelp.h"
#include "language.h" #include "language.h"
#include "outputlist.h" #include "outputlist.h"
#include "example.h" #include "example.h"
#include "membergroup.h" #include "membergroup.h"
#include "scanner.h" #include "doc.h"
#include "groupdef.h" #include "groupdef.h"
#include "defargs.h" #include "defargs.h"
#include "xml.h" #include "xml.h"
...@@ -583,7 +584,7 @@ void MemberDef::writeDeclaration(OutputList &ol, ...@@ -583,7 +584,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
{ {
QCString doxyName=name().copy(); QCString doxyName=name().copy();
if (!cname.isEmpty()) doxyName.prepend(cname+"::"); if (!cname.isEmpty()) doxyName.prepend(cname+"::");
ol.startDoxyAnchor(cfname,cname,anchor(),doxyName); ol.startDoxyAnchor(cfname,anchor(),doxyName);
ol.addToIndex(name(),cname); ol.addToIndex(name(),cname);
ol.addToIndex(cname,name()); ol.addToIndex(cname,name());
if (hasHtmlHelp) if (hasHtmlHelp)
...@@ -763,7 +764,7 @@ void MemberDef::writeDeclaration(OutputList &ol, ...@@ -763,7 +764,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
if (!detailsVisible && !Config::extractAllFlag && !annMemb) if (!detailsVisible && !Config::extractAllFlag && !annMemb)
{ {
ol.endDoxyAnchor(); ol.endDoxyAnchor(cfname,anchor());
} }
ol.endMemberItem((annoClassDef!=0 && indDepth==0) || annEnumType); ol.endMemberItem((annoClassDef!=0 && indDepth==0) || annEnumType);
...@@ -796,7 +797,7 @@ void MemberDef::writeDeclaration(OutputList &ol, ...@@ -796,7 +797,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
* all active output formats. * all active output formats.
*/ */
void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
const char *scopeName) const char *scopeName,Definition *container)
{ {
if (getClassDef()==0 && isStatic() && !Config::extractStaticFlag) return; if (getClassDef()==0 && isStatic() && !Config::extractStaticFlag) return;
bool hasDocs = detailsAreVisible(); bool hasDocs = detailsAreVisible();
...@@ -809,16 +810,9 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -809,16 +810,9 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
(!hasDocs && !briefDescription().isEmpty() && annUsed) (!hasDocs && !briefDescription().isEmpty() && annUsed)
) )
{ {
// get definition. TODO: make a method of this // get definition.
NamespaceDef *nd=getNamespaceDef(); QCString cname = container->name();
ClassDef *cd=getClassDef(); QCString cfname = container->getOutputFileBase();
FileDef *fd=getFileDef();
Definition *d = 0;
if (cd) d=cd; else if (nd) d=nd; else d=fd;
ASSERT(d!=0);
QCString cname = d->name();
QCString cfname = d->getOutputFileBase();
// get member name // get member name
QCString doxyName=name().copy(); QCString doxyName=name().copy();
...@@ -858,7 +852,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -858,7 +852,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
{ {
if (vmd->isEnumerate() && ldef.mid(i,l)==vmd->name()) if (vmd->isEnumerate() && ldef.mid(i,l)==vmd->name())
{ {
ol.startDoxyAnchor(cfname,cname,anchor(),doxyName); ol.startDoxyAnchor(cfname,anchor(),doxyName);
ol.startMemberDoc(cname,name(),anchor(),name()); ol.startMemberDoc(cname,name(),anchor(),name());
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
...@@ -874,7 +868,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -874,7 +868,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if (!found) // anonymous compound if (!found) // anonymous compound
{ {
//printf("Annonymous compound `%s'\n",cname.data()); //printf("Annonymous compound `%s'\n",cname.data());
ol.startDoxyAnchor(cfname,cname,anchor(),doxyName); ol.startDoxyAnchor(cfname,anchor(),doxyName);
ol.startMemberDoc(cname,name(),anchor(),name()); ol.startMemberDoc(cname,name(),anchor(),name());
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
...@@ -895,13 +889,14 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -895,13 +889,14 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
} }
else else
{ {
ol.startDoxyAnchor(cfname,cname,anchor(),doxyName); ol.startDoxyAnchor(cfname,anchor(),doxyName);
ol.startMemberDoc(cname,name(),anchor(),name()); ol.startMemberDoc(cname,name(),anchor(),name());
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
htmlHelp->addIndexItem(cname,name(),cfname,anchor()); htmlHelp->addIndexItem(cname,name(),cfname,anchor());
} }
ClassDef *cd=getClassDef();
ArgumentList *scopeAl=scopeDefTemplateArguments(); ArgumentList *scopeAl=scopeDefTemplateArguments();
if (scopeAl==0 && cd) scopeAl=cd->templateArguments(); if (scopeAl==0 && cd) scopeAl=cd->templateArguments();
...@@ -1016,7 +1011,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1016,7 +1011,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
} }
if (!isDefine()) ol.endParameter(TRUE); if (!isDefine()) ol.endParameter(TRUE);
ol.endMemberDoc(); ol.endMemberDoc();
ol.endDoxyAnchor(); ol.endDoxyAnchor(cfname,anchor());
ol.startIndent(); ol.startIndent();
ol.pushGeneratorState(); ol.pushGeneratorState();
...@@ -1121,7 +1116,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1121,7 +1116,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
} }
//ol.writeListItem(); //ol.writeListItem();
ol.startDescTableTitle(); ol.startDescTableTitle();
ol.startDoxyAnchor(cfname,cname,fmd->anchor(),fmd->name()); ol.startDoxyAnchor(cfname,fmd->anchor(),fmd->name());
first=FALSE; first=FALSE;
ol.startEmphasis(); ol.startEmphasis();
ol.docify(fmd->name()); ol.docify(fmd->name());
...@@ -1129,7 +1124,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1129,7 +1124,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.disableAllBut(OutputGenerator::Man); ol.disableAllBut(OutputGenerator::Man);
ol.writeString(" "); ol.writeString(" ");
ol.enableAll(); ol.enableAll();
ol.endDoxyAnchor(); ol.endDoxyAnchor(cfname,fmd->anchor());
ol.endDescTableTitle(); ol.endDescTableTitle();
//ol.newParagraph(); //ol.newParagraph();
ol.startDescTableData(); ol.startDescTableData();
...@@ -1324,10 +1319,10 @@ void MemberDef::warnIfUndocumented() ...@@ -1324,10 +1319,10 @@ void MemberDef::warnIfUndocumented()
t="class", d=cd; t="class", d=cd;
else if (nd) else if (nd)
t="namespace", d=nd; t="namespace", d=nd;
else if (fd) else if (gd)
t="file", d=fd;
else
t="group", d=gd; t="group", d=gd;
else
t="file", d=fd;
if (d && d->isLinkable() && !isLinkable() && name().find('@')==-1) if (d && d->isLinkable() && !isLinkable() && name().find('@')==-1)
warn_undoc(defFileName,defLine,"Warning: Member %s of %s %s is not documented.", warn_undoc(defFileName,defLine,"Warning: Member %s of %s %s is not documented.",
...@@ -1570,3 +1565,20 @@ void MemberDef::generateXML(QTextStream &t,Definition *def) ...@@ -1570,3 +1565,20 @@ void MemberDef::generateXML(QTextStream &t,Definition *def)
t << ">" << endl; t << ">" << endl;
} }
Definition *MemberDef::getCompoundDef() const
{
NamespaceDef *nd=getNamespaceDef();
ClassDef *cd=getClassDef();
FileDef *fd=getFileDef();
GroupDef *gd=getGroupDef();
Definition *d = 0;
if (cd) d=cd; else if (nd) d=nd; else if (gd) d=gd; else d=fd;
ASSERT(d!=0);
return d;
}
QCString MemberDef::anchor() const
{
if (enumScope) return enumScope->anchor()+anc;
return anc;
}
...@@ -79,7 +79,7 @@ class MemberDef : public Definition ...@@ -79,7 +79,7 @@ class MemberDef : public Definition
const char *typeString() const { return type; } const char *typeString() const { return type; }
const char *argsString() const { return args; } const char *argsString() const { return args; }
const char *excpString() const { return exception; } const char *excpString() const { return exception; }
const char *anchor() const { return anc; } QCString anchor() const;
const QCString &initializer() const { return init; } const QCString &initializer() const { return init; }
int initializerLines() const { return initLines; } int initializerLines() const { return initLines; }
int getMemberSpecifiers() const { return memSpec; } int getMemberSpecifiers() const { return memSpec; }
...@@ -90,6 +90,7 @@ class MemberDef : public Definition ...@@ -90,6 +90,7 @@ class MemberDef : public Definition
GroupDef *getGroupDef() const { return group; } GroupDef *getGroupDef() const { return group; }
FileDef *getFileDef() const { return fileDef; } FileDef *getFileDef() const { return fileDef; }
NamespaceDef* getNamespaceDef() const { return nspace; } NamespaceDef* getNamespaceDef() const { return nspace; }
Definition *getCompoundDef() const;
// direct kind info // direct kind info
Protection protection() const { return prot; } Protection protection() const { return prot; }
...@@ -144,7 +145,7 @@ class MemberDef : public Definition ...@@ -144,7 +145,7 @@ class MemberDef : public Definition
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
bool inGroup); bool inGroup);
void writeDocumentation(MemberList *ml,OutputList &ol, void writeDocumentation(MemberList *ml,OutputList &ol,
const char *scopeName/*,MemberType m*/); const char *scopeName,Definition *container);
void warnIfUndocumented(); void warnIfUndocumented();
// relation to other members // relation to other members
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "language.h" #include "language.h"
#include "doxygen.h" #include "doxygen.h"
#include "outputlist.h" #include "outputlist.h"
#include "scanner.h" #include "doc.h"
#include "groupdef.h" #include "groupdef.h"
MemberList::MemberList() : QList<MemberDef>() MemberList::MemberList() : QList<MemberDef>()
...@@ -583,13 +583,13 @@ void MemberList::writeDeclarations(OutputList &ol, ...@@ -583,13 +583,13 @@ void MemberList::writeDeclarations(OutputList &ol,
} }
void MemberList::writeDocumentation(OutputList &ol, void MemberList::writeDocumentation(OutputList &ol,
const char *scopeName/*, MemberDef::MemberType m*/) const char *scopeName, Definition *container)
{ {
MemberListIterator mli(*this); MemberListIterator mli(*this);
MemberDef *md; MemberDef *md;
for ( ; (md=mli.current()) ; ++mli) for ( ; (md=mli.current()) ; ++mli)
{ {
md->writeDocumentation(this,ol,scopeName); md->writeDocumentation(this,ol,scopeName,container);
} }
} }
......
...@@ -55,8 +55,8 @@ class MemberList : public QList<MemberDef> ...@@ -55,8 +55,8 @@ class MemberList : public QList<MemberDef>
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
const char *title,const char *subtitle, const char *title,const char *subtitle,
bool inGroup=FALSE,bool countSubGroups=TRUE); bool inGroup=FALSE,bool countSubGroups=TRUE);
void writeDocumentation(OutputList &ol,const char *scopeName void writeDocumentation(OutputList &ol,const char *scopeName,
/*,MemberDef::MemberType m*/); Definition *container);
void addMemberGroup(MemberGroup *mg); void addMemberGroup(MemberGroup *mg);
private: private:
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include "namespacedef.h" #include "namespacedef.h"
#include "outputlist.h" #include "outputlist.h"
#include "util.h" #include "util.h"
#include "scanner.h" #include "doc.h"
#include "language.h" #include "language.h"
#include "classdef.h" #include "classdef.h"
#include "classlist.h" #include "classlist.h"
...@@ -272,7 +272,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -272,7 +272,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trDefineDocumentation()); parseText(ol,theTranslator->trDefineDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
defineMembers.writeDocumentation(ol,name()); defineMembers.writeDocumentation(ol,name(),this);
} }
protoMembers.countDocMembers(); protoMembers.countDocMembers();
...@@ -282,7 +282,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -282,7 +282,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trFunctionPrototypeDocumentation()); parseText(ol,theTranslator->trFunctionPrototypeDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
protoMembers.writeDocumentation(ol,name()); protoMembers.writeDocumentation(ol,name(),this);
} }
typedefMembers.countDocMembers(); typedefMembers.countDocMembers();
...@@ -292,7 +292,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -292,7 +292,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trTypedefDocumentation()); parseText(ol,theTranslator->trTypedefDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
typedefMembers.writeDocumentation(ol,name()); typedefMembers.writeDocumentation(ol,name(),this);
} }
enumMembers.countDocMembers(); enumMembers.countDocMembers();
...@@ -302,7 +302,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -302,7 +302,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trEnumerationTypeDocumentation()); parseText(ol,theTranslator->trEnumerationTypeDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
enumMembers.writeDocumentation(ol,name()); enumMembers.writeDocumentation(ol,name(),this);
} }
//enumValMembers.countDocMembers(); //enumValMembers.countDocMembers();
...@@ -322,7 +322,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -322,7 +322,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trFunctionDocumentation()); parseText(ol,theTranslator->trFunctionDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
funcMembers.writeDocumentation(ol,name()); funcMembers.writeDocumentation(ol,name(),this);
} }
varMembers.countDocMembers(); varMembers.countDocMembers();
...@@ -332,7 +332,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -332,7 +332,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trVariableDocumentation()); parseText(ol,theTranslator->trVariableDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
varMembers.writeDocumentation(ol,name()); varMembers.writeDocumentation(ol,name(),this);
} }
// write Author section (Man only) // write Author section (Man only)
......
...@@ -122,9 +122,9 @@ class OutputGenerator ...@@ -122,9 +122,9 @@ class OutputGenerator
virtual void startMemberDoc(const char *,const char *, virtual void startMemberDoc(const char *,const char *,
const char *,const char *) = 0; const char *,const char *) = 0;
virtual void endMemberDoc() = 0; virtual void endMemberDoc() = 0;
virtual void startDoxyAnchor(const char *fileName,const char *clName, virtual void startDoxyAnchor(const char *fName,const char *anchor,
const char *anchor,const char *name) = 0; const char *name) = 0;
virtual void endDoxyAnchor() = 0; virtual void endDoxyAnchor(const char *fileName,const char *anchor) = 0;
virtual void startCodeAnchor(const char *label) = 0; virtual void startCodeAnchor(const char *label) = 0;
virtual void endCodeAnchor() = 0; virtual void endCodeAnchor() = 0;
virtual void writeLatexSpacing() = 0; virtual void writeLatexSpacing() = 0;
...@@ -187,7 +187,8 @@ class OutputGenerator ...@@ -187,7 +187,8 @@ class OutputGenerator
virtual void endQuickIndexItem() = 0; virtual void endQuickIndexItem() = 0;
virtual void writeFormula(const char *,const char *) = 0; virtual void writeFormula(const char *,const char *) = 0;
virtual void writeNonBreakableSpace() = 0; virtual void writeNonBreakableSpace() = 0;
virtual void writeImage(const char *,const char *,const char *) = 0; virtual void startImage(const char *,const char *,bool) = 0;
virtual void endImage(bool) = 0;
virtual void startDescTable() = 0; virtual void startDescTable() = 0;
virtual void endDescTable() = 0; virtual void endDescTable() = 0;
......
...@@ -203,11 +203,10 @@ class OutputList ...@@ -203,11 +203,10 @@ class OutputList
{ forall(&OutputGenerator::startMemberDoc,clName,memName,anchor,title); } { forall(&OutputGenerator::startMemberDoc,clName,memName,anchor,title); }
void endMemberDoc() void endMemberDoc()
{ forall(&OutputGenerator::endMemberDoc); } { forall(&OutputGenerator::endMemberDoc); }
void startDoxyAnchor(const char *fn, const char *cn, void startDoxyAnchor(const char *fName,const char *anchor, const char *name)
const char *anchor,const char *name) { forall(&OutputGenerator::startDoxyAnchor,fName,anchor,name); }
{ forall(&OutputGenerator::startDoxyAnchor,fn,cn,anchor,name); } void endDoxyAnchor(const char *fn,const char *anchor)
void endDoxyAnchor() { forall(&OutputGenerator::endDoxyAnchor,fn,anchor); }
{ forall(&OutputGenerator::endDoxyAnchor); }
void startCodeAnchor(const char *label) void startCodeAnchor(const char *label)
{ forall(&OutputGenerator::startCodeAnchor,label); } { forall(&OutputGenerator::startCodeAnchor,label); }
void endCodeAnchor() void endCodeAnchor()
...@@ -332,8 +331,10 @@ class OutputList ...@@ -332,8 +331,10 @@ class OutputList
{ forall(&OutputGenerator::writeFormula,n,t); } { forall(&OutputGenerator::writeFormula,n,t); }
void writeNonBreakableSpace() void writeNonBreakableSpace()
{ forall(&OutputGenerator::writeNonBreakableSpace); } { forall(&OutputGenerator::writeNonBreakableSpace); }
void writeImage(const char *n,const char *w,const char *h) void startImage(const char *n,const char *s,bool c)
{ forall(&OutputGenerator::writeImage,n,w,h); } { forall(&OutputGenerator::startImage,n,s,c); }
void endImage(bool c)
{ forall(&OutputGenerator::endImage,c); }
void startDescTable() void startDescTable()
{ forall(&OutputGenerator::startDescTable); } { forall(&OutputGenerator::startDescTable); }
......
...@@ -1124,7 +1124,7 @@ void RTFGenerator::writeIndexItem(const char *ref,const char *fn, ...@@ -1124,7 +1124,7 @@ void RTFGenerator::writeIndexItem(const char *ref,const char *fn,
if (!ref && fn) if (!ref && fn)
{ {
t << "\\tab "; t << "\\tab ";
WriteRTFReference(name); WriteRTFReference(fn);
t << endl; t << endl;
} }
else else
...@@ -1392,15 +1392,15 @@ void RTFGenerator::endTitleHead(const char *fileName,const char *name) ...@@ -1392,15 +1392,15 @@ void RTFGenerator::endTitleHead(const char *fileName,const char *name)
// make an index entry // make an index entry
addToIndex(name,0); addToIndex(name,0);
if (name) //if (name)
{ //{
writeAnchor(0,name); // writeAnchor(0,name);
} //}
//
if (Config::rtfHyperFlag && fileName) //if (Config::rtfHyperFlag && fileName)
{ //{
writeAnchor(fileName,0); writeAnchor(fileName,0);
} //}
} }
} }
...@@ -1459,13 +1459,16 @@ void RTFGenerator::endMemberDoc() ...@@ -1459,13 +1459,16 @@ void RTFGenerator::endMemberDoc()
newParagraph(); newParagraph();
} }
void RTFGenerator::startDoxyAnchor(const char *fName,const char *clname, void RTFGenerator::startDoxyAnchor(const char *,const char *,const char *)
const char *anchor,const char *) {
}
void RTFGenerator::endDoxyAnchor(const char *fName,const char *anchor)
{ {
QCString ref; QCString ref;
if (clname) if (fName)
{ {
ref+=clname; ref+=fName;
} }
if (anchor) if (anchor)
{ {
...@@ -1479,33 +1482,6 @@ void RTFGenerator::startDoxyAnchor(const char *fName,const char *clname, ...@@ -1479,33 +1482,6 @@ void RTFGenerator::startDoxyAnchor(const char *fName,const char *clname,
t << "{\\bkmkend "; t << "{\\bkmkend ";
t << formatBmkStr(ref); t << formatBmkStr(ref);
t << "}" << endl; t << "}" << endl;
if (Config::rtfHyperFlag)
{ // doxygen expects a bookmark based on fName for the hyper target so we make a second bookmark
ref="";
if (fName)
{
ref+=fName;
}
if (anchor)
{
ref+='_';
ref+=anchor;
}
t << "{\\bkmkstart ";
t << formatBmkStr(ref);
t << "}" << endl;
t << "{\\bkmkend ";
t << formatBmkStr(ref);
t << "}" << endl;
}
}
void RTFGenerator::endDoxyAnchor()
{
} }
...@@ -1760,12 +1736,9 @@ void RTFGenerator::endClassDiagram(ClassDiagram &d, ...@@ -1760,12 +1736,9 @@ void RTFGenerator::endClassDiagram(ClassDiagram &d,
const char *fileName,const char *) const char *fileName,const char *)
{ {
newParagraph(); newParagraph();
DBG_RTF(t <<"{\\comment This would be an image map..." << endl)
// create a gif file // create a gif file
d.writeImageMap(t,dir,fileName); d.writeImageMap(t,dir,fileName,FALSE);
t << "}" << endl;
// display the file // display the file
t << "{" << endl; t << "{" << endl;
...@@ -1855,16 +1828,14 @@ void RTFGenerator::endMemberList() ...@@ -1855,16 +1828,14 @@ void RTFGenerator::endMemberList()
#endif #endif
} }
void RTFGenerator::writeImage(const char *,const char *,const char *) void RTFGenerator::startImage(const char *,const char *,bool)
{ {
#ifdef DELETEDCODE // not yet implemented
t << "\\mbox{\\epsfig{file=" << name; }
if (w)
t << "," << w; void RTFGenerator::endImage(bool)
else if (h) {
t << "," << h; // not yet implemented
t << "}}" << endl;
#endif
} }
void RTFGenerator::startDescTable() void RTFGenerator::startDescTable()
......
...@@ -120,8 +120,8 @@ class RTFGenerator : public OutputGenerator ...@@ -120,8 +120,8 @@ class RTFGenerator : public OutputGenerator
void lineBreak(); void lineBreak();
void startMemberDoc(const char *,const char *,const char *,const char *); void startMemberDoc(const char *,const char *,const char *,const char *);
void endMemberDoc(); void endMemberDoc();
void startDoxyAnchor(const char *,const char *,const char *,const char *); void startDoxyAnchor(const char *,const char *,const char *);
void endDoxyAnchor(); void endDoxyAnchor(const char *,const char *);
void startCodeAnchor(const char *) {}; void startCodeAnchor(const char *) {};
void endCodeAnchor() {}; void endCodeAnchor() {};
void writeChar(char c); void writeChar(char c);
...@@ -183,7 +183,8 @@ class RTFGenerator : public OutputGenerator ...@@ -183,7 +183,8 @@ class RTFGenerator : public OutputGenerator
void endQuickIndexItem() {} void endQuickIndexItem() {}
void writeFormula(const char *,const char *); void writeFormula(const char *,const char *);
void writeNonBreakableSpace(); void writeNonBreakableSpace();
void writeImage(const char *,const char *,const char *); void startImage(const char *,const char *,bool);
void endImage(bool);
void startDescTable(); void startDescTable();
void endDescTable(); void endDescTable();
......
...@@ -19,22 +19,10 @@ ...@@ -19,22 +19,10 @@
#define SCANNER_H #define SCANNER_H
#include "qtbc.h" #include "qtbc.h"
#include <stdio.h>
#include <qlist.h>
#include <qintdict.h>
#include "entry.h"
#include "code.h"
class OutputList; class OutputList;
class Entry;
extern void parseMain(Entry *); extern void parseMain(Entry *);
extern void parseDoc(OutputList &ol,
const char *fileName,int startLine,
const char *clName, const char *memName,
const QCString &docString);
extern void parseExample(OutputList &ol,const QCString &docString,
const char *fileName);
extern void parseText(OutputList &ol,const QCString &txtString);
#endif #endif
This diff is collapsed.
...@@ -982,12 +982,12 @@ class Translator ...@@ -982,12 +982,12 @@ class Translator
// new since 1.2.0 // new since 1.2.0
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
/*! Used as a marker that is put before a todo item */ /*! Used as a marker that is put before a test item */
virtual QCString trTest() virtual QCString trTest()
{ {
return "Test"; return "Test";
} }
/*! Used as the header of the todo list */ /*! Used as the header of the test list */
virtual QCString trTestList() virtual QCString trTestList()
{ {
return "Test List"; return "Test List";
......
This diff is collapsed.
This diff is collapsed.
...@@ -701,12 +701,12 @@ class TranslatorDutch : public Translator ...@@ -701,12 +701,12 @@ class TranslatorDutch : public Translator
// new since 1.2.0 // new since 1.2.0
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
/*! Used as a marker that is put before a todo item */ /*! Used as a marker that is put before a test item */
virtual QCString trTest() virtual QCString trTest()
{ {
return "Test"; return "Test";
} }
/*! Used as the header of the todo list */ /*! Used as the header of the test list */
virtual QCString trTestList() virtual QCString trTestList()
{ {
return "Test Lijst"; return "Test Lijst";
......
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