summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compound.xsd2
-rw-r--r--src/compound_xsd.h2
-rw-r--r--src/docparser.cpp106
-rw-r--r--src/docparser.h10
-rw-r--r--src/doxygen.cpp101
-rw-r--r--src/entry.cpp2
-rw-r--r--src/entry.h2
-rw-r--r--src/filedef.cpp139
-rw-r--r--src/filedef.h8
-rw-r--r--src/htmldocvisitor.cpp4
-rw-r--r--src/htmlgen.cpp14
-rw-r--r--src/memberdef.h8
-rw-r--r--src/pre.l15
-rw-r--r--src/scanner.l76
-rw-r--r--src/tagreader.cpp4
-rw-r--r--src/translator_cn.h17
-rw-r--r--src/translator_de.h19
-rw-r--r--src/translator_dk.h15
-rw-r--r--src/translator_se.h51
-rw-r--r--src/util.cpp18
-rw-r--r--src/xmlgen.cpp9
21 files changed, 407 insertions, 215 deletions
diff --git a/src/compound.xsd b/src/compound.xsd
index c5fea76..f9e0abe 100644
--- a/src/compound.xsd
+++ b/src/compound.xsd
@@ -119,6 +119,8 @@
<xsd:element name="definition" minOccurs="0" />
<xsd:element name="argsstring" minOccurs="0" />
<xsd:element name="name" />
+ <xsd:element name="read" minOccurs="0" />
+ <xsd:element name="write" minOccurs="0" />
<xsd:element name="reimplements" type="reimplementType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="reimplementedby" type="reimplementType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="param" type="paramType" minOccurs="0" maxOccurs="unbounded" />
diff --git a/src/compound_xsd.h b/src/compound_xsd.h
index 90409f7..3aad39c 100644
--- a/src/compound_xsd.h
+++ b/src/compound_xsd.h
@@ -119,6 +119,8 @@
" <xsd:element name=\"definition\" minOccurs=\"0\" />\n"
" <xsd:element name=\"argsstring\" minOccurs=\"0\" />\n"
" <xsd:element name=\"name\" />\n"
+" <xsd:element name=\"read\" minOccurs=\"0\" />\n"
+" <xsd:element name=\"write\" minOccurs=\"0\" />\n"
" <xsd:element name=\"reimplements\" type=\"reimplementType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
" <xsd:element name=\"reimplementedby\" type=\"reimplementType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
" <xsd:element name=\"param\" type=\"paramType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 3f74dcf..2f6a55f 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -667,6 +667,48 @@ static void handleInitialStyleCommands(DocPara *parent,QList<DocNode> &children)
}
}
+static int handleAHref(DocNode *parent,QList<DocNode> &children,const HtmlAttribList &tagHtmlAttribs)
+{
+ HtmlAttribListIterator li(tagHtmlAttribs);
+ HtmlAttrib *opt;
+ int index=0;
+ int retval = RetVal_OK;
+ for (li.toFirst();(opt=li.current());++li,++index)
+ {
+ if (opt->name=="name") // <a name=label> tag
+ {
+ if (!opt->value.isEmpty())
+ {
+ DocAnchor *anc = new DocAnchor(parent,opt->value,TRUE);
+ children.append(anc);
+ break; // stop looking for other tag attribs
+ }
+ else
+ {
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: found <a> tag with name option but without value!");
+ }
+ }
+ else if (opt->name=="href") // <a href=url>..</a> tag
+ {
+ // copy attributes
+ HtmlAttribList attrList = tagHtmlAttribs;
+ // and remove the href attribute
+ bool result = attrList.remove(index);
+ ASSERT(result);
+ DocHRef *href = new DocHRef(parent,attrList,opt->value);
+ children.append(href);
+ g_insideHtmlLink=TRUE;
+ retval = href->parse();
+ g_insideHtmlLink=FALSE;
+ break;
+ }
+ else // unsupported option for tag a
+ {
+ }
+ }
+ return retval;
+}
+
const char *DocStyleChange::styleString() const
{
switch (m_style)
@@ -1924,6 +1966,11 @@ endlink:
//---------------------------------------------------------------------------
+DocDotFile::DocDotFile(DocNode *parent,const QString &name) :
+ m_parent(parent), m_name(name), m_relPath(g_relPath)
+{
+}
+
void DocDotFile::parse()
{
g_nodeStack.push(this);
@@ -2001,6 +2048,12 @@ void DocDotFile::parse()
//---------------------------------------------------------------------------
+DocImage::DocImage(DocNode *parent,const HtmlAttribList &attribs,const QString &name,Type t) :
+ m_parent(parent), m_attribs(attribs), m_name(name),
+ m_type(t), m_relPath(g_relPath)
+{
+}
+
void DocImage::parse()
{
g_nodeStack.push(this);
@@ -2134,11 +2187,24 @@ int DocHtmlHeader::parse()
}
goto endheader;
}
+ else if (tagId==HTML_A)
+ {
+ if (!g_token->endTag)
+ {
+ handleAHref(this,m_children,g_token->attribs);
+ }
+ }
+ else if (tagId==HTML_BR)
+ {
+ DocLineBreak *lb = new DocLineBreak(this);
+ m_children.append(lb);
+ }
else
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected html tag <%s%s> found within <h%d> context",
g_token->endTag?"/":"",g_token->name.data(),m_level);
}
+
}
break;
case TK_SYMBOL:
@@ -4042,44 +4108,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
}
break;
case HTML_A:
- {
- HtmlAttribListIterator li(tagHtmlAttribs);
- HtmlAttrib *opt;
- int index=0;
- for (li.toFirst();(opt=li.current());++li,++index)
- {
- if (opt->name=="name") // <a name=label> tag
- {
- if (!opt->value.isEmpty())
- {
- DocAnchor *anc = new DocAnchor(this,opt->value,TRUE);
- m_children.append(anc);
- break; // stop looking for other tag attribs
- }
- else
- {
- warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: found <a> tag with name option but without value!");
- }
- }
- else if (opt->name=="href") // <a href=url>..</a> tag
- {
- // copy attributes
- HtmlAttribList attrList = tagHtmlAttribs;
- // and remove the href attribute
- bool result = attrList.remove(index);
- ASSERT(result);
- DocHRef *href = new DocHRef(this,attrList,opt->value);
- m_children.append(href);
- g_insideHtmlLink=TRUE;
- retval = href->parse();
- g_insideHtmlLink=FALSE;
- break;
- }
- else // unsupported option for tag a
- {
- }
- }
- }
+ retval=handleAHref(this,m_children,tagHtmlAttribs);
break;
case HTML_H1:
retval=handleHtmlHeader(tagHtmlAttribs,1);
@@ -4273,6 +4302,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
break;
default:
// we should not get here!
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected end tag %s\n",tagName.data());
ASSERT(0);
break;
}
diff --git a/src/docparser.h b/src/docparser.h
index 84fe830..b5467c2 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -568,8 +568,7 @@ class DocImage : public CompAccept<DocImage>, public DocNode
{
public:
enum Type { Html, Latex, Rtf };
- DocImage(DocNode *parent,const HtmlAttribList &attribs,const QString &name,Type t) :
- m_parent(parent), m_attribs(attribs), m_name(name), m_type(t) {}
+ DocImage(DocNode *parent,const HtmlAttribList &attribs,const QString &name,Type t);
Kind kind() const { return Kind_Image; }
Type type() const { return m_type; }
QString name() const { return m_name; }
@@ -577,6 +576,7 @@ class DocImage : public CompAccept<DocImage>, public DocNode
bool hasCaption() const { return !m_children.isEmpty(); }
QString width() const { return m_width; }
QString height() const { return m_height; }
+ QString relPath() const { return m_relPath; }
const HtmlAttribList &attribs() const { return m_attribs; }
void accept(DocVisitor *v) { CompAccept<DocImage>::accept(this,v); }
void parse();
@@ -588,18 +588,19 @@ class DocImage : public CompAccept<DocImage>, public DocNode
Type m_type;
QString m_width;
QString m_height;
+ QString m_relPath;
};
/*! @brief Node representing a dot file */
class DocDotFile : public CompAccept<DocDotFile>, public DocNode
{
public:
- DocDotFile(DocNode *parent,const QString &name) :
- m_parent(parent), m_name(name) { }
+ DocDotFile(DocNode *parent,const QString &name);
void parse();
Kind kind() const { return Kind_DotFile; }
QString name() const { return m_name; }
QString file() const { return m_file; }
+ QString relPath() const { return m_relPath; }
bool hasCaption() const { return !m_children.isEmpty(); }
QString width() const { return m_width; }
QString height() const { return m_height; }
@@ -609,6 +610,7 @@ class DocDotFile : public CompAccept<DocDotFile>, public DocNode
DocNode *m_parent;
QString m_name;
QString m_file;
+ QString m_relPath;
QString m_width;
QString m_height;
};
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index cd5d557..e923082 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -1081,8 +1081,9 @@ static void findUsingDirectives(Entry *root)
{
//printf("Found using directive %s at line %d of %s\n",
// root->name.data(),root->startLine,root->fileName.data());
+ QCString name=substitute(root->name,".","::");
bool ambig;
- if (!root->name.isEmpty())
+ if (!name.isEmpty())
{
NamespaceDef *usingNd = 0;
NamespaceDef *nd = 0;
@@ -1109,8 +1110,8 @@ static void findUsingDirectives(Entry *root)
{
QCString scope=scopeOffset>0 ?
nsName.left(scopeOffset)+"::" : QCString();
- usingNd = getResolvedNamespace(scope+root->name);
- //printf("Trying with scope=`%s' usingNd=%p\n",(scope+root->name).data(),usingNd);
+ usingNd = getResolvedNamespace(scope+name);
+ //printf("Trying with scope=`%s' usingNd=%p\n",(scope+name).data(),usingNd);
if (scopeOffset==0)
{
scopeOffset=-1;
@@ -1121,7 +1122,7 @@ static void findUsingDirectives(Entry *root)
}
} while (scopeOffset>=0 && usingNd==0);
- //printf("%s -> %p\n",root->name.data(),usingNd);
+ //printf("%s -> %p\n",name.data(),usingNd);
// add the namespace the correct scope
if (usingNd)
@@ -1141,7 +1142,7 @@ static void findUsingDirectives(Entry *root)
else // unknown namespace, but add it anyway.
{
NamespaceDef *nd=new NamespaceDef(
- root->fileName,root->startLine,root->name);
+ root->fileName,root->startLine,name);
nd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition
nd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
nd->addSectionsToDefinition(root->anchors);
@@ -1169,7 +1170,7 @@ static void findUsingDirectives(Entry *root)
nd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
nd->insertUsedFile(root->fileName);
// add class to the list
- Doxygen::namespaceSDict.inSort(root->name,nd);
+ Doxygen::namespaceSDict.inSort(name,nd);
nd->setRefItems(root->sli);
}
}
@@ -1490,6 +1491,8 @@ static MemberDef *addVariableToClass(
md->setMaxInitLines(root->initLines);
md->setMemberGroupId(root->mGrpId);
md->setMemberSpecifiers(root->memSpec);
+ md->setReadAccessor(root->read);
+ md->setWriteAccessor(root->write);
md->enableCallGraph(root->callGraph);
addMemberToGroups(root,md);
//if (root->mGrpId!=-1)
@@ -2928,18 +2931,18 @@ static QDict<int> *getTemplateArgumentsInName(ArgumentList *templateArguments,co
return templateNames;
}
-/*! Searches a class from within the context of \a cd and returns its
+/*! Searches a class from within \a context and \a cd and returns its
* definition if found (otherwise 0 is returned).
- * This function differs from getResolvedClass in that it also takes
- * using declarations and definition into account.
*/
-static ClassDef *findClassWithinClassContext(ClassDef *cd,const QCString &name)
+static ClassDef *findClassWithinClassContext(Definition *context,ClassDef *cd,const QCString &name)
{
+
+#if 0
ClassDef *result=0;
+ FileDef *fd=cd->getFileDef();
// try using of namespaces in namespace scope
NamespaceDef *nd=cd->getNamespaceDef();
- FileDef *fd=cd->getFileDef();
if (nd) // class is inside a namespace
{
QCString fName = nd->name()+"::"+name;
@@ -3029,8 +3032,21 @@ static ClassDef *findClassWithinClassContext(ClassDef *cd,const QCString &name)
}
}
}
+#endif
- return getResolvedClass(cd,fd,name);
+ FileDef *fd=cd->getFileDef();
+ ClassDef *result=0;
+ if (context)
+ {
+ result = getResolvedClass(context,0,name);
+ //printf("** Trying to find %s within context %s result=%s\n",
+ // name.data(),context->name().data(),result ? result->name().data() : "<none>");
+ }
+ if (result==0)
+ {
+ result = getResolvedClass(cd,fd,name);
+ }
+ return result;
}
enum FindBaseClassRelation_Mode
@@ -3042,6 +3058,7 @@ enum FindBaseClassRelation_Mode
static bool findClassRelation(
Entry *root,
+ Definition *context,
ClassDef *cd,
BaseInfo *bi,
QDict<int> *templateNames,
@@ -3052,6 +3069,7 @@ static bool findClassRelation(
static void findUsedClassesForClass(Entry *root,
+ Definition *context,
ClassDef *masterCd,
ClassDef *instanceCd,
bool isArtificial,
@@ -3072,6 +3090,7 @@ static void findUsedClassesForClass(Entry *root,
MemberDef *md=mi->memberDef;
if (md->isVariable()) // for each member variable in this class
{
+ //printf("Found variable %s in class %s\n",md->name().data(),masterCd->name().data());
QCString type=removeRedundantWhiteSpace(md->typeString());
int pos=0;
QCString usedClassName;
@@ -3082,10 +3101,10 @@ static void findUsedClassesForClass(Entry *root,
{
type = substituteTemplateArgumentsInString(type,formalArgs,actualArgs);
}
- //printf("findUsedClassesForClass(%s)=%s\n",masterCd->name().data(),type.data());
+ //printf(" template substitution gives=%s\n",type.data());
while (!found && extractClassNameFromType(type,pos,usedClassName,templSpec))
{
- //printf("Found used class %s\n",usedClassName.data());
+ //printf(" found used class %s\n",usedClassName.data());
// the name could be a type definition, resolve it
QCString typeName = resolveTypeDef(masterCd,usedClassName);
//printf("*** Found resolved class %s for %s\n",typeName.data(),usedClassName.data());
@@ -3105,8 +3124,8 @@ static void findUsedClassesForClass(Entry *root,
replaceNamespaceAliases(usedClassName,si);
}
// add any template arguments to the class
- QCString usedName = usedClassName+templSpec;
- //printf("usedName=%s\n",usedName.data());
+ QCString usedName = removeRedundantWhiteSpace(usedClassName+templSpec);
+ //printf(" usedName=%s\n",usedName.data());
bool delTempNames=FALSE;
if (templateNames==0)
@@ -3115,7 +3134,7 @@ static void findUsedClassesForClass(Entry *root,
delTempNames=TRUE;
}
BaseInfo bi(usedName,Public,Normal);
- findClassRelation(root,instanceCd,&bi,templateNames,TemplateInstances,isArtificial);
+ findClassRelation(root,context,instanceCd,&bi,templateNames,TemplateInstances,isArtificial);
if (masterCd->templateArguments())
{
@@ -3150,8 +3169,9 @@ static void findUsedClassesForClass(Entry *root,
if (!found)
{
- ClassDef *usedCd=findClassWithinClassContext(masterCd,usedName);
- //printf("Looking for used class: result=%p master=%p\n",usedCd,masterCd);
+ ClassDef *usedCd=findClassWithinClassContext(context,masterCd,usedName);
+ //printf("Looking for used class %s: result=%s master=%s\n",
+ // usedName.data(),usedCd?usedCd->name().data():"<none>",masterCd?masterCd->name().data():"<none>");
if (usedCd)
{
@@ -3197,6 +3217,7 @@ static void findUsedClassesForClass(Entry *root,
static void findBaseClassesForClass(
Entry *root,
+ Definition *context,
ClassDef *masterCd,
ClassDef *instanceCd,
FindBaseClassRelation_Mode mode,
@@ -3235,18 +3256,18 @@ static void findBaseClassesForClass(
if (mode==DocumentedOnly)
{
// find a documented base class in the correct scope
- if (!findClassRelation(root,instanceCd,&tbi,templateNames,DocumentedOnly,isArtificial))
+ if (!findClassRelation(root,context,instanceCd,&tbi,templateNames,DocumentedOnly,isArtificial))
{
if (!Config_getBool("HIDE_UNDOC_RELATIONS"))
{
// no documented base class -> try to find an undocumented one
- findClassRelation(root,instanceCd,&tbi,templateNames,Undocumented,isArtificial);
+ findClassRelation(root,context,instanceCd,&tbi,templateNames,Undocumented,isArtificial);
}
}
}
else if (mode==TemplateInstances)
{
- findClassRelation(root,instanceCd,&tbi,templateNames,TemplateInstances,isArtificial);
+ findClassRelation(root,context,instanceCd,&tbi,templateNames,TemplateInstances,isArtificial);
}
if (delTempNames)
{
@@ -3260,6 +3281,7 @@ static void findBaseClassesForClass(
//----------------------------------------------------------------------
static bool findTemplateInstanceRelation(Entry *root,
+ Definition *context,
ClassDef *templateClass,const QCString &templSpec,
QDict<int> *templateNames,
bool isArtificial)
@@ -3302,10 +3324,10 @@ static bool findTemplateInstanceRelation(Entry *root,
Debug::print(Debug::Classes,0," template root found %s!\n",templateRoot->name.data());
ArgumentList *templArgs = new ArgumentList;
stringToArgumentList(templSpec,templArgs);
- findBaseClassesForClass(templateRoot,templateClass,instanceClass,
+ findBaseClassesForClass(templateRoot,context,templateClass,instanceClass,
TemplateInstances,isArtificial,templArgs,templateNames);
- findUsedClassesForClass(templateRoot,templateClass,instanceClass,
+ findUsedClassesForClass(templateRoot,context,templateClass,instanceClass,
isArtificial,templArgs,templateNames);
delete templArgs;
}
@@ -3339,6 +3361,7 @@ static bool isRecursiveBaseClass(const QCString &scope,const QCString &name)
static bool findClassRelation(
Entry *root,
+ Definition *context,
ClassDef *cd,
BaseInfo *bi,
QDict<int> *templateNames,
@@ -3416,10 +3439,10 @@ static bool findClassRelation(
(bi->virt==Normal)?"normal":"virtual"
);
- int i;
- int si=baseClassName.findRev("::");
+ int i=baseClassName.find('<');
+ int si=baseClassName.findRev("::",i==-1 ? baseClassName.length() : i);
if (si==-1) si=0;
- if (baseClass==0 && (i=baseClassName.find('<',si))!=-1)
+ if (baseClass==0 && i!=-1)
// base class has template specifiers
{
// TODO: here we should try to find the correct template specialization
@@ -3467,7 +3490,7 @@ static bool findClassRelation(
//NamespaceDef *nd=cd->getNamespaceDef();
if (!found)
{
- baseClass=findClassWithinClassContext(cd,baseClassName);
+ baseClass=findClassWithinClassContext(context,cd,baseClassName);
//printf("findClassWithinClassContext(%s,%s)=%p\n",
// cd->name().data(),baseClassName.data(),baseClass);
found = baseClass!=0 && baseClass!=cd;
@@ -3490,7 +3513,7 @@ static bool findClassRelation(
// relations.
if (!templSpec.isEmpty() && mode==TemplateInstances)
{
- findTemplateInstanceRelation(root,baseClass,templSpec,templateNames,isArtificial);
+ findTemplateInstanceRelation(root,context,baseClass,templSpec,templateNames,isArtificial);
}
else if (mode==DocumentedOnly)
{
@@ -3643,7 +3666,7 @@ static void findInheritedTemplateInstances()
if ((cd=getClass(bName)))
{
//printf("Class %s %d\n",cd->name().data(),root->extends->count());
- findBaseClassesForClass(root,cd,cd,TemplateInstances,FALSE);
+ findBaseClassesForClass(root,cd,cd,cd,TemplateInstances,FALSE);
}
}
}
@@ -3663,7 +3686,7 @@ static void findUsedTemplateInstances()
Debug::print(Debug::Classes,0," Class %s : \n",bName.data());
if ((cd=getClass(bName)))
{
- findUsedClassesForClass(root,cd,cd,TRUE);
+ findUsedClassesForClass(root,cd,cd,cd,TRUE);
}
}
}
@@ -3683,7 +3706,7 @@ static void computeClassRelations()
Debug::print(Debug::Classes,0," Class %s : \n",bName.data());
if ((cd=getClass(bName)))
{
- findBaseClassesForClass(root,cd,cd,DocumentedOnly,FALSE);
+ findBaseClassesForClass(root,cd,cd,cd,DocumentedOnly,FALSE);
}
if ((cd==0 || (!cd->hasDocumentation() && !cd->isReference())) &&
bName.right(2)!="::")
@@ -3762,10 +3785,10 @@ static void computeTemplateClassRelations()
tbi.name = substituteTemplateArgumentsInString(bi->name,tl,templArgs);
// find a documented base class in the correct scope
- if (!findClassRelation(root,tcd,&tbi,actualTemplateNames,DocumentedOnly,FALSE))
+ if (!findClassRelation(root,cd,tcd,&tbi,actualTemplateNames,DocumentedOnly,FALSE))
{
// no documented base class -> try to find an undocumented one
- findClassRelation(root,tcd,&tbi,actualTemplateNames,Undocumented,FALSE);
+ findClassRelation(root,cd,tcd,&tbi,actualTemplateNames,Undocumented,FALSE);
}
delete actualTemplateNames;
}
@@ -6194,14 +6217,15 @@ static void findSectionsInDocumentation()
static void flushCachedTemplateRelations()
{
- // remove all references to template classes from the cache
- // as there can be new template instances that should be linked
- // to instead.
+ // remove all references to classes from the cache
+ // as there can be new template instances in the inheritance path
+ // to this class. Optimization: only remove those classes that
+ // have inheritance instances as direct or indirect sub classes.
QCacheIterator<LookupInfo> ci(Doxygen::lookupCache);
LookupInfo *li=0;
for (ci.toFirst();(li=ci.current());++ci)
{
- if (li->classDef && li->classDef->isTemplate())
+ if (li->classDef)
{
Doxygen::lookupCache.remove(ci.currentKey());
}
@@ -8244,6 +8268,7 @@ void parseInput()
msg("Building file list...\n");
buildFileList(root);
+ //generateFileTree();
msg("Searching for included using directives...\n");
findIncludedUsingDirectives();
diff --git a/src/entry.cpp b/src/entry.cpp
index 2f2f237..02fa578 100644
--- a/src/entry.cpp
+++ b/src/entry.cpp
@@ -70,6 +70,8 @@ Entry::Entry(const Entry &e)
docFile = e.docFile.copy();
relates = e.relates.copy();
relatesDup = e.relatesDup;
+ read = e.read.copy();
+ write = e.write.copy();
brief = e.brief.copy();
briefLine = e.briefLine;
briefFile = e.briefFile.copy();
diff --git a/src/entry.h b/src/entry.h
index d18d7e7..2d7d49a 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -289,6 +289,8 @@ class Entry
QCString inbodyFile; //!< file in which the body doc was found
QCString relates; //!< related class (doc block)
bool relatesDup; //!< keep duplicate doc in original file also
+ QCString read; //!< property read accessor
+ QCString write; //!< property write accessor
QCString inside; //!< name of the class in which documents are found
QCString exception; //!< throw specification
int bodyLine; //!< line number of the definition in the source
diff --git a/src/filedef.cpp b/src/filedef.cpp
index ad3a216..2dabcc9 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -240,6 +240,12 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.startTextBlock();
writeDetailedDocumentation(ol);
ol.endTextBlock();
+
+ ol.pushGeneratorState();
+ ol.disable(OutputGenerator::Man);
+ ol.disable(OutputGenerator::RTF);
+ ol.newParagraph();
+ ol.popGeneratorState();
}
else if (!briefDescription().isEmpty())
{
@@ -275,11 +281,15 @@ void FileDef::writeDocumentation(OutputList &ol)
fd->name().right(5)==".java";
}
ol.startTypewriter();
- if (isIDLorJava)
+ if (isIDLorJava) // IDL/Java include
{
ol.docify("import ");
}
- else
+ else if (ii->imported) // Objective-C include
+ {
+ ol.docify("#import ");
+ }
+ else // C/C++ include
{
ol.docify("#include ");
}
@@ -302,12 +312,13 @@ void FileDef::writeDocumentation(OutputList &ol)
0,ii->includeName);
if (!Config_getString("GENERATE_TAGFILE").isEmpty() && !fd->isReference())
{
- const char *locStr = (ii->local || isIDLorJava) ? "yes" : "no";
+ const char *locStr = (ii->local || isIDLorJava) ? "yes" : "no";
+ const char *impStr = (ii->imported || isIDLorJava) ? "yes" : "no";
Doxygen::tagFile << " <includes id=\""
- << convertToXML(fd->getOutputFileBase())
- << "\" name=\""
- << convertToXML(fd->name())
- << "\" local=\"" << locStr << "\">"
+ << convertToXML(fd->getOutputFileBase()) << "\" "
+ << "name=\"" << convertToXML(fd->name()) << "\" "
+ << "local=\"" << locStr << "\" "
+ << "imported=\"" << impStr << "\">"
<< convertToXML(ii->includeName)
<< "</includes>"
<< endl;
@@ -543,66 +554,30 @@ void FileDef::insertMember(MemberDef *md)
{
case MemberDef::Variable:
case MemberDef::Property:
- if (sortBriefDocs)
- decVarMembers.inSort(md);
- else
- decVarMembers.append(md);
- if (sortMemberDocs)
- docVarMembers.inSort(md);
- else
- docVarMembers.append(md);
+ if (sortBriefDocs) decVarMembers.inSort(md); else decVarMembers.append(md);
+ if (sortMemberDocs) docVarMembers.inSort(md); else docVarMembers.append(md);
break;
case MemberDef::Function:
- if (sortBriefDocs)
- decFuncMembers.inSort(md);
- else
- decFuncMembers.append(md);
- if (sortMemberDocs)
- docFuncMembers.inSort(md);
- else
- docFuncMembers.append(md);
+ if (sortBriefDocs) decFuncMembers.inSort(md); else decFuncMembers.append(md);
+ if (sortMemberDocs) docFuncMembers.inSort(md); else docFuncMembers.append(md);
break;
case MemberDef::Typedef:
- if (sortBriefDocs)
- decTypedefMembers.inSort(md);
- else
- decTypedefMembers.append(md);
- if (sortMemberDocs)
- docTypedefMembers.inSort(md);
- else
- docTypedefMembers.append(md);
+ if (sortBriefDocs) decTypedefMembers.inSort(md); else decTypedefMembers.append(md);
+ if (sortMemberDocs) docTypedefMembers.inSort(md); else docTypedefMembers.append(md);
break;
case MemberDef::Enumeration:
- if (sortBriefDocs)
- decEnumMembers.inSort(md);
- else
- decEnumMembers.append(md);
- if (sortMemberDocs)
- docEnumMembers.inSort(md);
- else
- docEnumMembers.append(md);
+ if (sortBriefDocs) decEnumMembers.inSort(md); else decEnumMembers.append(md);
+ if (sortMemberDocs) docEnumMembers.inSort(md); else docEnumMembers.append(md);
break;
case MemberDef::EnumValue: // enum values are shown inside their enums
break;
case MemberDef::Prototype:
- if (sortBriefDocs)
- decProtoMembers.inSort(md);
- else
- decProtoMembers.append(md);
- if (sortMemberDocs)
- docProtoMembers.inSort(md);
- else
- docProtoMembers.append(md);
+ if (sortBriefDocs) decProtoMembers.inSort(md); else decProtoMembers.append(md);
+ if (sortMemberDocs) docProtoMembers.inSort(md); else docProtoMembers.append(md);
break;
case MemberDef::Define:
- if (sortBriefDocs)
- decDefineMembers.inSort(md);
- else
- decDefineMembers.append(md);
- if (sortMemberDocs)
- docDefineMembers.inSort(md);
- else
- docDefineMembers.append(md);
+ if (sortBriefDocs) decDefineMembers.inSort(md); else decDefineMembers.append(md);
+ if (sortMemberDocs) docDefineMembers.inSort(md); else docDefineMembers.append(md);
break;
default:
err("FileDef::insertMembers(): "
@@ -693,7 +668,8 @@ void FileDef::addUsingDeclaration(Definition *d)
}
}
-void FileDef::addIncludeDependency(FileDef *fd,const char *incName,bool local)
+void FileDef::addIncludeDependency(FileDef *fd,const char *incName,bool local,
+ bool imported)
{
//printf("FileDef::addIncludeDependency(%p,%s,%d)\n",fd,incName,local);
QCString iName = fd ? fd->absFilePath().data() : incName;
@@ -703,6 +679,7 @@ void FileDef::addIncludeDependency(FileDef *fd,const char *incName,bool local)
ii->fileDef = fd;
ii->includeName = incName;
ii->local = local;
+ ii->imported = imported;
includeList->append(ii);
includeDict->insert(iName,ii);
}
@@ -759,7 +736,8 @@ void FileDef::addIncludedUsingDirectives()
}
-void FileDef::addIncludedByDependency(FileDef *fd,const char *incName,bool local)
+void FileDef::addIncludedByDependency(FileDef *fd,const char *incName,
+ bool local,bool imported)
{
//printf("FileDef::addIncludedByDependency(%p,%s,%d)\n",fd,incName,local);
QCString iName = fd ? fd->absFilePath().data() : incName;
@@ -769,6 +747,7 @@ void FileDef::addIncludedByDependency(FileDef *fd,const char *incName,bool local
ii->fileDef = fd;
ii->includeName = incName;
ii->local = local;
+ ii->imported = imported;
includedByList->append(ii);
includedByDict->insert(iName,ii);
}
@@ -970,7 +949,7 @@ static void generateIndent(QTextStream &t,DirEntry *de,int level)
}
}
-
+#if 0
static void writeDirTreeNode(QTextStream &t,Directory *root,int level)
{
QCString indent;
@@ -1001,12 +980,43 @@ static void writeDirTreeNode(QTextStream &t,Directory *root,int level)
}
}
}
+#endif
-void generateFileTree(QTextStream &t)
+static void addDirsAsGroups(Directory *root,GroupDef *parent,int level)
+{
+ GroupDef *gd=0;
+ if (root->kind()==DirEntry::Dir)
+ {
+ gd = new GroupDef("<generated>",
+ 1,
+ root->name(), // name
+ root->name() // title
+ );
+ if (parent)
+ {
+ parent->addGroup(gd);
+ }
+ else
+ {
+ Doxygen::groupSDict.append(root->name(),gd);
+ }
+ }
+ QListIterator<DirEntry> dli(root->children());
+ DirEntry *de;
+ for (dli.toFirst();(de=dli.current());++dli)
+ {
+ if (de->kind()==DirEntry::Dir)
+ {
+ addDirsAsGroups((Directory *)de,gd,level+1);
+ }
+ }
+}
+
+void generateFileTree()
{
FTVHelp::generateTreeViewImages();
- Directory *root=new Directory(0,"");
+ Directory *root=new Directory(0,"root");
root->setLast(TRUE);
FileNameListIterator fnli(Doxygen::inputNameList);
FileName *fn;
@@ -1019,12 +1029,15 @@ void generateFileTree(QTextStream &t)
mergeFileDef(root,fd);
}
}
- t << "<div class=\"directory\">\n";
- writeDirTreeNode(t,root,0);
- t << "</div>\n";
+ //t << "<div class=\"directory\">\n";
+ //writeDirTreeNode(t,root,0);
+ //t << "</div>\n";
+ addDirsAsGroups(root,0,0);
delete root;
}
+//-------------------------------------------------------------------
+
void FileDef::combineUsingRelations()
{
if (visited) return; // already done
diff --git a/src/filedef.h b/src/filedef.h
index 5d64763..c96f321 100644
--- a/src/filedef.h
+++ b/src/filedef.h
@@ -46,6 +46,7 @@ struct IncludeInfo
FileDef *fileDef;
QCString includeName;
bool local;
+ bool imported;
};
/*! \class FileDef filedef.h
@@ -140,8 +141,8 @@ class FileDef : public Definition
bool generateSourceFile() const;
- void addIncludeDependency(FileDef *fd,const char *incName,bool local);
- void addIncludedByDependency(FileDef *fd,const char *incName,bool local);
+ void addIncludeDependency(FileDef *fd,const char *incName,bool local,bool imported);
+ void addIncludedByDependency(FileDef *fd,const char *incName,bool local,bool imported);
QList<IncludeInfo> *includeFileList() const { return includeList; }
QList<IncludeInfo> *includedByFileList() const { return includedByList; }
@@ -286,7 +287,8 @@ class Directory : public DirEntry
QList<DirEntry> m_children;
};
-void generateFileTree(QTextStream &t);
+//void generateFileTree(QTextStream &t);
+void generateFileTree();
#endif
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index de1dba2..5b59560 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -709,7 +709,7 @@ void HtmlDocVisitor::visitPre(DocImage *img)
baseName=baseName.right(baseName.length()-i-1);
}
m_t << "<div align=\"center\">" << endl;
- m_t << "<img src=\"" << img->name() << "\" alt=\""
+ m_t << "<img src=\"" << img->relPath() << img->name() << "\" alt=\""
<< baseName << "\"" << htmlAttribsToString(img->attribs()) << ">" << endl;
if (img->hasCaption())
{
@@ -743,7 +743,7 @@ void HtmlDocVisitor::visitPost(DocImage *img)
void HtmlDocVisitor::visitPre(DocDotFile *df)
{
if (m_hide) return;
- writeDotFile(df->file(),"");
+ writeDotFile(df->file(),df->relPath());
m_t << "<div align=\"center\">" << endl;
if (df->hasCaption())
{
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 5866c39..69dd955 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -309,6 +309,12 @@ void HtmlGenerator::writeStyleSheetFile(QFile &file)
static void writeDefaultHeaderFile(QTextStream &t, const char *title,
const char *relPath,bool usePathCmd)
{
+ QString relPathStr;
+ if (usePathCmd)
+ relPathStr="$relpath$";
+ else
+ relPathStr=relPath;
+
t << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"
"<html><head>"
"<meta http-equiv=\"Content-Type\" content=\"text/html;charset="
@@ -320,11 +326,7 @@ static void writeDefaultHeaderFile(QTextStream &t, const char *title,
t << "href=\"";
if (Config_getString("HTML_STYLESHEET").isEmpty())
{
- if (usePathCmd)
- t << "$relpath$";
- else
- t << relPath;
- t << "doxygen.css";
+ t << relPathStr << "doxygen.css";
}
else
{
@@ -334,7 +336,7 @@ static void writeDefaultHeaderFile(QTextStream &t, const char *title,
{
err("Error: user specified HTML style sheet file does not exist!\n");
}
- t << cssfi.fileName();
+ t << relPathStr << cssfi.fileName();
}
t << "\" rel=\"stylesheet\" type=\"text/css\">\n"
"</head><body>\n";
diff --git a/src/memberdef.h b/src/memberdef.h
index 0208746..34c7164 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -93,6 +93,10 @@ class MemberDef : public Definition
NamespaceDef* getNamespaceDef() const { return nspace; }
//Definition *getCompoundDef() const;
+ // grabbing the property read/write accessor names
+ const char *getReadAccessor() const { return read; }
+ const char *getWriteAccessor() const { return write; }
+
// querying the grouping definition
GroupDef *getGroupDef() const { return group; }
Grouping::GroupPri_t getGroupPri() const { return grouppri; }
@@ -161,6 +165,8 @@ class MemberDef : public Definition
void setSectionList(Definition *d,MemberList *sl);
void setGroupDef(GroupDef *gd,Grouping::GroupPri_t pri,const QCString &fileName,int startLine,bool hasDocs);
void setExplicitExternal(bool b) { explExt=b; }
+ void setReadAccessor(const char *r) { read=r; }
+ void setWriteAccessor(const char *w) { write=w; }
void makeRelated() { related=TRUE; }
@@ -307,6 +313,8 @@ class MemberDef : public Definition
QCString type; // return type
QCString args; // function arguments/variable array specifiers
QCString bitfields; // struct member bitfields
+ QCString read; // property read accessor
+ QCString write; // property write accessor
QCString exception; // exceptions that can be thrown
QCString init; // initializer
int initLines; // number of lines in the initializer
diff --git a/src/pre.l b/src/pre.l
index a33ffe2..f052878 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -99,6 +99,7 @@ static bool g_macroExpansion; // from the configuration
static bool g_expandOnlyPredef; // from the configuration
static int g_commentCount;
static bool g_insideComment;
+static bool g_isImported;
static void setFileName(const char *name)
@@ -1065,12 +1066,12 @@ static void readIncludeFile(const QCString &inc)
if (oldFileDef)
{
// add include dependency to the file in which the #include was found
- oldFileDef->addIncludeDependency(g_yyFileDef,incFileName,localInclude);
+ oldFileDef->addIncludeDependency(g_yyFileDef,incFileName,localInclude,g_isImported);
// add included by dependency
if (g_yyFileDef)
{
//printf("Adding include dependency %s->%s\n",oldFileDef->name().data(),incFileName.data());
- g_yyFileDef->addIncludedByDependency(oldFileDef,oldFileDef->name(),localInclude);
+ g_yyFileDef->addIncludedByDependency(oldFileDef,oldFileDef->name(),localInclude,g_isImported);
}
}
FileState *fs=new FileState;
@@ -1100,12 +1101,12 @@ static void readIncludeFile(const QCString &inc)
FileDef *fd = findFileDef(Doxygen::inputNameDict,incFileName,ambig);
//printf("findFileDef(%s)=%p\n",incFileName.data(),fd);
// add include dependency to the file in which the #include was found
- oldFileDef->addIncludeDependency(fd,incFileName,localInclude);
+ oldFileDef->addIncludeDependency(fd,incFileName,localInclude,g_isImported);
// add included by dependency
if (fd)
{
//printf("Adding include dependency (2) %s->%s ambig=%d\n",oldFileDef->name().data(),fd->name().data(),ambig);
- fd->addIncludedByDependency(oldFileDef,oldFileDef->name(),localInclude);
+ fd->addIncludedByDependency(oldFileDef,oldFileDef->name(),localInclude,g_isImported);
}
}
if (Debug::isFlagSet(Debug::Preprocessor))
@@ -1386,11 +1387,13 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<ReadString>. {
g_defArgsStr+=*yytext;
}
-<Command>"include"{B}+/{ID} {
+<Command>("include"|"import"){B}+/{ID} {
+ g_isImported = yytext[1]=='m';
if (g_macroExpansion)
BEGIN(IncludeID);
}
-<Command>"include"{B}*[<"] {
+<Command>("include"|"import"){B}*[<"] {
+ g_isImported = yytext[1]=='m';
char c[2];
c[0]=yytext[yyleng-1];c[1]='\0';
g_incName=c;
diff --git a/src/scanner.l b/src/scanner.l
index 16bcd73..a81a4b0 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -837,7 +837,8 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
%x ObjCProtocolList
%x QtPropType
%x QtPropName
-%x QtPropRW
+%x QtPropRead
+%x QtPropWrite
%%
@@ -1181,7 +1182,11 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->virt = Virtual;
lineCount();
}
-<FindMembers>{B}*"abstract"{BN}+ { current->type += " abstract ";
+<FindMembers>{B}*"abstract"{BN}+ {
+ if (!insidePHP)
+ {
+ current->type += " abstract ";
+ }
current->virt = Pure;
lineCount();
}
@@ -1253,7 +1258,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
}
<FindMembers>{B}*((("disp")?"interface")|"valuetype"){BN}+ { // M$/Corba IDL interface
lineCount();
- if (insideIDL || insideJava || insideCS || insideD)
+ if (insideIDL || insideJava || insideCS || insideD || insidePHP)
{
isTypedef=FALSE;
current->section = Entry::INTERFACE_SEC;
@@ -1621,15 +1626,20 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
}
<QtPropName>{ID} {
current->name=yytext;
- BEGIN(QtPropRW);
+ BEGIN(QtPropRead);
}
-<QtPropRW>"READ" {
+<QtPropRead>"READ" {
current->memSpec |= Entry::Readable;
}
-<QtPropRW>"WRITE" {
+<QtPropRead>{ID} {
+ current->read = yytext;
+ BEGIN(QtPropWrite);
+ }
+<QtPropWrite>"WRITE" {
current->memSpec |= Entry::Writable;
}
-<QtPropRW>")" {
+<QtPropWrite>{ID} {
+ current->write = yytext;
unput(';');
BEGIN(FindMembers);
}
@@ -1666,7 +1676,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
{
addType( current ) ;
}
- bool javaLike = insideJava || insideCS || insideD;
+ bool javaLike = insideJava || insideCS || insideD || insidePHP;
if (javaLike && strcmp(yytext,"public")==0)
{
current->protection = Public;
@@ -2230,27 +2240,17 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
{
current->type = current->type.mid(3);
}
- current->type=current->type.simplifyWhiteSpace();
- current->args=removeRedundantWhiteSpace(current->args);
- // was: current->args.simplifyWhiteSpace();
- current->name=current->name.stripWhiteSpace();
- //if (!current->name.isEmpty() && current->type.left(8)=="typedef ")
- //{
- // // add typedef to dictionary
- // QCString dest = extractName(current->type.right(current->type.length()-8));
- // if (Doxygen::typedefDict[current->name]==0 && !dest.isEmpty())
- // {
- // //printf("1>>>>>>>>>> adding %s->%s\n",current->name.data(),dest.data());
- // QCString scope;
- // if (current_root->section & Entry::SCOPE_MASK) scope=current_root->name;
- // Doxygen::typedefDict.insert(current->name, new TypedefInfo(dest,scope));
- // }
- //}
- current->section = Entry::VARIABLE_SEC ;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- //printf("New variable type=`%s' name=`%s' groupId=%d\n",current->type.data(),current->name.data(),current->mGrpId);
- current_root->addSubEntry( current ) ;
+ if (!current->name.isEmpty() && current->section!=Entry::ENUM_SEC)
+ {
+ current->type=current->type.simplifyWhiteSpace();
+ current->args=removeRedundantWhiteSpace(current->args);
+ current->name=current->name.stripWhiteSpace();
+ current->section = Entry::VARIABLE_SEC ;
+ current->fileName = yyFileName;
+ current->startLine = yyLineNr;
+ //printf("New variable type=`%s' name=`%s' groupId=%d\n",current->type.data(),current->name.data(),current->mGrpId);
+ current_root->addSubEntry( current ) ;
+ }
if ( *yytext == ',')
{
current = new Entry(*current);
@@ -3558,15 +3558,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
roundCount=0;
BEGIN(SkipUnionSwitch);
}
- else if (insideJava && (strcmp(yytext,"implements")==0 || strcmp(yytext,"extends")==0))
- {
- current->type.resize(0);
- baseProt=Public;
- baseVirt=Normal;
- baseName.resize(0);
- BEGIN( BasesProt ) ;
- }
- else if (insidePHP && (strcmp(yytext,"extends")==0))
+ else if ((insideJava || insidePHP) && (strcmp(yytext,"implements")==0 || strcmp(yytext,"extends")==0))
{
current->type.resize(0);
baseProt=Public;
@@ -3684,10 +3676,10 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
BEGIN( ReadBody ) ;
}
}
-<BasesProt>"virtual" { baseVirt = Virtual; }
-<BasesProt>"public" { baseProt = Public; }
-<BasesProt>"protected" { baseProt = Protected; }
-<BasesProt>"private" { baseProt = Private; }
+<BasesProt>"virtual"{BN}+ { lineCount(); baseVirt = Virtual; }
+<BasesProt>"public"{BN}+ { lineCount(); baseProt = Public; }
+<BasesProt>"protected"{BN}+ { lineCount(); baseProt = Protected; }
+<BasesProt>"private"{BN}+ { lineCount(); baseProt = Private; }
<BasesProt>{BN} { lineCount(); }
<BasesProt>. { unput(*yytext); BEGIN(Bases); }
<Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID} {
diff --git a/src/tagreader.cpp b/src/tagreader.cpp
index d8df9f8..5716cc9 100644
--- a/src/tagreader.cpp
+++ b/src/tagreader.cpp
@@ -99,6 +99,7 @@ class TagIncludeInfo
QString name;
QString text;
bool isLocal;
+ bool isImported;
};
/*! Container for file specific info that can be read from a tagfile */
@@ -470,6 +471,7 @@ class TagFileParser : public QXmlDefaultHandler
m_curIncludes->id = attrib.value("id");
m_curIncludes->name = attrib.value("name");
m_curIncludes->isLocal = attrib.value("local")=="yes" ? TRUE : FALSE;
+ m_curIncludes->isImported = attrib.value("imported")=="yes" ? TRUE : FALSE;
m_curFile->includes.append(m_curIncludes);
}
else
@@ -1215,7 +1217,7 @@ void TagFileParser::addIncludes()
// ifd->getOutputFileBase().data(),ii->id.data());
if (ifd->getOutputFileBase()==QCString(ii->id))
{
- fd->addIncludeDependency(ifd,ii->text,ii->isLocal);
+ fd->addIncludeDependency(ifd,ii->text,ii->isLocal,ii->isImported);
}
}
}
diff --git a/src/translator_cn.h b/src/translator_cn.h
index 7b2756a..41a4ebc 100644
--- a/src/translator_cn.h
+++ b/src/translator_cn.h
@@ -24,7 +24,7 @@
*/
#define CN_SPC
-class TranslatorChinese : public TranslatorAdapter_1_3_3
+class TranslatorChinese : public Translator
{
public:
/*! Used for identification of the language. The identification
@@ -1467,9 +1467,22 @@ class TranslatorChinese : public TranslatorAdapter_1_3_3
*/
virtual QCString trSearchMatches()
{
- return "Matches:";
+ /* return "Matches:"; */
return "符合的结果:";
}
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.8
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used in HTML as the title of page with source code for file filename
+ */
+ virtual QCString trSourceFile(QCString& filename)
+ {
+ /* return filename + " Source File"; */
+ return filename + CN_SPC"源文件";
+ }
+
};
#endif
diff --git a/src/translator_de.h b/src/translator_de.h
index 7af7cc8..6394f98 100644
--- a/src/translator_de.h
+++ b/src/translator_de.h
@@ -84,13 +84,16 @@
// - Updated a few strings which changed in CVS revision 1.22
// ("compound" vs. "class")
//
+// 2004/08/01 Jens Seidel (jensseidel@users.sourceforge.net)
+// - Updated for "new since 1.3.8" version
+//
// Todo:
// - see FIXME
#ifndef TRANSLATOR_DE_H
#define TRANSLATOR_DE_H
-class TranslatorGerman : public TranslatorAdapter_1_3_8
+class TranslatorGerman : public Translator
{
public:
@@ -156,7 +159,7 @@ class TranslatorGerman : public TranslatorAdapter_1_3_8
/*! this is the text of a link put after brief descriptions. */
virtual QCString trMore()
- { return "Mehr..."; }
+ { return "Mehr ..."; }
/*! put in the class documentation */
virtual QCString trListOfAllMembers()
@@ -1604,6 +1607,18 @@ class TranslatorGerman : public TranslatorAdapter_1_3_8
{
return "Treffer:";
}
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.8
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used in HTML as the title of page with source code for file filename
+ */
+ virtual QCString trSourceFile(QCString& filename)
+ {
+ return filename + " Quellcode";
+ }
+
};
#endif
diff --git a/src/translator_dk.h b/src/translator_dk.h
index 38deea3..ea350f1 100644
--- a/src/translator_dk.h
+++ b/src/translator_dk.h
@@ -72,7 +72,7 @@
#ifndef TRANSLATOR_DK_H
#define TRANSLATOR_DK_H
-class TranslatorDanish : public TranslatorAdapter_1_3_8
+class TranslatorDanish : public Translator
{
public:
@@ -1445,6 +1445,19 @@ class TranslatorDanish : public TranslatorAdapter_1_3_8
return "Fundne ord:"; //translation?
}
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.8
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used in HTML as the title of page with source code for
+ * file filename
+ */
+ virtual QCString trSourceFile(QCString& filename)
+ {
+ return "Kildefilen " + filename;
+ }
+
+
/*---------- For internal use: ----------------------------------------*/
protected:
/*! For easy flexible-noun implementation.
diff --git a/src/translator_se.h b/src/translator_se.h
index 2b07dd9..0d3866f 100644
--- a/src/translator_se.h
+++ b/src/translator_se.h
@@ -69,7 +69,7 @@ Problem!
#ifndef TRANSLATOR_SE_H
#define TRANSLATOR_SE_H
-class TranslatorSwedish : public TranslatorAdapter_1_3_3
+class TranslatorSwedish : public TranslatorAdapter_1_3_8
{
public:
@@ -1350,7 +1350,56 @@ class TranslatorSwedish : public TranslatorAdapter_1_3_3
return "H鋜 鋜 anropnings diagrammet f鰎 den h鋜 funktionen:";
}
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.3
+//////////////////////////////////////////////////////////////////////////
+ /*! When the search engine is enabled this text is put in the header
+ * of each page before the field where one can enter the text to search
+ * for.
+ */
+ virtual QCString trSearchForIndex()
+ {
+ return "S鰇 efter";
+ }
+ /*! This string is used as the title for the page listing the search
+ * results.
+ */
+ virtual QCString trSearchResultsTitle()
+ {
+ return "S鰇resultat";
+ }
+ /*! This string is put just before listing the search results. The
+ * text can be different depending on the number of documents found.
+ * Inside the text you can put the special marker $num to insert
+ * the number representing the actual number of search results.
+ * The @a numDocuments parameter can be either 0, 1 or 2, where the
+ * value 2 represents 2 or more matches. HTML markup is allowed inside
+ * the returned string.
+ */
+ virtual QCString trSearchResults(int numDocuments)
+ {
+ if (numDocuments==0)
+ {
+ return "Tyv鋜r finns det inga dokument som matchar din s鰇ning.";
+ }
+ else if (numDocuments==1)
+ {
+ return "Hittade <b>1</b> dokument som matchar din s鰇ning.";
+ }
+ else
+ {
+ return "Hittade <b>$num</b> dokument som matchar din s鰇ning. "
+ "Visar de b鋝ta tr鋐farna f鰎st.";
+ }
+ }
+ /*! This string is put before the list of matched words, for each search
+ * result. What follows is the list of words that matched the query.
+ */
+ virtual QCString trSearchMatches()
+ {
+ return "Tr鋐far:";
+ }
};
diff --git a/src/util.cpp b/src/util.cpp
index 193dded..f2ef4c3 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1010,7 +1010,6 @@ ClassDef *getResolvedClassRec(Definition *scope,
QCString name=n;
QCString explicitScopePart;
- //int qualifierIndex = name.findRev("::"); // todo: deal with cases like A<B::C>
int qualifierIndex = computeQualifiedIndex(name);
//printf("name=%s qualifierIndex=%d\n",name.data(),qualifierIndex);
if (qualifierIndex!=-1) // qualified name
@@ -1032,7 +1031,6 @@ ClassDef *getResolvedClassRec(Definition *scope,
//printf("Looking for symbol %s result=%p\n",name.data(),dl);
if (dl==0)
{
- // name is not a known symbol
return 0;
}
@@ -1181,7 +1179,7 @@ ClassDef *getResolvedClass(Definition *scope,
}
//printf("getResolvedClass(%s,%s)=%s\n",scope?scope->name().data():"<global>",
// n,result?result->name().data():"<none>");
- //
+
return result;
}
@@ -4120,14 +4118,22 @@ QCString substituteTemplateArgumentsInString(
++formAli,actArg=actualArgs->next()
)
{
- //printf("n=%s formArg->type=%s formArg->name=%s\n",
- // n.data(),formArg->type.data(),formArg->name.data());
if (formArg->type=="class" || formArg->type=="typename")
{
+ //printf("n=%s formArg->type=%s formArg->name=%si formArg->defval=%s\n",
+ // n.data(),formArg->type.data(),formArg->name.data(),formArg->defval.data());
if (formArg->name==n && actArg && !actArg->type.isEmpty()) // base class is a template argument
{
// replace formal argument with the actual argument of the instance
- result += actArg->type+" ";
+ if (actArg->name.isEmpty())
+ {
+ result += actArg->type+" ";
+ }
+ else // for case where the actual arg is something like "unsigned int"
+ // the "int" part is in actArg->name.
+ {
+ result += actArg->type+" "+actArg->name+" ";
+ }
found=TRUE;
}
else if (formArg->name==n && actArg==0 && !formArg->defval.isEmpty() &&
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index ef9a490..7b51deb 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -619,6 +619,15 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De
}
t << " <name>" << convertToXML(md->name()) << "</name>" << endl;
+
+ if (md->memberType() == MemberDef::Property)
+ {
+ if (md->isReadable())
+ t << " <read>" << convertToXML(md->getReadAccessor()) << "</read>" << endl;
+ if (md->isWritable())
+ t << " <write>" << convertToXML(md->getWriteAccessor()) << "</write>" << endl;
+ }
+
MemberDef *rmd = md->reimplements();
if (rmd)
{