Commit 4d121f89 authored by dimitri's avatar dimitri

Release-1.7.6.1-20111226

parent e7c5e0d7
DOXYGEN Version 1.7.6.1
DOXYGEN Version 1.7.6.1-20111226
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
--------
Dimitri van Heesch (10 December 2011)
Dimitri van Heesch (26 December 2011)
DOXYGEN Version 1.7.6.1
DOXYGEN Version 1.7.6.1_20111226
Please read INSTALL for compilation instructions.
......@@ -26,4 +26,4 @@ forum.
Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (10 December 2011)
Dimitri van Heesch (dimitri@stack.nl) (26 December 2011)
......@@ -20,7 +20,7 @@ doxygen_version_minor=7
doxygen_version_revision=6.1
#NOTE: Setting version_mmn to "NO" will omit mmn info from the package.
doxygen_version_mmn=NO
doxygen_version_mmn=20111226
bin_dirs=`echo $PATH | sed -e "s/:/ /g"`
......
......@@ -12,7 +12,7 @@
# Documents produced by Doxygen are derivative works derived from the
# input used in their production; they are not affected by this license.
PROJECT_NAME = "Doxygen manual"
PROJECT_NAME =
OUTPUT_DIRECTORY = ..
HTML_HEADER =
HTML_FOOTER =
......
This diff is collapsed.
......@@ -113,7 +113,7 @@ or
</ol>
For the brief description there are also several posibilities:
For the brief description there are also several possibilities:
<ol>
<li>One could use the \ref cmdbrief "\\brief" command with one of the
above comment blocks. This command ends at the end of a paragraph,
......
......@@ -42,8 +42,8 @@ tries to be complete):
First, assure that your programming language has a reasonable chance of being
recognized by Doxygen. These languages are supported by default: C, C++, C#,
Objective-C, IDL, Java, VHDL, PHP, Python, Fortran, and D. It
is possible to configure certain filetype extensions to use certain parsers:
Objective-C, IDL, Java, VHDL, PHP, Python, Tcl, Fortran, and D. It
is possible to configure certain file type extensions to use certain parsers:
see the \ref cfg_extension_mapping "Configuration/ExtensionMappings" for details.
Also, completely different languages can be supported by using preprocessor
programs: see the <a href="http://www.doxygen.org/helpers.html">Helpers page</a>
......
......@@ -164,8 +164,8 @@ QHP_SECT_FILTER_ATTRS =
QHG_LOCATION =
GENERATE_ECLIPSEHELP = YES
ECLIPSE_DOC_ID = org.doxygen.qtools
DISABLE_INDEX = NO
GENERATE_TREEVIEW = NO
DISABLE_INDEX = YES
GENERATE_TREEVIEW = YES
ENUM_VALUES_PER_LINE = 4
USE_INLINE_TREES = YES
TREEVIEW_WIDTH = 250
......@@ -266,8 +266,8 @@ UML_LOOK = NO
TEMPLATE_RELATIONS = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
CALLER_GRAPH = NO
CALL_GRAPH = YES
CALLER_GRAPH = YES
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = svg
......
......@@ -1745,7 +1745,7 @@ void ClassDef::writeDeclarationLink(OutputList &ol,bool &found,const char *heade
Doxygen::tagFile << " <class kind=\"" << compoundTypeString()
<< "\">" << convertToXML(name()) << "</class>" << endl;
}
ol.startMemberItem(FALSE);
ol.startMemberItem(anchor(),FALSE);
QCString ctype = compoundTypeString();
QCString cname;
if (localNames)
......@@ -1792,7 +1792,7 @@ void ClassDef::writeDeclarationLink(OutputList &ol,bool &found,const char *heade
// add the brief description if available
if (!briefDescription().isEmpty())
{
ol.startMemberDescription();
ol.startMemberDescription(anchor());
ol.parseDoc(briefFile(),briefLine(),this,0,
briefDescription(),FALSE,FALSE,0,TRUE,FALSE);
if (isLinkableInProject())
......@@ -2001,7 +2001,7 @@ void ClassDef::writeMemberPages(OutputList &ol)
{
if (ml->listType()&MemberList::detailedLists)
{
ml->writeDocumentationPage(ol,name(),this);
ml->writeDocumentationPage(ol,displayName(),this);
}
}
......@@ -3737,7 +3737,7 @@ void ClassDef::writeMemberDocumentation(OutputList &ol,MemberList::ListType lt,c
{
//printf("%s: ClassDef::writeMemberDocumentation()\n",name().data());
MemberList * ml = getMemberList(lt);
if (ml) ml->writeDocumentation(ol,name(),this,title,FALSE,showInline);
if (ml) ml->writeDocumentation(ol,displayName(),this,title,FALSE,showInline);
}
void ClassDef::writeSimpleMemberDocumentation(OutputList &ol,MemberList::ListType lt)
......
......@@ -140,6 +140,7 @@ static int g_braceCount=0;
static void saveObjCContext();
static void restoreObjCContext();
static QCString g_forceTagReference;
//-------------------------------------------------------------------
......@@ -780,7 +781,9 @@ static MemberDef *setCallContextForVar(const QCString &name)
// in case there are multiple members we could link to, we
// only link to members if defined in the same file or
// defined as external.
if (!md->isStatic() || md->getBodyDef()==g_sourceFileDef)
if ((!md->isStatic() || md->getBodyDef()==g_sourceFileDef) &&
(g_forceTagReference.isEmpty() || g_forceTagReference==md->getReference())
)
{
g_theCallContext.setClass(stripClassName(md->typeString(),md->getOuterScope()));
//printf("returning member %s in source file %s\n",md->name().data(),g_sourceFileDef->name().data());
......@@ -868,7 +871,7 @@ static bool getLinkInScope(const QCString &c, // scope
NamespaceDef *nd;
GroupDef *gd;
//fprintf(stderr,"getLinkInScope: trying `%s'::`%s' varOnly=%d\n",c.data(),m.data(),varOnly);
if (getDefs(c,m,"()",md,cd,fd,nd,gd,FALSE,g_sourceFileDef) &&
if (getDefs(c,m,"()",md,cd,fd,nd,gd,FALSE,g_sourceFileDef,FALSE,g_forceTagReference) &&
md->isLinkable() && (!varOnly || md->isVariable()))
{
if (g_exampleBlock)
......@@ -887,7 +890,6 @@ static bool getLinkInScope(const QCString &c, // scope
Definition *d = md->getOuterScope()==Doxygen::globalScope ?
md->getBodyDef() : md->getOuterScope();
if (md->getGroupDef()) d = md->getGroupDef();
//fprintf(stderr,"d=%p linkable=%d\n",d,d?d->isLinkable():0);
if (d && d->isLinkable())
{
g_theCallContext.setClass(stripClassName(md->typeString(),md->getOuterScope()));
......@@ -1062,9 +1064,26 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName,
//fprintf(stderr,"is a global md=%p g_currentDefinition=%s linkable=%d\n",md,g_currentDefinition?g_currentDefinition->name().data():"<none>",md->isLinkable());
if (md->isLinkable())
{
QCString text;
if (!g_forceTagReference.isEmpty()) // explicit reference to symbol in tag file
{
text=g_forceTagReference;
if (text.right(4)==".tag") // strip .tag if present
{
text=text.left(text.length()-4);
}
text+=getLanguageSpecificSeparator(md->getLanguage());
text+=clName;
md->setName(text);
md->setLocalName(text);
}
else // normal reference
{
text=clName;
}
ol.linkableSymbol(g_yyLineNr,md->name(),md,
g_currentMemberDef ? g_currentMemberDef : g_currentDefinition);
writeMultiLineCodeLink(ol,md->getReference(),md->getOutputFileBase(),md->anchor(),clName,md->briefDescriptionAsTooltip());
writeMultiLineCodeLink(ol,md->getReference(),md->getOutputFileBase(),md->anchor(),text,md->briefDescriptionAsTooltip());
addToSearchIndex(clName);
if (g_currentMemberDef)
{
......@@ -1260,6 +1279,13 @@ static void generateMemberLink(CodeOutputInterface &ol,const QCString &varName,
static void generateFunctionLink(CodeOutputInterface &ol,char *funcName)
{
//CodeClassDef *ccd=0;
ClassDef *ccd=0;
QCString locScope=g_classScope;
QCString locFunc=removeRedundantWhiteSpace(funcName);
//fprintf(stdout,"*** locScope=%s locFunc=%s\n",locScope.data(),locFunc.data());
int len=2;
int i=locFunc.findRev("::");
if (g_currentMemberDef && g_currentMemberDef->getClassDef() &&
funcName==g_currentMemberDef->localName() &&
g_currentMemberDef->getDefLine()==g_yyLineNr &&
......@@ -1272,15 +1298,8 @@ static void generateFunctionLink(CodeOutputInterface &ol,char *funcName)
// in case of overloaded methods, this will make sure that we link to
// the correct method, and thereby get the correct reimplemented relations.
// See also bug 549022.
return;
goto exit;
}
//CodeClassDef *ccd=0;
ClassDef *ccd=0;
QCString locScope=g_classScope;
QCString locFunc=removeRedundantWhiteSpace(funcName);
//fprintf(stdout,"*** locScope=%s locFunc=%s\n",locScope.data(),locFunc.data());
int len=2;
int i=locFunc.findRev("::");
if (i==-1) i=locFunc.findRev("."),len=1;
if (i==-1) i=locFunc.findRev("\\"),len=1; // for PHP
if (i>0)
......@@ -1314,7 +1333,7 @@ static void generateFunctionLink(CodeOutputInterface &ol,char *funcName)
{
if (getLink(bcli.current()->classDef->name(),locFunc,ol,funcName))
{
return;
goto exit;
}
}
}
......@@ -1323,6 +1342,8 @@ static void generateFunctionLink(CodeOutputInterface &ol,char *funcName)
{
generateClassOrGlobalLink(ol,funcName);
}
exit:
g_forceTagReference.resize(0);
return;
}
......@@ -3216,6 +3237,12 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
endFontClass();
}
}
<*>"/*[tag:"[^\]\n]*"]*/"{B}* { // special pattern /*[tag:filename]*/ to force linking to a tag file
g_forceTagReference=yytext;
int s=g_forceTagReference.find(':');
int e=g_forceTagReference.findRev(']');
g_forceTagReference = g_forceTagReference.mid(s+1,e-s-1);
}
<*>\n{B}*"/*"[!*]/[^/*] {
if (Config_getBool("STRIP_CODE_COMMENTS"))
{
......@@ -3381,6 +3408,7 @@ static void restoreObjCContext()
void resetCCodeParserState()
{
//printf("***initParseCodeContext()\n");
g_forceTagReference.resize(0);
g_theVarContext.clear();
g_classScopeLengthStack.setAutoDelete(TRUE);
g_classScopeLengthStack.clear();
......
......@@ -37,6 +37,7 @@
#include "parserintf.h"
#include "marshal.h"
#include "debug.h"
#include "vhdldocgen.h"
#define START_MARKER 0x4445465B // DEF[
#define END_MARKER 0x4445465D // DEF]
......@@ -864,6 +865,14 @@ void Definition::writeInlineCode(OutputList &ol,const char *scopeName)
//printf("Read:\n`%s'\n\n",codeFragment.data());
MemberDef *thisMd = 0;
if (definitionType()==TypeMember) thisMd = (MemberDef *)this;
// vhdl parser can' t start at an arbitrary point in the source code
if(this->getLanguage()==SrcLangExt_VHDL)
{
if (thisMd) VhdlDocGen::writeCodeFragment(ol,actualStart,codeFragment,thisMd);
return;
}
ol.startCodeFragment();
pIntf->parseCode(ol, // codeOutIntf
scopeName, // scope
......@@ -1112,12 +1121,12 @@ void Definition::addInnerCompound(Definition *)
QCString Definition::qualifiedName() const
{
static int count=0;
count++;
//static int count=0;
//count++;
makeResident();
if (!m_impl->qualifiedName.isEmpty())
{
count--;
//count--;
return m_impl->qualifiedName;
}
......@@ -1126,12 +1135,12 @@ QCString Definition::qualifiedName() const
{
if (m_impl->localName=="<globalScope>")
{
count--;
//count--;
return "";
}
else
{
count--;
//count--;
return m_impl->localName;
}
}
......@@ -1142,10 +1151,12 @@ QCString Definition::qualifiedName() const
}
else
{
m_impl->qualifiedName = m_impl->outerScope->qualifiedName()+"::"+m_impl->localName;
m_impl->qualifiedName = m_impl->outerScope->qualifiedName()+
getLanguageSpecificSeparator(getLanguage())+
m_impl->localName;
}
//printf("end %s::qualifiedName()=%s\n",name().data(),m_impl->qualifiedName.data());
count--;
//count--;
return m_impl->qualifiedName;
};
......
......@@ -116,6 +116,9 @@ class Definition : public DefinitionIntf, public LockableObj
/*! Returns the name of the definition */
const QCString& name() const { return m_name; }
/*! Returns the name of the definition as it appears in the output */
virtual QCString displayName() const = 0;
/*! Returns the local name without any scope qualifiers. */
QCString localName() const;
......@@ -323,9 +326,9 @@ class Definition : public DefinitionIntf, public LockableObj
* the Doxygen::tagFile stream.
*/
void writeDocAnchorsToTagFile();
void setLocalName(const QCString name);
protected:
void setLocalName(const QCString name);
virtual void flushToDisk() const;
virtual void loadFromDisk() const;
......
......@@ -213,7 +213,7 @@ void DirDef::writeSubDirList(OutputList &ol)
DirDef *dd=m_subdirs.first();
while (dd)
{
ol.startMemberItem(0);
ol.startMemberItem(dd->getOutputFileBase(),0);
ol.parseText(theTranslator->trDir(FALSE,TRUE)+" ");
ol.insertMemberAlign();
ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),0,dd->shortName());
......@@ -224,7 +224,7 @@ void DirDef::writeSubDirList(OutputList &ol)
}
if (!dd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
ol.startMemberDescription();
ol.startMemberDescription(dd->getOutputFileBase());
ol.parseDoc(briefFile(),briefLine(),dd,0,dd->briefDescription(),
FALSE, // indexWords
FALSE, // isExample
......@@ -253,7 +253,7 @@ void DirDef::writeFileList(OutputList &ol)
FileDef *fd=m_fileList->first();
while (fd)
{
ol.startMemberItem(0);
ol.startMemberItem(fd->getOutputFileBase(),0);
ol.docify(theTranslator->trFile(FALSE,TRUE)+" ");
ol.insertMemberAlign();
if (fd->isLinkable())
......@@ -285,7 +285,7 @@ void DirDef::writeFileList(OutputList &ol)
ol.endMemberItem();
if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
ol.startMemberDescription();
ol.startMemberDescription(fd->getOutputFileBase());
ol.parseDoc(briefFile(),briefLine(),fd,0,fd->briefDescription(),
FALSE, // indexWords
FALSE, // isExample
......
......@@ -5771,6 +5771,7 @@ int DocPara::handleHtmlEndTag(const QCString &tagName)
break;
case HTML_P:
// ignore </p> tag
retval=TK_NEWPARA;
break;
case HTML_DL:
retval=RetVal_EndDesc;
......
......@@ -1244,6 +1244,7 @@ class DocRoot : public CompAccept<DocRoot>, public DocNode
void parse();
bool indent() const { return m_indent; }
bool singleLine() const { return m_singleLine; }
const QList<DocNode> &children() const { return m_children; }
private:
bool m_indent;
......
......@@ -1517,7 +1517,7 @@ static QCString escapeTooltip(const QCString &tooltip)
static void writeBoxMemberList(FTextStream &t,
char prot,MemberList *ml,ClassDef *scope,
bool isStatic=FALSE)
bool isStatic=FALSE,const QDict<void> *skipNames=0)
{
(void)isStatic;
if (ml)
......@@ -1527,7 +1527,8 @@ static void writeBoxMemberList(FTextStream &t,
int totalCount=0;
for (mlia.toFirst();(mma = mlia.current());++mlia)
{
if (mma->getClassDef() == scope)
if (mma->getClassDef()==scope &&
(skipNames==0 || skipNames->find(mma->name())==0))
{
totalCount++;
}
......@@ -1536,7 +1537,8 @@ static void writeBoxMemberList(FTextStream &t,
int count=0;
for (mlia.toFirst();(mma = mlia.current());++mlia)
{
if (mma->getClassDef() == scope)
if (mma->getClassDef() == scope &&
(skipNames==0 || skipNames->find(mma->name())==0))
{
if (totalCount>=15 && count>=10)
{
......@@ -1565,7 +1567,7 @@ static void writeBoxMemberList(FTextStream &t,
{
if (mg->members())
{
writeBoxMemberList(t,prot,mg->members(),scope);
writeBoxMemberList(t,prot,mg->members(),scope,isStatic,skipNames);
}
}
}
......@@ -1588,21 +1590,34 @@ void DotNode::writeBox(FTextStream &t,
if (m_classDef && umlLook && (gt==Inheritance || gt==Collaboration))
{
// add names shown as relation to a dictionary, so we don't show
// them as attributes as well
QDict<void> arrowNames(17);
QListIterator<EdgeInfo> li(*m_edgeInfo);
EdgeInfo *ei;
for (li.toFirst();(ei=li.current());++li)
{
if (!ei->m_label.isEmpty())
{
arrowNames.insert(ei->m_label,(void*)0x8);
}
}
//printf("DotNode::writeBox for %s\n",m_classDef->name().data());
static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
t << "{" << convertLabel(m_label);
t << "\\n|";
writeBoxMemberList(t,'+',m_classDef->getMemberList(MemberList::pubAttribs),m_classDef);
writeBoxMemberList(t,'+',m_classDef->getMemberList(MemberList::pubStaticAttribs),m_classDef,TRUE);
writeBoxMemberList(t,'+',m_classDef->getMemberList(MemberList::properties),m_classDef);
writeBoxMemberList(t,'~',m_classDef->getMemberList(MemberList::pacAttribs),m_classDef);
writeBoxMemberList(t,'~',m_classDef->getMemberList(MemberList::pacStaticAttribs),m_classDef,TRUE);
writeBoxMemberList(t,'#',m_classDef->getMemberList(MemberList::proAttribs),m_classDef);
writeBoxMemberList(t,'#',m_classDef->getMemberList(MemberList::proStaticAttribs),m_classDef,TRUE);
writeBoxMemberList(t,'+',m_classDef->getMemberList(MemberList::pubAttribs),m_classDef,FALSE,&arrowNames);
writeBoxMemberList(t,'+',m_classDef->getMemberList(MemberList::pubStaticAttribs),m_classDef,TRUE,&arrowNames);
writeBoxMemberList(t,'+',m_classDef->getMemberList(MemberList::properties),m_classDef,FALSE,&arrowNames);
writeBoxMemberList(t,'~',m_classDef->getMemberList(MemberList::pacAttribs),m_classDef,FALSE,&arrowNames);
writeBoxMemberList(t,'~',m_classDef->getMemberList(MemberList::pacStaticAttribs),m_classDef,TRUE,&arrowNames);
writeBoxMemberList(t,'#',m_classDef->getMemberList(MemberList::proAttribs),m_classDef,FALSE,&arrowNames);
writeBoxMemberList(t,'#',m_classDef->getMemberList(MemberList::proStaticAttribs),m_classDef,TRUE,&arrowNames);
if (extractPrivate)
{
writeBoxMemberList(t,'-',m_classDef->getMemberList(MemberList::priAttribs),m_classDef);
writeBoxMemberList(t,'-',m_classDef->getMemberList(MemberList::priStaticAttribs),m_classDef,TRUE);
writeBoxMemberList(t,'-',m_classDef->getMemberList(MemberList::priAttribs),m_classDef,FALSE,&arrowNames);
writeBoxMemberList(t,'-',m_classDef->getMemberList(MemberList::priStaticAttribs),m_classDef,TRUE,&arrowNames);
}
t << "|";
writeBoxMemberList(t,'+',m_classDef->getMemberList(MemberList::pubMethods),m_classDef);
......@@ -1628,7 +1643,7 @@ void DotNode::writeBox(FTextStream &t,
{
if (mg->members())
{
writeBoxMemberList(t,'*',mg->members(),m_classDef);
writeBoxMemberList(t,'*',mg->members(),m_classDef,FALSE,&arrowNames);
}
}
}
......
......@@ -922,7 +922,7 @@ static Definition *buildScopeFromQualifiedName(const QCString name,int level)
else if (nd==0 && cd==0) // scope is not known!
{
// introduce bogus namespace
//printf("++ adding dummy namespace %s to %s\n",nsName.data(),prevScope->name().data());
printf("++ adding dummy namespace %s to %s\n",nsName.data(),prevScope->name().data());
nd=new NamespaceDef(
"[generated]",1,fullScope);
......@@ -2226,13 +2226,14 @@ static MemberDef *addVariableToFile(
Entry *root = rootNav->entry();
Debug::print(Debug::Variables,0,
" global variable:\n"
" type=`%s' scope=`%s' name=`%s' args=`%s' prot=`%d mtype=%d\n",
" type=`%s' scope=`%s' name=`%s' args=`%s' prot=`%d mtype=%d lang=%d\n",
root->type.data(),
scope.data(),
name.data(),
root->args.data(),
root->protection,
mtype
mtype,
root->lang
);
FileDef *fd = rootNav->fileDef();
......@@ -2421,18 +2422,21 @@ static MemberDef *addVariableToFile(
/*! See if the return type string \a type is that of a function pointer
* \returns -1 if this is not a function pointer variable or
* the index at which the brace of (...*name) was found.
* the index at which the closing brace of (...*name) was found.
*/
static int findFunctionPtr(const QCString &type,int lang, int *pLength=0)
{
if (lang == SrcLangExt_Fortran) return -1; // Fortran does not have function pointers
static const QRegExp re("([^)]*[\\*\\^][^)]*)");
int i=-1,l;
int bb=type.find('<');
int be=type.findRev('>');
if (!type.isEmpty() && // return type is non-empty
(i=re.match(type,0,&l))!=-1 && // contains (...*...)
type.find("operator")==-1 && // not an operator
(type.find(")(")==-1 || type.find("typedef ")!=-1)
(type.find(")(")==-1 || type.find("typedef ")!=-1) &&
// not a function pointer return type
!(bb<i && i<be) // bug665855: avoid treating "typedef A<void (T*)> type" as a function pointer
)
{
if (pLength) *pLength=l;
......@@ -2610,6 +2614,7 @@ static void addVariable(EntryNav *rootNav,int isFuncPtr=-1)
{
int i=isFuncPtr;
if (i==-1) i=findFunctionPtr(root->type,root->lang); // for typedefs isFuncPtr is not yet set
Debug::print(Debug::Variables,0," functionPtr? %s\n",i!=-1?"yes":"no");
if (i!=-1) // function pointer
{
int ai = root->type.find('[',i);
......@@ -10212,7 +10217,7 @@ void parseInput()
**************************************************************************/
LayoutDocManager::instance().init();
QCString layoutFileName = Config_getString("LAYOUT_FILE");
QCString &layoutFileName = Config_getString("LAYOUT_FILE");
bool defaultLayoutUsed = FALSE;
if (layoutFileName.isEmpty())
{
......@@ -10406,7 +10411,10 @@ void parseInput()
computeTemplateClassRelations();
flushUnresolvedRelations();
computeClassRelations();
//VhdlDocGen::computeVhdlComponentRelations(); // @MARTIN: removed because it breaks non-vhdl code
if (Config_getBool("OPTIMIZE_OUTPUT_VHDL"))
{
VhdlDocGen::computeVhdlComponentRelations();
}
g_classEntries.clear();
msg("Add enum values to enums...\n");
......@@ -10528,19 +10536,6 @@ void generateOutput()
**************************************************************************/
//// dump all symbols
//SDict<DefinitionList>::Iterator sdi(Doxygen::symbolMap);
//DefinitionList *dl;
//for (sdi.toFirst();(dl=sdi.current());++sdi)
//{
// DefinitionListIterator dli(*dl);
// Definition *d;
// printf("Symbol: ");
// for (dli.toFirst();(d=dli.current());++dli)
// {
// printf("%s ",d->qualifiedName().data());
// }
// printf("\n");
//}
if (g_dumpSymbolMap)
{
dumpSymbolMap();
......@@ -10555,11 +10550,12 @@ void generateOutput()
g_outputList->add(new HtmlGenerator);
HtmlGenerator::init();
bool generateHtmlHelp = Config_getBool("GENERATE_HTMLHELP");
// add HTML indexers that are enabled
bool generateHtmlHelp = Config_getBool("GENERATE_HTMLHELP");
bool generateEclipseHelp = Config_getBool("GENERATE_ECLIPSEHELP");
bool generateQhp = Config_getBool("GENERATE_QHP");
bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
bool generateDocSet = Config_getBool("GENERATE_DOCSET");
bool generateQhp = Config_getBool("GENERATE_QHP");
bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
bool generateDocSet = Config_getBool("GENERATE_DOCSET");
if (generateEclipseHelp) Doxygen::indexList.addIndex(new EclipseHelp);
if (generateHtmlHelp) Doxygen::indexList.addIndex(new HtmlHelp);
if (generateQhp) Doxygen::indexList.addIndex(new Qhp);
......@@ -10568,10 +10564,7 @@ void generateOutput()
Doxygen::indexList.initialize();
HtmlGenerator::writeTabData();
#if 0
if (Config_getBool("GENERATE_INDEXLOG")) Doxygen::indexList.addIndex(new IndexLog);
#endif
//if (Config_getBool("HTML_DYNAMIC_SECTIONS")) HtmlGenerator::generateSectionImages();
// copy static stuff
copyStyleSheet();
copyLogo();
copyExtraFiles();
......@@ -10672,17 +10665,6 @@ void generateOutput()
}
}
//statistics();
// count the number of documented elements in the lists we have built.
// If the result is 0 we do not generate the lists and omit the
// corresponding links in the index.
//msg("Generating index page...\n");
//writeIndex(*g_outputList);
//msg("Generating page index...\n");
//writePageIndex(*g_outputList);
msg("Generating example documentation...\n");
generateExampleDocs();
......@@ -10701,24 +10683,12 @@ void generateOutput()
msg("Generating group documentation...\n");
generateGroupDocs();
//msg("Generating group index...\n");
//writeGroupIndex(*g_outputList);
msg("Generating class documentation...\n");
generateClassDocs();
//if (Config_getBool("HAVE_DOT") && Config_getBool("GRAPHICAL_HIERARCHY"))
//{
// msg("Generating graphical class hierarchy...\n");
// writeGraphicalClassHierarchy(*g_outputList);
//}
msg("Generating namespace index...\n");
generateNamespaceDocs();
//msg("Generating namespace member index...\n");
//writeNamespaceMemberIndex(*g_outputList);
if (Config_getBool("GENERATE_LEGEND"))
{
msg("Generating graph info page...\n");
......@@ -10731,24 +10701,6 @@ void generateOutput()
generateDirDocs(*g_outputList);
}
//msg("Generating file index...\n");
//writeFileIndex(*g_outputList);
//if (Config_getBool("SHOW_DIRECTORIES"))
//{
// msg("Generating directory index...\n");
// writeDirIndex(*g_outputList);
//}
//msg("Generating example index...\n");
//writeExampleIndex(*g_outputList);
//msg("Generating file member index...\n");
//writeFileMemberIndex(*g_outputList);
//writeDirDependencyGraph(Config_getString("HTML_OUTPUT"));
if (Doxygen::formulaList.count()>0 && Config_getBool("GENERATE_HTML")
&& !Config_getBool("USE_MATHJAX"))
{
......@@ -10756,15 +10708,6 @@ void generateOutput()
Doxygen::formulaList.generateBitmaps(Config_getString("HTML_OUTPUT"));
}
//if (Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP"))
//{
// HtmlHelp::getInstance()->finalize();
//}
//if (Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_TREEVIEW"))
//{
// FTVHelp::getInstance()->finalize();
//}
writeIndexHierarchy(*g_outputList);
msg("finalizing index lists...\n");
......@@ -10897,8 +10840,6 @@ void generateOutput()
* Start cleaning up *
**************************************************************************/
//Doxygen::symbolCache->printStats();
//Doxygen::symbolStorage->printStats();
cleanUpDoxygen();
finializeDocParser();
......
......@@ -80,11 +80,8 @@ class FileDef : public Definition
else
return Definition::name();
}
QCString fileName() const
{
return filename;
}
QCString displayName() const { return name(); }
QCString fileName() const { return filename; }
QCString getOutputFileBase() const
{ return convertNameToFile(diskname); }
......
......@@ -578,6 +578,26 @@ void FTVHelp::addContentsItem(bool isDir,
}
static QCString node2URL(FTVNode *n)
{
QCString url = n->file;
if (!url.isEmpty() && url.at(0)=='!') // relative URL
{
// remove leading !
url = url.mid(1);
}
else if (!url.isEmpty() && url.at(0)=='^') // absolute URL
{
// skip, keep ^ in the output
}
else // local file (with optional anchor)
{
url+=Doxygen::htmlFileExtension;
if (!n->anchor.isEmpty()) url+="#"+n->anchor;
}
return url;
}
void FTVHelp::generateIndent(FTextStream &t, FTVNode *n,int level)
{
......@@ -645,8 +665,7 @@ void FTVHelp::generateLink(FTextStream &t,FTVNode *n)
}
t << "href=\"";
t << externalRef("",n->ref,TRUE);
t << n->file << Doxygen::htmlFileExtension;
if (!n->anchor.isEmpty()) t << "#" << n->anchor;
t << node2URL(n);
if (m_topLevelIndex)
t << "\" target=\"basefrm\">";
else
......@@ -672,8 +691,7 @@ void FTVHelp::generateJSLink(FTextStream &t,FTVNode *n)
// TODO: use m_topLevelIndex
t << "\"" << convertToJSString(n->name) << "\", \"";
t << externalRef("",n->ref,TRUE);
t << n->file << Doxygen::htmlFileExtension;
if (!n->anchor.isEmpty()) t << "#" << n->anchor;
t << node2URL(n);
t << "\", ";
}
}
......@@ -756,9 +774,7 @@ bool FTVHelp::generateJSTree(FTextStream &tidx,FTextStream &t, const QList<FTVNo
//if (!n->file.isEmpty() && !childOfHierarchy(n->parent))
if (n->addToNavIndex)
{
tidx << "," << endl << "\"" << n->file << Doxygen::htmlFileExtension;
if (!n->anchor.isEmpty()) tidx << "#" << n->anchor;
tidx << "\":[";
tidx << "," << endl << "\"" << node2URL(n) << "\":[";
writePathToNode(tidx,n,n);
tidx << "]";
}
......@@ -847,9 +863,11 @@ void FTVHelp::generateTreeViewScripts()
bool first=TRUE;
generateJSTree(tidx,t,m_indentNodes[0],1,first);
if (first) t << "]";
t << endl << " ] ]" << endl;
if (first)
t << "]" << endl;
else
t << endl << " ] ]" << endl;
t << "];" << endl;
t << endl << navtree_script;
......
......@@ -646,7 +646,7 @@ void GroupDef::writeFiles(OutputList &ol,const QCString &title)
FileDef *fd=fileList->first();
while (fd)
{
ol.startMemberItem(0);
ol.startMemberItem(fd->getOutputFileBase(),0);
ol.docify(theTranslator->trFile(FALSE,TRUE)+" ");
ol.insertMemberAlign();
ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name());
......@@ -657,7 +657,7 @@ void GroupDef::writeFiles(OutputList &ol,const QCString &title)
ol.endMemberItem();
if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
ol.startMemberDescription();
ol.startMemberDescription(fd->getOutputFileBase());
ol.parseDoc(briefFile(),briefLine(),fd,0,fd->briefDescription(),FALSE,FALSE);
ol.endMemberDescription();
}
......@@ -685,7 +685,7 @@ void GroupDef::writeNestedGroups(OutputList &ol,const QCString &title)
GroupDef *gd=groupList->first();
while (gd)
{
ol.startMemberItem(0);
ol.startMemberItem(gd->getOutputFileBase(),0);
//ol.docify(theTranslator->trGroup(FALSE,TRUE));
//ol.docify(" ");
ol.insertMemberAlign();
......@@ -697,7 +697,7 @@ void GroupDef::writeNestedGroups(OutputList &ol,const QCString &title)
ol.endMemberItem();
if (!gd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
ol.startMemberDescription();
ol.startMemberDescription(gd->getOutputFileBase());
ol.parseDoc(briefFile(),briefLine(),gd,0,gd->briefDescription(),FALSE,FALSE);
ol.endMemberDescription();
}
......@@ -719,7 +719,7 @@ void GroupDef::writeDirs(OutputList &ol,const QCString &title)
DirDef *dd=dirList->first();
while (dd)
{
ol.startMemberItem(0);
ol.startMemberItem(dd->getOutputFileBase(),0);
ol.parseText(theTranslator->trDir(FALSE,TRUE));
ol.insertMemberAlign();
ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),0,dd->shortName());
......@@ -730,8 +730,8 @@ void GroupDef::writeDirs(OutputList &ol,const QCString &title)
}
if (!dd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
ol.startMemberDescription();
ol.parseDoc(briefFile(),briefLine(),dd,0,dd->briefDescription(),FALSE,FALSE);
ol.startMemberDescription(dd->getOutputFileBase());
ol.parseDoc(briefFile(),briefLine(),dd,0,dd->briefDescription(),FALSE,FALSE,0,TRUE,FALSE);
ol.endMemberDescription();
}
dd=dirList->next();
......@@ -776,7 +776,7 @@ void GroupDef::writePageDocumentation(OutputList &ol)
ol.endSection(si->label,SectionInfo::Subsection);
}
ol.startTextBlock();
ol.parseDoc(pd->docFile(),pd->docLine(),pd,0,pd->documentation()+pd->inbodyDocumentation(),TRUE,FALSE);
ol.parseDoc(pd->docFile(),pd->docLine(),pd,0,pd->documentation()+pd->inbodyDocumentation(),TRUE,FALSE,0,TRUE,FALSE);
ol.endTextBlock();
}
}
......@@ -1443,3 +1443,8 @@ void GroupDef::removeMemberFromList(MemberList::ListType lt,MemberDef *md)
if (ml) ml->remove(md);
}
void GroupDef::sortSubGroups()
{
groupList->sort();
}
......@@ -49,9 +49,10 @@ class GroupDef : public Definition
DefType definitionType() const { return TypeGroup; }
QCString getOutputFileBase() const;
QCString anchor() const { return QCString(); }
QCString displayName() const { return hasGroupTitle() ? title : Definition::name(); }
const char *groupTitle() const { return title; }
void setGroupTitle( const char *newtitle );
bool hasGroupTitle( ) { return titleSet; }
bool hasGroupTitle( ) const { return titleSet; }
void addFile(const FileDef *def);
bool addClass(const ClassDef *def);
bool addNamespace(const NamespaceDef *def);
......@@ -87,7 +88,7 @@ class GroupDef : public Definition
bool visited; // number of times accessed for output - KPW
friend void writeGroupTreeNode(OutputList&, GroupDef*, int, FTVHelp*);
//friend void writeGroupTreeNode(OutputList&, GroupDef*, int, FTVHelp*);
// make accessible for writing tree view of group in index.cpp - KPW
void setGroupScope(Definition *d) { groupScope = d; }
......@@ -105,7 +106,9 @@ class GroupDef : public Definition
GroupList * getSubGroups() const { return groupList; }
PageSDict * getPages() const { return pageDict; }
DirList * getDirs() const { return dirList; }
PageSDict * getExamples() const { return exampleDict; }
//MemberList* getMembers() const { return allMemberList; }
void sortSubGroups();
protected:
void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const);
......
......@@ -83,8 +83,8 @@ static bool mustBeOutsideParagraph(DocNode *n)
/* \internal */
case DocNode::Kind_Internal:
/* <div> */
case DocNode::Kind_Verbatim:
case DocNode::Kind_Include:
case DocNode::Kind_Verbatim:
case DocNode::Kind_Image:
case DocNode::Kind_SecRefList:
/* <hr> */
......@@ -107,8 +107,6 @@ static bool mustBeOutsideParagraph(DocNode *n)
return FALSE;
}
static QString htmlAttribsToString(const HtmlAttribList &attribs)
{
QString result;
......@@ -849,16 +847,6 @@ void HtmlDocVisitor::visitPre(DocPara *p)
void HtmlDocVisitor::visitPost(DocPara *p)
{
// if (m_hide) return;
// if (!p->isLast() && // omit <p> for last paragraph
// !(p->parent() && // and for parameter sections
// p->parent()->kind()==DocNode::Kind_ParamSect
// )
// )
// {
// m_t << "<p>\n";
// }
bool needsTag = FALSE;
if (p && p->parent())
{
......@@ -1209,11 +1197,7 @@ void HtmlDocVisitor::visitPost(DocInternal *)
void HtmlDocVisitor::visitPre(DocHRef *href)
{
if (m_hide) return;
QCString url = href->url();
if (url.left(5)!="http:" && url.left(6)!="https:" && url.left(4)!="ftp:")
{
url.prepend(href->relPath());
}
QCString url = correctURL(href->url(),href->relPath());
m_t << "<a href=\"" << convertToXML(url) << "\""
<< htmlAttribsToString(href->attribs()) << ">";
}
......@@ -1261,11 +1245,7 @@ void HtmlDocVisitor::visitPre(DocImage *img)
}
else
{
if (url.left(5)!="http:" && url.left(6)!="https:" && url.left(4)!="ftp:")
{
url.prepend(img->relPath());
}
m_t << "<img src=\"" << url << "\" "
m_t << "<img src=\"" << correctURL(url,img->relPath()) << "\" "
<< htmlAttribsToString(img->attribs())
<< "/>" << endl;
}
......
......@@ -1857,7 +1857,7 @@ void HtmlGenerator::endMemberList()
// 0 = single column right aligned
// 1 = double column left aligned
// 2 = single column left aligned
void HtmlGenerator::startMemberItem(int annoType)
void HtmlGenerator::startMemberItem(const char *anchor,int annoType)
{
DBG_HTML(t << "<!-- startMemberItem() -->" << endl)
if (Config_getBool("HTML_ALIGN_MEMBERS"))
......@@ -1867,7 +1867,7 @@ void HtmlGenerator::startMemberItem(int annoType)
t << "<table class=\"memberdecls\">" << endl;
m_emptySection=FALSE;
}
t << "<tr>";
t << "<tr class=\"memitem:" << anchor << "\">";
switch(annoType)
{
case 0: t << "<td class=\"memItemLeft\" align=\"right\" valign=\"top\">"; break;
......@@ -1896,12 +1896,12 @@ void HtmlGenerator::startMemberTemplateParams()
{
}
void HtmlGenerator::endMemberTemplateParams()
void HtmlGenerator::endMemberTemplateParams(const char *anchor)
{
if (Config_getBool("HTML_ALIGN_MEMBERS"))
{
t << "</td></tr>" << endl;
t << "<tr><td class=\"memTemplItemLeft\" align=\"right\" valign=\"top\">";
t << "<tr class=\"memitem:" << anchor << "\"><td class=\"memTemplItemLeft\" align=\"right\" valign=\"top\">";
}
}
......@@ -1916,7 +1916,7 @@ void HtmlGenerator::insertMemberAlign(bool templ)
}
}
void HtmlGenerator::startMemberDescription()
void HtmlGenerator::startMemberDescription(const char *anchor)
{
DBG_HTML(t << "<!-- startMemberDescription -->" << endl)
if (Config_getBool("HTML_ALIGN_MEMBERS"))
......@@ -1926,7 +1926,7 @@ void HtmlGenerator::startMemberDescription()
t << "<table class=\"memberdecls\">" << endl;
m_emptySection=FALSE;
}
t << "<tr><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">";
t << "<tr class=\"memdesc:" << anchor << "\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">";
}
else
{
......@@ -2446,15 +2446,15 @@ static void startQuickIndexItem(FTextStream &t,const char *l,
{
t << " class=\"current\"";
}
t << "><a ";
t << "href=\"" << relPath << l << "\">";
t << ">";
if (l) t << "<a href=\"" << correctURL(l,relPath) << "\">";
t << "<span>";
}
static void endQuickIndexItem(FTextStream &t)
static void endQuickIndexItem(FTextStream &t,const char *l)
{
t << "</span>";
t << "</a>";
if (l) t << "</a>";
t << "</li>\n";
}
......@@ -2469,6 +2469,7 @@ static bool quickLinkVisible(LayoutNavEntry::Kind kind)
{
case LayoutNavEntry::MainPage: return TRUE;
case LayoutNavEntry::User: return TRUE;
case LayoutNavEntry::UserGroup: return TRUE;
case LayoutNavEntry::Pages: return indexedPages>0;
case LayoutNavEntry::Modules: return documentedGroups>0;
case LayoutNavEntry::Namespaces: return documentedNamespaces>0;
......@@ -2505,18 +2506,10 @@ static void renderQuickLinksAsTree(FTextStream &t,const QCString &relPath,Layout
{
if (entry->visible() && quickLinkVisible(entry->kind()))
{
QCString url = entry->baseFile();
if (entry->kind()!=LayoutNavEntry::User)
{
url+=Doxygen::htmlFileExtension;
}
t << "<li";
t << "><a ";
t << "href=\"" << relPath << url << "\">";
t << "<span>";
QCString url = entry->url();
t << "<li><a href=\"" << relPath << url << "\"><span>";
t << fixSpaces(entry->title());
t << "</span>";
t << "</a>\n";
t << "</span></a>\n";
// recursive into child list
renderQuickLinksAsTree(t,relPath,entry);
t << "</li>";
......@@ -2531,7 +2524,6 @@ static void renderQuickLinksAsTabs(FTextStream &t,const QCString &relPath,
LayoutNavEntry *hlEntry,LayoutNavEntry::Kind kind,
bool highlightParent,bool highlightSearch)
{
//static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
if (hlEntry->parent()) // first draw the tabs for the parent of hlEntry
{
renderQuickLinksAsTabs(t,relPath,hlEntry->parent(),kind,highlightParent,highlightSearch);
......@@ -2554,11 +2546,7 @@ static void renderQuickLinksAsTabs(FTextStream &t,const QCString &relPath,
{
if (entry->visible() && quickLinkVisible(entry->kind()))
{
QCString url = entry->baseFile();
if (entry->kind()!=LayoutNavEntry::User)
{
url+=Doxygen::htmlFileExtension;
}
QCString url = entry->url();
startQuickIndexItem(t,url,
entry==hlEntry &&
(entry->children().count()>0 ||
......@@ -2566,27 +2554,23 @@ static void renderQuickLinksAsTabs(FTextStream &t,const QCString &relPath,
),
TRUE,relPath);
t << fixSpaces(entry->title());
endQuickIndexItem(t);
endQuickIndexItem(t,url);
}
}
if (hlEntry->parent()==LayoutDocManager::instance().rootNavEntry()) // first row
if (hlEntry->parent()==LayoutDocManager::instance().rootNavEntry()) // first row is special as it contains the search box
{
//static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
static bool searchEngine = Config_getBool("SEARCHENGINE");
static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH");
if (searchEngine /* && !generateTreeView */)
if (searchEngine)
{
t << " <li>\n";
if (!serverBasedSearch) // pure client side search
{
//t << " <li id=\"searchli\">\n";
t << " <li>\n";
writeClientSearchBox(t,relPath);
t << " </li>\n";
}
else // if (!generateTreeView) // server based search
else // server based search
{
//t << " <li id=\"searchli\">\n";
t << " <li>\n";
writeServerSearchBox(t,relPath,highlightSearch);
if (!highlightSearch)
{
......@@ -2594,13 +2578,13 @@ static void renderQuickLinksAsTabs(FTextStream &t,const QCString &relPath,
}
}
}
if (!highlightSearch) // on the search page the page will be ended by the
if (!highlightSearch) // on the search page the index will be ended by the
// page itself
{
endQuickIndexList(t,TRUE);
}
}
else // normal case
else // normal case for other rows than first one
{
endQuickIndexList(t,TRUE);
}
......@@ -2609,7 +2593,9 @@ static void renderQuickLinksAsTabs(FTextStream &t,const QCString &relPath,
}
static void writeDefaultQuickLinks(FTextStream &t,bool compact,
HighlightedItem hli,const QCString &relPath)
HighlightedItem hli,
const char *file,
const QCString &relPath)
{
LayoutNavEntry *root = LayoutDocManager::instance().rootNavEntry();
LayoutNavEntry::Kind kind = (LayoutNavEntry::Kind)-1;
......@@ -2630,6 +2616,7 @@ static void writeDefaultQuickLinks(FTextStream &t,bool compact,
case HLI_Globals: kind = LayoutNavEntry::FileGlobals; break;
case HLI_Pages: kind = LayoutNavEntry::Pages; break;
case HLI_Examples: kind = LayoutNavEntry::Examples; break;
case HLI_UserGroup: kind = LayoutNavEntry::UserGroup; break;
case HLI_ClassVisible: kind = LayoutNavEntry::ClassList; altKind = LayoutNavEntry::Classes;
highlightParent = TRUE; break;
case HLI_NamespaceVisible: kind = LayoutNavEntry::NamespaceList; altKind = LayoutNavEntry::Namespaces;
......@@ -2643,7 +2630,7 @@ static void writeDefaultQuickLinks(FTextStream &t,bool compact,
if (compact)
{
// find highlighted index item
LayoutNavEntry *hlEntry = root->find(kind);
LayoutNavEntry *hlEntry = root->find(kind,kind==LayoutNavEntry::UserGroup ? file : 0);
if (!hlEntry && altKind!=(LayoutNavEntry::Kind)-1) { hlEntry=root->find(altKind); kind=altKind; }
if (!hlEntry) // highlighted item not found in the index! -> just show the level 1 index...
{
......@@ -2654,6 +2641,14 @@ static void writeDefaultQuickLinks(FTextStream &t,bool compact,
return; // argl, empty index!
}
}
if (kind==LayoutNavEntry::UserGroup)
{
LayoutNavEntry *e = hlEntry->children().getFirst();
if (e)
{
hlEntry = e;
}
}
renderQuickLinksAsTabs(t,relPath,hlEntry,kind,highlightParent,hli==HLI_Search);
}
else
......@@ -2710,9 +2705,9 @@ void HtmlGenerator::endContents()
t << "</div><!-- contents -->" << endl;
}
void HtmlGenerator::writeQuickLinks(bool compact,HighlightedItem hli)
void HtmlGenerator::writeQuickLinks(bool compact,HighlightedItem hli,const char *file)
{
writeDefaultQuickLinks(t,compact,hli,relPath);
writeDefaultQuickLinks(t,compact,hli,file,relPath);
}
// PHP based search script
......@@ -2788,7 +2783,7 @@ void HtmlGenerator::writeSearchPage()
}
if (!Config_getBool("DISABLE_INDEX"))
{
writeDefaultQuickLinks(t,TRUE,HLI_Search,"");
writeDefaultQuickLinks(t,TRUE,HLI_Search,0,"");
}
else
{
......
......@@ -120,10 +120,10 @@ class HtmlGenerator : public OutputGenerator
void endInlineHeader();
void startAnonTypeScope(int) {}
void endAnonTypeScope(int) {}
void startMemberItem(int);
void startMemberItem(const char *anchor,int);
void endMemberItem();
void startMemberTemplateParams();
void endMemberTemplateParams();
void endMemberTemplateParams(const char *anchor);
void startMemberGroupHeader(bool);
void endMemberGroupHeader();
......@@ -133,7 +133,7 @@ class HtmlGenerator : public OutputGenerator
void endMemberGroup(bool);
void insertMemberAlign(bool);
void startMemberDescription();
void startMemberDescription(const char *anchor);
void endMemberDescription();
void writeRuler() { t << "<hr/>"; }
......@@ -197,7 +197,7 @@ class HtmlGenerator : public OutputGenerator
void endQuickIndices();
void writeSplitBar(const char *name);
void writeLogo();
void writeQuickLinks(bool compact,HighlightedItem hli);
void writeQuickLinks(bool compact,HighlightedItem hli,const char *file);
void startContents();
void endContents();
void writeNonBreakableSpace(int);
......
......@@ -60,7 +60,7 @@ class IndexFieldSDict : public SDict<IndexField>
class HtmlHelpIndex
{
public:
HtmlHelpIndex();
HtmlHelpIndex(HtmlHelp *help);
~HtmlHelpIndex();
void addItem(const char *first,const char *second,
const char *url, const char *anchor,
......@@ -68,10 +68,11 @@ class HtmlHelpIndex
void writeFields(FTextStream &t);
private:
IndexFieldSDict *dict;
HtmlHelp *m_help;
};
/*! Constructs a new HtmlHelp index */
HtmlHelpIndex::HtmlHelpIndex()
HtmlHelpIndex::HtmlHelpIndex(HtmlHelp *help) : m_help(help)
{
dict = new IndexFieldSDict;
dict->setAutoDelete(TRUE);
......@@ -198,7 +199,7 @@ void HtmlHelpIndex::writeFields(FTextStream &t)
t << "<param name=\"Local\" value=\"" << f->url << Doxygen::htmlFileExtension;
if (!f->anchor.isEmpty() && f->reversed) t << "#" << f->anchor;
t << "\">";
t << "<param name=\"Name\" value=\"" << level1 << "\">"
t << "<param name=\"Name\" value=\"" << m_help->recode(level1) << "\">"
"</OBJECT>\n";
}
else
......@@ -209,14 +210,14 @@ void HtmlHelpIndex::writeFields(FTextStream &t)
t << "<param name=\"Local\" value=\"" << f->url << Doxygen::htmlFileExtension;
if (!f->anchor.isEmpty() && f->reversed) t << "#" << f->anchor;
t << "\">";
t << "<param name=\"Name\" value=\"" << level1 << "\">"
t << "<param name=\"Name\" value=\"" << m_help->recode(level1) << "\">"
"</OBJECT>\n";
}
else
{
t << " <LI><OBJECT type=\"text/sitemap\">";
t << "<param name=\"See Also\" value=\"" << level1 << "\">";
t << "<param name=\"Name\" value=\"" << level1 << "\">"
t << "<param name=\"See Also\" value=\"" << m_help->recode(level1) << "\">";
t << "<param name=\"Name\" value=\"" << m_help->recode(level1) << "\">"
"</OBJECT>\n";
}
}
......@@ -237,7 +238,7 @@ void HtmlHelpIndex::writeFields(FTextStream &t)
t << "<param name=\"Local\" value=\"" << f->url << Doxygen::htmlFileExtension;
if (!f->anchor.isEmpty()) t << "#" << f->anchor;
t << "\">";
t << "<param name=\"Name\" value=\"" << level2 << "\">"
t << "<param name=\"Name\" value=\"" << m_help->recode(level2) << "\">"
"</OBJECT>\n";
}
lastLevel1 = level1.copy();
......@@ -258,7 +259,7 @@ HtmlHelp::HtmlHelp() : indexFileDict(1009)
/* initial depth */
dc = 0;
cf = kf = 0;
index = new HtmlHelpIndex;
index = new HtmlHelpIndex(this);
m_fromUtf8 = (void *)(-1);
}
......
......@@ -85,6 +85,7 @@ class HtmlHelp : public IndexIntf
void addStyleSheetFile(const char *) {}
private:
friend class HtmlHelpIndex;
void createProjectFile();
QFile *cf,*kf;
......
This diff is collapsed.
......@@ -178,6 +178,7 @@ enum HighlightedItem
HLI_Pages,
HLI_Examples,
HLI_Search,
HLI_UserGroup,
HLI_ClassVisible,
HLI_NamespaceVisible,
......
......@@ -2024,7 +2024,7 @@ void LatexGenerator::startMemberTemplateParams()
}
}
void LatexGenerator::endMemberTemplateParams()
void LatexGenerator::endMemberTemplateParams(const char *)
{
if (templateMemberItem)
{
......@@ -2032,7 +2032,7 @@ void LatexGenerator::endMemberTemplateParams()
}
}
void LatexGenerator::startMemberItem(int annoType)
void LatexGenerator::startMemberItem(const char *,int annoType)
{
//printf("LatexGenerator::startMemberItem(%d)\n",annType);
if (!insideTabbing)
......@@ -2052,7 +2052,7 @@ void LatexGenerator::endMemberItem()
t << endl;
}
void LatexGenerator::startMemberDescription()
void LatexGenerator::startMemberDescription(const char *)
{
if (!insideTabbing)
{
......@@ -2271,15 +2271,10 @@ void LatexGenerator::endParameterList()
{
}
void LatexGenerator::startParameterType(bool /*first*/,const char *key)
void LatexGenerator::startParameterType(bool first,const char *key)
{
t << "\\item[{";
t << key;
// if (!first)
// {
// t << "\\/ " << key << " ";
// }
if (!first && key) t << key;
}
void LatexGenerator::endParameterType()
......
......@@ -113,10 +113,10 @@ class LatexGenerator : public OutputGenerator
void endInlineHeader();
void startAnonTypeScope(int);
void endAnonTypeScope(int);
void startMemberItem(int);
void startMemberItem(const char *,int);
void endMemberItem();
void startMemberTemplateParams();
void endMemberTemplateParams();
void endMemberTemplateParams(const char *);
void startMemberGroupHeader(bool);
void endMemberGroupHeader();
......@@ -162,7 +162,7 @@ class LatexGenerator : public OutputGenerator
void endCenter() { t << "\\end{center}" << endl; }
void startSmall() { t << "\\footnotesize "; }
void endSmall() { t << "\\normalsize "; }
void startMemberDescription();
void startMemberDescription(const char *);
void endMemberDescription();
void startDescList(SectionTypes) { t << "\\begin{Desc}\n\\item["; }
void endDescList() { t << "\\end{Desc}" << endl; }
......@@ -186,7 +186,7 @@ class LatexGenerator : public OutputGenerator
void endQuickIndices() {}
void writeSplitBar(const char *) {}
void writeLogo() {}
void writeQuickLinks(bool,HighlightedItem) {}
void writeQuickLinks(bool,HighlightedItem,const char*) {}
void startContents() {}
void endContents() {}
void writeNonBreakableSpace(int);
......
......@@ -21,6 +21,7 @@
#include "language.h"
#include "vhdldocgen.h"
#include "util.h"
#include "doxygen.h"
#include <qxml.h>
#include <qfile.h>
......@@ -55,7 +56,8 @@ static bool elemIsVisible(const QXmlAttributes &attrib,bool defVal=TRUE)
//---------------------------------------------------------------------------------
LayoutNavEntry *LayoutNavEntry::find(LayoutNavEntry::Kind kind) const
LayoutNavEntry *LayoutNavEntry::find(LayoutNavEntry::Kind kind,
const char *file) const
{
LayoutNavEntry *result=0;
QListIterator<LayoutNavEntry> li(m_children);
......@@ -64,9 +66,9 @@ LayoutNavEntry *LayoutNavEntry::find(LayoutNavEntry::Kind kind) const
{
// depth first search, needed to find the entry furthest from the
// root in case an entry is in the tree twice
result = entry->find(kind);
result = entry->find(kind,file);
if (result) return result;
if (entry->kind()==kind)
if (entry->kind()==kind && (file==0 || entry->baseFile()==file))
{
return entry;
}
......@@ -74,6 +76,39 @@ LayoutNavEntry *LayoutNavEntry::find(LayoutNavEntry::Kind kind) const
return result;
}
QCString LayoutNavEntry::url() const
{
QCString url = baseFile().stripWhiteSpace();
if (kind()!=LayoutNavEntry::User)
{
url+=Doxygen::htmlFileExtension;
}
else if (url.left(5)=="@ref " || url.left(5)=="\\ref ")
{
Definition *d;
QCString anchor;
bool found=FALSE;
if (resolveLink(0,url.mid(5).stripWhiteSpace(),TRUE,&d,anchor))
{
if (d && d->isLinkable())
{
url=d->getOutputFileBase()+Doxygen::htmlFileExtension;
if (!anchor.isEmpty())
{
url+="#"+anchor;
}
found=TRUE;
}
}
if (!found)
{
msg("warning: explicit link request to '%s' in layout file '%s' could not be resolved\n",qPrint(url.mid(5)),qPrint(Config_getString("LAYOUT_FILE")));
}
}
//printf("LayoutNavEntry::url()=%s\n",url.data());
return url;
}
//---------------------------------------------------------------------------------
class LayoutParser : public QXmlDefaultHandler
......@@ -771,13 +806,13 @@ class LayoutParser : public QXmlDefaultHandler
{
m_scope="navindex/";
m_rootNav = LayoutDocManager::instance().rootNavEntry();
m_rootNav->clear();
if (m_rootNav) m_rootNav->clear();
}
void endNavIndex()
{
m_scope="";
if (!m_rootNav->find(LayoutNavEntry::MainPage))
if (m_rootNav && !m_rootNav->find(LayoutNavEntry::MainPage))
{
// no MainPage node... add one the first item of the root node...
new LayoutNavEntry(m_rootNav,LayoutNavEntry::MainPage, TRUE,
......@@ -923,6 +958,13 @@ class LayoutParser : public QXmlDefaultHandler
QCString(),
"user"
},
{ "usergroup",
LayoutNavEntry::UserGroup,
QCString(),
QCString(),
QCString(),
"usergroup"
},
{ 0, // end of list
(LayoutNavEntry::Kind)0,
QCString(),
......@@ -952,8 +994,9 @@ class LayoutParser : public QXmlDefaultHandler
}
else
{
err("error: the type '%s' is not supported for the entry tag within a navindex! Check your layout file!\n");
err("error: the type '%s' is not supported for the entry tag within a navindex! Check your layout file!\n",type.data());
}
m_invalidEntry=TRUE;
return;
}
QCString baseFile = mapping[i].baseFile;
......@@ -978,6 +1021,10 @@ class LayoutParser : public QXmlDefaultHandler
{
baseFile=url;
}
else if (kind==LayoutNavEntry::UserGroup)
{
baseFile+=QCString().sprintf("%d",m_userGroupCount++);
}
// create new item and make it the new root
m_rootNav = new LayoutNavEntry(m_rootNav,kind,kind==LayoutNavEntry::MainPage?TRUE:isVisible,baseFile,title,intro);
}
......@@ -985,7 +1032,8 @@ class LayoutParser : public QXmlDefaultHandler
void endNavEntry()
{
// set the root back to the parent
m_rootNav = m_rootNav->parent();
if (m_rootNav && !m_invalidEntry) m_rootNav = m_rootNav->parent();
m_invalidEntry=FALSE;
}
void startClass(const QXmlAttributes &)
......@@ -1142,15 +1190,19 @@ class LayoutParser : public QXmlDefaultHandler
}
private:
LayoutParser() : m_sHandler(163), m_eHandler(17) { }
LayoutParser() : m_sHandler(163), m_eHandler(17), m_invalidEntry(FALSE) { }
QDict<StartElementHandler> m_sHandler;
QDict<EndElementHandler> m_eHandler;
QString m_scope;
int m_part;
LayoutNavEntry *m_rootNav;
bool m_invalidEntry;
static int m_userGroupCount;
};
int LayoutParser::m_userGroupCount=0;
//---------------------------------------------------------------------------------
class LayoutErrorHandler : public QXmlErrorHandler
......
......@@ -127,7 +127,8 @@ struct LayoutNavEntry
FileGlobals,
Dirs,
Examples,
User
User,
UserGroup
};
LayoutNavEntry(LayoutNavEntry *parent,Kind k,bool vs,const QCString &bf,
const QCString &tl,const QCString &intro,bool prepend=FALSE)
......@@ -140,12 +141,13 @@ struct LayoutNavEntry
QCString baseFile() const { return m_baseFile; }
QCString title() const { return m_title; }
QCString intro() const { return m_intro; }
QCString url() const;
bool visible() { return m_visible; }
void clear() { m_children.clear(); }
void addChild(LayoutNavEntry *e) { m_children.append(e); }
void prependChild(LayoutNavEntry *e) { m_children.prepend(e); }
const QList<LayoutNavEntry> &children() const { return m_children; }
LayoutNavEntry *find(LayoutNavEntry::Kind k) const;
LayoutNavEntry *find(LayoutNavEntry::Kind k,const char *file=0) const;
private:
LayoutNavEntry() : m_parent(0) {}
......
......@@ -524,7 +524,7 @@ void ManGenerator::endAnonTypeScope(int indentLevel)
}
void ManGenerator::startMemberItem(int)
void ManGenerator::startMemberItem(const char *,int)
{
if (firstCol && !insideTabbing) t << ".in +1c\n";
t << "\n.ti -1c\n.RI \"";
......
......@@ -111,10 +111,10 @@ class ManGenerator : public OutputGenerator
void endInlineHeader();
void startAnonTypeScope(int);
void endAnonTypeScope(int);
void startMemberItem(int);
void startMemberItem(const char *,int);
void endMemberItem();
void startMemberTemplateParams() {}
void endMemberTemplateParams() {}
void endMemberTemplateParams(const char *) {}
void startMemberGroupHeader(bool);
void endMemberGroupHeader();
......@@ -158,7 +158,7 @@ class ManGenerator : public OutputGenerator
void endCenter() {}
void startSmall() {}
void endSmall() {}
void startMemberDescription() { t << "\n.RI \"\\fI"; firstCol=FALSE; }
void startMemberDescription(const char *) { t << "\n.RI \"\\fI"; firstCol=FALSE; }
void endMemberDescription() { t << "\\fP\""; firstCol=FALSE; }
void startDescList(SectionTypes);
void endDescList() {}
......@@ -183,7 +183,7 @@ class ManGenerator : public OutputGenerator
void endQuickIndices() {}
void writeSplitBar(const char *) {}
void writeLogo() {}
void writeQuickLinks(bool,HighlightedItem) {}
void writeQuickLinks(bool,HighlightedItem,const char *) {}
void startContents() {}
void endContents() {}
void writeNonBreakableSpace(int n) { int i; for (i=0;i<n;i++) t << " "; }
......
......@@ -183,7 +183,7 @@ static bool writeDefArgumentList(OutputList &ol,ClassDef *cd,
{
if (isDefine || first)
{
ol.startParameterType(first,md->isObjCMethod()?"dummy":0);
ol.startParameterType(first,0);
paramTypeStarted=TRUE;
if (isDefine)
{
......@@ -1306,6 +1306,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
}
QCString cname = d->name();
QCString cdname = d->displayName();
QCString cfname = getOutputFileBase();
//QCString osname = cname;
// in case of class members that are put in a group the name of the outerscope
......@@ -1322,14 +1323,17 @@ void MemberDef::writeDeclaration(OutputList &ol,
// start a new member declaration
bool isAnonymous = annoClassDef || m_impl->annMemb || m_impl->annEnumType;
///printf("startMemberItem for %s\n",name().data());
ol.startMemberItem( isAnonymous ? 1 : m_impl->tArgList ? 3 : 0);
ol.startMemberItem( anchor(), isAnonymous ? 1 : m_impl->tArgList ? 3 : 0);
// If there is no detailed description we need to write the anchor here.
bool detailsVisible = isDetailedSectionLinkable();
if (!detailsVisible && !m_impl->annMemb)
{
QCString doxyName=name().copy();
if (!cname.isEmpty()) doxyName.prepend(cname+"::");
if (!cname.isEmpty())
{
doxyName.prepend(cdname+getLanguageSpecificSeparator(getLanguage()));
}
QCString doxyArgs=argsString();
ol.startDoxyAnchor(cfname,cname,anchor(),doxyName,doxyArgs);
......@@ -1354,7 +1358,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
{
if (!isAnonymous) ol.startMemberTemplateParams();
writeTemplatePrefix(ol,m_impl->tArgList);
if (!isAnonymous) ol.endMemberTemplateParams();
if (!isAnonymous) ol.endMemberTemplateParams(anchor());
}
// *** write type
......@@ -1378,7 +1382,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
ol.startAnonTypeScope(s_indentLevel++);
annoClassDef->writeDeclaration(ol,m_impl->annMemb,inGroup);
//printf(">>>>>>>>>>>>>> startMemberItem(2)\n");
ol.startMemberItem(2);
ol.startMemberItem(anchor(),2);
int j;
for (j=0;j< s_indentLevel-1;j++)
{
......@@ -1644,7 +1648,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
/* && !annMemb */
)
{
ol.startMemberDescription();
ol.startMemberDescription(anchor());
ol.parseDoc(briefFile(),briefLine(),
getOuterScope()?getOuterScope():d,this,briefDescription(),
TRUE,FALSE,0,TRUE,FALSE);
......@@ -1791,16 +1795,18 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
KEEP_RESIDENT_DURING_CALL;
SrcLangExt lang = getLanguage();
//printf("member=%s lang=%d\n",name().data(),lang);
bool optVhdl = lang==SrcLangExt_VHDL;
QCString sep = getLanguageSpecificSeparator(lang);
QCString scopeName = scName;
QCString memAnchor = anchor();
QCString ciname = container->name();
if (container->definitionType()==TypeGroup)
{
if (getClassDef()) scopeName=getClassDef()->name();
else if (getNamespaceDef()) scopeName=getNamespaceDef()->name();
else if (getFileDef()) scopeName=getFileDef()->name();
if (getClassDef()) scopeName=getClassDef()->displayName();
else if (getNamespaceDef()) scopeName=getNamespaceDef()->displayName();
else if (getFileDef()) scopeName=getFileDef()->displayName();
ciname = ((GroupDef *)container)->groupTitle();
}
else if (container->definitionType()==TypeFile && getNamespaceDef())
......@@ -1809,14 +1815,17 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
memAnchor.prepend("file_");
}
QCString cname = container->name();
QCString cfname = getOutputFileBase();
QCString cname = container->name();
QCString cfname = getOutputFileBase();
QCString cfiname = container->getOutputFileBase();
// get member name
QCString doxyName=name();
// prepend scope if there is any. TODO: make this optional for C only docs
if (scopeName) doxyName.prepend((QCString)scopeName+"::");
if (!scopeName.isEmpty())
{
doxyName.prepend(scopeName+sep);
}
QCString doxyArgs=argsString();
QCString ldef = definition();
......@@ -1985,7 +1994,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
else
{
linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),ldef);
linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),substitute(ldef,"::",sep));
hasParameterList=writeDefArgumentList(ol,cd,scopeName,this);
}
......
......@@ -237,6 +237,8 @@ class MemberDef : public Definition
ClassDef *category() const;
QCString displayName() const { return Definition::name(); }
//-----------------------------------------------------------------------------------
// ---- setters -----
//-----------------------------------------------------------------------------------
......
......@@ -319,14 +319,14 @@ void MemberList::writePlainDeclarations(OutputList &ol,
ol.startMemberList();
first=FALSE;
}
ol.startMemberItem(0);
ol.startMemberItem(md->anchor(),0);
ol.writeString("enum ");
ol.insertMemberAlign();
md->writeEnumDeclaration(ol,cd,nd,fd,gd);
ol.endMemberItem();
if (!md->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
ol.startMemberDescription();
ol.startMemberDescription(md->anchor());
ol.parseDoc(
md->briefFile(),md->briefLine(),
cd,md,
......
......@@ -591,7 +591,7 @@ void NamespaceDef::writeMemberPages(OutputList &ol)
{
if (ml->listType()&MemberList::documentationLists)
{
ml->writeDocumentationPage(ol,name(),this);
ml->writeDocumentationPage(ol,displayName(),this);
}
}
ol.popGeneratorState();
......@@ -836,7 +836,7 @@ void NamespaceSDict::writeDeclaration(OutputList &ol,const char *title,bool loca
if (nd->isLinkable())
{
SrcLangExt lang = nd->getLanguage();
ol.startMemberItem(0);
ol.startMemberItem(nd->getOutputFileBase(),0);
if (lang==SrcLangExt_Java || lang==SrcLangExt_CSharp)
{
ol.docify("package ");
......@@ -867,8 +867,8 @@ void NamespaceSDict::writeDeclaration(OutputList &ol,const char *title,bool loca
ol.endMemberItem();
if (!nd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
ol.startMemberDescription();
ol.parseDoc(nd->briefFile(),nd->briefLine(),nd,0,nd->briefDescription(),FALSE,FALSE);
ol.startMemberDescription(nd->getOutputFileBase());
ol.parseDoc(nd->briefFile(),nd->briefLine(),nd,0,nd->briefDescription(),FALSE,FALSE,0,TRUE);
ol.endMemberDescription();
}
}
......@@ -950,7 +950,7 @@ void NamespaceDef::writeMemberDeclarations(OutputList &ol,MemberList::ListType l
void NamespaceDef::writeMemberDocumentation(OutputList &ol,MemberList::ListType lt,const QCString &title)
{
MemberList * ml = getMemberList(lt);
if (ml) ml->writeDocumentation(ol,name(),this,title);
if (ml) ml->writeDocumentation(ol,displayName(),this,title);
}
......
......@@ -26,80 +26,54 @@ function getScript(scriptName,func,show)
function createIndent(o,domNode,node,level)
{
if (node.parentNode && node.parentNode.parentNode)
{
if (node.parentNode && node.parentNode.parentNode) {
createIndent(o,domNode,node.parentNode,level+1);
}
var imgNode = document.createElement("img");
imgNode.width = 16;
imgNode.height = 22;
if (level==0 && node.childrenData)
{
if (level==0 && node.childrenData) {
node.plus_img = imgNode;
node.expandToggle = document.createElement("a");
node.expandToggle.href = "javascript:void(0)";
node.expandToggle.onclick = function()
{
if (node.expanded)
{
node.expandToggle.onclick = function() {
if (node.expanded) {
$(node.getChildrenUL()).slideUp("fast");
if (node.isLast)
{
if (node.isLast) {
node.plus_img.src = node.relpath+"ftv2plastnode.png";
}
else
{
} else {
node.plus_img.src = node.relpath+"ftv2pnode.png";
}
node.expanded = false;
}
else
{
} else {
expandNode(o, node, false, false);
}
}
node.expandToggle.appendChild(imgNode);
domNode.appendChild(node.expandToggle);
}
else
{
} else {
domNode.appendChild(imgNode);
}
if (level==0)
{
if (node.isLast)
{
if (node.childrenData)
{
if (level==0) {
if (node.isLast) {
if (node.childrenData) {
imgNode.src = node.relpath+"ftv2plastnode.png";
}
else
{
} else {
imgNode.src = node.relpath+"ftv2lastnode.png";
domNode.appendChild(imgNode);
}
}
else
{
if (node.childrenData)
{
} else {
if (node.childrenData) {
imgNode.src = node.relpath+"ftv2pnode.png";
}
else
{
} else {
imgNode.src = node.relpath+"ftv2node.png";
domNode.appendChild(imgNode);
}
}
}
else
{
if (node.isLast)
{
} else {
if (node.isLast) {
imgNode.src = node.relpath+"ftv2blank.png";
}
else
{
} else {
imgNode.src = node.relpath+"ftv2vertline.png";
}
}
......@@ -134,37 +108,45 @@ function newNode(o, po, text, link, childrenData, lastNode)
node.label = document.createTextNode(text);
node.expanded = false;
a.appendChild(node.label);
if (link)
{
if (link) {
var url;
if (link.substring(0,1)=='^') {
url = link.substring(1);
link = url;
} else {
url = node.relpath+link;
}
a.className = stripPath(link.replace('#',':'));
if (link.indexOf('#')!=-1)
{
if (link.indexOf('#')!=-1) {
var aname = '#'+link.split('#')[1];
var srcPage = stripPath($(location).attr('pathname'));
var targetPage = stripPath(link.split('#')[0]);
a.href = srcPage!=targetPage ? node.relpath+link : '#';
a.href = srcPage!=targetPage ? url : '#';
a.onclick = function(){
$('.item').removeClass('selected');
$('.item').removeAttr('id');
$(a).parent().parent().addClass('selected');
$(a).parent().parent().attr('id','selected');
var anchor = $(aname);
$("#doc-content").animate({
scrollTop: anchor.position().top +
$('#doc-content').scrollTop() -
$('#doc-content').offset().top
},500,function(){
var pos, anchor = $(aname), docContent = $('#doc-content');
if (anchor.parent().attr('class')=='memItemLeft') {
pos = anchor.parent().position().top;
} else {
pos = anchor.position().top;
}
var dist = Math.abs(Math.min(
pos-docContent.offset().top,
docContent[0].scrollHeight-
docContent.height()-docContent.scrollTop()));
docContent.animate({
scrollTop: pos + docContent.scrollTop() - docContent.offset().top
},Math.max(50,Math.min(500,dist)),function(){
window.location.replace(aname);
});
};
} else {
a.href = url;
}
else
{
a.href = node.relpath+link;
}
}
else
{
} else {
if (childrenData != null)
{
a.className = "nolink";
......@@ -174,10 +156,8 @@ function newNode(o, po, text, link, childrenData, lastNode)
}
node.childrenUL = null;
node.getChildrenUL = function()
{
if (!node.childrenUL)
{
node.getChildrenUL = function() {
if (!node.childrenUL) {
node.childrenUL = document.createElement("ul");
node.childrenUL.className = "children_ul";
node.childrenUL.style.display = "none";
......@@ -205,36 +185,24 @@ function showRoot()
function expandNode(o, node, imm, showRoot)
{
if (node.childrenData && !node.expanded)
{
if (typeof(node.childrenData)==='string')
{
if (node.childrenData && !node.expanded) {
if (typeof(node.childrenData)==='string') {
var varName = node.childrenData;
getScript(node.relpath+varName,function(){
node.childrenData = getData(varName);
expandNode(o, node, imm, showRoot);
}, showRoot);
}
else
{
if (!node.childrenVisited)
{
} else {
if (!node.childrenVisited) {
getNode(o, node);
}
if (imm)
{
} if (imm) {
$(node.getChildrenUL()).show();
}
else
{
} else {
$(node.getChildrenUL()).slideDown("fast");
}
if (node.isLast)
{
if (node.isLast) {
node.plus_img.src = node.relpath+"ftv2mlastnode.png";
}
else
{
} else {
node.plus_img.src = node.relpath+"ftv2mnode.png";
}
node.expanded = true;
......@@ -244,72 +212,53 @@ function expandNode(o, node, imm, showRoot)
function showNode(o, node, index)
{
if (node.childrenData && !node.expanded)
{
if (typeof(node.childrenData)==='string')
{
if (node.childrenData && !node.expanded) {
if (typeof(node.childrenData)==='string') {
var varName = node.childrenData;
getScript(node.relpath+varName,function(){
node.childrenData = getData(varName);
showNode(o,node,index);
},true);
}
else
{
if (!node.childrenVisited)
{
} else {
if (!node.childrenVisited) {
getNode(o, node);
}
$(node.getChildrenUL()).show();
if (node.isLast)
{
if (node.isLast) {
node.plus_img.src = node.relpath+"ftv2mlastnode.png";
}
else
{
} else {
node.plus_img.src = node.relpath+"ftv2mnode.png";
}
node.expanded = true;
var n = node.children[o.breadcrumbs[index]];
if (index+1<o.breadcrumbs.length)
{
if (index+1<o.breadcrumbs.length) {
showNode(o,n,index+1);
}
else
{
if (typeof(n.childrenData)==='string')
{
} else {
if (typeof(n.childrenData)==='string') {
var varName = n.childrenData;
getScript(n.relpath+varName,function(){
n.childrenData = getData(varName);
node.expanded=false;
showNode(o,node,index); // retry with child node expanded
},true);
}
else
{
if (o.toroot=="index.html" || n.childrenData)
{
} else {
if (o.toroot=="index.html" || n.childrenData) {
expandNode(o, n, true, true);
}
var a;
if ($(location).attr('hash'))
{
if ($(location).attr('hash')) {
var link=stripPath($(location).attr('pathname'))+':'+
$(location).attr('hash').substring(1);
a=$('.item a[class*=\""'+link+'"\"]');
}
if (a && a.length)
{
if (a && a.length) {
a.parent().parent().addClass('selected');
a.parent().parent().attr('id','selected');
var anchor = $($(location).attr('hash'));
var targetDiv = anchor.next();
$(targetDiv).children('.memproto,.memdoc').
effect("highlight", {}, 1500);
}
else
{
} else {
$(n.itemDiv).addClass('selected');
$(n.itemDiv).attr('id','selected');
}
......@@ -323,8 +272,7 @@ function getNode(o, po)
{
po.childrenVisited = true;
var l = po.childrenData.length-1;
for (var i in po.childrenData)
{
for (var i in po.childrenData) {
var nodeData = po.childrenData[i];
po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2],
i==l);
......@@ -364,11 +312,13 @@ function initNavTree(toroot,relpath)
$(window).bind('hashchange', function(){
if (window.location.hash && window.location.hash.length>1){
var anchor = $(window.location.hash);
var targetDiv = anchor.next();
$(targetDiv).children('.memproto,.memdoc').effect("highlight",{},1500);
var docContent = $('#doc-content');
if (docContent && anchor && anchor[0] && anchor[0].ownerDocument){
docContent.scrollTop(anchor.position().top+docContent.scrollTop()-docContent.offset().top);
if (anchor.parent().attr('class')=='memItemLeft'){
var rows = $('.memberdecls tr[class$=\""'+
window.location.hash.substring(1)+'"\"]').children();
rows.effect('highlight',{},1500);
} else {
var targetDiv = anchor.next();
$(targetDiv).children('.memproto,.memdoc').effect("highlight",{},1500);
}
var a;
if ($(location).attr('hash')){
......@@ -385,9 +335,6 @@ function initNavTree(toroot,relpath)
var targetDiv = anchor.next();
showRoot();
}
} else {
var docContent = $('#doc-content');
if (docContent){ docContent.scrollTop(0); }
}
})
......
This diff is collapsed.
......@@ -340,10 +340,10 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void endInlineHeader() = 0;
virtual void startAnonTypeScope(int) = 0;
virtual void endAnonTypeScope(int) = 0;
virtual void startMemberItem(int) = 0;
virtual void startMemberItem(const char *,int) = 0;
virtual void endMemberItem() = 0;
virtual void startMemberTemplateParams() = 0;
virtual void endMemberTemplateParams() = 0;
virtual void endMemberTemplateParams(const char *) = 0;
virtual void startMemberGroupHeader(bool) = 0;
virtual void endMemberGroupHeader() = 0;
virtual void startMemberGroupDocs() = 0;
......@@ -362,7 +362,7 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void writeStartAnnoItem(const char *type,const char *file,
const char *path,const char *name) = 0;
virtual void writeEndAnnoItem(const char *name) = 0;
virtual void startMemberDescription() = 0;
virtual void startMemberDescription(const char *anchor) = 0;
virtual void endMemberDescription() = 0;
virtual void startIndent() = 0;
virtual void endIndent() = 0;
......@@ -384,7 +384,7 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void endQuickIndices() = 0;
virtual void writeSplitBar(const char *) = 0;
virtual void writeLogo() = 0;
virtual void writeQuickLinks(bool compact,HighlightedItem hli) = 0;
virtual void writeQuickLinks(bool compact,HighlightedItem hli,const char *file) = 0;
virtual void startContents() = 0;
virtual void endContents() = 0;
virtual void startTextBlock(bool) = 0;
......@@ -394,7 +394,7 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void endMemberDocPrefixItem() = 0;
virtual void startMemberDocName(bool) = 0;
virtual void endMemberDocName() = 0;
virtual void startParameterType(bool,const char *) = 0;
virtual void startParameterType(bool,const char *key) = 0;
virtual void endParameterType() = 0;
virtual void startParameterName(bool) = 0;
virtual void endParameterName(bool,bool,bool) = 0;
......
......@@ -289,16 +289,17 @@ FORALL1(SectionTypes a1,a1)
FORALL1(bool a1,a1)
FORALL2(bool a1,int a2,a1,a2)
FORALL2(bool a1,bool a2,a1,a2)
FORALL2(const char *a1,bool a2,a1,a2)
FORALL4(const char *a1,const char *a2,const char *a3,bool a4,a1,a2,a3,a4)
#endif
FORALL2(int a1,bool a2,a1,a2)
FORALL2(bool a1,HighlightedItem a2,a1,a2)
FORALL2(bool a1,const char *a2,a1,a2)
FORALL2(ParamListTypes a1,const char *a2,a1,a2)
FORALL1(IndexSections a1,a1)
FORALL2(const char *a1,const char *a2,a1,a2)
FORALL2(const char *a1,bool a2,a1,a2)
FORALL2(const char *a1,int a2,a1,a2)
FORALL2(const char *a1,SectionInfo::SectionType a2,a1,a2)
FORALL3(bool a1,HighlightedItem a2,const char *a3,a1,a2,a3)
FORALL3(bool a1,bool a2,bool a3,a1,a2,a3)
FORALL3(const ClassDiagram &a1,const char *a2,const char *a3,a1,a2,a3)
FORALL3(const char *a1,const char *a2,const char *a3,a1,a2,a3)
......
......@@ -201,14 +201,14 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startAnonTypeScope,i1); }
void endAnonTypeScope(int i1)
{ forall(&OutputGenerator::endAnonTypeScope,i1); }
void startMemberItem(int i1)
{ forall(&OutputGenerator::startMemberItem,i1); }
void startMemberItem(const char *anchor,int i1)
{ forall(&OutputGenerator::startMemberItem,anchor,i1); }
void endMemberItem()
{ forall(&OutputGenerator::endMemberItem); }
void startMemberTemplateParams()
{ forall(&OutputGenerator::startMemberTemplateParams); }
void endMemberTemplateParams()
{ forall(&OutputGenerator::endMemberTemplateParams); }
void endMemberTemplateParams(const char *anchor)
{ forall(&OutputGenerator::endMemberTemplateParams,anchor); }
void startMemberGroupHeader(bool b)
{ forall(&OutputGenerator::startMemberGroupHeader,b); }
void endMemberGroupHeader()
......@@ -295,8 +295,8 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startBold); }
void endBold()
{ forall(&OutputGenerator::endBold); }
void startMemberDescription()
{ forall(&OutputGenerator::startMemberDescription); }
void startMemberDescription(const char *anchor)
{ forall(&OutputGenerator::startMemberDescription,anchor); }
void endMemberDescription()
{ forall(&OutputGenerator::endMemberDescription); }
void startSimpleSect(SectionTypes t,const char *file,const char *anchor,
......@@ -338,8 +338,8 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::writeSplitBar,name); }
void writeLogo()
{ forall(&OutputGenerator::writeLogo); }
void writeQuickLinks(bool compact,HighlightedItem hli)
{ forall(&OutputGenerator::writeQuickLinks,compact,hli); }
void writeQuickLinks(bool compact,HighlightedItem hli,const char *file)
{ forall(&OutputGenerator::writeQuickLinks,compact,hli,file); }
void startContents()
{ forall(&OutputGenerator::startContents); }
void endContents()
......@@ -489,15 +489,16 @@ class OutputList : public OutputDocInterface
FORALLPROTO1(bool);
FORALLPROTO2(bool,int);
FORALLPROTO2(bool,bool);
FORALLPROTO2(const char *,bool);
FORALLPROTO4(const char *,const char *,const char *,int);
#endif
FORALLPROTO2(int,bool);
FORALLPROTO2(bool,HighlightedItem);
FORALLPROTO2(bool,const char *);
FORALLPROTO2(ParamListTypes,const char *);
FORALLPROTO2(const char *,const char *);
FORALLPROTO2(const char *,bool);
FORALLPROTO2(const char *,int);
FORALLPROTO2(const char *,SectionInfo::SectionType);
FORALLPROTO3(bool,HighlightedItem,const char *);
FORALLPROTO3(bool,bool,bool);
FORALLPROTO3(const char *,const char *,bool);
FORALLPROTO3(const char *,const char *,SectionInfo::SectionType);
......
......@@ -52,6 +52,7 @@ class PageDef : public Definition
bool hasParentPage() const;
void setPageScope(Definition *d){ m_pageScope = d; }
Definition *getPageScope() const { return m_pageScope; }
QCString displayName() const { return !m_title.isEmpty() ? m_title : Definition::name(); }
private:
void setNestingLevel(int l);
......
......@@ -2,6 +2,7 @@
#include <ctype.h>
#if defined(_WIN32) && !defined(__CYGWIN__)
#undef UNICODE
#define _WIN32_DCOM
#include <windows.h>
#else
#include <unistd.h>
......
......@@ -63,19 +63,28 @@ struct FileState
QCString fileName;
};
/** @brief Singleton that manages the defines available while proprocessing files. */
/** @brief Singleton that manages the defines available while
* proprocessing files.
*/
class DefineManager
{
/** Local class used to hold the defines for a single file */
class DefinesPerFile
{
public:
/** Creates an empty container for defines */
DefinesPerFile() : m_defines(257), m_includedFiles(17)
{
m_defines.setAutoDelete(TRUE);
}
/** Destroys the object */
virtual ~DefinesPerFile()
{
}
/** Adds a define in the context of a file. Will replace
* an existing define with the same name (redefinition)
* @param def The Define object to add.
*/
void addDefine(Define *def)
{
Define *d = m_defines.find(def->name);
......@@ -85,6 +94,9 @@ class DefineManager
}
m_defines.insert(def->name,def);
}
/** Adds an include file for this file
* @param fileName The name of the include file
*/
void addInclude(const char *fileName)
{
m_includedFiles.insert(fileName,(void*)0x8);
......@@ -97,26 +109,48 @@ class DefineManager
public:
friend class DefinesPerFile;
/** Returns a reference to the singleton */
static DefineManager &instance()
{
if (theInstance==0) theInstance = new DefineManager;
return *theInstance;
}
/** Deletes the singleton */
static void deleteInstance()
{
delete theInstance;
theInstance = 0;
}
void startContext()
/** Starts a context in which defines are collected.
* Called at the start of a new file that is preprocessed.
* @param fileName the name of the file to process.
*/
void startContext(const char *fileName)
{
//printf("DefineManager::startContext()\n");
m_contextDefines.clear();
if (fileName==0) return;
DefinesPerFile *dpf = m_fileMap.find(fileName);
if (dpf==0)
{
//printf("New file!\n");
dpf = new DefinesPerFile;
m_fileMap.insert(fileName,dpf);
}
}
/** Ends the context started with startContext() freeing any
* defines collected within in this context.
*/
void endContext()
{
//printf("DefineManager::endContext()\n");
m_contextDefines.clear();
}
/** Add an included file to the current context.
* If the file has been pre-processed already, all defines are added
* to the context.
* @param fileName The name of the include file to add to the context.
*/
void addFileToContext(const char *fileName)
{
if (fileName==0) return;
......@@ -135,6 +169,11 @@ class DefineManager
dpf->collectDefines(&m_contextDefines,includeStack);
}
}
/** Add a define to the manager object.
* @param fileName The file in which the define was found
* @param def The Define object to add.
*/
void addDefine(const char *fileName,Define *def)
{
if (fileName==0) return;
......@@ -153,6 +192,11 @@ class DefineManager
}
dpf->addDefine(def);
}
/** Add an include relation to the manager object.
* @param fromFileName file name in which the include was found.
* @param toFileName file name that is included.
*/
void addInclude(const char *fromFileName,const char *toFileName)
{
//printf("DefineManager::addInclude(%s,%s)\n",fromFileName,toFileName);
......@@ -164,16 +208,22 @@ class DefineManager
}
dpf->addInclude(toFileName);
}
/** Returns a Define object given its name or 0 if the Define does
* not exist.
*/
Define *isDefined(const char *name) const
{
return m_contextDefines.find(name);
}
/** Returns a reference to the defines found in the current context. */
const DefineDict &defineContext() const
{
return m_contextDefines;
}
private:
static DefineManager *theInstance;
/** Helper function to collect all define for a given file */
void collectDefinesForFile(const char *fileName,DefineDict *dict)
{
if (fileName==0) return;
......@@ -184,25 +234,41 @@ class DefineManager
dpf->collectDefines(dict,includeStack);
}
}
/** Helper function to return the DefinesPerFile object for a given file name. */
DefinesPerFile *find(const char *fileName) const
{
if (fileName==0) return 0;
return m_fileMap.find(fileName);
}
/** Creates a new DefineManager object */
DefineManager() : m_fileMap(1009), m_contextDefines(1009)
{
m_fileMap.setAutoDelete(TRUE);
}
/** Destroys the object */
virtual ~DefineManager()
{
}
QDict<DefinesPerFile> m_fileMap;
DefineDict m_contextDefines;
};
/** Singleton instance */
DefineManager *DefineManager::theInstance = 0;
void DefineManager::DefinesPerFile::collectDefines(DefineDict *dict,QDict<void> &includeStack)
/** Collects all defines for a file and all files that the file includes.
* This function will recursively call itself for each file.
* @param dict The dictionary to fill with the defines. A redefine will
* replace a previous definition.
* @param includeStack The stack of includes, used to stop recursion in
* case there is a cyclic include dependency.
*/
void DefineManager::DefinesPerFile::collectDefines(
DefineDict *dict,QDict<void> &includeStack)
{
//printf("DefinesPerFile::collectDefines #defines=%d\n",m_defines.count());
{
......@@ -2773,10 +2839,9 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output)
g_condStack.setAutoDelete(TRUE);
//g_fileDefineDict->clear();
DefineManager::instance().startContext();
setFileName(fileName);
g_inputFileDef = g_yyFileDef;
DefineManager::instance().addFileToContext(g_yyFileName);
DefineManager::instance().startContext(g_yyFileName);
static bool firstTime=TRUE;
if (firstTime)
......
......@@ -296,7 +296,7 @@ static void addToSearchIndex(const char *text)
}
static ClassDef *stripClassName(const char *s)
static ClassDef *stripClassName(const char *s,Definition *d=g_currentDefinition)
{
int pos=0;
QCString type = s;
......@@ -309,11 +309,11 @@ static ClassDef *stripClassName(const char *s)
ClassDef *cd=0;
if (!g_classScope.isEmpty())
{
cd=getResolvedClass(g_currentDefinition,g_sourceFileDef,g_classScope+"::"+clName);
cd=getResolvedClass(d,g_sourceFileDef,g_classScope+"::"+clName);
}
if (cd==0)
{
cd=getResolvedClass(g_currentDefinition,g_sourceFileDef,clName);
cd=getResolvedClass(d,g_sourceFileDef,clName);
}
if (cd)
{
......@@ -516,7 +516,7 @@ static bool getLinkInScope(const QCString &c, // scope
if (md->getGroupDef()) d = md->getGroupDef();
if (d && d->isLinkable())
{
g_theCallContext.setClass(stripClassName(md->typeString()));
g_theCallContext.setClass(stripClassName(md->typeString(),md->getOuterScope()));
//printf("g_currentDefinition=%p g_currentMemberDef=%p\n",
// g_currentDefinition,g_currentMemberDef);
......@@ -563,18 +563,16 @@ static bool getLink(const char *className,
/*
For a given string in the source code,
finds its class or global id and links to it.
As of June 1, '05, this ONLY finds classes
*/
static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName,
bool /*typeOnly*/=FALSE)
bool typeOnly=FALSE)
{
QCString className=clName;
// Don't do anything for empty text
if (className.isEmpty()) return;
//printf("generateClassOrGlobalLink(className=%s)\n",className.data());
//fprintf(stderr,"generateClassOrGlobalLink(className=%s)\n",className.data());
ClassDef *cd=0,*lcd=0; /** Class def that we may find */
MemberDef *md=0; /** Member def that we may find */
......@@ -583,15 +581,25 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName,
if ((lcd=g_theVarContext.findVariable(className))==0) // not a local variable
{
Definition *d = g_currentDefinition;
QCString scope = substitute(className,".","::");
cd = getResolvedClass(d,g_sourceFileDef,className,&md);
cd = getResolvedClass(d,g_sourceFileDef,substitute(className,".","::"),&md);
//printf("d=%p g_sourceFileDef=%p\n",d,g_currentDefinition);
//printf("is found as a type %s\n",cd?cd->name().data():"<null>");
//fprintf(stderr,"d=%s g_sourceFileDef=%s\n",
// d?d->displayName().data():"<null>",
// g_currentDefinition?g_currentDefinition->displayName().data():"<null>");
//fprintf(stderr,"is found as a type %s\n",cd?cd->name().data():"<null>");
if (cd==0 && md==0) // also see if it is variable or enum or enum value
{
if (getLink(g_classScope,clName,ol,clName))
NamespaceDef *nd = getResolvedNamespace(scope);
if (nd)
{
writeMultiLineCodeLink(ol,nd->getReference(),nd->getOutputFileBase(),nd->anchor(),clName,nd->briefDescriptionAsTooltip());
addToSearchIndex(className);
return;
}
else if (getLink(g_classScope,clName,ol,clName))
{
return;
}
......@@ -624,50 +632,55 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName,
}
else // not a class, maybe a global member
{
//printf("Checking if '%s' is a global function\n",clName);
/*
This code requires a going-over in order to
make it work for Python
//printf("class %s not linkable! cd=%p md=%p typeOnly=%d\n",clName,cd,md,typeOnly);
if (!isLocal && (md!=0 || (cd==0 && !typeOnly))) // not a class, see if it is a global enum/variable/typedef.
int scopeEnd = className.findRev(".");
if (scopeEnd!=-1 && !typeOnly) // name with explicit scope
{
if (md==0) // not found as a typedef
{
md = setCallContextForVar(clName);
//printf("setCallContextForVar(%s) md=%p g_currentDefinition=%p\n",clName,md,g_currentDefinition);
if (md && g_currentDefinition)
{
//fprintf(stderr,"%s accessible from %s? %d md->getOuterScope=%s\n",
// md->name().data(),g_currentDefinition->name().data(),
// isAccessibleFrom(g_currentDefinition,g_sourceFileDef,md),
// md->getOuterScope()->name().data());
}
if (md && g_currentDefinition &&
isAccessibleFrom(g_currentDefinition,g_sourceFileDef,md)==-1)
{
md=0; // variable not accessible
}
}
if (md)
QCString scope = substitute(className.left(scopeEnd),".","::");
QCString locName = className.right(className.length()-scopeEnd-1);
ClassDef *mcd = getClass(scope);
//fprintf(stderr,"scope=%s locName=%s mcd=%p\n",scope.data(),locName.data(),mcd);
if (mcd)
{
//printf("is a global md=%p g_currentDefinition=%s\n",md,g_currentDefinition?g_currentDefinition->name().data():"<none>");
if (md->isLinkable())
MemberDef *md = mcd->getMemberByName(locName);
if (md)
{
writeMultiLineCodeLink(ol,md->getReference(),md->getOutputFileBase(),md->anchor(),clName,md->briefDescriptionAsTooltip());
addToSearchIndex(clName);
if (g_currentMemberDef)
g_theCallContext.setClass(stripClassName(md->typeString(),md->getOuterScope()));
writeMultiLineCodeLink(ol,md->getReference(),md->getOutputFileBase(),md->anchor(),clName,md->briefDescriptionAsTooltip());
addToSearchIndex(className);
Definition *d = md->getOuterScope()==Doxygen::globalScope ?
md->getBodyDef() : md->getOuterScope();
if (md->getGroupDef()) d = md->getGroupDef();
if (d && d->isLinkable() && md->isLinkable() && g_currentMemberDef)
{
addDocCrossReference(g_currentMemberDef,md);
}
return;
}
}
else // check namespace as well
{
NamespaceDef *mnd = getResolvedNamespace(scope);
if (mnd)
{
MemberDef *md=mnd->getMemberByName(locName);
if (md)
{
//printf("name=%s scope=%s\n",locName.data(),scope.data());
g_theCallContext.setClass(stripClassName(md->typeString(),md->getOuterScope()));
writeMultiLineCodeLink(ol,md->getReference(),md->getOutputFileBase(),md->anchor(),clName,md->briefDescriptionAsTooltip());
addToSearchIndex(className);
Definition *d = md->getOuterScope()==Doxygen::globalScope ?
md->getBodyDef() : md->getOuterScope();
if (md->getGroupDef()) d = md->getGroupDef();
if (d && d->isLinkable() && md->isLinkable() && g_currentMemberDef)
{
addDocCrossReference(g_currentMemberDef,md);
}
return;
}
}
}
}
*/
// nothing found, just write out the word
codifyLines(clName);
......@@ -738,10 +751,11 @@ static bool findMemberLink(CodeOutputInterface &ol,Definition *sym,const char *s
addDocCrossReference(g_currentMemberDef,(MemberDef*)sym);
}
}
//fprintf(stderr,"cd=%s thisCd=%s\n",cd?cd->name().data():"<none>",thisCd?thisCd->name().data():"<none>");
// TODO: find the nearest base class in case cd is a base class of
// thisCd
if (cd==thisCd)
if (cd==thisCd || (thisCd && thisCd->isBaseClass(cd,TRUE)))
{
writeMultiLineCodeLink(ol,sym->getReference(),
sym->getOutputFileBase(),
......@@ -994,7 +1008,7 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBUT
codify(yytext);
}
{IDENTIFIER} {
({IDENTIFIER}".")*{IDENTIFIER} {
// The parser
// is assuming
// that ALL identifiers
......@@ -1114,10 +1128,11 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBUT
({IDENTIFIER}".")*{IDENTIFIER}/"(" {
generateClassOrGlobalLink(*g_code,yytext);
}
{IDENTIFIER} {
codify(yytext);
//generateClassOrGlobalLink(*g_code,yytext);
({IDENTIFIER}".")+{IDENTIFIER} {
generateClassOrGlobalLink(*g_code,yytext,TRUE);
}
{IDENTIFIER} { codify(yytext); }
}
......@@ -1127,6 +1142,12 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBUT
{BB} {
codify(yytext);
}
"pass" {
startFontClass("keyword");
codifyLines(yytext);
endFontClass();
BEGIN(Body);
}
{KEYWORD} {
startFontClass("keyword");
codifyLines(yytext);
......
This diff is collapsed.
......@@ -1571,7 +1571,7 @@ void RTFGenerator::endDescItem()
newParagraph();
}
void RTFGenerator::startMemberDescription()
void RTFGenerator::startMemberDescription(const char *)
{
DBG_RTF(t << "{\\comment (startMemberDescription)}" << endl)
t << "{" << endl;
......@@ -1837,7 +1837,7 @@ void RTFGenerator::endClassDiagram(const ClassDiagram &d,
// t << text;
//}
void RTFGenerator::startMemberItem(int)
void RTFGenerator::startMemberItem(const char *,int)
{
DBG_RTF(t <<"{\\comment startMemberItem }" << endl)
t << rtf_Style_Reset << rtf_BList_DepthStyle() << endl; // set style to apropriate depth
......
......@@ -111,10 +111,10 @@ class RTFGenerator : public OutputGenerator
void endInlineHeader();
void startAnonTypeScope(int) {}
void endAnonTypeScope(int) {}
void startMemberItem(int);
void startMemberItem(const char *,int);
void endMemberItem();
void startMemberTemplateParams() {}
void endMemberTemplateParams() {}
void endMemberTemplateParams(const char *) {}
void insertMemberAlign(bool) {}
void writeRuler() { rtfwriteRuler_thin(); }
......@@ -154,7 +154,7 @@ class RTFGenerator : public OutputGenerator
void startSmall() { t << "{\\sub "; }
void endSmall() { t << "}"; }
void startMemberDescription();
void startMemberDescription(const char *);
void endMemberDescription();
void startDescList(SectionTypes);
void startSimpleSect(SectionTypes,const char *,const char *,const char *);
......@@ -178,7 +178,7 @@ class RTFGenerator : public OutputGenerator
void endQuickIndices() {}
void writeSplitBar(const char *) {}
void writeLogo() {}
void writeQuickLinks(bool,HighlightedItem) {}
void writeQuickLinks(bool,HighlightedItem,const char *) {}
void startContents() {}
void endContents() {}
void writeNonBreakableSpace(int);
......
......@@ -374,10 +374,13 @@ static void addMemberToSearchIndex(
ClassDef *cd=0;
NamespaceDef *nd=0;
FileDef *fd=0;
GroupDef *gd=0;
if (isLinkable &&
(cd=md->getClassDef()) &&
cd->isLinkable() &&
cd->templateMaster()==0)
(
((cd=md->getClassDef()) && cd->isLinkable() && cd->templateMaster()==0) ||
((gd=md->getGroupDef()) && gd->isLinkable())
)
)
{
QCString n = md->name();
uchar charCode = (uchar)n.at(0);
......
......@@ -1656,7 +1656,7 @@ D
int myCmd=0;
for (unsigned int i=0;i<myName.length();i++)
{
char c = myName[i];
char c = myName.at(i);
if (myCmd)
{
if (c==' '||c=='\t'||c=='\n'||c==']')
......@@ -2250,7 +2250,7 @@ tcl_inf("TCL_SUBST: use '%s'\n",s);
if (tcl.input_string.at(tcl.input_string.length()-1) == '\n')
{
tcl.input_string[tcl.input_string.length()-1] = 0x1A;
tcl.input_string.at(tcl.input_string.length()-1) = 0x1A;
}
else
{
......
This diff is collapsed.
......@@ -137,7 +137,8 @@ bool getDefs(const QCString &scopeName,
GroupDef *&gd,
bool forceEmptyScope=FALSE,
FileDef *currentFile=0,
bool checkCV=FALSE
bool checkCV=FALSE,
const char *forceTagFile=0
);
QCString getFileFilter(const char* name,bool isSourceCode);
......@@ -412,5 +413,7 @@ QCString replaceColorMarkers(const char *str);
bool copyFile(const QCString &src,const QCString &dest);
QCString extractBlock(const QCString text,const QCString marker);
QCString correctURL(const QCString &url,const QCString &relPath);
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment