diff options
-rw-r--r-- | src/arguments.cpp | 17 | ||||
-rw-r--r-- | src/arguments.h | 12 | ||||
-rw-r--r-- | src/classdef.cpp | 4 | ||||
-rw-r--r-- | src/configimpl.l | 8 | ||||
-rw-r--r-- | src/context.cpp | 12 | ||||
-rw-r--r-- | src/defargs.l | 6 | ||||
-rw-r--r-- | src/dirdef.cpp | 6 | ||||
-rw-r--r-- | src/filedef.cpp | 6 | ||||
-rw-r--r-- | src/groupdef.cpp | 20 | ||||
-rw-r--r-- | src/mangen.cpp | 2 | ||||
-rw-r--r-- | src/memberdef.cpp | 8 | ||||
-rw-r--r-- | src/namespacedef.cpp | 4 | ||||
-rw-r--r-- | src/pagedef.cpp | 10 | ||||
-rw-r--r-- | src/plantuml.cpp | 2 | ||||
-rw-r--r-- | src/scanner.l | 9 | ||||
-rw-r--r-- | src/translator_es.h | 4 | ||||
-rwxr-xr-x | src/util.cpp | 14 | ||||
-rw-r--r-- | src/xmlgen.cpp | 7 | ||||
-rw-r--r-- | templates/html/htmlmemdef.tpl | 2 | ||||
-rw-r--r-- | templates/xml/compound.xsd | 8 |
20 files changed, 137 insertions, 24 deletions
diff --git a/src/arguments.cpp b/src/arguments.cpp index 095aa96..a828dab 100644 --- a/src/arguments.cpp +++ b/src/arguments.cpp @@ -33,6 +33,7 @@ ArgumentList *ArgumentList::deepCopy() const argList->pureSpecifier = pureSpecifier; argList->trailingReturnType = trailingReturnType; argList->isDeleted = isDeleted; + argList->refQualifier = refQualifier; return argList; } @@ -63,6 +64,7 @@ ArgumentList *ArgumentList::unmarshal(StorageIntf *s) result->pureSpecifier = unmarshalBool(s); result->trailingReturnType = unmarshalQCString(s); result->isDeleted = unmarshalBool(s); + result->refQualifier = (RefQualifierType)unmarshalInt(s); return result; } @@ -81,13 +83,13 @@ void ArgumentList::marshal(StorageIntf *s,ArgumentList *argList) Argument *a; for (ali.toFirst();(a=ali.current());++ali) { - marshalQCString(s,a->attrib); - marshalQCString(s,a->type); - marshalQCString(s,a->canType); - marshalQCString(s,a->name); - marshalQCString(s,a->array); - marshalQCString(s,a->defval); - marshalQCString(s,a->docs); + marshalQCString(s,a->attrib); + marshalQCString(s,a->type); + marshalQCString(s,a->canType); + marshalQCString(s,a->name); + marshalQCString(s,a->array); + marshalQCString(s,a->defval); + marshalQCString(s,a->docs); marshalQCString(s,a->typeConstraint); } } @@ -96,6 +98,7 @@ void ArgumentList::marshal(StorageIntf *s,ArgumentList *argList) marshalBool(s,argList->pureSpecifier); marshalQCString(s,argList->trailingReturnType); marshalBool(s,argList->isDeleted); + marshalInt(s,(int)argList->refQualifier); } } diff --git a/src/arguments.h b/src/arguments.h index 555b573..3af7134 100644 --- a/src/arguments.h +++ b/src/arguments.h @@ -73,6 +73,13 @@ struct Argument QCString typeConstraint; /*!< Used for Java generics: \<T extends C\> */ }; +enum RefQualifierType +{ + RefQualifierNone, + RefQualifierLValue, + RefQualifierRValue +}; + /*! \brief This class represents an function or template argument list. * * This class also stores some information about member that is typically @@ -87,7 +94,8 @@ class ArgumentList : public QList<Argument> constSpecifier(FALSE), volatileSpecifier(FALSE), pureSpecifier(FALSE), - isDeleted(FALSE) + isDeleted(FALSE), + refQualifier(RefQualifierNone) { setAutoDelete(TRUE); } /*! Destroys the argument list */ ~ArgumentList() {} @@ -105,6 +113,8 @@ class ArgumentList : public QList<Argument> QCString trailingReturnType; /*! method with =delete */ bool isDeleted; + /*! C++11 ref qualifier */ + RefQualifierType refQualifier; static ArgumentList *unmarshal(StorageIntf *s); static void marshal(StorageIntf *s,ArgumentList *argList); diff --git a/src/classdef.cpp b/src/classdef.cpp index c987d98..51fb8c6 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -954,6 +954,10 @@ void ClassDef::writeBriefDescription(OutputList &ol,bool exampleFlag) if (hasBriefDescription()) { ol.startParagraph(); + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Man); + ol.writeString(" - "); + ol.popGeneratorState(); ol.generateDoc(briefFile(),briefLine(),this,0, briefDescription(),TRUE,FALSE,0,TRUE,FALSE); ol.pushGeneratorState(); diff --git a/src/configimpl.l b/src/configimpl.l index aa80a30..df032a6 100644 --- a/src/configimpl.l +++ b/src/configimpl.l @@ -1763,10 +1763,10 @@ void Config::postProcess(bool clearHeaderAndFooter) // refers to the files that we are supposed to parse. if (clearHeaderAndFooter) { - Config_getString(HTML_HEADER)=""; - Config_getString(HTML_FOOTER)=""; - Config_getString(LATEX_HEADER)=""; - Config_getString(LATEX_FOOTER)=""; + ConfigImpl_getString("HTML_HEADER")=""; + ConfigImpl_getString("HTML_FOOTER")=""; + ConfigImpl_getString("LATEX_HEADER")=""; + ConfigImpl_getString("LATEX_FOOTER")=""; } } diff --git a/src/context.cpp b/src/context.cpp index f2f1419..e13aa69 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -3969,6 +3969,8 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private> s_inst.addProperty("parameters", &Private::parameters); s_inst.addProperty("hasConstQualifier", &Private::hasConstQualifier); s_inst.addProperty("hasVolatileQualifier",&Private::hasVolatileQualifier); + s_inst.addProperty("hasRefQualifierLValue", &Private::hasRefQualifierLValue); + s_inst.addProperty("hasRefQualifierRValue", &Private::hasRefQualifierRValue); s_inst.addProperty("trailingReturnType", &Private::trailingReturnType); s_inst.addProperty("extraTypeChars", &Private::extraTypeChars); s_inst.addProperty("templateDecls", &Private::templateDecls); @@ -4571,6 +4573,16 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private> ArgumentList *al = getDefArgList(); return al ? al->volatileSpecifier : FALSE; } + TemplateVariant hasRefQualifierLValue() const + { + ArgumentList *al = getDefArgList(); + return al ? al->refQualifier==RefQualifierLValue : FALSE; + } + TemplateVariant hasRefQualifierRValue() const + { + ArgumentList *al = getDefArgList(); + return al ? al->refQualifier==RefQualifierRValue : FALSE; + } TemplateVariant trailingReturnType() const { ArgumentList *al = getDefArgList(); diff --git a/src/defargs.l b/src/defargs.l index b0607d8..a55ad27 100644 --- a/src/defargs.l +++ b/src/defargs.l @@ -479,6 +479,12 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" <FuncQual>"volatile" { g_argList->volatileSpecifier=TRUE; } +<FuncQual>"&" { + g_argList->refQualifier=RefQualifierLValue; + } +<FuncQual>"&&" { + g_argList->refQualifier=RefQualifierRValue; + } <FuncQual,TrailingReturn>"="{B}*"0" { g_argList->pureSpecifier=TRUE; BEGIN(FuncQual); diff --git a/src/dirdef.cpp b/src/dirdef.cpp index d6f4f55..0a63c1e 100644 --- a/src/dirdef.cpp +++ b/src/dirdef.cpp @@ -170,13 +170,17 @@ void DirDef::writeDetailedDescription(OutputList &ol,const QCString &title) void DirDef::writeBriefDescription(OutputList &ol) { - if (!briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC)) + if (hasBriefDescription()) { DocRoot *rootNode = validatingParseDoc( briefFile(),briefLine(),this,0,briefDescription(),TRUE,FALSE); if (rootNode && !rootNode->isEmpty()) { ol.startParagraph(); + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Man); + ol.writeString(" - "); + ol.popGeneratorState(); ol.writeDoc(rootNode,this,0); ol.pushGeneratorState(); ol.disable(OutputGenerator::RTF); diff --git a/src/filedef.cpp b/src/filedef.cpp index 0a1e6e2..9c04dc8 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -365,7 +365,7 @@ void FileDef::writeDetailedDescription(OutputList &ol,const QCString &title) void FileDef::writeBriefDescription(OutputList &ol) { - if (!briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC)) + if (hasBriefDescription()) { DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0, briefDescription(),TRUE,FALSE,0,TRUE,FALSE); @@ -373,6 +373,10 @@ void FileDef::writeBriefDescription(OutputList &ol) if (rootNode && !rootNode->isEmpty()) { ol.startParagraph(); + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Man); + ol.writeString(" - "); + ol.popGeneratorState(); ol.writeDoc(rootNode,this,0); ol.pushGeneratorState(); ol.disable(OutputGenerator::RTF); diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 6b6d659..ccfa0df 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -711,6 +711,7 @@ void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title) || !documentation().isEmpty() || !inbodyDocumentation().isEmpty() ) { + ol.pushGeneratorState(); if (pageDict->count()!=countMembers()) // not only pages -> classical layout { ol.pushGeneratorState(); @@ -721,10 +722,15 @@ void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title) ol.disableAllBut(OutputGenerator::Html); ol.writeAnchor(0,"details"); ol.popGeneratorState(); - ol.startGroupHeader(); - ol.parseText(title); - ol.endGroupHeader(); } + else + { + ol.disableAllBut(OutputGenerator::Man); // always print title for man page + } + ol.startGroupHeader(); + ol.parseText(title); + ol.endGroupHeader(); + ol.popGeneratorState(); // repeat brief description if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF)) @@ -762,13 +768,17 @@ void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title) void GroupDef::writeBriefDescription(OutputList &ol) { - if (!briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC)) + if (hasBriefDescription()) { DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0, briefDescription(),TRUE,FALSE,0,TRUE,FALSE); if (rootNode && !rootNode->isEmpty()) { ol.startParagraph(); + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Man); + ol.writeString(" - "); + ol.popGeneratorState(); ol.writeDoc(rootNode,this,0); ol.pushGeneratorState(); ol.disable(OutputGenerator::RTF); @@ -789,6 +799,7 @@ void GroupDef::writeBriefDescription(OutputList &ol) } delete rootNode; } + ol.writeSynopsis(); } void GroupDef::writeGroupGraph(OutputList &ol) @@ -1091,7 +1102,6 @@ void GroupDef::writeDocumentation(OutputList &ol) ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Man); ol.endTitleHead(getOutputFileBase(),name()); - ol.parseText(title); ol.popGeneratorState(); ol.endHeaderSection(); ol.startContents(); diff --git a/src/mangen.cpp b/src/mangen.cpp index 963f66c..2f4d3ae 100644 --- a/src/mangen.cpp +++ b/src/mangen.cpp @@ -191,7 +191,7 @@ void ManGenerator::endTitleHead(const char *,const char *name) t << ".ad l" << endl; t << ".nh" << endl; t << ".SH NAME" << endl; - t << name << " \\- "; + t << name; firstCol=FALSE; paragraph=TRUE; inHeader=TRUE; diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 952be64..05f8c94 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -357,6 +357,14 @@ static bool writeDefArgumentList(OutputList &ol,Definition *scope,MemberDef *md) { ol.docify(" volatile"); } + if (defArgList->refQualifier==RefQualifierLValue) + { + ol.docify(" &"); + } + else if (defArgList->refQualifier==RefQualifierRValue) + { + ol.docify(" &&"); + } if (!defArgList->trailingReturnType.isEmpty()) { linkifyText(TextGeneratorOLImpl(ol), // out diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index c04fa7b..29f68a4 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -408,6 +408,10 @@ void NamespaceDef::writeBriefDescription(OutputList &ol) if (rootNode && !rootNode->isEmpty()) { ol.startParagraph(); + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Man); + ol.writeString(" - "); + ol.popGeneratorState(); ol.writeDoc(rootNode,this,0); ol.pushGeneratorState(); ol.disable(OutputGenerator::RTF); diff --git a/src/pagedef.cpp b/src/pagedef.cpp index 6146a3c..1210305 100644 --- a/src/pagedef.cpp +++ b/src/pagedef.cpp @@ -229,12 +229,20 @@ void PageDef::writePageDocumentation(OutputList &ol) } ol.startTextBlock(); + QCString docStr = documentation()+inbodyDocumentation(); + if (!docStr.isEmpty()) + { + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Man); + ol.writeString(" - "); + ol.popGeneratorState(); + } ol.generateDoc( docFile(), // fileName docLine(), // startLine this, // context 0, // memberdef - documentation()+inbodyDocumentation(), // docStr + docStr, // docStr TRUE, // index words FALSE // not an example ); diff --git a/src/plantuml.cpp b/src/plantuml.cpp index 8e40f36..1171289 100644 --- a/src/plantuml.cpp +++ b/src/plantuml.cpp @@ -75,7 +75,7 @@ void generatePlantUMLOutput(const char *baseName,const char *outDir,PlantUMLOutp } if (pumlIncludePathList.first()) pumlArgs += "\" "; pumlArgs += "-Djava.awt.headless=true -jar \""+plantumlJarPath+"plantuml.jar\" "; - if (plantumlConfigFile != "") + if (!plantumlConfigFile.isEmpty()) { pumlArgs += "-config \""; pumlArgs += plantumlConfigFile; diff --git a/src/scanner.l b/src/scanner.l index 9c32666..a310f4f 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -4659,6 +4659,15 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) roundCount=0; BEGIN(CopyRound); } +<FuncQual>{BN}*"&" { + current->args += " &"; + current->argList->refQualifier=RefQualifierLValue; + } +<FuncQual>{BN}*"&&" { + current->args += " &&"; + current->argList->refQualifier=RefQualifierRValue; + } + <FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* { // pure virtual member function lineCount() ; current->args += " = 0"; diff --git a/src/translator_es.h b/src/translator_es.h index 5cdbb1f..8922297 100644 --- a/src/translator_es.h +++ b/src/translator_es.h @@ -406,13 +406,13 @@ class TranslatorSpanish : public Translator * list of defines */ virtual QCString trDefines() - { return "'defines'"; } + { return "defines"; } /*! This is used in the documentation of a file as a header before the * list of typedefs */ virtual QCString trTypedefs() - { return "'typedefs'"; } + { return "typedefs"; } /*! This is used in the documentation of a file as a header before the * list of enumerations diff --git a/src/util.cpp b/src/util.cpp index 3593c9d..6f7703b 100755 --- a/src/util.cpp +++ b/src/util.cpp @@ -2268,6 +2268,8 @@ QCString argListToString(ArgumentList *al,bool useCanonicalType,bool showDefVals result+=")"; if (al->constSpecifier) result+=" const"; if (al->volatileSpecifier) result+=" volatile"; + if (al->refQualifier==RefQualifierLValue) result+=" &"; + else if (al->refQualifier==RefQualifierRValue) result+=" &&"; if (!al->trailingReturnType.isEmpty()) result+=" -> "+al->trailingReturnType; if (al->pureSpecifier) result+=" =0"; return removeRedundantWhiteSpace(result); @@ -3362,6 +3364,12 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl, } } + if (srcAl->refQualifier != dstAl->refQualifier) + { + NOMATCH + return FALSE; // one member is has a different ref-qualifier than the other + } + // so far the argument list could match, so we need to compare the types of // all arguments. ArgumentListIterator srcAli(*srcAl),dstAli(*dstAl); @@ -3795,6 +3803,12 @@ bool matchArguments2(Definition *srcScope,FileDef *srcFileScope,ArgumentList *sr } } + if (srcAl->refQualifier != dstAl->refQualifier) + { + NOMATCH + return FALSE; // one member is has a different ref-qualifier than the other + } + // so far the argument list could match, so we need to compare the types of // all arguments. ArgumentListIterator srcAli(*srcAl),dstAli(*dstAl); diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index a00c17e..fe95c7a 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -620,6 +620,13 @@ static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,De if (md->isInline()) t << "yes"; else t << "no"; t << "\""; + if (al->refQualifier!=RefQualifierNone) + { + t << " refqual=\""; + if (al->refQualifier==RefQualifierLValue) t << "lvalue"; else t << "rvalue"; + t << "\""; + } + if (md->isFinal()) { t << " final=\"yes\""; diff --git a/templates/html/htmlmemdef.tpl b/templates/html/htmlmemdef.tpl index 2b03a22..cb9c9e0 100644 --- a/templates/html/htmlmemdef.tpl +++ b/templates/html/htmlmemdef.tpl @@ -94,6 +94,8 @@ {{ member.extraTypeChars }} {% if member.hasConstQualifier %} const {% endif %} {% if member.hasVolatileQualifier %} volatile {% endif %} + {% if member.hasRefQualifierLValue %} & {% endif %} + {% if member.hasRefQualifierRValue %} && {% endif %} {{ member.trailingReturnType }} {% endif %} {% endif %} diff --git a/templates/xml/compound.xsd b/templates/xml/compound.xsd index c960c7b..f2ab42c 100644 --- a/templates/xml/compound.xsd +++ b/templates/xml/compound.xsd @@ -149,6 +149,7 @@ <xsd:attribute name="const" type="DoxBool" use="optional"/> <xsd:attribute name="explicit" type="DoxBool" use="optional"/> <xsd:attribute name="inline" type="DoxBool" use="optional"/> + <xsd:attribute name="refqual" type="DoxRefQualifierKind" use="optional"/> <xsd:attribute name="virt" type="DoxVirtualKind" use="optional"/> <xsd:attribute name="volatile" type="DoxBool" use="optional"/> <xsd:attribute name="mutable" type="DoxBool" use="optional"/> @@ -689,6 +690,13 @@ </xsd:restriction> </xsd:simpleType> + <xsd:simpleType name="DoxRefQualifierKind"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="lvalue" /> + <xsd:enumeration value="rvalue" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="DoxLanguage"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="Unknown" /> |