summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/classdef.cpp106
-rw-r--r--src/cmdmapper.cpp2
-rw-r--r--src/cmdmapper.h4
-rw-r--r--src/config.l4
-rw-r--r--src/declinfo.l3
-rw-r--r--src/docparser.cpp19
-rw-r--r--src/docparser.h2
-rw-r--r--src/doctokenizer.h1
-rw-r--r--src/doctokenizer.l15
-rw-r--r--src/doxygen.cpp106
-rw-r--r--src/entry.cpp5
-rw-r--r--src/entry.h67
-rw-r--r--src/htmldocvisitor.cpp1
-rw-r--r--src/htmlgen.cpp33
-rw-r--r--src/latexdocvisitor.cpp1
-rw-r--r--src/mandocvisitor.cpp3
-rw-r--r--src/mangen.cpp2
-rw-r--r--src/memberdef.cpp29
-rw-r--r--src/perlmodgen.cpp1
-rw-r--r--src/printdocvisitor.h2
-rw-r--r--src/rtfdocvisitor.cpp1
-rw-r--r--src/scanner.l64
-rw-r--r--src/tagreader.cpp25
-rw-r--r--src/util.cpp21
-rw-r--r--src/xmldocvisitor.cpp5
25 files changed, 377 insertions, 145 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp
index ff014c9..ffc6779 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -934,6 +934,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
QCString pageTitle=displayName().copy();
QCString pageType;
QCString cType=compoundTypeString();
+ //printf("ClassDef::writeDocumentation() cType=%s\n",cType.data());
toupper(cType.at(0));
pageType+=" ";
pageType+=cType;
@@ -941,7 +942,9 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (m_tempArgs) pageTitle.prepend(" Template");
startFile(ol,getOutputFileBase(),name(),pageTitle);
startTitle(ol,getOutputFileBase());
- ol.parseText(theTranslator->trCompoundReference(displayName(),m_compType,m_tempArgs!=0));
+ ol.parseText(theTranslator->trCompoundReference(displayName(),
+ m_isObjC && m_compType==Interface ? Class : m_compType,
+ m_tempArgs!=0));
addGroupListToTitle(ol,this);
endTitle(ol,getOutputFileBase(),name());
@@ -1039,7 +1042,9 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
Doxygen::tagFile << " <compound kind=\"" << compoundTypeString();
- Doxygen::tagFile << "\">" << endl;
+ Doxygen::tagFile << "\"";
+ if (isObjectiveC()) { Doxygen::tagFile << " objc=\"yes\""; }
+ Doxygen::tagFile << ">" << endl;
Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl;
if (m_tempArgs)
@@ -1371,7 +1376,9 @@ void ClassDef::writeDocumentation(OutputList &ol)
{
ol.disable(OutputGenerator::Man);
ol.writeRuler();
- ol.parseText(theTranslator->trGeneratedFromFiles(m_compType,m_files.count()==1));
+ ol.parseText(theTranslator->trGeneratedFromFiles(
+ m_isObjC && m_compType==Interface ? Class : m_compType,
+ m_files.count()==1));
bool first=TRUE;
const char *file = m_files.first();
@@ -1498,7 +1505,7 @@ void ClassDef::writeMemberList(OutputList &ol)
ol.parseText(theTranslator->trIncludingInheritedMembers());
//ol.startItemList();
- ol.writeString("<table>\n");
+ ol.writeString("<p><table>\n");
//MemberNameInfo *mni=m_allMemberNameInfoList->first();
MemberNameInfoSDict::Iterator mnii(*m_allMemberNameInfoSDict);
@@ -1526,24 +1533,45 @@ void ClassDef::writeMemberList(OutputList &ol)
QCString name=mi->ambiguityResolutionScope+md->name();
//ol.writeListItem();
ol.writeString(" <tr class=\"memlist\"><td>");
- //Definition *bd = md->getGroupDef();
- //if (bd==0) bd=cd;
- ol.writeObjectLink(md->getReference(),
- md->getOutputFileBase(),
- md->anchor(),name);
-
- if ( md->isFunction() || md->isSignal() || md->isSlot() ||
- (md->isFriend() && md->argsString()))
- ol.docify(md->argsString());
- else if (md->isEnumerate())
- ol.parseText(" "+theTranslator->trEnumName());
- else if (md->isEnumValue())
- ol.parseText(" "+theTranslator->trEnumValue());
- else if (md->isTypedef())
- ol.docify(" typedef");
- else if (md->isFriend() && !strcmp(md->typeString(),"friend class"))
- ol.docify(" class");
- //ol.writeString("\n");
+ if (cd->isObjectiveC())
+ {
+ if (md->isObjCMethod())
+ {
+ if (md->isStatic())
+ ol.writeString("+&nbsp;</td><td>");
+ else
+ ol.writeString("-&nbsp;</td><td>");
+ }
+ else
+ ol.writeString("</td><td>");
+ }
+ if (md->isObjCMethod())
+ {
+ ol.writeObjectLink(md->getReference(),
+ md->getOutputFileBase(),
+ md->anchor(),md->name());
+ }
+ else
+ {
+ //Definition *bd = md->getGroupDef();
+ //if (bd==0) bd=cd;
+ ol.writeObjectLink(md->getReference(),
+ md->getOutputFileBase(),
+ md->anchor(),name);
+
+ if ( md->isFunction() || md->isSignal() || md->isSlot() ||
+ (md->isFriend() && md->argsString()))
+ ol.docify(md->argsString());
+ else if (md->isEnumerate())
+ ol.parseText(" "+theTranslator->trEnumName());
+ else if (md->isEnumValue())
+ ol.parseText(" "+theTranslator->trEnumValue());
+ else if (md->isTypedef())
+ ol.docify(" typedef");
+ else if (md->isFriend() && !strcmp(md->typeString(),"friend class"))
+ ol.docify(" class");
+ //ol.writeString("\n");
+ }
ol.writeString("</td>");
memberWritten=TRUE;
}
@@ -1554,17 +1582,32 @@ void ClassDef::writeMemberList(OutputList &ol)
{
//ol.writeListItem();
ol.writeString(" <tr bgcolor=\"#f0f0f0\"><td>");
+ if (cd->isObjectiveC())
+ {
+ if (md->isObjCMethod())
+ {
+ if (md->isStatic())
+ ol.writeString("+&nbsp;</td><td>");
+ else
+ ol.writeString("-&nbsp;</td><td>");
+ }
+ else
+ ol.writeString("</td><td>");
+ }
ol.startBold();
ol.docify(md->name());
ol.endBold();
- if ( md->isFunction() || md->isSignal() || md->isSlot() )
- ol.docify(md->argsString());
- else if (md->isEnumerate())
- ol.parseText(" "+theTranslator->trEnumName());
- else if (md->isEnumValue())
- ol.parseText(" "+theTranslator->trEnumValue());
- else if (md->isTypedef())
- ol.docify(" typedef");
+ if (!md->isObjCMethod())
+ {
+ if ( md->isFunction() || md->isSignal() || md->isSlot() )
+ ol.docify(md->argsString());
+ else if (md->isEnumerate())
+ ol.parseText(" "+theTranslator->trEnumName());
+ else if (md->isEnumValue())
+ ol.parseText(" "+theTranslator->trEnumValue());
+ else if (md->isTypedef())
+ ol.docify(" typedef");
+ }
ol.writeString(" (");
ol.parseText(theTranslator->trDefinedIn()+" ");
if (cd->isLinkable())
@@ -1589,7 +1632,8 @@ void ClassDef::writeMemberList(OutputList &ol)
ol.writeString("</td>");
ol.writeString("<td>");
}
- if ((prot!=Public || virt!=Normal ||
+ if (
+ (prot!=Public || virt!=Normal ||
md->isFriend() || md->isRelated() || md->isExplicit() ||
md->isMutable() || (md->isInline() && Config_getBool("INLINE_INFO")) ||
md->isSignal() || md->isSlot() ||
diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp
index d531d55..959be75 100644
--- a/src/cmdmapper.cpp
+++ b/src/cmdmapper.cpp
@@ -103,6 +103,8 @@ CommandMap cmdMap[] =
{ "_internalref", CMD_INTERNALREF },
{ "dot", CMD_DOT },
{ "enddot", CMD_ENDDOT },
+ { "manonly", CMD_MANONLY },
+ { "endmanonly", CMD_ENDMANONLY },
{ 0, 0 }
};
diff --git a/src/cmdmapper.h b/src/cmdmapper.h
index e990716..18e43e3 100644
--- a/src/cmdmapper.h
+++ b/src/cmdmapper.h
@@ -103,7 +103,9 @@ enum CommandType
CMD_XREFITEM = 69 | SIMPLESECT_BIT,
CMD_XMLONLY = 70,
CMD_DOT = 71,
- CMD_ENDDOT = 72
+ CMD_ENDDOT = 72,
+ CMD_MANONLY = 73,
+ CMD_ENDMANONLY = 74
};
enum HtmlTagType
diff --git a/src/config.l b/src/config.l
index 3e11d90..7c1cc28 100644
--- a/src/config.l
+++ b/src/config.l
@@ -1100,6 +1100,8 @@ void Config::check()
filePatternList.append("*.php");
filePatternList.append("*.php3");
filePatternList.append("*.inc");
+ filePatternList.append("*.m");
+ filePatternList.append("*.mm");
}
// add default pattern if needed
@@ -1819,7 +1821,7 @@ void Config::create()
"and *.h) to filter out the source-files in the directories. If left \n"
"blank the following patterns are tested: \n"
"*.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp \n"
- "*.h++ *.idl *.odl *.cs *.php *.php3 *.inc\n"
+ "*.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm\n"
);
cb = addBool(
"RECURSIVE",
diff --git a/src/declinfo.l b/src/declinfo.l
index 68d4e81..7058e43 100644
--- a/src/declinfo.l
+++ b/src/declinfo.l
@@ -128,6 +128,9 @@ ID ([a-z_A-Z][a-z_A-Z0-9]*)|(@[0-9]+)
}
name.resize(0);
}
+<Start>":" { // Objective-C argument separator
+ name+=yytext;
+ }
<Start>[*&]+ {
addType();
type+=yytext;
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 760e1b5..703ed07 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -826,6 +826,15 @@ reparsetoken:
doctokenizerYYsetStatePara();
}
break;
+ case CMD_MANONLY:
+ {
+ doctokenizerYYsetStateManOnly();
+ tok = doctokenizerYYlex();
+ children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::ManOnly,g_isExample,g_exampleName));
+ if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: manonly section ended without end marker");
+ doctokenizerYYsetStatePara();
+ }
+ break;
case CMD_LATEXONLY:
{
doctokenizerYYsetStateLatexOnly();
@@ -3664,6 +3673,15 @@ int DocPara::handleCommand(const QString &cmdName)
doctokenizerYYsetStatePara();
}
break;
+ case CMD_MANONLY:
+ {
+ doctokenizerYYsetStateManOnly();
+ retval = doctokenizerYYlex();
+ m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::ManOnly,g_isExample,g_exampleName));
+ if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: manonly section ended without end marker");
+ doctokenizerYYsetStatePara();
+ }
+ break;
case CMD_LATEXONLY:
{
doctokenizerYYsetStateLatexOnly();
@@ -3702,6 +3720,7 @@ int DocPara::handleCommand(const QString &cmdName)
break;
case CMD_ENDCODE:
case CMD_ENDHTMLONLY:
+ case CMD_ENDMANONLY:
case CMD_ENDLATEXONLY:
case CMD_ENDXMLONLY:
case CMD_ENDLINK:
diff --git a/src/docparser.h b/src/docparser.h
index 05d6c93..0aba864 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -349,7 +349,7 @@ class DocWhiteSpace : public DocNode
class DocVerbatim : public DocNode
{
public:
- enum Type { Code, HtmlOnly, LatexOnly, XmlOnly, Verbatim, Dot };
+ enum Type { Code, HtmlOnly, ManOnly, LatexOnly, XmlOnly, Verbatim, Dot };
DocVerbatim(DocNode *parent,const QString &context,
const QString &text, Type t,bool isExample,
const QString &exampleFile) :
diff --git a/src/doctokenizer.h b/src/doctokenizer.h
index bd63611..4bac78d 100644
--- a/src/doctokenizer.h
+++ b/src/doctokenizer.h
@@ -120,6 +120,7 @@ void doctokenizerYYsetStatePara();
void doctokenizerYYsetStateTitle();
void doctokenizerYYsetStateCode();
void doctokenizerYYsetStateHtmlOnly();
+void doctokenizerYYsetStateManOnly();
void doctokenizerYYsetStateLatexOnly();
void doctokenizerYYsetStateXmlOnly();
void doctokenizerYYsetStateVerbatim();
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index 4507ef6..3c3dcaf 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -324,6 +324,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
%x St_TitleV
%x St_Code
%x St_HtmlOnly
+%x St_ManOnly
%x St_LatexOnly
%x St_XmlOnly
%x St_Verbatim
@@ -502,6 +503,14 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
<St_HtmlOnly>. {
g_token->verb+=yytext;
}
+<St_ManOnly>{CMD}"endmanonly" {
+ return RetVal_OK;
+ }
+<St_ManOnly>[^\\@\n$]+ |
+<St_ManOnly>\n |
+<St_ManOnly>. {
+ g_token->verb+=yytext;
+ }
<St_LatexOnly>{CMD}"endlatexonly" {
return RetVal_OK;
}
@@ -880,6 +889,12 @@ void doctokenizerYYsetStateHtmlOnly()
BEGIN(St_HtmlOnly);
}
+void doctokenizerYYsetStateManOnly()
+{
+ g_token->verb="";
+ BEGIN(St_ManOnly);
+}
+
void doctokenizerYYsetStateXmlOnly()
{
g_token->verb="";
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 869cb8c..bf1cbc9 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -491,7 +491,7 @@ static void addIncludeFile(ClassDef *cd,FileDef *ifd,Entry *root)
}
else // put #include in the class documentation without link
{
- cd->setIncludeFile(0,iName,local,FALSE);
+ cd->setIncludeFile(0,iName,local,TRUE);
}
}
}
@@ -729,6 +729,10 @@ static void addClassToContext(Entry *root)
case Entry::PROTOCOLDOC_SEC:
sec=ClassDef::Protocol;
break;
+ case Entry::CATEGORY_SEC:
+ case Entry::CATEGORYDOC_SEC:
+ sec=ClassDef::Category;
+ break;
case Entry::EXCEPTION_SEC:
case Entry::EXCEPTIONDOC_SEC:
sec=ClassDef::Exception;
@@ -811,6 +815,22 @@ static void addClassToContext(Entry *root)
cd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
cd->insertUsedFile(root->fileName);
+ //int bi;
+ //if (root->objc && (bi=fullName.find('<'))!=-1 && root->extends->count()==0)
+ //{
+ // // add protocols as base classes
+ // int be=fullName.find('>'),len;
+ // static QRegExp re("[A-Z_a-z][A-Z_a-z0-9]*");
+ // int p=0;
+ // while ((p=re.match(fullName,bi+1,&len))!=-1 && p<be)
+ // {
+ // QCString baseName = fullName.mid(p,len);
+ // printf("Adding artifical base class %s to %s\n",baseName.data(),fullName.data());
+ // root->extends->append(new BaseInfo(baseName,Public,Normal));
+ // bi=p+len;
+ // }
+ //}
+
// add class to the list
//printf("ClassDict.insert(%s)\n",resolveDefines(fullName).data());
Doxygen::classSDict.append(fullName,cd);
@@ -824,7 +844,8 @@ static void addClassToContext(Entry *root)
static void buildClassList(Entry *root)
{
if (
- (root->section & Entry::COMPOUND_MASK) && !root->name.isEmpty()
+ ((root->section & Entry::COMPOUND_MASK) ||
+ root->section==Entry::OBJCIMPL_SEC) && !root->name.isEmpty()
)
{
addClassToContext(root);
@@ -2232,11 +2253,12 @@ static void buildFunctionList(Entry *root)
)
)
{
- Debug::print(Debug::Functions,0,"--> member of class %s!\n",rname.data(),cd->name().data());
+ Debug::print(Debug::Functions,0,"--> member %s of class %s!\n",
+ rname.data(),cd->name().data());
addMethodToClass(root,cd,rname,isFriend);
}
else if (root->parent &&
- !(root->parent->section & Entry::COMPOUND_MASK) &&
+ !((root->parent->section & Entry::COMPOUND_MASK) || root->parent->section==Entry::OBJCIMPL_SEC) &&
!isMember &&
(root->relates.isEmpty() || root->relatesDup) &&
root->type.left(7)!="extern " &&
@@ -2310,24 +2332,6 @@ static void buildFunctionList(Entry *root)
md->setDocsForDefinition(!root->proto);
ArgumentList *argList = new ArgumentList;
stringToArgumentList(root->args,argList);
- //printf("root->argList=%p\n",root->argList);
- //if (root->argList)
- //{
- // ArgumentListIterator ali1(*root->argList);
- // ArgumentListIterator ali2(*argList);
- // Argument *sa,*da;
- // for (;(sa=ali1.current()) && (da=ali2.current());++ali1,++ali2)
- // {
- // printf("sa->name=%s (doc=%s) da->name=%s (doc=%s)\n",
- // sa->name.data(),sa->docs.data(),
- // da->name.data(),da->docs.data()
- // );
- // if (!sa->docs.isEmpty() && da->docs.isEmpty())
- // {
- // da->docs=sa->docs.copy();
- // }
- // }
- //}
if (root->proto)
{
//printf("setDeclArgumentList to %p\n",argList);
@@ -2359,19 +2363,6 @@ static void buildFunctionList(Entry *root)
// merge ingroup specifiers
if (md->getGroupDef()==0 && root->groups->first()!=0)
{
- //printf("new member is grouped, existing member not\n");
- // if we do addMemberToGroups here an undocumented declaration may prevent
- // the documented implementation below it from being added
- //addMemberToGroups(root,md);
- //GroupDef *gd=Doxygen::groupSDict[root->groups->first()->groupname.data()];
- //if (gd)
- //{
- // bool success = gd->insertMember(md);
- // if (success)
- // {
- // md->setGroupDef(gd, root->groups->first()->pri, root->fileName, root->startLine, !root->doc.isEmpty());
- // }
- //}
addMemberToGroups(root,md);
}
else if (md->getGroupDef()!=0 && root->groups->count()==0)
@@ -3302,6 +3293,7 @@ static bool findTemplateInstanceRelation(Entry *root,
ClassDef *instanceClass = templateClass->insertTemplateInstance(
root->fileName,root->startLine,templSpec,freshInstance);
if (isArtificial) instanceClass->setClassIsArtificial();
+ instanceClass->setIsObjectiveC(root->objc);
if (freshInstance)
{
@@ -4207,9 +4199,16 @@ static bool findGlobalMember(Entry *root,
}
else // got docs for an undefined member!
{
- warn(root->fileName,root->startLine,
- "Warning: documented function `%s' was not defined.",decl
- );
+ if (root->parent && root->parent->section==Entry::OBJCIMPL_SEC)
+ {
+ // probably a local member ObjC method not found in the interface
+ }
+ else
+ {
+ warn(root->fileName,root->startLine,
+ "Warning: documented function `%s' was not defined.",decl
+ );
+ }
}
return TRUE;
}
@@ -4752,7 +4751,9 @@ static void findMember(Entry *root,
delete nl;
}
}
- if (count==0 && !(isFriend && funcType=="class"))
+ if (count==0 && !(isFriend && funcType=="class") &&
+ (root->parent==0 || root->parent->section!=Entry::OBJCIMPL_SEC)
+ )
{
int candidates=0;
if (mn->count()>0)
@@ -5193,6 +5194,32 @@ static void findMemberDocumentation(Entry *root)
}
//----------------------------------------------------------------------
+
+static void findObjCMethodDefinitions(Entry *root)
+{
+ EntryListIterator eli(*root->sublist);
+ Entry *objCImpl;
+ for (;(objCImpl=eli.current());++eli)
+ {
+ if (objCImpl->section==Entry::OBJCIMPL_SEC)
+ {
+ //printf("Found ObjC class implementation %s\n",objCImpl->name.data());
+ EntryListIterator seli(*objCImpl->sublist);
+ Entry *objCMethod;
+ for (;(objCMethod=seli.current());++seli)
+ {
+ if (objCMethod->section==Entry::FUNCTION_SEC)
+ {
+ //Printf(" Found ObjC method definition %s\n",objCMethod->name.data());
+ findMember(objCMethod, objCMethod->type+" "+objCImpl->name+"::"+objCMethod->name+" "+objCMethod->args, FALSE,TRUE);
+ objCMethod->section=Entry::EMPTY_SEC;
+ }
+ }
+ }
+ }
+}
+
+//----------------------------------------------------------------------
// find and add the enumeration to their classes, namespaces or files
static void findEnums(Entry *root)
@@ -8129,6 +8156,7 @@ void parseInput()
findEnumDocumentation(root);
msg("Searching for member function documentation...\n");
+ findObjCMethodDefinitions(root);
findMemberDocumentation(root); // may introduce new members !
transferRelatedFunctionDocumentation();
transferFunctionDocumentation();
diff --git a/src/entry.cpp b/src/entry.cpp
index f111442..3bcaf31 100644
--- a/src/entry.cpp
+++ b/src/entry.cpp
@@ -200,8 +200,9 @@ Entry::~Entry()
void Entry::addSubEntry(Entry *current)
{
- //printf("Entry %d with name %s type 0x%x added\n",
- // current->num,current->name.data(),current->section);
+ //printf("Entry %d with name %s type 0x%x added to %s type 0x%x\n",
+ // current->num,current->name.data(),current->section,
+ // name.data(),section);
//printf("Entry::addSubEntry(%s) %p\n",current->name.data(),current->tArgList);
current->parent=this;
sublist->append(current);
diff --git a/src/entry.h b/src/entry.h
index 82d1a36..44504fc 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -191,42 +191,45 @@ class Entry
PROTOCOL_SEC | CATEGORY_SEC,
SCOPE_MASK = COMPOUND_MASK | NAMESPACE_SEC,
- CLASSDOC_SEC = 0x00000100,
- STRUCTDOC_SEC = 0x00000200,
- UNIONDOC_SEC = 0x00000400,
- EXCEPTIONDOC_SEC = 0x00000800,
- NAMESPACEDOC_SEC = 0x00001000,
- INTERFACEDOC_SEC = 0x00002000,
- PROTOCOLDOC_SEC = 0x00004000,
+ CLASSDOC_SEC = 0x00000800,
+ STRUCTDOC_SEC = 0x00001000,
+ UNIONDOC_SEC = 0x00002000,
+ EXCEPTIONDOC_SEC = 0x00004000,
+ NAMESPACEDOC_SEC = 0x00008000,
+ INTERFACEDOC_SEC = 0x00010000,
+ PROTOCOLDOC_SEC = 0x00020000,
+ CATEGORYDOC_SEC = 0x00040000,
COMPOUNDDOC_MASK = CLASSDOC_SEC | STRUCTDOC_SEC | UNIONDOC_SEC |
- INTERFACEDOC_SEC | EXCEPTIONDOC_SEC | PROTOCOLDOC_SEC,
+ INTERFACEDOC_SEC | EXCEPTIONDOC_SEC | PROTOCOLDOC_SEC |
+ CATEGORYDOC_SEC,
- SOURCE_SEC = 0x00010000,
- HEADER_SEC = 0x00020000,
+ SOURCE_SEC = 0x00400000,
+ HEADER_SEC = 0x00800000,
FILE_MASK = SOURCE_SEC | HEADER_SEC,
- ENUMDOC_SEC = 0x00100000,
- ENUM_SEC = 0x00200000,
- EMPTY_SEC = 0x00300000,
- PAGEDOC_SEC = 0x00400000,
- VARIABLE_SEC = 0x00500000,
- FUNCTION_SEC = 0x00600000,
- TYPEDEF_SEC = 0x00700000,
- MEMBERDOC_SEC = 0x00800000,
- OVERLOADDOC_SEC = 0x00900000,
- EXAMPLE_SEC = 0x00a00000,
- VARIABLEDOC_SEC = 0x00b00000,
- FILEDOC_SEC = 0x00c00000,
- DEFINEDOC_SEC = 0x00d00000,
- INCLUDE_SEC = 0x00e00000,
- DEFINE_SEC = 0x00f00000,
- GROUPDOC_SEC = 0x01000000,
- USINGDIR_SEC = 0x01100000,
- MAINPAGEDOC_SEC = 0x01200000,
- MEMBERGRP_SEC = 0x01300000,
- USINGDECL_SEC = 0x01400000,
- PACKAGE_SEC = 0x01500000,
- PACKAGEDOC_SEC = 0x01600000
+ ENUMDOC_SEC = 0x01000000,
+ ENUM_SEC = 0x02000000,
+ EMPTY_SEC = 0x03000000,
+ PAGEDOC_SEC = 0x04000000,
+ VARIABLE_SEC = 0x05000000,
+ FUNCTION_SEC = 0x06000000,
+ TYPEDEF_SEC = 0x07000000,
+ MEMBERDOC_SEC = 0x08000000,
+ OVERLOADDOC_SEC = 0x09000000,
+ EXAMPLE_SEC = 0x0a000000,
+ VARIABLEDOC_SEC = 0x0b000000,
+ FILEDOC_SEC = 0x0c000000,
+ DEFINEDOC_SEC = 0x0d000000,
+ INCLUDE_SEC = 0x0e000000,
+ DEFINE_SEC = 0x0f000000,
+ GROUPDOC_SEC = 0x10000000,
+ USINGDIR_SEC = 0x11000000,
+ MAINPAGEDOC_SEC = 0x12000000,
+ MEMBERGRP_SEC = 0x13000000,
+ USINGDECL_SEC = 0x14000000,
+ PACKAGE_SEC = 0x15000000,
+ PACKAGEDOC_SEC = 0x16000000,
+ OBJCIMPL_SEC = 0x17000000
};
enum MemberSpecifier
{
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index bea84fa..1496366 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -200,6 +200,7 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::HtmlOnly:
m_t << s->text();
break;
+ case DocVerbatim::ManOnly:
case DocVerbatim::LatexOnly:
case DocVerbatim::XmlOnly:
/* nothing */
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index a5113b6..30d9a5c 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -43,7 +43,7 @@
static const char *defaultStyleSheet =
"H1 {\n"
" text-align: center;\n"
-" font-family: Arial, Helvetica, sans-serif;\n"
+" font-family: Geneva, Arial, Helvetica, sans-serif;\n"
"}\n"
"H2 {\n"
" font-family: Geneva, Arial, Helvetica, sans-serif;\n"
@@ -56,6 +56,7 @@ static const char *defaultStyleSheet =
" text-align: center;\n"
" margin: 2px;\n"
" padding: 2px;\n"
+" line-height: 120%;\n"
"}\n"
"A.qindex {\n"
" text-decoration: none;\n"
@@ -79,9 +80,9 @@ static const char *defaultStyleSheet =
" font-weight: bold;\n"
" background-color: #6666cc;\n"
" color: #ffffff;\n"
-" padding: 2 6px;\n"
+" padding: 2px 6px;\n"
" border: 1px double #9295C2;\n"
-" }\n"
+"}\n"
"A.qindexHL:hover {\n"
" text-decoration: none;\n"
" background-color: #6666cc;\n"
@@ -116,7 +117,13 @@ static const char *defaultStyleSheet =
"TD.md { background-color: #F4F4FB; font-weight: bold; }\n"
"TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; }\n"
"TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; }\n"
-"DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold }\n"
+"DIV.groupHeader {\n"
+" margin-left: 16px;\n"
+" margin-top: 12px;\n"
+" margin-bottom: 6px;\n"
+" font-weight: bold;\n"
+" font-family: Geneva, Arial, Helvetica, sans-serif;\n"
+"}\n"
"DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller }\n"
"BODY {\n"
" background: white;\n"
@@ -172,7 +179,7 @@ static const char *defaultStyleSheet =
"}\n"
".mdescLeft {\n"
" font-size: smaller;\n"
-" font-family: Arial, Helvetica, sans-serif;\n"
+" font-style: italic;\n"
" background-color: #FAFAFA;\n"
" padding-left: 8px;\n"
" border-top: 1px none #E0E0E0;\n"
@@ -183,7 +190,6 @@ static const char *defaultStyleSheet =
"}\n"
".mdescRight {\n"
" font-size: smaller;\n"
-" font-family: Arial, Helvetica, sans-serif;\n"
" font-style: italic;\n"
" background-color: #FAFAFA;\n"
" padding-left: 4px;\n"
@@ -282,8 +288,16 @@ void HtmlGenerator::init()
exit(1);
}
writeLogo(dname);
- if (!Config_getString("HTML_HEADER").isEmpty()) g_header=fileToString(Config_getString("HTML_HEADER"));
- if (!Config_getString("HTML_FOOTER").isEmpty()) g_footer=fileToString(Config_getString("HTML_FOOTER"));
+ if (!Config_getString("HTML_HEADER").isEmpty())
+ {
+ g_header=fileToString(Config_getString("HTML_HEADER"));
+ //printf("g_header='%s'\n",g_header.data());
+ }
+ if (!Config_getString("HTML_FOOTER").isEmpty())
+ {
+ g_footer=fileToString(Config_getString("HTML_FOOTER"));
+ //printf("g_footer='%s'\n",g_footer.data());
+ }
}
void HtmlGenerator::writeStyleSheetFile(QFile &file)
@@ -422,8 +436,7 @@ static void writePageFooter(QTextStream &t,const QCString lastTitle)
);
t << endl << "<a href=\"http://www.doxygen.org/index.html\">";
t << endl << "<img src=\"doxygen.png\" alt=\"doxygen\" "
- << "align=\"middle\" border=0 > " << endl <<
- "</a>" << versionString <<" ";
+ << "align=\"middle\" border=0 > " << "</a>" << versionString << " ";
t << "</small></address>\n</body>\n</html>\n";
}
else
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index 17fc3cc..30305db 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -258,6 +258,7 @@ void LatexDocVisitor::visit(DocVerbatim *s)
break;
case DocVerbatim::HtmlOnly:
case DocVerbatim::XmlOnly:
+ case DocVerbatim::ManOnly:
/* nothing */
break;
case DocVerbatim::LatexOnly:
diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp
index d697bfc..2345670 100644
--- a/src/mandocvisitor.cpp
+++ b/src/mandocvisitor.cpp
@@ -198,6 +198,9 @@ void ManDocVisitor::visit(DocVerbatim *s)
m_t << ".PP" << endl;
m_firstCol=TRUE;
break;
+ case DocVerbatim::ManOnly:
+ m_t << s->text();
+ break;
case DocVerbatim::HtmlOnly:
case DocVerbatim::XmlOnly:
case DocVerbatim::LatexOnly:
diff --git a/src/mangen.cpp b/src/mangen.cpp
index b17d76d..6981372 100644
--- a/src/mangen.cpp
+++ b/src/mangen.cpp
@@ -153,6 +153,8 @@ void ManGenerator::endTitleHead(const char *,const char *name)
{
t << ".TH \"" << name << "\" " << getExtension() << " \""
<< dateToString(FALSE) << "\" \"";
+ if (!Config_getString("PROJECT_NUMBER").isEmpty())
+ t << "Version " << Config_getString("PROJECT_NUMBER") << "\" \"";
if (Config_getString("PROJECT_NAME").isEmpty())
t << "Doxygen";
else
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 8a3b927..c47ab09 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -144,21 +144,24 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
{
QCString n=a->type;
if (md->isObjCMethod()) { n.prepend("("); n.append(")"); }
- if (!cName.isEmpty()) n=addTemplateNames(n,cd->name(),cName);
- linkifyText(TextGeneratorOLImpl(ol),cd,md->getBodyDef(),md->name(),n);
+ if (a->type!="...")
+ {
+ if (!cName.isEmpty()) n=addTemplateNames(n,cd->name(),cName);
+ linkifyText(TextGeneratorOLImpl(ol),cd,md->getBodyDef(),md->name(),n);
+ }
}
if (!md->isDefine())
{
ol.endParameterType();
ol.startParameterName(defArgList->count()<2);
}
- if (!a->name.isEmpty()) // argument has a name
+ if (!a->name.isEmpty() || (a->name.isEmpty() && a->type=="...")) // argument has a name
{
ol.docify(" ");
ol.disable(OutputGenerator::Man);
ol.startEmphasis();
ol.enable(OutputGenerator::Man);
- ol.docify(a->name);
+ if (a->name.isEmpty()) ol.docify(a->type); else ol.docify(a->name);
ol.disable(OutputGenerator::Man);
ol.endEmphasis();
ol.enable(OutputGenerator::Man);
@@ -191,7 +194,8 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
{
//printf("Found parameter keyword %s\n",a->attrib.data());
// strip [ and ]
- key=a->attrib.mid(1,a->attrib.length()-2)+":";
+ key=a->attrib.mid(1,a->attrib.length()-2);
+ if (key!=",") key+=":"; // for normal keywords add colon
}
ol.endParameterName(FALSE,FALSE);
ol.startParameterType(FALSE,key);
@@ -800,9 +804,9 @@ void MemberDef::writeDeclaration(OutputList &ol,
if (prot!=Public)
{
Doxygen::tagFile << "\" protection=\"";
- if (prot==Protected) Doxygen::tagFile << "public";
+ if (prot==Protected) Doxygen::tagFile << "protected";
else if (prot==Package) Doxygen::tagFile << "package";
- else /* Private */ Doxygen::tagFile << "protected";
+ else /* Private */ Doxygen::tagFile << "private";
}
if (virt!=Normal)
{
@@ -1321,6 +1325,17 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.startMemberDocName(isObjCMethod());
if (isObjCMethod())
{
+ // strip scope name
+ int ep = ldef.find("::");
+ if (ep!=-1)
+ {
+ int sp=ldef.findRev(' ',ep);
+ if (sp!=-1)
+ {
+ ldef=ldef.left(sp+1)+ldef.mid(ep+2);
+ }
+ }
+ // strip keywords
int dp = ldef.find(':');
if (dp!=-1)
{
diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp
index 8072a53..20520c1 100644
--- a/src/perlmodgen.cpp
+++ b/src/perlmodgen.cpp
@@ -619,6 +619,7 @@ void PerlModDocVisitor::visit(DocVerbatim *s)
return;
case DocVerbatim::Verbatim: type = "preformatted"; break;
case DocVerbatim::HtmlOnly: type = "htmlonly"; break;
+ case DocVerbatim::ManOnly: type = "manonly"; break;
case DocVerbatim::LatexOnly: type = "latexonly"; break;
case DocVerbatim::XmlOnly: type = "xmlonly"; break;
case DocVerbatim::Dot: type = "dot"; break;
diff --git a/src/printdocvisitor.h b/src/printdocvisitor.h
index 42b418c..52062ec 100644
--- a/src/printdocvisitor.h
+++ b/src/printdocvisitor.h
@@ -141,6 +141,7 @@ class PrintDocVisitor : public DocVisitor
case DocVerbatim::Code: printf("<code>"); break;
case DocVerbatim::Verbatim: printf("<verbatim>"); break;
case DocVerbatim::HtmlOnly: printf("<htmlonly>"); break;
+ case DocVerbatim::ManOnly: printf("<manonly>"); break;
case DocVerbatim::LatexOnly: printf("<latexonly>"); break;
case DocVerbatim::XmlOnly: printf("<xmlonly>"); break;
case DocVerbatim::Dot: printf("<dot>"); break;
@@ -151,6 +152,7 @@ class PrintDocVisitor : public DocVisitor
case DocVerbatim::Code: printf("</code>"); break;
case DocVerbatim::Verbatim: printf("</verbatim>"); break;
case DocVerbatim::HtmlOnly: printf("</htmlonly>"); break;
+ case DocVerbatim::ManOnly: printf("</manonly>"); break;
case DocVerbatim::LatexOnly: printf("</latexonly>"); break;
case DocVerbatim::XmlOnly: printf("</xmlonly>"); break;
case DocVerbatim::Dot: printf("</dot>"); break;
diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp
index 0d77bce..6c65ee2 100644
--- a/src/rtfdocvisitor.cpp
+++ b/src/rtfdocvisitor.cpp
@@ -313,6 +313,7 @@ void RTFDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::HtmlOnly:
case DocVerbatim::LatexOnly:
case DocVerbatim::XmlOnly:
+ case DocVerbatim::ManOnly:
/* nothing */
break;
case DocVerbatim::Dot:
diff --git a/src/scanner.l b/src/scanner.l
index 873b377..70ae82e 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -167,6 +167,7 @@ static QCString oldStyleArgType;
static QCString docBackup;
static QCString briefBackup;
+
//-----------------------------------------------------------------------------
static void initParser()
@@ -439,11 +440,12 @@ static void setContext()
insideIDL = fileName.right(4)==".idl" || fileName.right(5)==".pidl" ||
fileName.right(4)==".odl";
insideJava = fileName.right(5)==".java";
- insideCS = fileName.right(3)==".cs";
- insideD = fileName.right(3)==".d";
+ insideCS = fileName.right(3)==".cs"; // for normal keywords add colon
+ insideD = fileName.right(3)==".d"; // for normal keywords add colon
insidePHP = fileName.right(4)==".php" || fileName.right(5)==".php4" ||
fileName.right(4)==".inc" || fileName.right(6)==".phtml";
- insideObjC = fileName.right(2)==".m";
+ insideObjC = fileName.right(2)==".m" || fileName.right(2)==".M" ||
+ fileName.right(3)==".mm";
if ( insidePHP )
{
useOverrideCommands = TRUE;
@@ -1024,6 +1026,11 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
}
else
{
+ lineCount();
+ current->fileName = yyFileName;
+ current->startLine = yyLineNr;
+ current->bodyLine = yyLineNr;
+ current->section = Entry::FUNCTION_SEC;
current->protection = protection = Public ;
current->stat=yytext[0]=='+';
current->mtype = mtype = Method;
@@ -1044,7 +1051,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
}
current->name = yytext;
}
-<ObjCMethod>":" { // start of parameter list
+<ObjCMethod>":"{B}* { // start of parameter list
current->name += ':';
Argument *a = new Argument;
current->argList->append(a);
@@ -1060,11 +1067,13 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->argList->getLast()->attrib=(QCString)"["+yytext+"]";
current->name += yytext;
}
-<ObjCParams>{ID} { // name of parameter
- current->argList->getLast()->name=yytext;
+<ObjCParams>{ID}{BN}* { // name of parameter
+ lineCount();
+ current->argList->getLast()->name=QCString(yytext).stripWhiteSpace();
}
<ObjCParams>"..." { // name of parameter
- current->argList->getLast()->name=yytext;
+ current->argList->getLast()->attrib="[,]";
+ current->argList->getLast()->type="...";
}
<ObjCParams>":" {
current->name += ':';
@@ -1084,7 +1093,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<ObjCParamType>[^)]* {
current->argList->last()->type=yytext;
}
-<ObjCParamType>")" {
+<ObjCParamType>")"{B}* {
BEGIN( ObjCParams );
}
<ObjCMethod,ObjCParams>";" { // end of method declaration
@@ -1093,6 +1102,10 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
unput(';');
BEGIN( Function );
}
+<ObjCMethod,ObjCParams>"{" { // start of a method body
+ unput('{');
+ BEGIN( Function );
+ }
<FindMembers>{BN}{1,80} {
lineCount();
}
@@ -1226,7 +1239,20 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->name = QCString(yytext).stripWhiteSpace();
}
}
-<FindMembers>{B}*"@interface"{BN}+ { // Objective-C interface
+<FindMembers>{B}*"@implementation"{BN}+ { // Objective-C class implementation
+ lineCount();
+ isTypedef=FALSE;
+ current->section = Entry::OBJCIMPL_SEC;
+ current->objc = insideObjC = TRUE;
+ current->protection = protection = Public ;
+ addType( current ) ;
+ current->type += " implementation" ;
+ current->fileName = yyFileName;
+ current->startLine = yyLineNr;
+ current->bodyLine = yyLineNr;
+ BEGIN( CompoundName );
+ }
+<FindMembers>{B}*"@interface"{BN}+ { // Objective-C class interface
lineCount();
isTypedef=FALSE;
current->section = Entry::INTERFACE_SEC;
@@ -3327,10 +3353,19 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<ClassTemplSpec>. {
current->name += yytext;
}
+<CompoundName>{SCOPENAME}{BN}*";" { // forward declaration
+ unput(';');
+ if (isTypedef) // typedef of a class, put typedef keyword back
+ {
+ current->type.prepend("typedef");
+ }
+ BEGIN( FindMembers );
+ }
<CompoundName>{SCOPENAME} {
current->name = yytext ;
lineCount();
- if (current->section == Entry::PROTOCOL_SEC)
+ if (current->section == Entry::PROTOCOL_SEC ||
+ current->section == Entry::OBJCIMPL_SEC)
{
unput('{'); // fake start of body
}
@@ -3454,16 +3489,17 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->name.sprintf("@%d",anonCount++);
}
curlyCount=0;
- if (current->section==Entry::PROTOCOL_SEC)
- {
+ if (current->section==Entry::PROTOCOL_SEC ||
+ current->section==Entry::OBJCIMPL_SEC)
+ { // ObjC body that ends with @end
BEGIN( ReadBodyIntf );
}
else if (current->section==Entry::NAMESPACE_SEC)
- {
+ { // namespace body
BEGIN( ReadNSBody );
}
else
- {
+ { // class body
BEGIN( ReadBody ) ;
}
}
diff --git a/src/tagreader.cpp b/src/tagreader.cpp
index 6301305..f3b5ee8 100644
--- a/src/tagreader.cpp
+++ b/src/tagreader.cpp
@@ -55,8 +55,8 @@ class TagMemberInfo
class TagClassInfo
{
public:
- enum Kind { Class, Struct, Union, Interface, Exception };
- TagClassInfo() { bases=0, templateArguments=0; members.setAutoDelete(TRUE); }
+ enum Kind { Class, Struct, Union, Interface, Exception, Protocol, Category };
+ TagClassInfo() { bases=0, templateArguments=0; members.setAutoDelete(TRUE); isObjC=FALSE; }
~TagClassInfo() { delete bases; delete templateArguments; }
QString name;
QString filename;
@@ -65,6 +65,7 @@ class TagClassInfo
QList<TagMemberInfo> members;
QList<QString> *templateArguments;
Kind kind;
+ bool isObjC;
};
/*! Container for namespace specific info that can be read from a tagfile */
@@ -194,6 +195,7 @@ class TagFileParser : public QXmlDefaultHandler
{
m_curString = "";
QString kind = attrib.value("kind");
+ QString isObjC = attrib.value("objc");
if (kind=="class")
{
m_curClass = new TagClassInfo;
@@ -224,6 +226,18 @@ class TagFileParser : public QXmlDefaultHandler
m_curClass->kind = TagClassInfo::Exception;
m_state = InClass;
}
+ else if (kind=="protocol")
+ {
+ m_curClass = new TagClassInfo;
+ m_curClass->kind = TagClassInfo::Protocol;
+ m_state = InClass;
+ }
+ else if (kind=="category")
+ {
+ m_curClass = new TagClassInfo;
+ m_curClass->kind = TagClassInfo::Category;
+ m_state = InClass;
+ }
else if (kind=="file")
{
m_curFile = new TagFileInfo;
@@ -253,6 +267,10 @@ class TagFileParser : public QXmlDefaultHandler
{
err("Error: Unknown compound attribute `%s' found!\n",kind.data());
}
+ if (isObjC=="yes" && m_curClass)
+ {
+ m_curClass->isObjC = TRUE;
+ }
}
void endCompound()
{
@@ -1004,6 +1022,8 @@ void TagFileParser::buildLists(Entry *root)
case TagClassInfo::Union: ce->section = Entry::UNION_SEC; break;
case TagClassInfo::Interface: ce->section = Entry::INTERFACE_SEC; break;
case TagClassInfo::Exception: ce->section = Entry::EXCEPTION_SEC; break;
+ case TagClassInfo::Protocol: ce->section = Entry::PROTOCOL_SEC; break;
+ case TagClassInfo::Category: ce->section = Entry::CATEGORY_SEC; break;
}
ce->name = tci->name;
addDocAnchors(ce,tci->docAnchors);
@@ -1011,6 +1031,7 @@ void TagFileParser::buildLists(Entry *root)
ti->tagName = m_tagName;
ti->fileName = tci->filename;
ce->tagInfo = ti;
+ ce->objc = tci->isObjC;
// transfer base class list
if (tci->bases)
{
diff --git a/src/util.cpp b/src/util.cpp
index ff0ec8d..a72a968 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -557,6 +557,7 @@ NamespaceDef *getResolvedNamespace(const char *name)
}
static QDict<MemberDef> g_resolvedTypedefs;
+static QDict<Definition> g_visitedNamespaces;
// forward declaration
ClassDef *getResolvedClassRec(Definition *scope,
@@ -746,12 +747,13 @@ bool accessibleViaUsingNamespace(const NamespaceSDict *nl,
//printf("Trying via used namespace %s\n",und->name().data());
Definition *sc = explicitScopePart.isEmpty() ? und : followPath(und,fileScope,explicitScopePart);
if (sc && item->getOuterScope()==sc) return TRUE;
- //printf("Try via used namespac done\n");
+ //printf("Try via used namespace done\n");
}
}
return FALSE;
}
+
/* Returns the "distance" (=number of levels up) from item to scope, or -1
* if item in not inside scope.
*/
@@ -857,6 +859,7 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item,
int i=-1;
if (newScope->definitionType()==Definition::TypeNamespace)
{
+ g_visitedNamespaces.insert(newScope->name(),newScope);
// this part deals with the case where item is a class
// A::B::C but is explicit referenced as A::C, where B is imported
// in A via a using directive.
@@ -884,11 +887,14 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item,
NamespaceDef *nd;
for (nli.toFirst();(nd=nli.current());++nli)
{
- i = isAccessibleFrom(scope,fileScope,item,nd->name());
- if (i!=-1)
+ if (g_visitedNamespaces.find(nd->name())==0)
{
- //printf("> found via explicit scope of used namespace\n");
- goto done;
+ i = isAccessibleFrom(scope,fileScope,item,nd->name());
+ if (i!=-1)
+ {
+ //printf("> found via explicit scope of used namespace\n");
+ goto done;
+ }
}
}
}
@@ -1009,6 +1015,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
if (d->definitionType()==Definition::TypeClass ||
d->definitionType()==Definition::TypeMember)
{
+ g_visitedNamespaces.clear();
// test accessibility of definition within scope.
int distance = isAccessibleFrom(scope,fileScope,d,explicitScopePart);
if (distance!=-1) // definition is accessible
@@ -1525,6 +1532,10 @@ int filterCRLF(char *buf,int len)
if (src<len && buf[src] == '\n')
++src; // skip LF just after CR (DOS)
}
+ else if ( c == '\0' && src<len-1) // filter out internal \0 characters, as it will confuse the parser
+ {
+ c = ' '; // turn into a space
+ }
buf[dest++] = c; // copy the (modified) character to dest
}
return dest; // length of the valid part of the buf
diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp
index 25b7d44..5d50020 100644
--- a/src/xmldocvisitor.cpp
+++ b/src/xmldocvisitor.cpp
@@ -181,6 +181,11 @@ void XmlDocVisitor::visit(DocVerbatim *s)
filter(s->text());
m_t << "</htmlonly>";
break;
+ case DocVerbatim::ManOnly:
+ m_t << "<manonly>";
+ filter(s->text());
+ m_t << "</manonly>";
+ break;
case DocVerbatim::LatexOnly:
m_t << "<latexonly>";
filter(s->text());