diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/classdef.cpp | 120 | ||||
-rw-r--r-- | src/config.l | 1 | ||||
-rw-r--r-- | src/doc.l | 147 | ||||
-rw-r--r-- | src/dot.cpp | 33 | ||||
-rw-r--r-- | src/dot.h | 6 | ||||
-rw-r--r-- | src/doxygen.cpp | 6 | ||||
-rw-r--r-- | src/groupdef.cpp | 9 | ||||
-rw-r--r-- | src/groupdef.h | 2 | ||||
-rw-r--r-- | src/htmlgen.cpp | 1 | ||||
-rw-r--r-- | src/htmlgen.h | 10 | ||||
-rw-r--r-- | src/index.cpp | 124 | ||||
-rw-r--r-- | src/latexgen.h | 22 | ||||
-rw-r--r-- | src/mangen.h | 6 | ||||
-rw-r--r-- | src/memberdef.cpp | 13 | ||||
-rw-r--r-- | src/memberdef.h | 6 | ||||
-rw-r--r-- | src/membergroup.cpp | 10 | ||||
-rw-r--r-- | src/membergroup.h | 4 | ||||
-rw-r--r-- | src/outputgen.h | 6 | ||||
-rw-r--r-- | src/outputlist.h | 12 | ||||
-rw-r--r-- | src/pre.l | 13 | ||||
-rw-r--r-- | src/rtfgen.h | 14 | ||||
-rw-r--r-- | src/scanner.l | 48 | ||||
-rw-r--r-- | src/translator.cpp | 78 | ||||
-rw-r--r-- | src/translator.h | 3 | ||||
-rw-r--r-- | src/translator_jp.h | 995 | ||||
-rw-r--r-- | src/translator_sk.h | 17 | ||||
-rw-r--r-- | src/util.cpp | 34 | ||||
-rw-r--r-- | src/util.h | 5 | ||||
-rw-r--r-- | src/xmlgen.cpp | 47 |
29 files changed, 1144 insertions, 648 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp index eb46b38..762f8aa 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -156,29 +156,29 @@ void ClassDef::insertSubClass(ClassDef *cd,Protection p, void ClassDef::addMembersToMemberGroup() { - ::addMembersToMemberGroup(&pubTypes,memberGroupSDict); - ::addMembersToMemberGroup(&pubMembers,memberGroupSDict); - ::addMembersToMemberGroup(&pubAttribs,memberGroupSDict); - ::addMembersToMemberGroup(&pubSlots,memberGroupSDict); - ::addMembersToMemberGroup(&signals,memberGroupSDict); - ::addMembersToMemberGroup(&dcopMethods,memberGroupSDict); - ::addMembersToMemberGroup(&pubStaticMembers,memberGroupSDict); - ::addMembersToMemberGroup(&pubStaticAttribs,memberGroupSDict); - ::addMembersToMemberGroup(&proTypes,memberGroupSDict); - ::addMembersToMemberGroup(&proMembers,memberGroupSDict); - ::addMembersToMemberGroup(&proAttribs,memberGroupSDict); - ::addMembersToMemberGroup(&proSlots,memberGroupSDict); - ::addMembersToMemberGroup(&proStaticMembers,memberGroupSDict); - ::addMembersToMemberGroup(&proStaticAttribs,memberGroupSDict); - ::addMembersToMemberGroup(&priTypes,memberGroupSDict); - ::addMembersToMemberGroup(&priMembers,memberGroupSDict); - ::addMembersToMemberGroup(&priAttribs,memberGroupSDict); - ::addMembersToMemberGroup(&priSlots,memberGroupSDict); - ::addMembersToMemberGroup(&priStaticMembers,memberGroupSDict); - ::addMembersToMemberGroup(&priStaticAttribs,memberGroupSDict); - ::addMembersToMemberGroup(&friends,memberGroupSDict); - ::addMembersToMemberGroup(&related,memberGroupSDict); - ::addMembersToMemberGroup(&properties,memberGroupSDict); + ::addMembersToMemberGroup(&pubTypes,memberGroupSDict,this); + ::addMembersToMemberGroup(&pubMembers,memberGroupSDict,this); + ::addMembersToMemberGroup(&pubAttribs,memberGroupSDict,this); + ::addMembersToMemberGroup(&pubSlots,memberGroupSDict,this); + ::addMembersToMemberGroup(&signals,memberGroupSDict,this); + ::addMembersToMemberGroup(&dcopMethods,memberGroupSDict,this); + ::addMembersToMemberGroup(&pubStaticMembers,memberGroupSDict,this); + ::addMembersToMemberGroup(&pubStaticAttribs,memberGroupSDict,this); + ::addMembersToMemberGroup(&proTypes,memberGroupSDict,this); + ::addMembersToMemberGroup(&proMembers,memberGroupSDict,this); + ::addMembersToMemberGroup(&proAttribs,memberGroupSDict,this); + ::addMembersToMemberGroup(&proSlots,memberGroupSDict,this); + ::addMembersToMemberGroup(&proStaticMembers,memberGroupSDict,this); + ::addMembersToMemberGroup(&proStaticAttribs,memberGroupSDict,this); + ::addMembersToMemberGroup(&priTypes,memberGroupSDict,this); + ::addMembersToMemberGroup(&priMembers,memberGroupSDict,this); + ::addMembersToMemberGroup(&priAttribs,memberGroupSDict,this); + ::addMembersToMemberGroup(&priSlots,memberGroupSDict,this); + ::addMembersToMemberGroup(&priStaticMembers,memberGroupSDict,this); + ::addMembersToMemberGroup(&priStaticAttribs,memberGroupSDict,this); + ::addMembersToMemberGroup(&friends,memberGroupSDict,this); + ::addMembersToMemberGroup(&related,memberGroupSDict,this); + ::addMembersToMemberGroup(&properties,memberGroupSDict,this); } // adds new member definition to the class @@ -197,12 +197,12 @@ void ClassDef::internalInsertMember(MemberDef *md, (Config_getBool("EXTRACT_PRIVATE") || prot!=Private)) { related.append(md); - md->setSectionList(&related); + md->setSectionList(this,&related); } else if (md->isFriend()) { friends.append(md); - md->setSectionList(&friends); + md->setSectionList(this,&friends); } else { @@ -210,30 +210,30 @@ void ClassDef::internalInsertMember(MemberDef *md, { case MemberDef::Signal: // Qt specific signals.append(md); - md->setSectionList(&signals); + md->setSectionList(this,&signals); break; case MemberDef::DCOP: // KDE2 specific dcopMethods.append(md); - md->setSectionList(&dcopMethods); + md->setSectionList(this,&dcopMethods); break; case MemberDef::Property: properties.append(md); - md->setSectionList(&properties); + md->setSectionList(this,&properties); break; case MemberDef::Slot: // Qt specific switch (prot) { case Protected: proSlots.append(md); - md->setSectionList(&proSlots); + md->setSectionList(this,&proSlots); break; case Public: pubSlots.append(md); - md->setSectionList(&pubSlots); + md->setSectionList(this,&pubSlots); break; case Private: priSlots.append(md); - md->setSectionList(&priSlots); + md->setSectionList(this,&priSlots); break; } break; @@ -246,15 +246,15 @@ void ClassDef::internalInsertMember(MemberDef *md, { case Protected: proStaticAttribs.append(md); - md->setSectionList(&proStaticAttribs); + md->setSectionList(this,&proStaticAttribs); break; case Public: pubStaticAttribs.append(md); - md->setSectionList(&pubStaticAttribs); + md->setSectionList(this,&pubStaticAttribs); break; case Private: priStaticAttribs.append(md); - md->setSectionList(&priStaticAttribs); + md->setSectionList(this,&priStaticAttribs); break; } } @@ -264,15 +264,15 @@ void ClassDef::internalInsertMember(MemberDef *md, { case Protected: proStaticMembers.append(md); - md->setSectionList(&proStaticMembers); + md->setSectionList(this,&proStaticMembers); break; case Public: pubStaticMembers.append(md); - md->setSectionList(&pubStaticMembers); + md->setSectionList(this,&pubStaticMembers); break; case Private: priStaticMembers.append(md); - md->setSectionList(&priStaticMembers); + md->setSectionList(this,&priStaticMembers); break; } } @@ -285,15 +285,15 @@ void ClassDef::internalInsertMember(MemberDef *md, { case Protected: proAttribs.append(md); - md->setSectionList(&proAttribs); + md->setSectionList(this,&proAttribs); break; case Public: pubAttribs.append(md); - md->setSectionList(&pubAttribs); + md->setSectionList(this,&pubAttribs); break; case Private: priAttribs.append(md); - md->setSectionList(&priAttribs); + md->setSectionList(this,&priAttribs); break; } } @@ -303,15 +303,15 @@ void ClassDef::internalInsertMember(MemberDef *md, { case Protected: proTypes.append(md); - md->setSectionList(&proTypes); + md->setSectionList(this,&proTypes); break; case Public: pubTypes.append(md); - md->setSectionList(&pubTypes); + md->setSectionList(this,&pubTypes); break; case Private: priTypes.append(md); - md->setSectionList(&priTypes); + md->setSectionList(this,&priTypes); break; } } @@ -321,15 +321,15 @@ void ClassDef::internalInsertMember(MemberDef *md, { case Protected: proMembers.append(md); - md->setSectionList(&proMembers); + md->setSectionList(this,&proMembers); break; case Public: pubMembers.append(md); - md->setSectionList(&pubMembers); + md->setSectionList(this,&pubMembers); break; case Private: priMembers.append(md); - md->setSectionList(&priMembers); + md->setSectionList(this,&priMembers); break; } } @@ -485,27 +485,6 @@ void ClassDef::insertMember(MemberDef *md) internalInsertMember(md,md->protection(),TRUE); } -//void ClassDef::computeMemberGroups() -//{ -// MemberNameInfoListIterator mnili(*m_allMemberNameInfoList); -// MemberNameInfo *mni; -// for (;(mni=mnili.current());++mnili) -// { -// MemberNameInfoIterator mnii(*mni); -// MemberInfo *mi; -// for (mnii.toFirst();(mi=mnii.current());++mnii) -// { -// MemberDef *md=mi->memberDef; -// MemberGroup *mg = md->getMemberGroup(); -// if (mg && m_memberGroupDict->find(mg->groupId())==0) -// { -// m_memberGroupDict->insert(mg->groupId(),mg); -// m_memberGroupList->append(mg); -// } -// } -// } -//} - // compute the anchors for all members void ClassDef::computeAnchors() { @@ -533,6 +512,12 @@ void ClassDef::computeAnchors() setAnchors(context,'u',&priTypes); setAnchors(context,'v',&dcopMethods); setAnchors(context,'w',&properties); + MemberGroupSDict::Iterator mgli(*memberGroupSDict); + MemberGroup *mg; + for (;(mg=mgli.current());++mgli) + { + mg->setAnchors(context); + } } void ClassDef::distributeMemberGroupDocumentation() @@ -1006,6 +991,7 @@ void ClassDef::writeDocumentation(OutputList &ol) } else // add this group to the corresponding member section { + //printf("addToDeclarationSection(%s)\n",mg->header().data()); mg->addToDeclarationSection(); } } diff --git a/src/config.l b/src/config.l index 3a1918d..466f1d1 100644 --- a/src/config.l +++ b/src/config.l @@ -31,6 +31,7 @@ #include <qstack.h> #include "config.h" +#include "lang_cfg.h" #include "version.h" #undef Config_getString @@ -99,6 +99,7 @@ static QCString curDotFileName; static QCString curDotFileCaption; static QCString internalRefFile; static QCString internalRefAnchor; +static QCString caption; static QStack<char> currentListIndent; // indent stack of all list items static bool insideItemList = FALSE; @@ -185,72 +186,85 @@ class Table ~Table(); void newRow(); void newElem(); + void setCaption(const char *s); private: - OutputDocInterface *parentDoc; - QList<TableElem> *elemList; - int curRow; - int curCol; - int rows; - int cols; + OutputDocInterface *m_parentDoc; + QList<TableElem> *m_elemList; + QCString m_caption; + int m_curRow; + int m_curCol; + int m_rows; + int m_cols; }; Table::Table() { - parentDoc=outDoc; - elemList=new QList<TableElem>; - elemList->setAutoDelete(TRUE); - curRow=curCol=rows=cols=0; + m_parentDoc=outDoc; + m_elemList=new QList<TableElem>; + m_elemList->setAutoDelete(TRUE); + m_curRow=m_curCol=m_rows=m_cols=0; } Table::~Table() { //printf("Table::~Table()\n"); // use elemList & cols & rows - if (cols>0 && rows>0) + if (m_cols>0 && m_rows>0) { - parentDoc->startTable(cols); - TableElem *e=elemList->first(); + m_parentDoc->startTable(!m_caption.isEmpty(),m_cols); + TableElem *e=m_elemList->first(); while (e) { if (e->getRow()>0) { if (e->getCol()==0) { - if (e->getRow()>1) parentDoc->endTableRow(); - parentDoc->nextTableRow(); + if (e->getRow()>1) m_parentDoc->endTableRow(); + m_parentDoc->nextTableRow(); } else { - parentDoc->nextTableColumn(); + m_parentDoc->nextTableColumn(); } - parentDoc->append(e->outputDocInterface()); - parentDoc->endTableColumn(); + m_parentDoc->append(e->outputDocInterface()); + m_parentDoc->endTableColumn(); } - e=elemList->next(); + e=m_elemList->next(); } - parentDoc->endTable(); + if (!m_caption.isEmpty()) + { + m_parentDoc->startCaption(); + m_parentDoc->docify(m_caption); + m_parentDoc->endCaption(); + } + m_parentDoc->endTable(!m_caption.isEmpty()); } - delete elemList; elemList=0; - outDoc=parentDoc; + delete m_elemList; m_elemList=0; + outDoc=m_parentDoc; +} + +void Table::setCaption(const char *s) +{ + m_caption=s; } void Table::newRow() { //printf("Table::newRow()\n"); - curRow++; - if (curRow>rows) rows=curRow; - curCol=0; + m_curRow++; + if (m_curRow>m_rows) m_rows=m_curRow; + m_curCol=0; } void Table::newElem() { //printf("Table::newElem(%d,%d)\n",curRow,curCol); - TableElem *te = new TableElem(curRow,curCol); - elemList->append(te); + TableElem *te = new TableElem(m_curRow,m_curCol); + m_elemList->append(te); - curCol++; - if (curCol>cols) cols=curCol; + m_curCol++; + if (m_curCol>m_cols) m_cols=m_curCol; } static QStack<Table> tableStack; @@ -531,19 +545,19 @@ struct IndentInfo static QStack<IndentInfo> listIndentStack; // indent stack of - items -static void addListItemMarker(const char *marker,int dashPos,bool enumerated) +static int computeIndent(const char *str,int length) { - // find the actual position at which the bullet was found int i; int indent=0; - for (i=0;i<dashPos;i++) + int tabSize=Config_getInt("TAB_SIZE"); + for (i=0;i<length;i++) { //printf("Parsed[%d]=%d\n",i,marker[i]); - if (marker[i]=='\t') + if (str[i]=='\t') { - indent+=Config_getInt("TAB_SIZE") - (indent%Config_getInt("TAB_SIZE")); + indent+=tabSize - (indent%tabSize); } - else if (marker[i]=='\n') + else if (str[i]=='\n') { indent=0; } @@ -552,9 +566,17 @@ static void addListItemMarker(const char *marker,int dashPos,bool enumerated) indent++; } } + return indent; +} + +static void addListItemMarker(const char *marker,int dashPos,bool enumerated) +{ + // find the actual position at which the bullet was found + int indent=computeIndent(marker,dashPos); //printf("list marker found at column %d enumerated %d\n",indent,enumerated); if (!insideItemList) { + //printf("startListMarker indent=%d\n",indent); currentListIndent.push(enumerated ? "O" : "U"); listIndentStack.push(new IndentInfo(indent,enumerated)); listIndentStack.top()->startList(); @@ -580,6 +602,7 @@ static void addListItemMarker(const char *marker,int dashPos,bool enumerated) } else if (pPrevInfo->indent<indent) // start sub item list { + //printf("startListMarker indent=%d\n",indent); currentListIndent.push(enumerated ? "O" : "U"); listIndentStack.push(new IndentInfo(indent,enumerated)); listIndentStack.top()->startList(); @@ -610,6 +633,32 @@ static void addListItemMarker(const char *marker,int dashPos,bool enumerated) } } +static void endListMarker(const char *marker,int dotPos) +{ + int indent=computeIndent(marker,dotPos); + //printf("endListMarker indent=%d " + // "insideItemList=%d listIndentStack.count()=%d\n", + // indent,insideItemList,listIndentStack.count()); + if (insideItemList && !listIndentStack.isEmpty()) + { + IndentInfo *ii = listIndentStack.top(); + while (ii && indent<=ii->indent) + { + ii->endList(); + listIndentStack.pop(); + currentListIndent.pop(); + delete ii; + ii = listIndentStack.top(); + //printf("ending list new indent=%d\n",ii ? ii->indent : -1); + } + if (listIndentStack.isEmpty()) + { + insideItemList=FALSE; + //printf("ending last list\n"); + } + } +} + // end the current (nested) list regardless of the nesting level. static void forceEndItemList() { @@ -626,7 +675,7 @@ static void forceEndItemList() case 'O': outDoc->endEnumList(); break; case 'U': outDoc->endItemList(); break; case 'D': outDoc->endDescription(); break; - case 'P': break; // do not end paragraphs + case 'P': if (inBlock()) endBlock(); break; default: err("Unexpected list indent token `%c'\n",c); } @@ -899,6 +948,7 @@ SUB [sS][uU][bB] SUP [sS][uU][pP] SRC [sS][rR][cC] TABLE [tT][aA][bB][lL][eE] +CAPTION [cC][aA][pP][tT][iI][oO][nN] TITLE [tT][iI][tT][lL][eE] TD [tT][dD] TR [tT][rR] @@ -955,6 +1005,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) %x DocInternalRef %x DocInternalRefText %x DocImage +%x DocCaption %x DocHtmlImageName %x DocHtmlImageOpt %x DocLatexImageName @@ -974,6 +1025,11 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) bool isEnumerated = text.at(dashPos+1)=='#'; addListItemMarker(yytext,dashPos+1,isEnumerated); } +<DocScan>^{B}*(("//"{B}*)?)"*"*{B}*"."{B}*/\n { /* found end list marker */ + QCString text=yytext; + int dotPos = text.findRev('.'); + endListMarker(yytext,dotPos+1); + } <DocScan>\n{B}*(("//"{B}*)?)"*"*{B}*"-"("#")?{B}+ { /* found list item marker */ QCString text=yytext; int dashPos = text.findRev('-'); @@ -981,6 +1037,11 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) bool isEnumerated = text.at(dashPos+1)=='#'; addListItemMarker(yytext+1,dashPos,isEnumerated); } +<DocScan>\n{B}*(("//"{B}*)?)"*"*{B}*"."{B}*/\n { /* found end list marker */ + QCString text=yytext; + int dotPos = text.findRev('.'); + endListMarker(yytext+1,dotPos); + } <DocScan,Text>"©" { outDoc->writeCopyright(); } <DocScan,Text>"<" { outDoc->docify("<"); } <DocScan,Text>">" { outDoc->docify(">"); } @@ -2024,6 +2085,20 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) <DocScan>"</"{CENTER}{ATTR}">" { outDoc->endCenter(); } <DocScan>"<"{TABLE}{ATTR}">" { startTable(); } <DocScan>"</"{TABLE}{ATTR}">" { endTable(); } +<DocScan>"<"{CAPTION}{ATTR}">" { caption.resize(0); + BEGIN( DocCaption ); + } +<DocCaption>[^\n\<\>\/]+ { + caption+=yytext; + } +<DocCaption>\n { caption+=" "; } +<DocCaption>. { caption+=*yytext; } +<DocCaption>"</"{CAPTION}{ATTR}">" { if (curTable) + { + curTable->setCaption(caption); + } + BEGIN( DocScan ); + } <DocScan>"<"{INPUT}{ATTR}">" <DocScan>"<"{SMALL}{ATTR}">" { outDoc->startSmall(); } <DocScan>"</"{SMALL}{ATTR}">" { outDoc->endSmall(); } diff --git a/src/dot.cpp b/src/dot.cpp index d1494a7..5f1b080 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -197,11 +197,12 @@ class DotNodeList : public QList<DotNode> /*! helper function that deletes all nodes in a connected graph, given * one of the graph's nodes */ -static void deleteNodes(DotNode *node) +static void deleteNodes(DotNode *node,SIntDict<DotNode> *skipNodes=0) { + //printf("deleteNodes skipNodes=%p\n",skipNodes); static DotNodeList deletedNodes; deletedNodes.setAutoDelete(TRUE); - node->deleteNode(deletedNodes); // collect nodes to be deleted. + node->deleteNode(deletedNodes,skipNodes); // collect nodes to be deleted. deletedNodes.clear(); // actually remove the nodes. } @@ -220,6 +221,7 @@ DotNode::DotNode(int n,const char *lab,const char *url,int distance,bool isRoot) DotNode::~DotNode() { + //printf("DotNode::~DotNode() %s\n",m_label.data()); delete m_children; delete m_parents; delete m_edgeInfo; @@ -276,7 +278,7 @@ void DotNode::removeParent(DotNode *n) if (m_parents) m_parents->remove(n); } -void DotNode::deleteNode(DotNodeList &deletedList) +void DotNode::deleteNode(DotNodeList &deletedList,SIntDict<DotNode> *skipNodes) { if (m_deleted) return; // avoid recursive loops in case the graph has cycles m_deleted=TRUE; @@ -287,7 +289,7 @@ void DotNode::deleteNode(DotNodeList &deletedList) for (dnlip.toFirst();(pn=dnlip.current());++dnlip) { //pn->removeChild(this); - pn->deleteNode(deletedList); + pn->deleteNode(deletedList,skipNodes); } } if (m_children!=0) // delete all child nodes of this node @@ -297,11 +299,16 @@ void DotNode::deleteNode(DotNodeList &deletedList) for (dnlic.toFirst();(cn=dnlic.current());++dnlic) { //cn->removeParent(this); - cn->deleteNode(deletedList); + cn->deleteNode(deletedList,skipNodes); } } // add this node to the list of deleted nodes. - deletedList.append(this); + //printf("skipNodes=%p find(%p)=%p\n",skipNodes,this,skipNodes ? skipNodes->find((int)this) : 0); + if (skipNodes==0 || skipNodes->find((int)this)==0) + { + //printf("deleting\n"); + deletedList.append(this); + } } static QCString convertLabel(const QCString &l) @@ -882,12 +889,22 @@ DotGfxHierarchyTable::DotGfxHierarchyTable() DotGfxHierarchyTable::~DotGfxHierarchyTable() { + //printf("DotGfxHierarchyTable::~DotGfxHierarchyTable\n"); + SIntDict<DotNode> skipNodes(17); + skipNodes.setAutoDelete(TRUE); DotNode *n = m_rootNodes->first(); while (n) { - DotNode *oldNode=n; + //printf("adding %s %p\n",n->label().data(),n); + skipNodes.append((int)n,n); + n=m_rootNodes->next(); + } + n = m_rootNodes->first(); + while (n) + { + //printf("Deleting root node %s\n",n->label().data()); + deleteNodes(n,&skipNodes); n=m_rootNodes->next(); - deleteNodes(oldNode); } delete m_rootNodes; delete m_usedNodes; @@ -19,6 +19,7 @@ #include "qtbc.h" #include <qlist.h> #include <qdict.h> +#include "sortdict.h" class ClassDef; class FileDef; @@ -68,16 +69,17 @@ class DotNode ); void setDistance(int distance); void addParent(DotNode *n); - void deleteNode(DotNodeList &deletedList); + void deleteNode(DotNodeList &deletedList,SIntDict<DotNode> *skipNodes=0); void removeChild(DotNode *n); void removeParent(DotNode *n); - int number() const { return m_number; } void write(QTextStream &t,GraphOutputFormat f,bool topDown,bool toChildren, int maxDistance=1000,bool backArrows=TRUE); int m_subgraphId; void clearWriteFlag(); void writeXML(QTextStream &t); void writeDEF(QTextStream &t); + QCString label() const { return m_label; } + int number() const { return m_number; } private: void colorConnectedNodes(int curColor); diff --git a/src/doxygen.cpp b/src/doxygen.cpp index c4fb21a..11c43b7 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -6968,6 +6968,9 @@ void parseInput() msg("Adding classes to their packages...\n"); addClassesToPackages(); + msg("Building full member lists recursively...\n"); + buildCompleteMemberLists(); + msg("Adding members to member groups.\n"); addMembersToMemberGroup(); @@ -6977,9 +6980,6 @@ void parseInput() distributeMemberGroupDocumentation(); } - msg("Building full member lists recursively...\n"); - buildCompleteMemberLists(); - msg("Computing member references...\n"); computeMemberReferences(); diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 7e2a54f..2886f73 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -309,6 +309,7 @@ bool GroupDef::containsGroup(const GroupDef *def) void GroupDef::addGroup(const GroupDef *def) { + //printf("adding group `%s' to group `%s'\n",def->name().data(),name().data()); //if (Config_getBool("SORT_MEMBER_DOCS")) // groupList->inSort(def); //else @@ -317,10 +318,10 @@ void GroupDef::addGroup(const GroupDef *def) void GroupDef::addParentGroup(const GroupDef *def) { - if (Config_getBool("SORT_MEMBER_DOCS")) - parentGroupList->inSort(def); - else - parentGroupList->append(def); + //if (Config_getBool("SORT_MEMBER_DOCS")) + // parentGroupList->inSort(def); + //else + parentGroupList->append(def); } bool GroupDef::isASubGroup() const diff --git a/src/groupdef.h b/src/groupdef.h index d32f781..a9402b0 100644 --- a/src/groupdef.h +++ b/src/groupdef.h @@ -78,7 +78,7 @@ class GroupDef : public Definition bool visited; // number of times accessed for output - KPW - friend void writeGroupTreeNode(OutputList&, GroupDef*,bool); + friend void writeGroupTreeNode(OutputList&, GroupDef*, int); // make accessible for writing tree view of group in index.cpp - KPW // members in the declaration part of the documentation diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 54b815c..97752a2 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -38,6 +38,7 @@ static const char *defaultStyleSheet = "H1 { text-align: center; }\n" + "CAPTION { font-weight: bold }\n" "A.qindex {}\n" "A.qindexRef {}\n" "A.el { text-decoration: none; font-weight: bold }\n" diff --git a/src/htmlgen.h b/src/htmlgen.h index 387065e..33ff992 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -165,8 +165,14 @@ class HtmlGenerator : public OutputGenerator void endSubscript() { t << "</sub>"; } void startSuperscript() { t << "<sup>"; } void endSuperscript() { t << "</sup>"; } - void startTable(int) { t << "<table border=1 cellspacing=3 cellpadding=3>"; } - void endTable() { t << "</table>" << endl; } + void startTable(bool,int) + { t << "<table border=1 cellspacing=3 cellpadding=3>"; } + void endTable(bool hasCaption) + { if (!hasCaption) t << "</tr>"; + t << "</table>" << endl; + } + void startCaption() { t << "</tr><caption align=\"bottom\">"; } + void endCaption() { t << "</caption>" << endl; } void nextTableRow() { t << "<tr><td>"; } void endTableRow() { t << "</tr>" << endl; } void nextTableColumn() { t << "<td>"; } diff --git a/src/index.cpp b/src/index.cpp index cc1bc99..02c8f92 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -78,6 +78,34 @@ void countDataStructures() documentedPackages = countPackages(); } +static void startIndexHierarchy(OutputList &ol,int level) +{ + // UGLY HACK! + ol.pushGeneratorState(); + ol.disable(OutputGenerator::Man); + ol.disable(OutputGenerator::Html); + if (level<6) ol.startIndexList(); + ol.enableAll(); + ol.disable(OutputGenerator::Latex); + ol.disable(OutputGenerator::RTF); + ol.startItemList(); + ol.popGeneratorState(); +} + +static void endIndexHierarchy(OutputList &ol,int level) +{ + // UGLY HACK! + ol.pushGeneratorState(); + ol.disable(OutputGenerator::Man); + ol.disable(OutputGenerator::Html); + if (level<6) ol.endIndexList(); + ol.enableAll(); + ol.disable(OutputGenerator::Latex); + ol.disable(OutputGenerator::RTF); + ol.endItemList(); + ol.popGeneratorState(); +} + //---------------------------------------------------------------------------- static bool g_memberIndexLetterUsed[256]; @@ -347,18 +375,7 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper,int level) { if (!started) { - { - // UGLY HACK! - ol.pushGeneratorState(); - ol.disable(OutputGenerator::Man); - ol.disable(OutputGenerator::Html); - if (level<6) ol.startIndexList(); - ol.enableAll(); - ol.disable(OutputGenerator::Latex); - ol.disable(OutputGenerator::RTF); - ol.startItemList(); - ol.popGeneratorState(); - } + startIndexHierarchy(ol,level); if (hasHtmlHelp) htmlHelp->incContentsDepth(); if (hasFtvHelp) ftvHelp->incContentsDepth(); started=TRUE; @@ -407,18 +424,7 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper,int level) } if (started) { - { - // UGLY HACK! - ol.pushGeneratorState(); - ol.disable(OutputGenerator::Man); - ol.disable(OutputGenerator::Html); - if (level<6) ol.endIndexList(); - ol.enableAll(); - ol.disable(OutputGenerator::Latex); - ol.disable(OutputGenerator::RTF); - ol.endItemList(); - ol.popGeneratorState(); - } + endIndexHierarchy(ol,level); if (hasHtmlHelp) htmlHelp->decContentsDepth(); if (hasFtvHelp) ftvHelp->decContentsDepth(); } @@ -572,18 +578,7 @@ static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started) { if (!started) { - { - // UGLY HACK! - ol.pushGeneratorState(); - ol.disable(OutputGenerator::Html); - ol.disable(OutputGenerator::Man); - ol.startIndexList(); - ol.enableAll(); - ol.disable(OutputGenerator::Latex); - ol.disable(OutputGenerator::RTF); - ol.startItemList(); - ol.popGeneratorState(); - } + startIndexHierarchy(ol,0); if (hasHtmlHelp) htmlHelp->incContentsDepth(); if (hasFtvHelp) ftvHelp->incContentsDepth(); started=TRUE; @@ -654,18 +649,7 @@ void writeClassHierarchy(OutputList &ol) writeClassTreeForList(ol,&Doxygen::hiddenClasses,started); if (started) { - { - // UGLY HACK! - ol.pushGeneratorState(); - ol.disable(OutputGenerator::Html); - ol.disable(OutputGenerator::Man); - ol.endIndexList(); - ol.enableAll(); - ol.disable(OutputGenerator::Latex); - ol.disable(OutputGenerator::RTF); - ol.endItemList(); - ol.popGeneratorState(); - } + endIndexHierarchy(ol,0); if (hasHtmlHelp) htmlHelp->decContentsDepth(); if (hasFtvHelp) ftvHelp->decContentsDepth(); } @@ -2135,18 +2119,7 @@ void writePageIndex(OutputList &ol) } parseText(ol,theTranslator->trRelatedPagesDescription()); ol.endTextBlock(); - { - // UGLY HACK! - ol.pushGeneratorState(); - ol.disable(OutputGenerator::Man); - ol.disable(OutputGenerator::Html); - ol.startIndexList(); - ol.enableAll(); - ol.disable(OutputGenerator::Latex); - ol.disable(OutputGenerator::RTF); - ol.startItemList(); - ol.popGeneratorState(); - } + startIndexHierarchy(ol,0); PageSDict::Iterator pdi(*Doxygen::pageSDict); PageInfo *pi=0; for (pdi.toFirst();(pi=pdi.current());++pdi) @@ -2177,18 +2150,7 @@ void writePageIndex(OutputList &ol) if (hasFtvHelp) ftvHelp->addContentsItem(FALSE,0,pageName,0,pageTitle); } } - { - // UGLY HACK! - ol.pushGeneratorState(); - ol.disable(OutputGenerator::Man); - ol.disable(OutputGenerator::Html); - ol.endIndexList(); - ol.enableAll(); - ol.disable(OutputGenerator::Latex); - ol.disable(OutputGenerator::RTF); - ol.endItemList(); - ol.popGeneratorState(); - } + endIndexHierarchy(ol,0); if (hasHtmlHelp) { htmlHelp->decContentsDepth(); @@ -2247,7 +2209,7 @@ void writeGraphInfo(OutputList &ol) * \author KPW */ -void writeGroupTreeNode(OutputList &ol, GroupDef *gd,bool subLevel) +void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level) { HtmlHelp *htmlHelp=0; FTVHelp *ftvHelp = 0; @@ -2263,7 +2225,7 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,bool subLevel) ftvHelp = FTVHelp::getInstance(); } - if (!gd->visited && (!gd->isASubGroup() || subLevel)) + if (!gd->visited && (!gd->isASubGroup() || level>0)) { //printf("gd->name()=%s #members=%d\n",gd->name().data(),gd->countMembers()); // write group info @@ -2338,14 +2300,14 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,bool subLevel) // write subgroups if (hasSubGroups) { - ol.startIndexList(); + startIndexHierarchy(ol,level+1); QListIterator<GroupDef> gli(*gd->groupList); GroupDef *subgd = 0; - for (gli.toLast();(subgd=gli.current());--gli) + for (gli.toFirst();(subgd=gli.current());++gli) { - writeGroupTreeNode(ol,subgd,TRUE); + writeGroupTreeNode(ol,subgd,level+1); } - ol.endIndexList(); + endIndexHierarchy(ol,level+1); } @@ -2544,14 +2506,14 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,bool subLevel) void writeGroupHierarchy(OutputList &ol) { - ol.startIndexList(); + startIndexHierarchy(ol,0); GroupSDict::Iterator gli(Doxygen::groupSDict); GroupDef *gd; for (gli.toFirst();(gd=gli.current());++gli) { - writeGroupTreeNode(ol,gd,FALSE); + writeGroupTreeNode(ol,gd,0); } - ol.endIndexList(); + endIndexHierarchy(ol,0); } //---------------------------------------------------------------------------- diff --git a/src/latexgen.h b/src/latexgen.h index 5d5eab8..ac6a68b 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -160,10 +160,26 @@ class LatexGenerator : public OutputGenerator void endSubscript() { t << "}}$"; } void startSuperscript() { t << "$^{\\mbox{"; } void endSuperscript() { t << "}}$"; } - void startTable(int c) { t << "\\begin{TabularC}{" << c - << "}\n\\hline\n"; + void startTable(bool hasCaption,int c) + { + if (hasCaption) t << "\\begin{table}[h]"; + t << "\\begin{TabularC}{" << c << "}\n\\hline\n"; } - void endTable() { t << "\\\\\\hline\n\\end{TabularC}\n"; } + void endTable(bool hasCaption) + { + if (hasCaption) + { + t << "\\end{table}\n"; + } + else + { + t << "\\\\\\hline\n\\end{TabularC}\n"; + } + } + void startCaption() { t << "\\\\\\hline\n\\end{TabularC}\n" + "\\centering\n\\caption{"; + } + void endCaption() { t << "}\n"; } void nextTableRow() {} void endTableRow() { t << "\\\\\\hline\n"; } void nextTableColumn() { t << "&"; } diff --git a/src/mangen.h b/src/mangen.h index 2b95de9..f3d2a2b 100644 --- a/src/mangen.h +++ b/src/mangen.h @@ -152,8 +152,10 @@ class ManGenerator : public OutputGenerator void endSubscript() { t << "\\*>"; firstCol=FALSE; } void startSuperscript() { t << "\\*{"; firstCol=FALSE; } void endSuperscript() { t << "\\*}"; firstCol=FALSE; } - void startTable(int) {} - void endTable() {} + void startTable(bool,int) {} + void endTable(bool) {} + void startCaption() {} + void endCaption() {} void nextTableRow() {} void endTableRow() {} void nextTableColumn() {} diff --git a/src/memberdef.cpp b/src/memberdef.cpp index baa1452..a72add2 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -349,6 +349,7 @@ MemberDef::MemberDef(const char *df,int dl, argList=0; } m_templateMaster=0; + classSectionSDict=0; } /*! Destroys the member definition. */ @@ -360,6 +361,7 @@ MemberDef::~MemberDef() delete argList; delete tArgList; delete m_defTmpArgLists; + delete classSectionSDict; } void MemberDef::setReimplements(MemberDef *md) @@ -1670,3 +1672,14 @@ void MemberDef::addListReference(Definition *d) d->getOutputFileBase()+":"+anchor(),memName,argsString()); } +MemberList *MemberDef::getSectionList(Definition *d) const +{ + return (d!=0 && classSectionSDict) ? classSectionSDict->find((int)d) : 0; +} + +void MemberDef::setSectionList(Definition *d, MemberList *sl) +{ + if (classSectionSDict==0) classSectionSDict = new SIntDict<MemberList>(7); + classSectionSDict->append((int)d,sl); +} + diff --git a/src/memberdef.h b/src/memberdef.h index df4b794..362a82d 100644 --- a/src/memberdef.h +++ b/src/memberdef.h @@ -24,6 +24,7 @@ #include "entry.h" #include "definition.h" +#include "sortdict.h" class ClassDef; class NamespaceDef; @@ -81,7 +82,7 @@ class MemberDef : public Definition const QCString &initializer() const { return init; } int initializerLines() const { return initLines; } int getMemberSpecifiers() const { return memSpec; } - MemberList *getSectionList() const { return section; } + MemberList *getSectionList(Definition *d) const; // scope query members ClassDef *getClassDef() const { return classDef; } @@ -143,7 +144,7 @@ class MemberDef : public Definition void setBitfields(const char *s) { bitfields = s; } void setMaxInitLines(int lines) { userInitLines=lines; } void setMemberClass(ClassDef *cd); - void setSectionList(MemberList *sl) { section=sl; } + 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; } @@ -300,6 +301,7 @@ class MemberDef : public Definition int groupStartLine; // line " " " " " bool groupHasDocs; // true if the entry that caused the grouping was documented MemberDef *m_templateMaster; + SIntDict<MemberList> *classSectionSDict; // disable copying of member defs diff --git a/src/membergroup.cpp b/src/membergroup.cpp index 469ad0d..086a9f8 100644 --- a/src/membergroup.cpp +++ b/src/membergroup.cpp @@ -53,7 +53,7 @@ MemberGroup::~MemberGroup() delete memberList; } -void MemberGroup::insertMember(MemberDef *md) +void MemberGroup::insertMember(Definition *d,MemberDef *md) { //printf("MemberGroup::insertMember memberList=%p count=%d" // " member section list: %p\n", @@ -62,13 +62,13 @@ void MemberGroup::insertMember(MemberDef *md) // md->getSectionList()); MemberDef *firstMd = memberList->first(); if (inSameSection && memberList->count()>0 && - firstMd->getSectionList()!=md->getSectionList()) + firstMd->getSectionList(d)!=md->getSectionList(d)) { inSameSection=FALSE; } else if (inDeclSection==0) { - inDeclSection = md->getSectionList(); + inDeclSection = md->getSectionList(d); } memberList->append(md); @@ -82,9 +82,9 @@ void MemberGroup::insertMember(MemberDef *md) } -void MemberGroup::setAnchors() +void MemberGroup::setAnchors(ClassDef *context) { - ::setAnchors(0,'z',memberList,grpId); + ::setAnchors(context,'z',memberList,grpId); } void MemberGroup::writeDeclarations(OutputList &ol, diff --git a/src/membergroup.h b/src/membergroup.h index b1dce56..6eba22b 100644 --- a/src/membergroup.h +++ b/src/membergroup.h @@ -40,8 +40,8 @@ class MemberGroup ~MemberGroup(); QCString header() const { return grpHeader; } int groupId() const { return grpId; } - void insertMember(MemberDef *); - void setAnchors(); + void insertMember(Definition *d,MemberDef *md); + void setAnchors(ClassDef *); void writePlainDeclarations(OutputList &ol, ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd); void writeDeclarations(OutputList &ol, diff --git a/src/outputgen.h b/src/outputgen.h index 3d6bfae..1b060e8 100644 --- a/src/outputgen.h +++ b/src/outputgen.h @@ -198,8 +198,10 @@ class BaseOutputDocInterface virtual void endSubscript() = 0; virtual void startSuperscript() = 0; virtual void endSuperscript() = 0; - virtual void startTable(int cols) = 0; - virtual void endTable() = 0; + virtual void startTable(bool hasCaption,int cols) = 0; + virtual void endTable(bool hasCaption) = 0; + virtual void startCaption() = 0; + virtual void endCaption() = 0; virtual void nextTableRow() = 0; virtual void endTableRow() = 0; virtual void nextTableColumn() = 0; diff --git a/src/outputlist.h b/src/outputlist.h index 88f3cb4..d96feb7 100644 --- a/src/outputlist.h +++ b/src/outputlist.h @@ -277,10 +277,14 @@ class OutputList : public OutputDocInterface { forall(&OutputGenerator::startSuperscript); } void endSuperscript() { forall(&OutputGenerator::endSuperscript); } - void startTable(int cols) - { forall(&OutputGenerator::startTable,cols); } - void endTable() - { forall(&OutputGenerator::endTable); } + void startTable(bool hasCaption,int cols) + { forall(&OutputGenerator::startTable,hasCaption,cols); } + void endTable(bool hasCaption) + { forall(&OutputGenerator::endTable,hasCaption); } + void startCaption() + { forall(&OutputGenerator::startCaption); } + void endCaption() + { forall(&OutputGenerator::endCaption); } void nextTableRow() { forall(&OutputGenerator::nextTableRow); } void endTableRow() @@ -1078,17 +1078,24 @@ BN [ \t\r\n] BEGIN(CopyLine); } } +<CopyLine>"extern"{BN}*"\"C\""*{BN}*"{" { + QCString text=yytext; + g_yyLineNr+=text.contains('\n'); + outputArray(yytext,yyleng); + } <CopyLine>"{" { // count brackets inside the main file if (g_includeStack.isEmpty()) + { g_curlyCount++; + } outputChar(*yytext); } <CopyLine>"}" { // count brackets inside the main file - if (g_includeStack.isEmpty()) + if (g_includeStack.isEmpty() && g_curlyCount>0) + { g_curlyCount--; + } outputChar(*yytext); - // This should hold otherwise the preprocessor is confused - //ASSERT(g_curlyCount>=0); } <CopyLine>"'"\\[0-7]{1,3}"'" { outputArray(yytext,yyleng); diff --git a/src/rtfgen.h b/src/rtfgen.h index 0f967b6..81633a6 100644 --- a/src/rtfgen.h +++ b/src/rtfgen.h @@ -152,12 +152,14 @@ class RTFGenerator : public OutputGenerator void endSubscript() { t << "}"; } void startSuperscript() { t << "{\\super " << endl;} void endSuperscript() { t << "}"; } - void startTable(int ) { }//t << "\\begin{TabularC}{" << c << "}\n\\hline\n"; - void endTable() { }//t << "\\\\\\hline\n\\end{TabularC}\n"; - void nextTableRow() { } - void endTableRow() { }//t << "\\\\\\hline\n"; - void nextTableColumn() { }//t << "&"; - void endTableColumn() { } + void startTable(bool,int) { /* not implemented */ } + void endTable(bool) { /* not implemented */ } + void startCaption() { /* not implemented */ } + void endCaption() { /* not implemented */ } + void nextTableRow() { /* not implemented */ } + void endTableRow() { /* not implemented */ } + void nextTableColumn() { /* not implemented */ } + void endTableColumn() { /* not implemented */ } void writeCopyright() { t << "\251"; } void writeQuote() { t << "\""; } void writeUmlaut(char c); diff --git a/src/scanner.l b/src/scanner.l index 6371b71..e70d3da 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -936,11 +936,6 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) } <FindMembers>"template"({BN}*)"<"/[>]? { lineCount(); - // class template specifier already found => member template specifier - // already inside class => member template specifier - //if (current->tArgList /*|| (current_root->section&Entry::COMPOUND_MASK)*/) - //{ - // printf("-------> member template \n"); if (current->tArgLists==0) { current->tArgLists = new QList<ArgumentList>; @@ -950,33 +945,6 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) al->setAutoDelete(TRUE); current->tArgLists->append(al); currentArgumentList = al; - //if (current->mtArgList) - // { - // if (current->tArgList) - // { - // delete current->tArgList; - // } - // current->tArgList = current->mtArgList; - // current->mtArgList = 0; - // } - // current->mtArgList = new ArgumentList; - // current->mtArgList->setAutoDelete(TRUE); - // currentArgumentList = current->mtArgList; - //} - //else // class template specifier - //{ - // printf("-------> class template\n"); - // if (current->tArgList) - // { - // current->tArgList->clear(); - // } - // else - // { - // current->tArgList = new ArgumentList; - // current->tArgList->setAutoDelete(TRUE); - // } - // currentArgumentList = current->tArgList; - //} templateStr="<"; fullArgString = templateStr.copy(); copyArgString = &templateStr; @@ -2198,7 +2166,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) BEGIN(SkipCPP); } */ -<FuncQual>[{:;] { unput(*yytext); BEGIN( Function ); } +<FuncQual>[{:;,] { unput(*yytext); BEGIN( Function ); } <FuncQual>{BN}*"const"{BN}* { lineCount() ; current->args += " const "; @@ -2263,7 +2231,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) <Function>":" { BEGIN(SkipInits); } -<Function>[;{] { +<Function>[;{,] { current->name=current->name.simplifyWhiteSpace(); current->type=current->type.simplifyWhiteSpace(); current->args=current->args.simplifyWhiteSpace(); @@ -2325,7 +2293,11 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) current = new Entry ; initEntry(); lastCurlyContext = FindMembers; - if( *yytext == '{' ) + if ( *yytext == ',' ) + { + current->type = previous->type.data(); + } + if ( *yytext == '{' ) { if (current_root->section & Entry::COMPOUND_MASK) previous->memSpec = previous->memSpec | Entry::Inline; @@ -4023,9 +3995,15 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) <Doc,JavaDoc,ClassDoc,PageDoc,ExampleDoc,ReadFormulaShort,ReadFormulaLong,AfterDoc>^{B}*(("//"{B}*)?)"*"+[ \t]*"-"("#")?{B}+ { current->doc += yytext; } +<Doc,JavaDoc,ClassDoc,PageDoc,ExampleDoc,ReadFormulaShort,ReadFormulaLong,AfterDoc>^{B}*(("//"{B}*)?)"*"+[ \t]*"."{B}*\n { + current->doc += yytext; + } <ClassDocBrief,AfterDocBrief>^{B}*(("//"{B}*)?)"*"+[ \t]*"-"("#")?{B}+ { current->brief += "-"; } +<ClassDocBrief,AfterDocBrief>^{B}*(("//"{B}*)?)"*"+[ \t]*"."{B}*\n { + current->brief += "."; + } <Doc,JavaDoc,ClassDoc,PageDoc,ExampleDoc,ReadFormulaShort,ReadFormulaLong,ClassDocBrief,AfterDoc,AfterDocBrief>^{B}*(("//"{B}*)?)"*"+/[^/] <Doc,JavaDoc,ClassDoc,PageDoc,ExampleDoc,ReadFormulaShort,ReadFormulaLong,ClassDocBrief,AfterDoc,AfterDocBrief>^{B}*(("//"{B}*)?)"*"+{B}+ { current->doc+=' '; diff --git a/src/translator.cpp b/src/translator.cpp index 3cce9df..00b15b8 100644 --- a/src/translator.cpp +++ b/src/translator.cpp @@ -191,3 +191,81 @@ QCString Translator::Windows1251ToKoi8R( const QCString & sInput ) return result.local8Bit(); } +/*! returns the caracter converted from hankaku-kana to zenkakukana. + Thanks Yongmao Ni http://alfin.mine.utsunomiya-u.ac.jp/~niy/algo/ */ +unsigned int hankaku2zen(int hankaku) +{ + static unsigned int z[64] = { + 0x2121,0x2123,0x2156,0x2157,0x2122,0x2126,0x2572,0x2521, + 0x2523,0x2525,0x2527,0x2529,0x2563,0x2565,0x2567,0x2543, + 0x213c,0x2522,0x2524,0x2526,0x2528,0x252a,0x252b,0x252d, + 0x252f,0x2531,0x2533,0x2535,0x2537,0x2539,0x253b,0x253d, + 0x253f,0x2541,0x2544,0x2546,0x2548,0x254a,0x254b,0x254c, + 0x254d,0x254e,0x254f,0x2552,0x2555,0x2558,0x255b,0x255e, + 0x255f,0x2560,0x2561,0x2562,0x2564,0x2566,0x2568,0x2569, + 0x256a,0x256b,0x256c,0x256d,0x256f,0x2573,0x212b,0x212c }; + + if (hankaku < 0xa0 || hankaku > 0xdf) return 0; + return z[hankaku - 0xa0]; +} + +/*! returns the character converted from japaneseEUC to SJIS + Thanks Yongmao Ni http://alfin.mine.utsunomiya-u.ac.jp/~niy/algo/ */ +unsigned int euc2sjis(unsigned int euc) +{ + unsigned int jis; + unsigned int hib, lob; + + if ((euc & 0xff00) == 0x8e00) + jis = hankaku2zen(euc & 0xff); + else jis = euc & ~0x8080; + + hib = (jis >> 8) & 0xff; + lob = jis & 0xff; + lob += (hib & 1) ? 0x1f : 0x7d; + if (lob >= 0x7f) lob++; + hib = ((hib - 0x21) >> 1) + 0x81; + if (hib > 0x9f) hib += 0x40; + + return (hib << 8) | lob; +} + + +/*! returns the string converted from Japanese-EUC to SJIS */ + +QCString Translator::JapaneseEucToSjis( const QCString & sInput ) +{ + QString result; + int len = sInput.length(); + int c1,c2,sj; + + result.setUnicode(0, len); + QChar* uc = (QChar*)result.unicode(); // const_cast + const unsigned char * c = (const unsigned char *)(const char*)sInput; + + for( int i=0; i<len;) + { + c1 = c[i]; + + if( c1 == EOF ) break; + + /* if MSB=0 then the character is ascii */ + if(!( c1 & 0x80)) + { + uc[i] = c[i]; + i=i+1; + } + else + { + c2 = c[i+1]; + if( c2 == EOF ) break; + sj = euc2sjis( (c1 << 8) + c2 ); + uc[i] = sj >> 8; + uc[i+1] = sj & 0xff; + i+=2; + } + } + + return result.local8Bit(); + +} diff --git a/src/translator.h b/src/translator.h index cc75d94..725c288 100644 --- a/src/translator.h +++ b/src/translator.h @@ -44,6 +44,9 @@ class Translator /*! Returns the string converted from windows-1251 to koi8-r. */ QCString Windows1251ToKoi8R( const QCString & sInput ); + + /*! Returns the string converted from Japanese-EUC to SJIS. */ + QCString JapaneseEucToSjis( const QCString & sInput ); public: diff --git a/src/translator_jp.h b/src/translator_jp.h index 4786558..5c240f1 100644 --- a/src/translator_jp.h +++ b/src/translator_jp.h @@ -15,464 +15,559 @@ * */ +/* + * translator_jp.h + * + * 1.2.5) + * First Translation + * by Kenji Nagamatsu + * 1.2.12) + * Update and Shift-Jis(_WIN32) + * by Ryunosuke Sato (30-Dec-2001) + */ + #ifndef TRANSLATOR_JP_H #define TRANSLATOR_JP_H -#include "translator_adapter.h" - -class TranslatorJapanese : public TranslatorAdapter_1_2_5 +class TranslatorJapanese : public Translator { + private: + /*! The decode() can change euc into sjis */ + inline QCString decode(const QCString & sInput) + { +#ifdef _WIN32 + return JapaneseEucToSjis(sInput); +#else + return sInput; +#endif + } public: - QCString idLanguage() + virtual QCString idLanguage() { return "japanese"; } + virtual QCString latexLanguageSupportCommand() + { + return ""; + } /*! returns the name of the package that is included by LaTeX */ - QCString latexBabelPackage() - { return "english"; } - QCString idLanguageCharset() - { return "euc-jp"; } + virtual QCString idLanguageCharset() + { +#ifdef _WIN32 + return "ShiftJIS"; +#else + return "euc-jp"; +#endif + } /*! used in the compound documentation before a list of related functions. */ - QCString trRelatedFunctions() - { return "関連する関数"; } + virtual QCString trRelatedFunctions() + { return decode("関連する関数"); } /*! subscript for the related functions. */ - QCString trRelatedSubscript() - { return "(これらはメンバ関数でないことに注意)"; } + virtual QCString trRelatedSubscript() + { return decode("(これらはメンバ関数でないことに注意)"); } /*! header that is put before the detailed description of files, classes and namespaces. */ - QCString trDetailedDescription() - { return "解説"; } + virtual QCString trDetailedDescription() + { return decode("解説"); } /*! header that is put before the list of typedefs. */ - QCString trMemberTypedefDocumentation() - { return "メンバ型定義の解説"; } + virtual QCString trMemberTypedefDocumentation() + { return decode("メンバ型定義の解説"); } /*! header that is put before the list of enumerations. */ - QCString trMemberEnumerationDocumentation() - { return "メンバ列挙型の解説"; } + virtual QCString trMemberEnumerationDocumentation() + { return decode("メンバ列挙型の解説"); } /*! header that is put before the list of member functions. */ - QCString trMemberFunctionDocumentation() - { return "メンバ関数の解説"; } + virtual QCString trMemberFunctionDocumentation() + { return decode("メンバ関数の解説"); } /*! header that is put before the list of member attributes. */ - QCString trMemberDataDocumentation() - { return "メンバデータの解説"; } + virtual QCString trMemberDataDocumentation() + { + if( Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode("構造体の解説"); + } + else + { + return decode("メンバの解説"); + } + } /*! this is the text of a link put after brief descriptions. */ - QCString trMore() - { return "より詳しく..."; } + virtual QCString trMore() + { return decode("より詳しく..."); } /*! put in the class documentation */ - QCString trListOfAllMembers() - { return "すべてのメンバリスト"; } + virtual QCString trListOfAllMembers() + { return decode("すべてのメンバリスト"); } /*! used as the title of the "list of all members" page of a class */ - QCString trMemberList() - { return "メンバリスト"; } + virtual QCString trMemberList() + { return decode("メンバリスト"); } /*! this is the first part of a sentence that is followed by a class name */ - QCString trThisIsTheListOfAllMembers() - { return "これは全メンバリストです。"; } + virtual QCString trThisIsTheListOfAllMembers() + { return decode("これは全メンバリストです。"); } /*! this is the remainder of the sentence after the class name */ - QCString trIncludingInheritedMembers() - { return "継承メンバもすべて含んでいます。"; } + virtual QCString trIncludingInheritedMembers() + { return decode("継承メンバもすべて含んでいます。"); } /*! this is put at the author sections at the bottom of man pages. * parameter s is name of the project name. */ - QCString trGeneratedAutomatically(const char *s) + virtual QCString trGeneratedAutomatically(const char *s) { QCString result; if (s) result=(QCString)s+"の"; result+="ソースコードから Doxygen が自動的に生成しました。"; - return result; + return decode(result); } /*! put after an enum name in the list of all members */ - QCString trEnumName() - { return "enum 型"; } + virtual QCString trEnumName() + { return decode("列挙型"); } /*! put after an enum value in the list of all members */ - QCString trEnumValue() - { return "enum 値"; } + virtual QCString trEnumValue() + { return decode("列挙値"); } /*! put after an undocumented member in the list of all members */ - QCString trDefinedIn() - { return "次で定義されました。"; } - - /*! put as in introduction in the verbatim header file of a class. - * parameter f is the name of the include file. - */ - QCString trVerbatimText(const char *f) - { return (QCString)"これはインクルードファイル"+f+"の内容です。"; } + virtual QCString trDefinedIn() + { return decode("次で定義されました。"); } // quick reference sections /*! This is put above each page as a link to the list of all groups of * compounds or files (see the \group command). */ - QCString trModules() - { return "モジュール"; } + virtual QCString trModules() + { return decode("モジュール"); } /*! This is put above each page as a link to the class hierarchy */ - QCString trClassHierarchy() - { return "クラス階層"; } + virtual QCString trClassHierarchy() + { return decode("クラス階層"); } /*! This is put above each page as a link to the list of annotated classes */ - QCString trCompoundList() - { return "データ構造リスト"; } + virtual QCString trCompoundList() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode("データ構造"); + } + else + { + return decode("構成"); + } + } /*! This is put above each page as a link to the list of documented files */ - QCString trFileList() - { return "ファイルリスト"; } + virtual QCString trFileList() + { return decode("ファイルリスト"); } /*! This is put above each page as a link to the list of all verbatim headers */ - QCString trHeaderFiles() - { return "ヘッダファイル"; } + virtual QCString trHeaderFiles() + { return decode("ヘッダファイル"); } /*! This is put above each page as a link to all members of compounds. */ - QCString trCompoundMembers() - { return "データ構造メンバ"; } + virtual QCString trCompoundMembers() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode("データフィールド"); + } + else + { + return decode("構成メンバ"); + } + } /*! This is put above each page as a link to all members of files. */ - QCString trFileMembers() - { return "ファイルメンバ"; } - + virtual QCString trFileMembers() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode("グローバル"); + } + else + { + return decode("ファイルメンバ"); + } + } /*! This is put above each page as a link to all related pages. */ - QCString trRelatedPages() - { return "関連ページ"; } + virtual QCString trRelatedPages() + { return decode("関連ページ"); } /*! This is put above each page as a link to all examples. */ - QCString trExamples() - { return "例"; } + virtual QCString trExamples() + { return decode("例"); } /*! This is put above each page as a link to the search engine. */ - QCString trSearch() - { return "検索"; } + virtual QCString trSearch() + { return decode("検索"); } /*! This is an introduction to the class hierarchy. */ - QCString trClassHierarchyDescription() - { return "この継承リストはおおまかにはソートされていますが、" - "アルファベット順で完全にソートされてはいません。"; + virtual QCString trClassHierarchyDescription() + { return decode("この継承リストはおおまかにはソートされていますが、" + "アルファベット順で完全にソートされてはいません。"); } /*! This is an introduction to the list with all files. */ - QCString trFileListDescription(bool extractAll) + virtual QCString trFileListDescription(bool extractAll) { QCString result="このリストは、"; if (!extractAll) result+="ドキュメント化され、"; result+="簡易説明を持つファイルすべてのリストです。"; - return result; + return decode(result); } /*! This is an introduction to the annotated compound list. */ - QCString trCompoundListDescription() - { return "これは簡易説明を持つ、クラス、構造体、共用体のリストです。";} + virtual QCString trCompoundListDescription() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode("データ構造の簡単な説明です。"); + } + else + { + return decode("クラス、構造体、共用体、インタフェースの簡単な説明です。"); + } + } /*! This is an introduction to the page with all class members. */ - QCString trCompoundMembersDescription(bool extractAll) + virtual QCString trCompoundMembersDescription(bool extractAll) { QCString result="これは"; if (!extractAll) result+="ドキュメント化された"; - result+="クラスメンバすべてのリストで、それぞれ"; - if (extractAll) result+="が属しているクラス"; + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="フィールドすべてのリストで、それぞれ"; + if (extractAll) result+="が属している構造体/共用体"; + } + else + { + result+="クラスメンバすべてのリストで、それぞれ"; + if (extractAll) result+="が属しているクラス"; + } result+="の解説へのリンクが張られています。"; - return result; + return decode(result); } /*! This is an introduction to the page with all file members. */ - QCString trFileMembersDescription(bool extractAll) + virtual QCString trFileMembersDescription(bool extractAll) { QCString result="これは"; if (!extractAll) result+="ドキュメント化された"; - result+="ファイルメンバすべてのリストで、それぞれ"; + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="関数、変数、マクロ、列挙型、型定義のリストで、それぞれ"; + } + else + { + result+="ファイルメンバすべてのリストで、それぞれ"; + } if (extractAll) result+="が属しているファイル"; result+="の解説へのリンクが張られています。"; - return result; + return decode(result); } /*! This is an introduction to the page with the list of all header files. */ - QCString trHeaderFilesDescription() - { return "APIを構成するヘッダファイルです。"; } + virtual QCString trHeaderFilesDescription() + { return decode("APIを構成するヘッダファイルです。"); } /*! This is an introduction to the page with the list of all examples */ - QCString trExamplesDescription() - { return "すべての例のリストです。"; } + virtual QCString trExamplesDescription() + { return decode("すべての例のリストです。"); } /*! This is an introduction to the page with the list of related pages */ - QCString trRelatedPagesDescription() - { return "関連するドキュメントページすべてのリストです。"; } + virtual QCString trRelatedPagesDescription() + { return decode("関連するドキュメントページすべてのリストです。"); } /*! This is an introduction to the page with the list of class/file groups */ - QCString trModulesDescription() - { return "すべてのモジュールのリストです。"; } + virtual QCString trModulesDescription() + { return decode("すべてのモジュールのリストです。"); } /*! This sentences is used in the annotated class/file lists if no brief * description is given. */ - QCString trNoDescriptionAvailable() - { return "ドキュメントが記述されていません。"; } + virtual QCString trNoDescriptionAvailable() + { return decode("ドキュメントが記述されていません。"); } // index titles (the project name is prepended for these) /*! This is used in HTML as the title of index.html. */ - QCString trDocumentation() - { return "ドキュメント"; } + virtual QCString trDocumentation() + { return decode("ドキュメント"); } /*! This is used in LaTeX as the title of the chapter with the * index of all groups. */ - QCString trModuleIndex() - { return "モジュール索引"; } + virtual QCString trModuleIndex() + { return decode("モジュール索引"); } /*! This is used in LaTeX as the title of the chapter with the * class hierarchy. */ - QCString trHierarchicalIndex() - { return "階層索引"; } + virtual QCString trHierarchicalIndex() + { return decode("階層索引"); } /*! This is used in LaTeX as the title of the chapter with the * annotated compound index. */ - QCString trCompoundIndex() - { return "データ構造索引"; } + virtual QCString trCompoundIndex() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode("データ構造索引"); + } + else + { + return decode("構成索引"); + } + } /*! This is used in LaTeX as the title of the chapter with the * list of all files. */ - QCString trFileIndex() - { return "ファイル索引"; } + virtual QCString trFileIndex() + { return decode("ファイル索引"); } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all groups. */ - QCString trModuleDocumentation() - { return "モジュールの解説"; } + virtual QCString trModuleDocumentation() + { return decode("モジュールの解説"); } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all classes, structs and unions. */ - QCString trClassDocumentation() - { return "クラスの解説"; } + virtual QCString trClassDocumentation() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode("データ構造の解説"); + } + else + { + return decode("クラスの解説"); + } + } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all files. */ - QCString trFileDocumentation() - { return "ファイルの解説"; } + virtual QCString trFileDocumentation() + { return decode("ファイルの解説"); } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all examples. */ - QCString trExampleDocumentation() - { return "例題の解説"; } + virtual QCString trExampleDocumentation() + { return decode("例題の解説"); } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all related pages. */ - QCString trPageDocumentation() - { return "ページの解説"; } + virtual QCString trPageDocumentation() + { return decode("ページの解説"); } /*! This is used in LaTeX as the title of the document */ - QCString trReferenceManual() - { return "リファレンスマニュアル"; } + virtual QCString trReferenceManual() + { return decode("リファレンスマニュアル"); } /*! This is used in the documentation of a file as a header before the * list of defines */ - QCString trDefines() - { return "マクロ定義"; } + virtual QCString trDefines() + { return decode("マクロ定義"); } /*! This is used in the documentation of a file as a header before the * list of function prototypes */ - QCString trFuncProtos() - { return "関数プロトタイプ"; } + virtual QCString trFuncProtos() + { return decode("関数プロトタイプ"); } /*! This is used in the documentation of a file as a header before the * list of typedefs */ - QCString trTypedefs() - { return "型定義"; } + virtual QCString trTypedefs() + { return decode("型定義"); } /*! This is used in the documentation of a file as a header before the * list of enumerations */ - QCString trEnumerations() - { return "列挙型"; } + virtual QCString trEnumerations() + { return decode("列挙型"); } /*! This is used in the documentation of a file as a header before the * list of (global) functions */ - QCString trFunctions() - { return "関数"; } + virtual QCString trFunctions() + { return decode("関数"); } /*! This is used in the documentation of a file as a header before the * list of (global) variables */ - QCString trVariables() - { return "変数"; } + virtual QCString trVariables() + { return decode("変数"); } /*! This is used in the documentation of a file as a header before the * list of (global) variables */ - QCString trEnumerationValues() - { return "列挙型値"; } - - /*! This is used in man pages as the author section. */ - QCString trAuthor() - { return "作者"; } - + virtual QCString trEnumerationValues() + { return decode("列挙型値"); } /*! This is used in the documentation of a file before the list of * documentation blocks for defines */ - QCString trDefineDocumentation() - { return "マクロ定義の解説"; } + virtual QCString trDefineDocumentation() + { return decode("マクロ定義の解説"); } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for function prototypes */ - QCString trFunctionPrototypeDocumentation() - { return "関数プロトタイプの解説"; } + virtual QCString trFunctionPrototypeDocumentation() + { return decode("関数プロトタイプの解説"); } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for typedefs */ - QCString trTypedefDocumentation() - { return "型定義の解説"; } + virtual QCString trTypedefDocumentation() + { return decode("型定義の解説"); } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for enumeration types */ - QCString trEnumerationTypeDocumentation() - { return "列挙型の解説"; } + virtual QCString trEnumerationTypeDocumentation() + { return decode("列挙型の解説"); } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for enumeration values */ - QCString trEnumerationValueDocumentation() - { return "列挙型値の解説"; } + virtual QCString trEnumerationValueDocumentation() + { return decode("列挙型値の解説"); } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for functions */ - QCString trFunctionDocumentation() - { return "関数の解説"; } + virtual QCString trFunctionDocumentation() + { return decode("関数の解説"); } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for variables */ - QCString trVariableDocumentation() - { return "変数の解説"; } + virtual QCString trVariableDocumentation() + { return decode("変数の解説"); } /*! This is used in the documentation of a file/namespace/group before * the list of links to documented compounds */ - QCString trCompounds() - { return "データ構造"; } - - /*! This is used in the documentation of a group before the list of - * links to documented files - */ - QCString trFiles() - { return "ファイル"; } - + virtual QCString trCompounds() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode("データ構造"); + } + else + { + return decode("構成"); + } + } /*! This is used in the standard footer of each page and indicates when * the page was generated */ - QCString trGeneratedAt(const char *date,const char *projName) + virtual QCString trGeneratedAt(const char *date,const char *projName) { QCString result; if (projName) result+=(QCString)projName+"に対して"; result+=(QCString)date+"に生成されました。"; - return result; + return decode(result); } /*! This is part of the sentence used in the standard footer of each page. */ - QCString trWrittenBy() + virtual QCString trWrittenBy() { - return "の開発者:"; + return decode("担当"); } /*! this text is put before a class diagram */ - QCString trClassDiagram(const char *clName) + virtual QCString trClassDiagram(const char *clName) { - return (QCString)clName+"に対するクラス階層図"; + return decode((QCString)clName+"に対する継承グラフ"); } /*! this text is generated when the \\internal command is used. */ - QCString trForInternalUseOnly() - { return "内部使用のみ。"; } + virtual QCString trForInternalUseOnly() + { return decode("内部使用のみ。"); } /*! this text is generated when the \\reimp command is used. */ - QCString trReimplementedForInternalReasons() - { return "内部的な理由により再実装されましたが、APIには影響しません。"; + virtual QCString trReimplementedForInternalReasons() + { return decode("内部的な理由により再実装されましたが、APIには影響しません。"); } /*! this text is generated when the \\warning command is used. */ - QCString trWarning() - { return "警告"; } + virtual QCString trWarning() + { return decode("警告"); } /*! this text is generated when the \\bug command is used. */ - QCString trBugsAndLimitations() - { return "バグと制限"; } + virtual QCString trBugsAndLimitations() + { return decode("バグと制限"); } /*! this text is generated when the \\version command is used. */ - QCString trVersion() - { return "バージョン"; } + virtual QCString trVersion() + { return decode("バージョン"); } /*! this text is generated when the \\date command is used. */ - QCString trDate() - { return "日付"; } + virtual QCString trDate() + { return decode("日付"); } /*! this text is generated when the \\author command is used. */ - QCString trAuthors() - { return "作者"; } + virtual QCString trAuthors() + { return decode("作者"); } /*! this text is generated when the \\return command is used. */ - QCString trReturns() - { return "戻り値"; } + virtual QCString trReturns() + { return decode("戻り値"); } /*! this text is generated when the \\sa command is used. */ - QCString trSeeAlso() - { return "参照"; } + virtual QCString trSeeAlso() + { return decode("参照"); } /*! this text is generated when the \\param command is used. */ - QCString trParameters() - { return "引数"; } + virtual QCString trParameters() + { return decode("引数"); } /*! this text is generated when the \\exception command is used. */ - QCString trExceptions() - { return "例外"; } + virtual QCString trExceptions() + { return decode("例外"); } /*! this text is used in the title page of a LaTeX document. */ - QCString trGeneratedBy() - { return ""; } + virtual QCString trGeneratedBy() + { return decode(""); } ////////////////////////////////////////////////////////////////////////// // new since 0.49-990307 ////////////////////////////////////////////////////////////////////////// /*! used as the title of page containing all the index of all namespaces. */ - QCString trNamespaceList() - { return "名前空間リスト"; } + virtual QCString trNamespaceList() + { return decode("名前空間リスト"); } /*! used as an introduction to the namespace list */ - QCString trNamespaceListDescription(bool extractAll) + virtual QCString trNamespaceListDescription(bool extractAll) { QCString result="このリストは、簡易説明を持つすべての"; if (!extractAll) result+="ドキュメント化された"; result+="名前空間のリストです。"; - return result; + return decode(result); } /*! used in the class documentation as a header before the list of all * friends of a class */ - QCString trFriends() - { return "フレンド"; } + virtual QCString trFriends() + { return decode("フレンド"); } ////////////////////////////////////////////////////////////////////////// // new since 0.49-990405 @@ -482,16 +577,16 @@ class TranslatorJapanese : public TranslatorAdapter_1_2_5 * related classes */ virtual QCString trRelatedFunctionDocumentation() - { return "フレンドと関連する関数の解説"; } + { return decode("フレンドと関連する関数の解説"); } ////////////////////////////////////////////////////////////////////////// // new since 0.49-990425 ////////////////////////////////////////////////////////////////////////// /*! used as the title of the HTML page of a class/struct/union */ - QCString trCompoundReference(const char *clName, + virtual QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, - bool /*isTemplate*/) + bool isTemplate) { QCString result=""; switch(compType) @@ -500,52 +595,53 @@ class TranslatorJapanese : public TranslatorAdapter_1_2_5 case ClassDef::Struct: result+="構造体 "; break; case ClassDef::Union: result+="共用体 "; break; case ClassDef::Interface: result+="インタフェース"; break; - case ClassDef::Exception: result+="Exception "; break; //TODO:fixme + case ClassDef::Exception: result+="例外"; break; //TODO:fixme } + if (isTemplate) result+=" テンプレート"; result+=(QCString)clName+" の解説"; - return result; + return decode(result); } /*! used as the title of the HTML page of a file */ - QCString trFileReference(const char *fileName) + virtual QCString trFileReference(const char *fileName) { QCString result="ファイル "+(QCString)fileName+" の解説"; - return result; + return decode(result); } /*! used as the title of the HTML page of a namespace */ - QCString trNamespaceReference(const char *namespaceName) + virtual QCString trNamespaceReference(const char *namespaceName) { QCString result="名前空間 "+(QCString)namespaceName+" の解説"; - return result; + return decode(result); } /* these are for the member sections of a class, struct or union */ - QCString trPublicMembers() - { return "公開メンバ"; } - QCString trPublicSlots() - { return "公開スロット"; } - QCString trSignals() - { return "シグナル"; } - QCString trStaticPublicMembers() - { return "静的公開メンバ"; } - QCString trProtectedMembers() - { return "保護メンバ"; } - QCString trProtectedSlots() - { return "保護スロット"; } - QCString trStaticProtectedMembers() - { return "静的保護メンバ"; } - QCString trPrivateMembers() - { return "非公開メンバ"; } - QCString trPrivateSlots() - { return "非公開スロット"; } - QCString trStaticPrivateMembers() - { return "静的非公開メンバ"; } + virtual QCString trPublicMembers() + { return decode("公開メンバ"); } + virtual QCString trPublicSlots() + { return decode("公開スロット"); } + virtual QCString trSignals() + { return decode("シグナル"); } + virtual QCString trStaticPublicMembers() + { return decode("静的公開メンバ"); } + virtual QCString trProtectedMembers() + { return decode("保護メンバ"); } + virtual QCString trProtectedSlots() + { return decode("保護スロット"); } + virtual QCString trStaticProtectedMembers() + { return decode("静的保護メンバ"); } + virtual QCString trPrivateMembers() + { return decode("非公開メンバ"); } + virtual QCString trPrivateSlots() + { return decode("非公開スロット"); } + virtual QCString trStaticPrivateMembers() + { return decode("静的非公開メンバ"); } /*! this function is used to produce a comma-separated list of items. * use generateMarker(i) to indicate where item i should be put. */ - QCString trWriteList(int numEntries) + virtual QCString trWriteList(int numEntries) { QCString result; int i; @@ -564,47 +660,47 @@ class TranslatorJapanese : public TranslatorAdapter_1_2_5 result+=", と "; } } - return result; + return decode(result); } /*! used in class documentation to produce a list of base classes, * if class diagrams are disabled. */ - QCString trInheritsList(int numEntries) + virtual QCString trInheritsList(int numEntries) { - return trWriteList(numEntries)+"を継承しています。"; + return decode(trWriteList(numEntries)+"を継承しています。"); } /*! used in class documentation to produce a list of super classes, * if class diagrams are disabled. */ - QCString trInheritedByList(int numEntries) + virtual QCString trInheritedByList(int numEntries) { - return trWriteList(numEntries)+"に継承されています。"; + return decode(trWriteList(numEntries)+"に継承されています。"); } /*! used in member documentation blocks to produce a list of * members that are hidden by this one. */ - QCString trReimplementedFromList(int numEntries) + virtual QCString trReimplementedFromList(int numEntries) { - return trWriteList(numEntries)+"を再定義しています。"; + return decode(trWriteList(numEntries)+"を再定義しています。"); } /*! used in member documentation blocks to produce a list of * all member that overwrite the implementation of this member. */ - QCString trReimplementedInList(int numEntries) + virtual QCString trReimplementedInList(int numEntries) { - return trWriteList(numEntries)+"で再定義されています。"; + return decode(trWriteList(numEntries)+"で再定義されています。"); } /*! This is put above each page as a link to all members of namespaces. */ - QCString trNamespaceMembers() - { return "名前空間メンバ"; } + virtual QCString trNamespaceMembers() + { return decode("名前空間メンバ"); } /*! This is an introduction to the page with all namespace members */ - QCString trNamespaceMemberDescription(bool extractAll) + virtual QCString trNamespaceMemberDescription(bool extractAll) { QCString result="これは"; if (!extractAll) result+="ドキュメント化された"; @@ -614,19 +710,19 @@ class TranslatorJapanese : public TranslatorAdapter_1_2_5 else result+="が属している名前空間"; result+="へのリンクが張られています。"; - return result; + return decode(result); } /*! This is used in LaTeX as the title of the chapter with the * index of all namespaces. */ - QCString trNamespaceIndex() - { return "名前空間索引"; } + virtual QCString trNamespaceIndex() + { return decode("名前空間索引"); } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all namespaces. */ - QCString trNamespaceDocumentation() - { return "名前空間の解説"; } + virtual QCString trNamespaceDocumentation() + { return decode("名前空間の解説"); } ////////////////////////////////////////////////////////////////////////// // new since 0.49-990522 @@ -635,8 +731,8 @@ class TranslatorJapanese : public TranslatorAdapter_1_2_5 /*! This is used in the documentation before the list of all * namespaces in a file. */ - QCString trNamespaces() - { return "名前空間"; } + virtual QCString trNamespaces() + { return decode("名前空間"); } ////////////////////////////////////////////////////////////////////////// // new since 0.49-990728 @@ -645,7 +741,7 @@ class TranslatorJapanese : public TranslatorAdapter_1_2_5 /*! This is put at the bottom of a class documentation page and is * followed by a list of files that were used to generate the page. */ - QCString trGeneratedFromFiles(ClassDef::CompoundType compType, + virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType, bool) { // here s is one of " Class", " Struct" or " Union" // single is true implies a single file @@ -656,61 +752,61 @@ class TranslatorJapanese : public TranslatorAdapter_1_2_5 case ClassDef::Struct: result+="構造体"; break; case ClassDef::Union: result+="共用体"; break; case ClassDef::Interface: result+="インタフェース"; break; - case ClassDef::Exception: result+="Exception"; break; //TODO:fixme + case ClassDef::Exception: result+="例外"; break; //TODO:fixme } result+="の解説は次のファイルから生成されました:"; - return result; + return decode(result); } /*! This is in the (quick) index as a link to the alphabetical compound * list. */ - QCString trAlphabeticalList() - { return "アルファベット順リスト"; } + virtual QCString trAlphabeticalList() + { return decode("アルファベット順リスト"); } ////////////////////////////////////////////////////////////////////////// // new since 0.49-990901 ////////////////////////////////////////////////////////////////////////// /*! This is used as the heading text for the retval command. */ - QCString trReturnValues() - { return "戻り値"; } + virtual QCString trReturnValues() + { return decode("戻り値"); } /*! This is in the (quick) index as a link to the main page (index.html) */ - QCString trMainPage() - { return "メインページ"; } + virtual QCString trMainPage() + { return decode("メインページ"); } /*! This is used in references to page that are put in the LaTeX * documentation. It should be an abbreviation of the word page. */ - QCString trPageAbbreviation() - { return "p."; } + virtual QCString trPageAbbreviation() + { return decode("p."); } ////////////////////////////////////////////////////////////////////////// // new since 0.49-991003 ////////////////////////////////////////////////////////////////////////// - QCString trSources() + virtual QCString trSources() { - return "ソース"; + return decode("ソース"); } - QCString trDefinedAtLineInSourceFile() + virtual QCString trDefinedAtLineInSourceFile() { - return "ファイル @1 の @0 行で定義されています。"; + return decode("ファイル @1 の @0 行で定義されています。"); } - QCString trDefinedInSourceFile() + virtual QCString trDefinedInSourceFile() { - return "ファイル @0 で定義されています。"; + return decode("ファイル @0 で定義されています。"); } ////////////////////////////////////////////////////////////////////////// // new since 1.0.0 ////////////////////////////////////////////////////////////////////////// - QCString trDeprecated() + virtual QCString trDeprecated() { - return "Deprecated"; + return decode("非推奨"); } ////////////////////////////////////////////////////////////////////////// @@ -718,115 +814,122 @@ class TranslatorJapanese : public TranslatorAdapter_1_2_5 ////////////////////////////////////////////////////////////////////////// /*! this text is put before a collaboration diagram */ - QCString trCollaborationDiagram(const char *clName) + virtual QCString trCollaborationDiagram(const char *clName) { - return (QCString)clName+"のコラボレーション図"; + return decode((QCString)clName+"のコラボレーション図"); } /*! this text is put before an include dependency graph */ - QCString trInclDepGraph(const char *fName) + virtual QCString trInclDepGraph(const char *fName) { - return (QCString)fName+"のインクルード依存関係図"; + return decode((QCString)fName+"のインクルード依存関係図"); } /*! header that is put before the list of constructor/destructors. */ - QCString trConstructorDocumentation() + virtual QCString trConstructorDocumentation() { - return "コンストラクタとデストラクタの解説"; + return decode("コンストラクタとデストラクタの解説"); } /*! Used in the file documentation to point to the corresponding sources. */ - QCString trGotoSourceCode() + virtual QCString trGotoSourceCode() { - return "このファイルのソースコードを見る。"; + return decode("このファイルのソースコードを見る。"); } /*! Used in the file sources to point to the corresponding documentation. */ - QCString trGotoDocumentation() + virtual QCString trGotoDocumentation() { - return "このファイルの解説を見る。"; + return decode("このファイルの解説を見る。"); } /*! Text for the \\pre command */ - QCString trPrecondition() + virtual QCString trPrecondition() { - return "事前条件"; + return decode("事前条件"); } /*! Text for the \\post command */ - QCString trPostcondition() + virtual QCString trPostcondition() { - return "事後条件"; + return decode("事後条件"); } /*! Text for the \\invariant command */ - QCString trInvariant() + virtual QCString trInvariant() { - return "Invariant"; + return decode("不変"); } /*! Text shown before a multi-line variable/enum initialization */ - QCString trInitialValue() + virtual QCString trInitialValue() { - return "初期値:"; + return decode("初期値:"); } /*! Text used the source code in the file index */ - QCString trCode() + virtual QCString trCode() { - return "コード"; + return decode("コード"); } - QCString trGraphicalHierarchy() + virtual QCString trGraphicalHierarchy() { - return "クラス階層図"; + return decode("クラス階層図"); } - QCString trGotoGraphicalHierarchy() + virtual QCString trGotoGraphicalHierarchy() { - return "クラス階層図を見る。"; + return decode("クラス階層図を見る。"); } - QCString trGotoTextualHierarchy() + virtual QCString trGotoTextualHierarchy() { - return "クラス階層図(テキスト)を見る。"; + return decode("クラス階層図(テキスト)を見る。"); } - QCString trPageIndex() + virtual QCString trPageIndex() { - return "ページ索引"; + return decode("ページ索引"); } ////////////////////////////////////////////////////////////////////////// // new since 1.1.0 ////////////////////////////////////////////////////////////////////////// - QCString trNote() + virtual QCString trNote() { - return "覚え書き"; + return decode("覚え書き"); } - QCString trPublicTypes() + virtual QCString trPublicTypes() { - return "公開型"; + return decode("公開型"); } - QCString trPublicAttribs() + virtual QCString trPublicAttribs() { - return "公開属性"; + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode("データフィールド"); + } + else + { + return decode("公開属性"); + } } - QCString trStaticPublicAttribs() + virtual QCString trStaticPublicAttribs() { - return "静的公開属性"; + return decode("静的公開属性"); } - QCString trProtectedTypes() + virtual QCString trProtectedTypes() { - return "保護型"; + return decode("保護型"); } - QCString trProtectedAttribs() + virtual QCString trProtectedAttribs() { - return "保護属性"; + return decode("保護属性"); } - QCString trStaticProtectedAttribs() + virtual QCString trStaticProtectedAttribs() { - return "静的保護属性"; + return decode("静的保護属性"); } - QCString trPrivateTypes() + virtual QCString trPrivateTypes() { - return "非公開型"; + return decode("非公開型"); } - QCString trPrivateAttribs() + virtual QCString trPrivateAttribs() { - return "非公開属性"; + return decode("非公開属性"); } - QCString trStaticPrivateAttribs() + virtual QCString trStaticPrivateAttribs() { - return "静的非公開属性"; + return decode("静的非公開属性"); } ////////////////////////////////////////////////////////////////////////// @@ -834,40 +937,40 @@ class TranslatorJapanese : public TranslatorAdapter_1_2_5 ////////////////////////////////////////////////////////////////////////// /*! Used as a marker that is put before a todo item */ - QCString trTodo() + virtual QCString trTodo() { - return "TODO"; + return decode("TODO"); } /*! Used as the header of the todo list */ - QCString trTodoList() + virtual QCString trTodoList() { - return "TODOリスト"; + return decode("TODOリスト"); } ////////////////////////////////////////////////////////////////////////// // new since 1.1.4 ////////////////////////////////////////////////////////////////////////// - QCString trReferencedBy() + virtual QCString trReferencedBy() { - return "次で参照されています。"; + return decode("参照位置"); } - QCString trRemarks() + virtual QCString trRemarks() { - return "意見"; + return decode("意見"); } - QCString trAttention() + virtual QCString trAttention() { - return "注意"; + return decode("注意"); } - QCString trInclByDepGraph() + virtual QCString trInclByDepGraph() { - return "このグラフは、このファイルがどのファイルから直接、間接的に" - "インクルードされているかを示しています。"; + return decode("このグラフは、このファイルがどのファイルから直接、間接的に" + "インクルードされているかを示しています。"); } - QCString trSince() + virtual QCString trSince() { - return "Since"; + return decode("から"); } ////////////////////////////////////////////////////////////////////////// @@ -875,15 +978,15 @@ class TranslatorJapanese : public TranslatorAdapter_1_2_5 ////////////////////////////////////////////////////////////////////////// /*! title of the graph legend page */ - QCString trLegendTitle() + virtual QCString trLegendTitle() { - return "グラフの凡例"; + return decode("グラフの凡例"); } /*! page explaining how the dot graph's should be interpreted */ - QCString trLegendDocs() + virtual QCString trLegendDocs() { return - "このページでは、doxygen で生成されたグラフをどのようにみたらよいかを" + decode("このページでは、doxygen で生成されたグラフをどのようにみたらよいかを" "説明します。<p>\n" "次の例を考えてみます。\n" "\\code\n" @@ -933,12 +1036,12 @@ class TranslatorJapanese : public TranslatorAdapter_1_2_5 "<li>紫の破線矢印は、そのクラスが他のクラスに含まれていたり、" "利用されていることを示します。また、矢印が指しているクラスや構造体を" "どの変数でアクセスできるかを矢印のラベルとして示しています。\n" - "</ul>\n"; + "</ul>\n"); } /*! text for the link to the legend page */ - QCString trLegend() + virtual QCString trLegend() { - return "凡例"; + return decode("凡例"); } ////////////////////////////////////////////////////////////////////////// @@ -946,14 +1049,14 @@ class TranslatorJapanese : public TranslatorAdapter_1_2_5 ////////////////////////////////////////////////////////////////////////// /*! Used as a marker that is put before a test item */ - QCString trTest() + virtual QCString trTest() { - return "テスト"; + return decode("テスト"); } /*! Used as the header of the test list */ - QCString trTestList() + virtual QCString trTestList() { - return "テストリスト"; + return decode("テストリスト"); } ////////////////////////////////////////////////////////////////////////// @@ -961,9 +1064,9 @@ class TranslatorJapanese : public TranslatorAdapter_1_2_5 ////////////////////////////////////////////////////////////////////////// /*! Used as a section header for KDE-2 IDL methods */ - QCString trDCOPMethods() + virtual QCString trDCOPMethods() { - return "DCOPメソッド"; + return decode("DCOPメソッド"); } ////////////////////////////////////////////////////////////////////////// @@ -971,14 +1074,14 @@ class TranslatorJapanese : public TranslatorAdapter_1_2_5 ////////////////////////////////////////////////////////////////////////// /*! Used as a section header for IDL properties */ - QCString trProperties() + virtual QCString trProperties() { - return "プロパティ"; + return decode("プロパティ"); } /*! Used as a section header for IDL property documentation */ - QCString trPropertyDocumentation() + virtual QCString trPropertyDocumentation() { - return "プロパティの解説"; + return decode("プロパティの解説"); } @@ -989,43 +1092,241 @@ class TranslatorJapanese : public TranslatorAdapter_1_2_5 /*! Used for Java interfaces in the summary section of Java packages */ virtual QCString trInterfaces() { - return "インターフェース"; + return decode("インターフェース"); } /*! Used for Java classes in the summary section of Java packages */ virtual QCString trClasses() { - return "クラス"; + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return decode("データ構造"); + } + else + { + return decode("クラス"); + } } /*! Used as the title of a Java package */ virtual QCString trPackage(const char *name) { - return (QCString)"パッケージ "+name; + return decode((QCString)"パッケージ "+name); } /*! Title of the package index page */ virtual QCString trPackageList() { - return "パッケージリスト"; + return decode("パッケージリスト"); } /*! The description of the package index page */ virtual QCString trPackageListDescription() { - return "簡易説明を持つパッケージです。"; + return decode("簡易説明を持つパッケージです。"); } /*! The link name in the Quick links header for each page */ virtual QCString trPackages() { - return "パッケージ"; + return decode("パッケージ"); } /*! Used as a chapter title for Latex & RTF output */ virtual QCString trPackageDocumentation() { - return "パッケージの解説"; + return decode("パッケージの解説"); } /*! Text shown before a multi-line define */ virtual QCString trDefineValue() { - return "値:"; + return decode("値:"); + } + + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.5 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a \\bug item */ + virtual QCString trBug() + { + return decode("バグ"); + } + /*! Used as the header of the bug list */ + virtual QCString trBugList() + { + return decode("バグのリスト"); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.6 +////////////////////////////////////////////////////////////////////////// + + /*! Used as ansicpg for RTF file + * + * The following table shows the correlation of Charset name, Charset Value and + * <pre> + * Codepage number: + * Charset Name Charset Value(hex) Codepage number + * ------------------------------------------------------ + * DEFAULT_CHARSET 1 (x01) + * SYMBOL_CHARSET 2 (x02) + * OEM_CHARSET 255 (xFF) + * ANSI_CHARSET 0 (x00) 1252 + * RUSSIAN_CHARSET 204 (xCC) 1251 + * EE_CHARSET 238 (xEE) 1250 + * GREEK_CHARSET 161 (xA1) 1253 + * TURKISH_CHARSET 162 (xA2) 1254 + * BALTIC_CHARSET 186 (xBA) 1257 + * HEBREW_CHARSET 177 (xB1) 1255 + * ARABIC _CHARSET 178 (xB2) 1256 + * SHIFTJIS_CHARSET 128 (x80) 932 + * HANGEUL_CHARSET 129 (x81) 949 + * GB2313_CHARSET 134 (x86) 936 + * CHINESEBIG5_CHARSET 136 (x88) 950 + * </pre> + * + */ + virtual QCString trRTFansicp() + { + return "932"; + } + + + /*! Used as ansicpg for RTF fcharset + * \see trRTFansicp() for a table of possible values. + */ + virtual QCString trRTFCharSet() + { + return "128"; + } + + /*! Used as header RTF general index */ + virtual QCString trRTFGeneralIndex() + { + return decode("索引"); + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trClass(bool first_capital, bool singular) + { + first_capital = first_capital; + singular = singular; + QCString result("クラス"); + return decode(result); + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trFile(bool first_capital, bool singular) + { + first_capital = first_capital; + singular = singular; + QCString result("ファイル"); + return decode(result); + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trNamespace(bool first_capital, bool singular) + { + first_capital = first_capital; + singular = singular; + QCString result("名前空間"); + return decode(result); + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trGroup(bool first_capital, bool singular) + { + first_capital = first_capital; + singular = singular; + QCString result("グループ"); + return decode(result); + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trPage(bool first_capital, bool singular) + { + first_capital = first_capital; + singular = singular; + QCString result("ページ"); + return decode(result); + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trMember(bool first_capital, bool singular) + { + first_capital = first_capital; + singular = singular; + QCString result("メンバ"); + return decode(result); + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trField(bool first_capital, bool singular) + { + first_capital = first_capital; + singular = singular; + QCString result("フィールド"); + return decode(result); + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trGlobal(bool first_capital, bool singular) + { + first_capital = first_capital; + singular = singular; + QCString result("グローバル"); + return decode(result); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.7 +////////////////////////////////////////////////////////////////////////// + + /*! This text is generated when the \\author command is used and + * for the author section in man pages. */ + virtual QCString trAuthor(bool first_capital, bool singular) + { + first_capital = first_capital; + singular = singular; + QCString result("作者"); + return decode(result); + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.11 +////////////////////////////////////////////////////////////////////////// + + /*! This text is put before the list of members referenced by a member + */ + virtual QCString trReferences() + { + return decode("参照"); + } + }; + + + + #endif diff --git a/src/translator_sk.h b/src/translator_sk.h index 77eb802..dfdfe3b 100644 --- a/src/translator_sk.h +++ b/src/translator_sk.h @@ -23,7 +23,7 @@ #ifndef TRANSLATOR_SK_H #define TRANSLATOR_SK_H -class TranslatorSlovak : public TranslatorAdapter_1_2_11 +class TranslatorSlovak : public Translator { private: /*! The Decode() inline assumes the source written in the @@ -1221,13 +1221,13 @@ class TranslatorSlovak : public TranslatorAdapter_1_2_11 /*! Used as ansicpg for RTF fcharset */ virtual QCString trRTFCharSet() { - return "0"; //??? + return "3"; } /*! Used as header RTF general index */ virtual QCString trRTFGeneralIndex() { - return "Index"; //??? + return "Index"; } /*! This is used for translation of the word that will possibly @@ -1331,6 +1331,17 @@ class TranslatorSlovak : public TranslatorAdapter_1_2_11 result += (singular) ? "r" : "ri"; return result; } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.11 +////////////////////////////////////////////////////////////////////////// + + /*! This text is put before the list of members referenced by a member + */ + virtual QCString trReferences() + { + return Decode("Odkazuje sa na"); + } }; #endif // TRANSLATOR_SK_H diff --git a/src/util.cpp b/src/util.cpp index e73b45b..25b00e4 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -3102,7 +3102,8 @@ const char *getOverloadDocs() "function only in what argument(s) it accepts."; } -void addMembersToMemberGroup(MemberList *ml,MemberGroupSDict *memberGroupSDict) +void addMembersToMemberGroup(MemberList *ml, + MemberGroupSDict *memberGroupSDict,Definition *context) { MemberListIterator mli(*ml); MemberDef *md; @@ -3122,19 +3123,30 @@ void addMembersToMemberGroup(MemberList *ml,MemberGroupSDict *memberGroupSDict) mg = new MemberGroup(groupId,*pGrpHeader,pDocs ? pDocs->data() : 0); memberGroupSDict->append(groupId,mg); } - md = ml->take(index); - mg->insertMember(md); + md = ml->take(index); // remove from member list + //if (allMembers) // remove from all member list as well + //{ + // MemberNameInfo *mni = allMembers->find(md->name()); + // if (mni) + // { + // QListIterator<MemberInfo> mii(*mni); + // MemberInfo *mi; + // for (;(mi=mii.current());++mii) + // { + // if (mi->memberDef==md) + // { + // mni->remove(mi); + // break; + // } + // } + // } + //} + mg->insertMember(context,md); // insert in member group md->setMemberGroup(mg); + continue; } - else - { - ++mli;++index; - } - } - else - { - ++mli;++index; } + ++mli;++index; } } @@ -42,6 +42,7 @@ class ClassList; class MemberGroupSDict; class Definition; struct TagInfo; +class MemberNameInfoSDict; //-------------------------------------------------------------------- @@ -148,7 +149,9 @@ int iSystem(const char *command,const char *args,bool isBatchFile=FALSE); QCString convertToHtml(const char *s); QCString convertToXML(const char *s); const char * getOverloadDocs(); -void addMembersToMemberGroup(MemberList *ml,MemberGroupSDict *memberGroupSDict); +void addMembersToMemberGroup(MemberList *ml, + MemberGroupSDict *memberGroupSDict, + Definition *context=0); bool extractClassNameFromType(const QCString &type,int &pos, QCString &name,QCString &templSpec); QCString substituteTemplateArgumentsInString( diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 2c4087a..049e3d5 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -83,16 +83,12 @@ inline void writeXMLString(QTextStream &t,const char *s) void writeXMLLink(QTextStream &t,const char *extRef,const char *compoundId, const char *anchorId,const char *text) { - t << "<ref idref=\"" << compoundId; - if (anchorId) - { - t << "_1" << anchorId; - } + t << "<ref refid=\"" << compoundId; + if (anchorId) t << "_1" << anchorId; + t << "\" kindref=\""; + if (anchorId) t << "member"; else t << "compound"; t << "\""; - if (extRef) - { - t << " external=\"" << extRef << "\""; - } + if (extRef) t << " external=\"" << extRef << "\""; t << ">"; writeXMLString(t,text); t << "</ref>"; @@ -613,17 +609,27 @@ class XMLGenerator : public OutputDocInterface XML_DB(("(endSuperscript)\n")); m_t << "</superscript>"; } - void startTable(int cols) + void startTable(bool,int cols) { XML_DB(("startTable\n")); startParMode(); m_t << "<table cols=\"" << cols << "\">\n"; } - void endTable() + void endTable(bool) { XML_DB(("endTable\n")); m_t << "</row>\n</table>"; } + void startCaption() + { + XML_DB(("startCaption")); + m_t << "<caption>"; + } + void endCaption() + { + XML_DB(("encCaption")); + m_t << "</caption"; + } void nextTableRow() { XML_DB(("(nextTableRow)\n")); @@ -764,15 +770,20 @@ class XMLGenerator : public OutputDocInterface { XML_DB(("(endPageRef)\n")); } - void writeLineNumber(const char *,const char *file, // TODO: support external references - const char *anchor,int l) + void writeLineNumber(const char *extRef,const char *compId, + const char *anchorId,int l) { XML_DB(("(writeLineNumber)\n")); m_t << "<linenumber"; m_t << " line=\"" << l << "\""; - if (file) + if (compId) { - m_t << " refid=\"" << file << "_1" << anchor << "\""; + m_t << " refid=\"" << compId; + if (anchorId) m_t << "_1" << anchorId; + m_t << "\" kindref=\""; + if (anchorId) m_t << "member"; else m_t << "compound"; + m_t << "\""; + if (extRef) m_t << " external=\"" << extRef << "\""; } m_t << "/>"; } @@ -1172,7 +1183,7 @@ static void generateXMLForMember(MemberDef *md,QTextStream &t,Definition *def) { t << " <exceptions>"; linkifyText(TextGeneratorXMLImpl(t),scopeName,md->name(),md->excpString()); - t << "</exception>" << endl; + t << "</exceptions>" << endl; } if (md->memberType()==MemberDef::Enumeration) // enum @@ -1293,7 +1304,7 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &t) BaseClassDef *bcd; for (bcli.toFirst();(bcd=bcli.current());++bcli) { - t << " <basecompoundref idref=\"" + t << " <basecompoundref refid=\"" << bcd->classDef->getOutputFileBase() << "\" prot=\""; switch (bcd->prot) @@ -1318,7 +1329,7 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &t) BaseClassDef *bcd; for (bcli.toFirst();(bcd=bcli.current());++bcli) { - t << " <derivedcompoundref idref=\"" + t << " <derivedcompoundref refid=\"" << bcd->classDef->getOutputFileBase() << "\" prot=\""; switch (bcd->prot) |