summaryrefslogtreecommitdiffstats
path: root/doc/options.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/options.n')
0 files changed, 0 insertions, 0 deletions
a(),md->name().data());
if (!isReference())
@@ -190,7 +194,7 @@ void ClassDef::insertMember(MemberDef *md)
/* insert member in the declaration section */
/********************************************/
if (md->isRelated() &&
- (Config_getBool("EXTRACT_PRIVATE") || md->protection()!=Private))
+ (Config_getBool("EXTRACT_PRIVATE") || prot!=Private))
{
related.append(md);
md->setSectionList(&related);
@@ -217,7 +221,7 @@ void ClassDef::insertMember(MemberDef *md)
md->setSectionList(&properties);
break;
case MemberDef::Slot: // Qt specific
- switch (md->protection())
+ switch (prot)
{
case Protected:
proSlots.append(md);
@@ -238,7 +242,7 @@ void ClassDef::insertMember(MemberDef *md)
{
if (md->isVariable())
{
- switch (md->protection())
+ switch (prot)
{
case Protected:
proStaticAttribs.append(md);
@@ -256,7 +260,7 @@ void ClassDef::insertMember(MemberDef *md)
}
else // function
{
- switch (md->protection())
+ switch (prot)
{
case Protected:
proStaticMembers.append(md);
@@ -277,7 +281,7 @@ void ClassDef::insertMember(MemberDef *md)
{
if (md->isVariable())
{
- switch (md->protection())
+ switch (prot)
{
case Protected:
proAttribs.append(md);
@@ -295,7 +299,7 @@ void ClassDef::insertMember(MemberDef *md)
}
else if (md->isTypedef() || md->isEnumerate() || md->isEnumValue())
{
- switch (md->protection())
+ switch (prot)
{
case Protected:
proTypes.append(md);
@@ -313,7 +317,7 @@ void ClassDef::insertMember(MemberDef *md)
}
else // member function
{
- switch (md->protection())
+ switch (prot)
{
case Protected:
proMembers.append(md);
@@ -338,7 +342,7 @@ void ClassDef::insertMember(MemberDef *md)
/* insert member in the detailed documentation section */
/*******************************************************/
if ((md->isRelated() &&
- (Config_getBool("EXTRACT_PRIVATE") || md->protection()!=Private)
+ (Config_getBool("EXTRACT_PRIVATE") || prot!=Private)
) || md->isFriend()
)
{
@@ -365,7 +369,7 @@ void ClassDef::insertMember(MemberDef *md)
functionMembers.append(md);
break;
case MemberDef::Slot:
- switch (md->protection())
+ switch (prot)
{
case Protected:
if (Config_getBool("SORT_MEMBER_DOCS"))
@@ -391,7 +395,7 @@ void ClassDef::insertMember(MemberDef *md)
}
break;
default: // any of the other members
- if (md->protection()!=Private || Config_getBool("EXTRACT_PRIVATE"))
+ if (prot!=Private || Config_getBool("EXTRACT_PRIVATE"))
{
switch (md->memberType())
{
@@ -458,21 +462,28 @@ void ClassDef::insertMember(MemberDef *md)
m_isAbstract=TRUE;
}
- MemberInfo *mi = new MemberInfo((MemberDef *)md,
- md->protection(),md->virtualness(),FALSE);
- MemberNameInfo *mni=0;
- if ((mni=m_allMemberNameInfoSDict->find(md->name())))
- {
- mni->append(mi);
- }
- else
+ if (addToAllList)
{
- mni = new MemberNameInfo(md->name());
- mni->append(mi);
- m_allMemberNameInfoSDict->inSort(mni->memberName(),mni);
+ MemberInfo *mi = new MemberInfo((MemberDef *)md,
+ prot,md->virtualness(),FALSE);
+ MemberNameInfo *mni=0;
+ if ((mni=m_allMemberNameInfoSDict->find(md->name())))
+ {
+ mni->append(mi);
+ }
+ else
+ {
+ mni = new MemberNameInfo(md->name());
+ mni->append(mi);
+ m_allMemberNameInfoSDict->append(mni->memberName(),mni);
+ }
}
}
+void ClassDef::insertMember(MemberDef *md)
+{
+ internalInsertMember(md,md->protection(),TRUE);
+}
//void ClassDef::computeMemberGroups()
//{
@@ -498,29 +509,30 @@ void ClassDef::insertMember(MemberDef *md)
// compute the anchors for all members
void ClassDef::computeAnchors()
{
- setAnchors('a',&pubMembers);
- setAnchors('b',&proMembers);
- setAnchors('c',&priMembers);
- setAnchors('d',&pubStaticMembers);
- setAnchors('e',&proStaticMembers);
- setAnchors('f',&priStaticMembers);
- setAnchors('g',&pubSlots);
- setAnchors('h',&proSlots);
- setAnchors('i',&priSlots);
- setAnchors('j',&signals);
- setAnchors('k',&related);
- setAnchors('l',&friends);
- setAnchors('m',&pubAttribs);
- setAnchors('n',&proAttribs);
- setAnchors('o',&priAttribs);
- setAnchors('p',&pubStaticAttribs);
- setAnchors('q',&proStaticAttribs);
- setAnchors('r',&priStaticAttribs);
- setAnchors('s',&pubTypes);
- setAnchors('t',&proTypes);
- setAnchors('u',&priTypes);
- setAnchors('v',&dcopMethods);
- setAnchors('w',&properties);
+ ClassDef *context = Config_getBool("INLINE_INHERITED_MEMB") ? this : 0;
+ setAnchors(context,'a',&pubMembers);
+ setAnchors(context,'b',&proMembers);
+ setAnchors(context,'c',&priMembers);
+ setAnchors(context,'d',&pubStaticMembers);
+ setAnchors(context,'e',&proStaticMembers);
+ setAnchors(context,'f',&priStaticMembers);
+ setAnchors(context,'g',&pubSlots);
+ setAnchors(context,'h',&proSlots);
+ setAnchors(context,'i',&priSlots);
+ setAnchors(context,'j',&signals);
+ setAnchors(context,'k',&related);
+ setAnchors(context,'l',&friends);
+ setAnchors(context,'m',&pubAttribs);
+ setAnchors(context,'n',&proAttribs);
+ setAnchors(context,'o',&priAttribs);
+ setAnchors(context,'p',&pubStaticAttribs);
+ setAnchors(context,'q',&proStaticAttribs);
+ setAnchors(context,'r',&priStaticAttribs);
+ setAnchors(context,'s',&pubTypes);
+ setAnchors(context,'t',&proTypes);
+ setAnchors(context,'u',&priTypes);
+ setAnchors(context,'v',&dcopMethods);
+ setAnchors(context,'w',&properties);
}
void ClassDef::distributeMemberGroupDocumentation()
@@ -967,7 +979,9 @@ void ClassDef::writeDocumentation(OutputList &ol)
// write link to list of all members (HTML only)
if (m_allMemberNameInfoSDict->count()>0 &&
- !Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ !Config_getBool("OPTIMIZE_OUTPUT_FOR_C")
+ /* && !Config_getBool("INLINE_INHERITED_MEMB") */
+ )
{
ol.disableAllBut(OutputGenerator::Html);
ol.startTextLink(m_memListFileName,0);
@@ -1213,7 +1227,9 @@ void ClassDef::writeDocumentationForInnerClasses(OutputList &ol)
ClassDef *innerCd;
for (cli.toFirst();(innerCd=cli.current());++cli)
{
- if (innerCd->isLinkableInProject() && innerCd->templateMaster()==0)
+ if (innerCd->isLinkableInProject() && innerCd->templateMaster()==0 &&
+ (innerCd->protection()!=Private || Config_getBool("EXTRACT_PRIVATE"))
+ )
{
msg("Generating docs for nested compound %s...\n",innerCd->name().data());
innerCd->writeDocumentation(ol);
@@ -1568,6 +1584,7 @@ bool ClassDef::isLinkableInProject() const
!m_artificial &&
name().find('@')==-1 && /* anonymous compound */
(m_prot!=Private || Config_getBool("EXTRACT_PRIVATE")) && /* private */
+ (!m_isLocal || Config_getBool("EXTRACT_LOCAL_CLASSES")) && /* local */
hasDocumentation() && /* documented */
!isReference() && /* not an external reference */
(!m_isStatic || Config_getBool("EXTRACT_STATIC"));
@@ -1637,6 +1654,17 @@ bool ClassDef::isBaseClass(ClassDef *bcd)
}
//----------------------------------------------------------------------------
+
+static bool isStandardFunc(MemberDef *md)
+{
+ ClassDef *cd=md->getClassDef();
+ if (cd->templateMaster()) cd=cd->templateMaster();
+ return md->name()=="operator=" || // assignment operator
+ md->name()==cd->localName() || // constructor
+ (md->name().find('~')!=-1 &&
+ md->name().find("operator")==-1); // destructor
+}
+
/*!
* recusively merges the `all members' lists of a class base
* with that of this class. Must only be called for classes without
@@ -1645,19 +1673,22 @@ bool ClassDef::isBaseClass(ClassDef *bcd)
void ClassDef::mergeMembers()
{
+ if (m_membersMerged) return;
+ m_membersMerged=TRUE;
+ //printf(" mergeMembers for %s\n",name().data());
+ bool inlineInheritedMembers = Config_getBool("INLINE_INHERITED_MEMB" );
BaseClassListIterator bcli(*baseClasses());
BaseClassDef *bcd;
for ( ; (bcd=bcli.current()) ; ++bcli )
{
ClassDef *bClass=bcd->classDef;
-
+
// merge the members in the base class of this inheritance branch first
bClass->mergeMembers();
- MemberNameInfoSDict *srcMnd = bClass->memberNameInfoSDict();
- MemberNameInfoSDict *dstMnd = memberNameInfoSDict();
- //MemberNameInfoList *dstMnl = memberNameInfoList();
-
+ MemberNameInfoSDict *srcMnd = bClass->m_allMemberNameInfoSDict;
+ MemberNameInfoSDict *dstMnd = m_allMemberNameInfoSDict;
+
MemberNameInfoSDict::Iterator srcMnili(*srcMnd);
MemberNameInfo *srcMni;
for ( ; (srcMni=srcMnili.current()) ; ++srcMnili)
@@ -1687,24 +1718,26 @@ void ClassDef::mergeMembers()
if (srcMd!=dstMd) // different members
{
ClassDef *dstCd = dstMd->getClassDef();
- //printf("Is %s a base class of %s?\n",srcCd->name(),dstCd->name());
+ //printf(" Is %s a base class of %s?\n",srcCd->name().data(),dstCd->name().data());
if (srcCd==dstCd || dstCd->isBaseClass(srcCd))
// member is in the same or a base class
{
found=matchArguments(srcMd->argumentList(),
- dstMd->argumentList()
- );
- //ambigue = ambigue || !found;
+ dstMd->argumentList());
+ //printf(" Yes, matching (%s<->%s): %d\n",
+ // argListToString(srcMd->argumentList()).data(),
+ // argListToString(dstMd->argumentList()).data(),
+ // found);
hidden = hidden || !found;
}
else // member is in a non base class => multiple inheritance
- // using the same base class.
+ // using the same base class.
{
//printf("$$ Existing member %s %s add scope %s\n",
// dstMi->ambiguityResolutionScope.data(),
// dstMd->name().data(),
// dstMi->scopePath.left(dstMi->scopePath.find("::")+2).data());
-
+
QCString scope=dstMi->scopePath.left(dstMi->scopePath.find("::")+2);
if (scope!=dstMi->ambiguityResolutionScope.left(scope.length()))
dstMi->ambiguityResolutionScope.prepend(scope);
@@ -1722,7 +1755,7 @@ void ClassDef::mergeMembers()
found=TRUE;
}
else // member can be reached via multiple paths in the
- // inheritance tree
+ // inheritance tree
{
//printf("$$ Existing member %s %s add scope %s\n",
// dstMi->ambiguityResolutionScope.data(),
@@ -1731,7 +1764,9 @@ void ClassDef::mergeMembers()
QCString scope=dstMi->scopePath.left(dstMi->scopePath.find("::")+2);
if (scope!=dstMi->ambiguityResolutionScope.left(scope.length()))
+ {
dstMi->ambiguityResolutionScope.prepend(scope);
+ }
ambigue=TRUE;
}
}
@@ -1748,6 +1783,14 @@ void ClassDef::mergeMembers()
// this case is shown anyway.
if (!found && srcMd->protection()!=Private)
{
+ if (inlineInheritedMembers)
+ {
+ if (!isStandardFunc(srcMd))
+ {
+ //printf(" insertMember `%s'\n",srcMd->name().data());
+ internalInsertMember(srcMd,bcd->prot,FALSE);
+ }
+ }
Specifier virt=srcMi->virt;
if (srcMi->virt==Normal && bcd->virt!=Normal) virt=bcd->virt;
MemberInfo *newMi = new MemberInfo(srcMd,bcd->prot,virt,TRUE);
@@ -1761,8 +1804,10 @@ void ClassDef::mergeMembers()
QCString scope=bClass->name()+"::";
if (scope!=srcMi->ambiguityResolutionScope.left(scope.length()))
+ {
newMi->ambiguityResolutionScope=
scope+srcMi->ambiguityResolutionScope.copy();
+ }
}
if (hidden)
{
@@ -1777,7 +1822,6 @@ void ClassDef::mergeMembers()
newMi->ambiguityResolutionScope=srcMi->ambigClass->name()+"::";
}
}
- //printf("Adding!\n");
dstMni->append(newMi);
}
}
@@ -1786,8 +1830,9 @@ void ClassDef::mergeMembers()
{
// create a deep copy of the list (only the MemberInfo's will be
// copied, not the actual MemberDef's)
- MemberNameInfo *newMni = new MemberNameInfo(srcMni->memberName());
-
+ MemberNameInfo *newMni = 0;
+ newMni = new MemberNameInfo(srcMni->memberName());
+
// copy the member(s) from the base to the sub class
MemberNameInfoIterator mnii(*srcMni);
MemberInfo *mi;
@@ -1805,12 +1850,20 @@ void ClassDef::mergeMembers()
//printf("%s::%s: prot=%d bcd->prot=%d result=%d\n",
// name().data(),mi->memberDef->name().data(),mi->prot,
// bcd->prot,prot);
-
+
if (mi->prot!=Private)
{
Specifier virt=mi->virt;
if (mi->virt==Normal && bcd->virt!=Normal) virt=bcd->virt;
-
+
+ if (inlineInheritedMembers)
+ {
+ if (!isStandardFunc(mi->memberDef))
+ {
+ //printf(" insertMember `%s'\n",mi->memberDef->name().data());
+ internalInsertMember(mi->memberDef,prot,FALSE);
+ }
+ }
//printf("Adding!\n");
MemberInfo *newMi=new MemberInfo(mi->memberDef,prot,virt,TRUE);
newMi->scopePath=bClass->name()+"::"+mi->scopePath;
@@ -1819,13 +1872,13 @@ void ClassDef::mergeMembers()
newMni->append(newMi);
}
}
-
+
// add it to the dictionary
- //dstMnl->append(newMni);
dstMnd->append(newMni->memberName(),newMni);
}
}
}
+ //printf(" end mergeMembers\n");
}
//----------------------------------------------------------------------------
diff --git a/src/classdef.h b/src/classdef.h
index d294601..507a915 100644
--- a/src/classdef.h
+++ b/src/classdef.h
@@ -311,6 +311,8 @@ class ClassDef : public Definition
/*! \} Interal API */
private:
+ void internalInsertMember(MemberDef *md,Protection prot,bool addToAllList);
+
/*! file name that forms the base for the output file containing the
* class documentation. For compatibility with Qt (e.g. links via tag
* files) this name cannot be derived from the class name directly.
@@ -408,6 +410,12 @@ class ClassDef : public Definition
/*! Is the class part of an unnamed namespace? */
bool m_isStatic;
+
+ /*! TRUE if classes members are merged with those of the base classes. */
+ bool m_membersMerged;
+
+ /*! TRUE if the class is defined in a source file rather than a header file. */
+ bool m_isLocal;
};
/*! \brief Class that contains information about a usage relation.
diff --git a/src/code.l b/src/code.l
index acd258d..23762ff 100644
--- a/src/code.l
+++ b/src/code.l
@@ -1107,14 +1107,12 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_code->codify(yytext);
}
<ClassName>{ID} {
- //g_ccd.name=yytext;
g_curClassName=yytext;
addType();
generateClassOrGlobalLink(*g_code,yytext);
BEGIN( ClassVar );
}
<ClassVar>"=" {
- g_code->codify(yytext);
unput(*yytext);
BEGIN( Body );
}
@@ -1124,7 +1122,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_theVarContext.addVariable(g_type,g_name);
generateClassOrGlobalLink(*g_code,yytext);
}
-<ClassName,ClassVar>[ \t\n]*":"[ \t\n]* {
+<ClassName,ClassVar>[ \t\n]*":"[ \t\n]* {
codifyLines(yytext);
g_curClassBases.clear();
BEGIN( Bases );
diff --git a/src/config.l b/src/config.l
index 98b61aa..3a1918d 100644
--- a/src/config.l
+++ b/src/config.l
@@ -711,7 +711,7 @@ static void substEnvVarsInStrList(QStrList &sl)
// search for a "word"
for (i=0;i<l;i++)
{
- char c;
+ char c=0;
// skip until start of new word
while (i<l && ((c=result.at(i))==' ' || c=='\t')) i++;
p=i; // p marks the start index of the word
@@ -868,6 +868,15 @@ void Config::check()
char *sfp = stripFromPath.first();
while (sfp)
{
+ register char *p = sfp;
+ if (p)
+ {
+ char c;
+ while ((c=*p++))
+ {
+ if (c=='\\') c='/';
+ }
+ }
QCString path = sfp;
if (path.at(0)!='/' && (path.length()<=2 || path.at(1)!=':'))
{
@@ -1213,34 +1222,83 @@ void Config::create()
"information to generate all constant output in the proper language. \n"
"The default language is English, other supported languages are: \n"
"Brazilian, Chinese, Croatian, Czech, Danish, Dutch, Finnish, French, \n"
- "German, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, \n"
+ "German, Greek, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, \n"
"Portuguese, Romanian, Russian, Slovak, Slovene, Spanish and Swedish.\n",
"English"
);
+#ifdef LANG_BR
ce->addValue("Brazilian");
+#endif
+#ifdef LANG_CN
ce->addValue("Chinese");
+#endif
+#ifdef LANG_HR
ce->addValue("Croatian");
+#endif
+#ifdef LANG_CZ
ce->addValue("Czech");
+#endif
+#ifdef LANG_DK
ce->addValue("Danish");
+#endif
+#ifdef LANG_NL
ce->addValue("Dutch");
+#endif
ce->addValue("English");
+#ifdef LANG_FI
ce->addValue("Finnish");
+#endif
+#ifdef LANG_FR
ce->addValue("French");
+#endif
+#ifdef LANG_DE
ce->addValue("German");
+#endif
+#ifdef LANG_GR
+ ce->addValue("Greek");
+#endif
+#ifdef LANG_HU
ce->addValue("Hungarian");
+#endif
+#ifdef LANG_IT
ce->addValue("Italian");
+#endif
+#ifdef LANG_JP
ce->addValue("Japanese");
+#endif
+#ifdef LANG_KR
ce->addValue("Korean");
+#endif
+#ifdef LANG_NO
ce->addValue("Norwegian");
+#endif
+#ifdef LANG_PL
ce->addValue("Polish");
+#endif
+#ifdef LANG_PT
ce->addValue("Portuguese");
+#endif
+#ifdef LANG_RO
ce->addValue("Romanian");
+#endif
+#ifdef LANG_RU
ce->addValue("Russian");
+#endif
+#ifdef LANG_SK
ce->addValue("Slovak");
+#endif
+#ifdef LANG_SI
ce->addValue("Slovene");
+#endif
+#ifdef LANG_ES
ce->addValue("Spanish");
+#endif
+#ifdef LANG_SE
ce->addValue("Swedish");
+#endif
+#ifdef LANG_UA
ce->addValue("Ukrainian");
+#endif
cb = addBool(
"EXTRACT_ALL",
"If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in \n"
@@ -1262,6 +1320,13 @@ void Config::create()
FALSE
);
cb = addBool(
+ "EXTRACT_LOCAL_CLASSES",
+ "If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) \n"
+ "defined locally in source files will be included in the documentation. \n"
+ "If set to NO only classes defined in header files are included. \n",
+ TRUE
+ );
+ cb = addBool(
"HIDE_UNDOC_MEMBERS",
"If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all \n"
"undocumented members of documented classes, files or namespaces. \n"
@@ -1302,6 +1367,14 @@ void Config::create()
FALSE
);
cb = addBool(
+ "INLINE_INHERITED_MEMB",
+ "If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited \n"
+ "members of a class in the documentation of that class as if those members were \n"
+ "ordinary class members. Constructors, destructors and assignment operators of \n"
+ "the base classes will not be shown. \n",
+ FALSE
+ );
+ cb = addBool(
"FULL_PATH_NAMES",
"If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full \n"
"path before files name in the file list and in the header files. If set \n"
diff --git a/src/defargs.l b/src/defargs.l
index 3fa6e65..c238123 100644
--- a/src/defargs.l
+++ b/src/defargs.l
@@ -196,8 +196,8 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
g_argRoundCount++;
*g_copyArgValue += *yytext;
}
-<CopyArgRound,CopyArgRound2>")" {
- *g_copyArgValue += *yytext;
+<CopyArgRound,CopyArgRound2>")"({B}*{ID})* {
+ *g_copyArgValue += yytext;
if (g_argRoundCount>0)
{
g_argRoundCount--;
@@ -251,6 +251,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
<ReadFuncArgType,ReadFuncArgDef>[,)>] {
g_curArgTypeName=removeRedundantWhiteSpace(g_curArgTypeName);
g_curArgDefValue=g_curArgDefValue.stripWhiteSpace();
+ //printf("curArgType=`%s' curArgDefVal=`%s'\n",g_curArgTypeName.data(),g_curArgDefValue.data());
int l=g_curArgTypeName.length();
if (l>0)
{
diff --git a/src/doc.l b/src/doc.l
index e5a2453..3d7b7af 100644
--- a/src/doc.l
+++ b/src/doc.l
@@ -1002,21 +1002,25 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
outDoc->docify(getenv(envvar));
}
<DocScan>{CMD}"htmlonly"/[^a-z_A-Z0-9] {
+ outDoc->startHtmlOnly();
outDoc->pushGeneratorState();
outDoc->disableAllBut(OutputGenerator::Html);
BEGIN(DocHtmlScan);
}
<DocHtmlScan>{CMD}"endhtmlonly"/[^a-z_A-Z0-9] {
outDoc->popGeneratorState();
+ outDoc->endHtmlOnly();
BEGIN(DocScan);
}
<DocScan>{CMD}"latexonly"/[^a-z_A-Z0-9] {
+ outDoc->startLatexOnly();
outDoc->pushGeneratorState();
outDoc->disableAllBut(OutputGenerator::Latex);
BEGIN(DocLatexScan);
}
<DocLatexScan>{CMD}"endlatexonly"/[^a-z_A-Z0-9] {
outDoc->popGeneratorState();
+ outDoc->endLatexOnly();
BEGIN(DocScan);
}
<DocHtmlScan,DocLatexScan>"//"|"/*"|"*/" {
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 83c640e..c4fb21a 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -555,215 +555,214 @@ static void buildClassList(Entry *root)
{
// this should not be called
warn(root->fileName,root->startLine,
- "Warning: invalid class name found!"
+ "Warning: invalid class name found!"
);
+ goto error;
}
- else
- {
- Debug::print(Debug::Classes,0," Found class with raw name %s\n",fullName.data());
+ Debug::print(Debug::Classes,0," Found class with raw name %s\n",fullName.data());
- fullName=stripAnonymousNamespaceScope(fullName);
- fullName=stripTemplateSpecifiersFromScope(fullName);
-
- Debug::print(Debug::Classes,0," Found class with name %s\n",fullName.data());
+ fullName=stripAnonymousNamespaceScope(fullName);
+ fullName=stripTemplateSpecifiersFromScope(fullName);
- bool ambig;
- ClassDef *cd;
- //printf("findFileDef(%s)\n",root->fileName.data());
- FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
+ Debug::print(Debug::Classes,0," Found class with name %s\n",fullName.data());
- if ((cd=getClass(fullName)))
- {
- Debug::print(Debug::Classes,0," Existing class!\n",fullName.data());
- //if (cd->templateArguments()==0)
- //{
- // //printf("existing ClassDef tempArgList=%p specScope=%s\n",root->tArgList,root->scopeSpec.data());
- // cd->setTemplateArguments(tArgList);
- //}
- if (!root->doc.isEmpty() || !root->brief.isEmpty() ||
- (root->bodyLine!=-1 && Config_getBool("SOURCE_BROWSER"))
- )
- // block contains something that ends up in the docs
- {
- if (!root->doc.isEmpty() && !cd->documentation().isEmpty())
- {
- warn(
- root->fileName,root->startLine,
- "Warning: class %s already has a detailed description. "
- "Skipping the one found here.",
- fullName.data()
- );
- }
- else if (!root->doc.isEmpty())
- {
- cd->setDocumentation(root->doc);
- }
- if (!root->brief.isEmpty() && !cd->briefDescription().isEmpty())
- {
- warn(
- root->fileName,root->startLine,
- "Warning: class %s already has a brief description\n"
- " skipping the one found here.",
- fullName.data()
- );
- }
- else if (!root->brief.isEmpty())
- {
- cd->setBriefDescription(root->brief);
- }
- if (root->bodyLine!=-1 && cd->getStartBodyLine()==-1)
- {
- cd->setBodySegment(root->bodyLine,root->endBodyLine);
- cd->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig));
- }
- cd->addSectionsToDefinition(root->anchors);
- cd->setName(fullName); // change name to match docs
- }
- cd->setFileDef(fd);
- if (cd->hasDocumentation())
+ bool ambig;
+ ClassDef *cd;
+ //printf("findFileDef(%s)\n",root->fileName.data());
+ FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
+
+ if ((cd=getClass(fullName)))
+ {
+ Debug::print(Debug::Classes,0," Existing class!\n",fullName.data());
+ //if (cd->templateArguments()==0)
+ //{
+ // //printf("existing ClassDef tempArgList=%p specScope=%s\n",root->tArgList,root->scopeSpec.data());
+ // cd->setTemplateArguments(tArgList);
+ //}
+ if (!root->doc.isEmpty() || !root->brief.isEmpty() ||
+ (root->bodyLine!=-1 && Config_getBool("SOURCE_BROWSER"))
+ )
+ // block contains something that ends up in the docs
+ {
+ if (!root->doc.isEmpty() && !cd->documentation().isEmpty())
{
- addIncludeFile(cd,fd,root);
+ warn(
+ root->fileName,root->startLine,
+ "Warning: class %s already has a detailed description. "
+ "Skipping the one found here.",
+ fullName.data()
+ );
}
- addNamespace(root,cd);
- if (fd && (root->section & Entry::COMPOUND_MASK))
+ else if (!root->doc.isEmpty())
{
- //printf(">> Inserting class `%s' in file `%s' (root->fileName=`%s')\n",
- // cd->name().data(),
- // fd->name().data(),
- // root->fileName.data()
- // );
- fd->insertClass(cd);
+ cd->setDocumentation(root->doc);
}
- addClassToGroups(root,cd);
- cd->setRefItems(root->todoId,root->testId,root->bugId);
- if (!root->subGrouping) cd->setSubGrouping(FALSE);
-
- if (cd->templateArguments()==0)
+ if (!root->brief.isEmpty() && !cd->briefDescription().isEmpty())
{
- // this happens if a template class declared with @class is found
- // before the actual definition.
- ArgumentList *tArgList =
- getTemplateArgumentsFromName(fullName,root->tArgLists);
- cd->setTemplateArguments(tArgList);
+ warn(
+ root->fileName,root->startLine,
+ "Warning: class %s already has a brief description\n"
+ " skipping the one found here.",
+ fullName.data()
+ );
}
- }
- else // new class
- {
-
- ClassDef::CompoundType sec=ClassDef::Class;
- switch(root->section)
+ else if (!root->brief.isEmpty())
{
- case Entry::UNION_SEC:
- case Entry::UNIONDOC_SEC:
- sec=ClassDef::Union; break;
- case Entry::STRUCT_SEC:
- case Entry::STRUCTDOC_SEC:
- sec=ClassDef::Struct; break;
- case Entry::INTERFACE_SEC:
- case Entry::INTERFACEDOC_SEC:
- sec=ClassDef::Interface; break;
- case Entry::EXCEPTION_SEC:
- case Entry::EXCEPTIONDOC_SEC:
- sec=ClassDef::Exception; break;
+ cd->setBriefDescription(root->brief);
}
- Debug::print(Debug::Classes,0," New class `%s' (sec=0x%08x)! #tArgLists=%d\n",
- fullName.data(),root->section,root->tArgLists ? (int)root->tArgLists->count() : -1);
- QCString className;
- QCString namespaceName;
- extractNamespaceName(fullName,className,namespaceName);
-
- //printf("New class: namespace `%s' name=`%s'\n",className.data(),namespaceName.data());
-
- QCString tagName;
- QCString refFileName;
- if (root->tagInfo)
+ if (root->bodyLine!=-1 && cd->getStartBodyLine()==-1)
{
- tagName = root->tagInfo->tagName;
- refFileName = root->tagInfo->fileName;
+ cd->setBodySegment(root->bodyLine,root->endBodyLine);
+ cd->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig));
}
- ClassDef *cd=new ClassDef(root->fileName,root->startLine,fullName,sec,
- tagName,refFileName);
- cd->setDocumentation(root->doc); // copy docs to definition
- cd->setBriefDescription(root->brief);
- //printf("new ClassDef %s tempArgList=%p specScope=%s\n",fullName.data(),root->tArgList,root->scopeSpec.data());
-
+ cd->addSectionsToDefinition(root->anchors);
+ cd->setName(fullName); // change name to match docs
+ }
+ cd->setFileDef(fd);
+ if (cd->hasDocumentation())
+ {
+ addIncludeFile(cd,fd,root);
+ }
+ addNamespace(root,cd);
+ if (fd && (root->section & Entry::COMPOUND_MASK))
+ {
+ //printf(">> Inserting class `%s' in file `%s' (root->fileName=`%s')\n",
+ // cd->name().data(),
+ // fd->name().data(),
+ // root->fileName.data()
+ // );
+ fd->insertClass(cd);
+ }
+ addClassToGroups(root,cd);
+ cd->setRefItems(root->todoId,root->testId,root->bugId);
+ if (!root->subGrouping) cd->setSubGrouping(FALSE);
+ if (cd->templateArguments()==0)
+ {
+ // this happens if a template class declared with @class is found
+ // before the actual definition.
ArgumentList *tArgList =
- getTemplateArgumentsFromName(fullName,root->tArgLists);
- //printf("class %s template args=%s\n",fullName.data(),
- // tArgList ? tempArgListToString(tArgList).data() : "<none>");
+ getTemplateArgumentsFromName(fullName,root->tArgLists);
cd->setTemplateArguments(tArgList);
- cd->setProtection(root->protection);
- cd->addSectionsToDefinition(root->anchors);
- cd->setIsStatic(root->stat);
+ }
+ }
+ else // new class
+ {
- // file definition containing the class cd
- cd->setBodySegment(root->bodyLine,root->endBodyLine);
- cd->setBodyDef(fd);
- if (!root->subGrouping) cd->setSubGrouping(FALSE);
+ ClassDef::CompoundType sec=ClassDef::Class;
+ switch(root->section)
+ {
+ case Entry::UNION_SEC:
+ case Entry::UNIONDOC_SEC:
+ sec=ClassDef::Union; break;
+ case Entry::STRUCT_SEC:
+ case Entry::STRUCTDOC_SEC:
+ sec=ClassDef::Struct; break;
+ case Entry::INTERFACE_SEC:
+ case Entry::INTERFACEDOC_SEC:
+ sec=ClassDef::Interface; break;
+ case Entry::EXCEPTION_SEC:
+ case Entry::EXCEPTIONDOC_SEC:
+ sec=ClassDef::Exception; break;
+ }
+ Debug::print(Debug::Classes,0," New class `%s' (sec=0x%08x)! #tArgLists=%d\n",
+ fullName.data(),root->section,root->tArgLists ? (int)root->tArgLists->count() : -1);
+ QCString className;
+ QCString namespaceName;
+ extractNamespaceName(fullName,className,namespaceName);
- addClassToGroups(root,cd);
- cd->setRefItems(root->todoId,root->testId,root->bugId);
+ //printf("New class: namespace `%s' name=`%s'\n",className.data(),namespaceName.data());
- // see if the class is found inside a namespace
- bool found=addNamespace(root,cd);
+ QCString tagName;
+ QCString refFileName;
+ if (root->tagInfo)
+ {
+ tagName = root->tagInfo->tagName;
+ refFileName = root->tagInfo->fileName;
+ }
+ ClassDef *cd=new ClassDef(root->fileName,root->startLine,fullName,sec,
+ tagName,refFileName);
+ cd->setDocumentation(root->doc); // copy docs to definition
+ cd->setBriefDescription(root->brief);
+ //printf("new ClassDef %s tempArgList=%p specScope=%s\n",fullName.data(),root->tArgList,root->scopeSpec.data());
- cd->setFileDef(fd);
- if (cd->hasDocumentation())
- {
- addIncludeFile(cd,fd,root);
- }
-
- // namespace is part of the class name
- if (!found && !namespaceName.isEmpty())
- {
- NamespaceDef *nd = getResolvedNamespace(namespaceName);
- if (nd)
- {
- cd->setNamespace(nd);
- nd->insertClass(cd);
- found=TRUE;
- }
- }
-
- // if the class is not in a namespace then we insert
- // it in the file definition
- if (!found && fd && (root->section & Entry::COMPOUND_MASK))
- {
- //printf(">> Inserting class `%s' in file `%s' (root->fileName=`%s')\n",
- // cd->name().data(),
- // fd->name().data(),
- // root->fileName.data()
- // );
- fd->insertClass(cd);
- }
-
- // the empty string test is needed for extract all case
- cd->setBriefDescription(root->brief);
- cd->insertUsedFile(root->fileName);
- // add class to the list
- //printf("ClassDict.insert(%s)\n",resolveDefines(fullName).data());
- Doxygen::classSDict.append(fullName,cd);
+ ArgumentList *tArgList =
+ getTemplateArgumentsFromName(fullName,root->tArgLists);
+ //printf("class %s template args=%s\n",fullName.data(),
+ // tArgList ? tempArgListToString(tArgList).data() : "<none>");
+ cd->setTemplateArguments(tArgList);
+ cd->setProtection(root->protection);
+ cd->addSectionsToDefinition(root->anchors);
+ cd->setIsStatic(root->stat);
- // also add class to the correct structural context
- Definition *d = findScopeFromQualifiedName(Doxygen::globalScope,fullName);
- if (d==0)
- {
- //warn(root->fileName,root->startLine,
- // "Warning: Internal inconsistency: scope for class %s not "
- // "found!\n",fullName.data()
- // );
- }
- else
+ // file definition containing the class cd
+ cd->setBodySegment(root->bodyLine,root->endBodyLine);
+ cd->setBodyDef(fd);
+ if (!root->subGrouping) cd->setSubGrouping(FALSE);
+
+ addClassToGroups(root,cd);
+ cd->setRefItems(root->todoId,root->testId,root->bugId);
+
+ // see if the class is found inside a namespace
+ bool found=addNamespace(root,cd);
+
+ cd->setFileDef(fd);
+ if (cd->hasDocumentation())
+ {
+ addIncludeFile(cd,fd,root);
+ }
+
+ // namespace is part of the class name
+ if (!found && !namespaceName.isEmpty())
+ {
+ NamespaceDef *nd = getResolvedNamespace(namespaceName);
+ if (nd)
{
- //printf("****** adding %s to scope %s\n",cd->name().data(),d->name().data());
- d->addInnerCompound(cd);
- cd->setOuterScope(d);
+ cd->setNamespace(nd);
+ nd->insertClass(cd);
+ found=TRUE;
}
}
+
+ // if the class is not in a namespace then we insert
+ // it in the file definition
+ if (!found && fd && (root->section & Entry::COMPOUND_MASK))
+ {
+ //printf(">> Inserting class `%s' in file `%s' (root->fileName=`%s')\n",
+ // cd->name().data(),
+ // fd->name().data(),
+ // root->fileName.data()
+ // );
+ fd->insertClass(cd);
+ }
+
+ // the empty string test is needed for extract all case
+ cd->setBriefDescription(root->brief);
+ cd->insertUsedFile(root->fileName);
+
+ // add class to the list
+ //printf("ClassDict.insert(%s)\n",resolveDefines(fullName).data());
+ Doxygen::classSDict.append(fullName,cd);
+
+ // also add class to the correct structural context
+ Definition *d = findScopeFromQualifiedName(Doxygen::globalScope,fullName);
+ if (d==0)
+ {
+ //warn(root->fileName,root->startLine,
+ // "Warning: Internal inconsistency: scope for class %s not "
+ // "found!\n",fullName.data()
+ // );
+ }
+ else
+ {
+ //printf("****** adding %s to scope %s\n",cd->name().data(),d->name().data());
+ d->addInnerCompound(cd);
+ cd->setOuterScope(d);
+ }
}
}
+error:
EntryListIterator eli(*root->sublist);
Entry *e;
for (;(e=eli.current());++eli)
@@ -1847,7 +1846,7 @@ static void buildFunctionList(Entry *root)
//printf("match!\n");
// see if we need to create a new member
found=(nd && rnd && nsName==rnsName) || // members are in the same namespace
- ((fd!=0 && // no external reference and
+ ((nd==0 && rnd==0 && fd!=0 && // no external reference and
fd->absFilePath()==root->fileName // prototype in the same file
)
);
@@ -2167,6 +2166,11 @@ static void transferFunctionDocumentation()
}
mdec->mergeMemberSpecifiers(mdef->getMemberSpecifiers());
mdef->mergeMemberSpecifiers(mdec->getMemberSpecifiers());
+
+ int todoId = QMAX(mdec->todoId(),mdef->todoId());
+ int testId = QMAX(mdec->testId(),mdef->testId());
+ int bugId = QMAX(mdec->bugId() ,mdef->bugId() );
+ mdec->setRefItems(todoId,testId,bugId);
}
}
}
@@ -4775,6 +4779,7 @@ static void buildCompleteMemberLists()
cd->subClasses()->count()==0 && // is a root of the hierarchy
cd->baseClasses()->count()>0) // and has at least one base class
{
+ //printf("*** merging members for %s\n",cd->name().data());
cd->mergeMembers();
}
}
@@ -6954,8 +6959,8 @@ void parseInput()
msg("Determining which enums are documented\n");
findDocumentedEnumValues();
- msg("Computing member references...\n");
- computeMemberReferences();
+ //msg("Computing member references...\n");
+ //computeMemberReferences();
msg("Computing member relations...\n");
computeMemberRelations();
@@ -6975,6 +6980,9 @@ void parseInput()
msg("Building full member lists recursively...\n");
buildCompleteMemberLists();
+ msg("Computing member references...\n");
+ computeMemberReferences();
+
if (Config_getBool("INHERIT_DOCS"))
{
msg("Inheriting documentation...\n");
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 620c8a9..144f8c6 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -84,7 +84,7 @@ FileDef::~FileDef()
/*! Compute the HTML anchor names for all members in the class */
void FileDef::computeAnchors()
{
- setAnchors('a',&allMemberList);
+ setAnchors(0,'a',&allMemberList);
}
void FileDef::distributeMemberGroupDocumentation()
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index f879d60..7e2a54f 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -343,7 +343,7 @@ int GroupDef::countMembers() const
/*! Compute the HTML anchor names for all members in the class */
void GroupDef::computeAnchors()
{
- setAnchors('a',allMemberList);
+ setAnchors(0,'a',allMemberList);
}
void GroupDef::writeDocumentation(OutputList &ol)
diff --git a/src/htmlgen.h b/src/htmlgen.h
index 75c2a00..387065e 100644
--- a/src/htmlgen.h
+++ b/src/htmlgen.h
@@ -249,6 +249,11 @@ class HtmlGenerator : public OutputGenerator
void startFontClass(const char *s) { t << "<font class=\"" << s << "\">"; }
void endFontClass() { t << "</font>"; }
+ void startHtmlOnly() {}
+ void endHtmlOnly() {}
+ void startLatexOnly() {}
+ void endLatexOnly() {}
+
private:
QCString lastTitle;
QCString lastFile;
diff --git a/src/lang_cfg.h b/src/lang_cfg.h
index 581905b..4e6639b 100644
--- a/src/lang_cfg.h
+++ b/src/lang_cfg.h
@@ -21,3 +21,4 @@
#define LANG_DK
#define LANG_SK
#define LANG_UA
+#define LANG_GR
diff --git a/src/language.cpp b/src/language.cpp
index 33da153..5f27716 100644
--- a/src/language.cpp
+++ b/src/language.cpp
@@ -91,6 +91,12 @@
#ifdef LANG_UA
#include "translator_ua.h"
#endif
+#ifdef LANG_GR
+#include "translator_gr.h"
+#endif
+//#ifdef LANG_JS
+//#include "translator_js.h"
+//#endif
#endif
#define L_EQUAL(a) !stricmp(langName,a)
@@ -242,6 +248,16 @@ bool setTranslator(const char *langName)
theTranslator=new TranslatorUkrainian;
}
#endif
+#ifdef LANG_GR
+ else if (L_EQUAL("greek"))
+ {
+ theTranslator=new TranslatorGreek;
+ }
+#endif
+// else if (L_EQUAL("japanese-sjis"))
+// {
+// theTranslator=new TranslatorJapaneseSjis;
+// }
#endif
else // use the default language (i.e. english)
{
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index 0f24f6e..49469de 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -272,8 +272,9 @@ static void writeDefaultHeaderPart1(QTextStream &t)
t << "\\makeindex\n"
"\\setcounter{tocdepth}{1}\n"
"\\setlength{\\footrulewidth}{0.4pt}\n"
- "\\begin{document}\n"
- "\\begin{titlepage}\n"
+ "\\begin{document}\n";
+ if (theTranslator->idLanguage()=="greek") t << "\\selectlanguage{greek}\n";
+ t << "\\begin{titlepage}\n"
"\\vspace*{7cm}\n"
"\\begin{center}\n"
"{\\Large ";
@@ -1380,13 +1381,15 @@ void LatexGenerator::latin2ToLatex(unsigned char c)
//void LatexGenerator::docifyStatic(QTextStream &t,const char *str)
void LatexGenerator::docify(const char *str)
{
- static bool isCzech = theTranslator->idLanguage()=="czech";
- static bool isJapanese = theTranslator->idLanguage()=="japanese";
- static bool isKorean = theTranslator->idLanguage()=="korean";
- static bool isRussian = theTranslator->idLanguage()=="russian";
- static bool isUkrainian = theTranslator->idLanguage()=="ukrainian";
- static bool isChinese = theTranslator->idLanguage()=="chinese";
- static bool isLatin2 = theTranslator->idLanguageCharset()=="iso-8859-2";
+ static bool isCzech = theTranslator->idLanguage()=="czech";
+ static bool isJapanese = theTranslator->idLanguage()=="japanese";
+ static bool isJapaneseSjis = theTranslator->idLanguage()=="japanese-sjis";
+ static bool isKorean = theTranslator->idLanguage()=="korean";
+ static bool isRussian = theTranslator->idLanguage()=="russian";
+ static bool isUkrainian = theTranslator->idLanguage()=="ukrainian";
+ static bool isChinese = theTranslator->idLanguage()=="chinese";
+ static bool isLatin2 = theTranslator->idLanguageCharset()=="iso-8859-2";
+ static bool isGreek = theTranslator->idLanguage()=="greek";
if (str)
{
const unsigned char *p=(const unsigned char *)str;
@@ -1452,7 +1455,7 @@ void LatexGenerator::docify(const char *str)
default:
// Some languages uses wide characters
- if (isJapanese || isKorean || isChinese)
+ if (isJapanese || isJapaneseSjis || isKorean || isChinese)
{
if (c>=128)
{
@@ -1494,6 +1497,17 @@ void LatexGenerator::docify(const char *str)
t << (char)c;
}
}
+ else if (isGreek)
+ {
+ if (c<128)
+ {
+ t << "\\textlatin{" << (char)c << "}";
+ }
+ else
+ {
+ t << (char)c;
+ }
+ }
else // language is other than Czech, Russian or Japanese
{
switch(c)
diff --git a/src/latexgen.h b/src/latexgen.h
index 51947c2..5d5eab8 100644
--- a/src/latexgen.h
+++ b/src/latexgen.h
@@ -255,6 +255,11 @@ class LatexGenerator : public OutputGenerator
void startFontClass(const char *) {}
void endFontClass() {}
+
+ void startHtmlOnly() {}
+ void endHtmlOnly() {}
+ void startLatexOnly() {}
+ void endLatexOnly() {}
private:
void latin2ToLatex(unsigned char);
diff --git a/src/libdoxygen.pro.in b/src/libdoxygen.pro.in