diff options
Diffstat (limited to 'src/memberdef.cpp')
-rw-r--r-- | src/memberdef.cpp | 71 |
1 files changed, 47 insertions, 24 deletions
diff --git a/src/memberdef.cpp b/src/memberdef.cpp index c708ffd..7bbfed4 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -140,9 +140,14 @@ static bool writeDefArgumentList(OutputList &ol,ClassDef *cd, //if (!md->isDefine()) ol.startParameter(TRUE); else ol.docify(" "); bool first=TRUE; + bool paramTypeStarted=FALSE; while (a) { - if (md->isDefine() || first) ol.startParameterType(first,md->isObjCMethod()?"dummy":0); + if (md->isDefine() || first) + { + ol.startParameterType(first,md->isObjCMethod()?"dummy":0); + paramTypeStarted=TRUE; + } QRegExp re(")("),res("(.*\\*"); int vp=a->type.find(re); int wp=a->type.find(res); @@ -179,7 +184,11 @@ static bool writeDefArgumentList(OutputList &ol,ClassDef *cd, } if (!md->isDefine()) { - ol.endParameterType(); + if (paramTypeStarted) + { + ol.endParameterType(); + paramTypeStarted=FALSE; + } ol.startParameterName(defArgList->count()<2); } if (hasFuncPtrType) @@ -236,7 +245,16 @@ static bool writeDefArgumentList(OutputList &ol,ClassDef *cd, if (key!=",") key+=":"; // for normal keywords add colon } ol.endParameterName(FALSE,FALSE,!md->isObjCMethod()); + if (paramTypeStarted) + { + ol.endParameterType(); + } ol.startParameterType(FALSE,key); + paramTypeStarted=TRUE; + } + else + { + ol.endParameterName(FALSE,FALSE,TRUE); } } first=FALSE; @@ -1497,7 +1515,6 @@ void MemberDef::writeDeclaration(OutputList &ol, //ol.startEmphasis(); ol.popGeneratorState(); } - //ol.newParagraph(); ol.endMemberDescription(); } warnIfUndocumented(); @@ -1926,10 +1943,11 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ol.endDoxyAnchor(cfname,memAnchor); ol.startIndent(); - ol.pushGeneratorState(); - ol.disable(OutputGenerator::RTF); - ol.newParagraph(); - ol.popGeneratorState(); + // FIXME:PARA + //ol.pushGeneratorState(); + //ol.disable(OutputGenerator::RTF); + //ol.newParagraph(); + //ol.popGeneratorState(); /* write multi-line initializer (if any) */ if (hasMultiLineInitializer() @@ -1969,8 +1987,11 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ) ) { - ol.parseDoc(briefFile(),briefLine(),getOuterScope()?getOuterScope():container,this,brief,FALSE,FALSE); - ol.newParagraph(); + ol.startParagraph(); + ol.parseDoc(briefFile(),briefLine(), + getOuterScope()?getOuterScope():container,this, + brief,FALSE,FALSE,0,TRUE,FALSE); + ol.endParagraph(); } /* write detailed description */ @@ -1980,8 +2001,9 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ol.parseDoc(docFile(),docLine(),getOuterScope()?getOuterScope():container,this,detailed+"\n",TRUE,FALSE); if (!inbodyDocumentation().isEmpty()) { - ol.newParagraph(); + ol.startParagraph(); ol.parseDoc(inbodyFile(),inbodyLine(),getOuterScope()?getOuterScope():container,this,inbodyDocumentation()+"\n",TRUE,FALSE); + ol.endParagraph(); } } else if (!brief.isEmpty() && (Config_getBool("REPEAT_BRIEF") || @@ -1989,7 +2011,6 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, { if (!inbodyDocumentation().isEmpty()) { - ol.newParagraph(); ol.parseDoc(inbodyFile(),inbodyLine(),getOuterScope()?getOuterScope():container,this,inbodyDocumentation()+"\n",TRUE,FALSE); } } @@ -2068,9 +2089,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, { if (first) { - //ol.newParagraph(); ol.startSimpleSect(BaseOutputDocInterface::EnumValues,0,0,theTranslator->trEnumerationValues()+": "); - ol.writeDescItem(); + ol.startDescForItem(); ol.startDescTable(); } @@ -2110,13 +2130,13 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, if (!fmd->briefDescription().isEmpty()) { ol.parseDoc(fmd->briefFile(),fmd->briefLine(),getOuterScope()?getOuterScope():container,fmd,fmd->briefDescription(),TRUE,FALSE); - //ol.newParagraph(); - } - if (!fmd->briefDescription().isEmpty() && - !fmd->documentation().isEmpty()) - { - ol.newParagraph(); } + // FIXME:PARA + //if (!fmd->briefDescription().isEmpty() && + // !fmd->documentation().isEmpty()) + //{ + // ol.newParagraph(); + //} if (!fmd->documentation().isEmpty()) { ol.parseDoc(fmd->docFile(),fmd->docLine(),getOuterScope()?getOuterScope():container,fmd,fmd->documentation()+"\n",TRUE,FALSE); @@ -2130,6 +2150,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, { //ol.endItemList(); ol.endDescTable(); + ol.endDescForItem(); ol.endSimpleSect(); ol.writeChar('\n'); } @@ -2269,9 +2290,9 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, if (hasExamples()) { ol.startSimpleSect(BaseOutputDocInterface::Examples,0,0,theTranslator->trExamples()+": "); - ol.writeDescItem(); + ol.startDescForItem(); writeExample(ol,m_impl->exampleSDict); - //ol.endDescItem(); + ol.endDescForItem(); ol.endSimpleSect(); } @@ -2296,10 +2317,11 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, { msg("Generating call graph for function %s\n",qualifiedName().data()); ol.disable(OutputGenerator::Man); - ol.newParagraph(); + ol.startParagraph(); ol.startCallGraph(); ol.parseText(theTranslator->trCallGraph()); ol.endCallGraph(callGraph); + ol.endParagraph(); ol.enableAll(); } } @@ -2312,10 +2334,11 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, { msg("Generating caller graph for function %s\n",qualifiedName().data()); ol.disable(OutputGenerator::Man); - ol.newParagraph(); + ol.startParagraph(); ol.startCallGraph(); ol.parseText(theTranslator->trCallerGraph()); ol.endCallGraph(callerGraph); + ol.endParagraph(); ol.enableAll(); } } @@ -2518,7 +2541,7 @@ void MemberDef::setAnchor(const char *a) QCString sigStr(33); MD5Buffer((const unsigned char *)memAnchor.data(),memAnchor.length(),md5_sig); MD5SigToString(md5_sig,sigStr.data(),33); - m_impl->anc = sigStr; + m_impl->anc = "a"+sigStr; } void MemberDef::setGroupDef(GroupDef *gd,Grouping::GroupPri_t pri, |