summaryrefslogtreecommitdiffstats
path: root/src/doxygen.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2017-12-27 19:12:07 (GMT)
committerJoe George <joe@zeroc.com>2018-10-22 19:21:42 (GMT)
commit3a97099d5e6afd298486f219694a7fb5eff67fea (patch)
tree979abad6dd502a4d28dac1f29a1bce9e4bb3b336 /src/doxygen.cpp
parentd94c10574f44c10ff0df9ce24c09cb6fcaac37c0 (diff)
downloadDoxygen-3a97099d5e6afd298486f219694a7fb5eff67fea.zip
Doxygen-3a97099d5e6afd298486f219694a7fb5eff67fea.tar.gz
Doxygen-3a97099d5e6afd298486f219694a7fb5eff67fea.tar.bz2
Added *.ice files as a recognized file type.
Added a Slice-optimized output mode.
Diffstat (limited to 'src/doxygen.cpp')
-rw-r--r--src/doxygen.cpp151
1 files changed, 120 insertions, 31 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 7eb7968..b12b354 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -1303,6 +1303,8 @@ static void addClassToContext(EntryNav *rootNav)
}
cd->setCompoundType(convertToCompoundType(root->section,root->spec));
+
+ cd->setMetaData(root->metaData);
}
else // new class
{
@@ -1367,6 +1369,8 @@ static void addClassToContext(EntryNav *rootNav)
cd->setBodySegment(root->bodyLine,root->endBodyLine);
cd->setBodyDef(fd);
+ cd->setMetaData(root->metaData);
+
// see if the class is found inside a namespace
//bool found=addNamespace(root,cd);
@@ -1586,7 +1590,7 @@ static ClassDef *createTagLessInstance(ClassDef *rootCd,ClassDef *templ,const QC
md->typeString(),md->name(),md->argsString(),md->excpString(),
md->protection(),md->virtualness(),md->isStatic(),Member,
md->memberType(),
- 0,0);
+ 0,0,"");
imd->setMemberClass(cd);
imd->setDocumentation(md->documentation(),md->docFile(),md->docLine());
imd->setBriefDescription(md->briefDescription(),md->briefFile(),md->briefLine());
@@ -1758,6 +1762,7 @@ static void buildNamespaceList(EntryNav *rootNav)
nd->setReference("");
nd->setFileName(fullName);
}
+ nd->setMetaData(root->metaData);
// file definition containing the namespace nd
FileDef *fd=rootNav->fileDef();
@@ -1787,6 +1792,7 @@ static void buildNamespaceList(EntryNav *rootNav)
nd->setArtificial(root->artificial);
nd->setLanguage(root->lang);
nd->setId(root->id);
+ nd->setMetaData(root->metaData);
//printf("Adding namespace to group\n");
addNamespaceToGroups(root,nd);
@@ -1962,6 +1968,7 @@ static void findUsingDirectives(EntryNav *rootNav)
nd->setArtificial(TRUE);
nd->setLanguage(root->lang);
nd->setId(root->id);
+ nd->setMetaData(root->metaData);
QListIterator<Grouping> gli(*root->groups);
Grouping *g;
@@ -2167,7 +2174,7 @@ static void findUsingDeclImports(EntryNav *rootNav)
md->typeString(),memName,md->argsString(),
md->excpString(),root->protection,root->virt,
md->isStatic(),Member,md->memberType(),
- templAl,al
+ templAl,al,root->metaData
);
}
newMd->setMemberClass(cd);
@@ -2360,7 +2367,7 @@ static MemberDef *addVariableToClass(
fileName,root->startLine,root->startColumn,
root->type,name,root->args,root->exception,
prot,Normal,root->stat,related,
- mtype,root->tArgLists ? root->tArgLists->getLast() : 0,0);
+ mtype,root->tArgLists ? root->tArgLists->getLast() : 0,0, root->metaData);
md->setTagInfo(rootNav->tagInfo());
md->setMemberClass(cd); // also sets outer scope (i.e. getOuterScope())
//md->setDefFile(root->fileName);
@@ -2603,7 +2610,7 @@ static MemberDef *addVariableToFile(
fileName,root->startLine,root->startColumn,
root->type,name,root->args,0,
root->protection, Normal,root->stat,Member,
- mtype,root->tArgLists ? root->tArgLists->getLast() : 0,0);
+ mtype,root->tArgLists ? root->tArgLists->getLast() : 0,0, root->metaData);
md->setTagInfo(rootNav->tagInfo());
md->setMemberSpecifiers(root->spec);
md->setDocumentation(root->doc,root->docFile,root->docLine);
@@ -2821,6 +2828,8 @@ done:
static void addVariable(EntryNav *rootNav,int isFuncPtr=-1)
{
+ static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+
rootNav->loadEntry(g_storage);
Entry *root = rootNav->entry();
@@ -2940,6 +2949,10 @@ static void addVariable(EntryNav *rootNav,int isFuncPtr=-1)
mtype=MemberType_Property;
else if (root->mtype==Event)
mtype=MemberType_Event;
+ else if (type.find("sequence<") != -1)
+ mtype=sliceOpt ? MemberType_Sequence : MemberType_Typedef;
+ else if (type.find("dictionary<") != -1)
+ mtype=sliceOpt ? MemberType_Dictionary : MemberType_Typedef;
else
mtype=MemberType_Variable;
@@ -3054,6 +3067,58 @@ static void buildTypedefList(EntryNav *rootNav)
}
//----------------------------------------------------------------------
+// Searches the Entry tree for sequence documentation sections.
+// If found they are stored in the global list.
+static void buildSequenceList(EntryNav *rootNav)
+{
+ if (!rootNav->name().isEmpty() &&
+ rootNav->section()==Entry::VARIABLE_SEC &&
+ rootNav->type().find("sequence<")!=-1 // it's a sequence
+ )
+ {
+ addVariable(rootNav);
+ }
+ if (rootNav->children())
+ {
+ EntryNavListIterator eli(*rootNav->children());
+ EntryNav *e;
+ for (;(e=eli.current());++eli)
+ {
+ if (e->section()!=Entry::ENUM_SEC)
+ {
+ buildSequenceList(e);
+ }
+ }
+ }
+}
+
+//----------------------------------------------------------------------
+// Searches the Entry tree for dictionary documentation sections.
+// If found they are stored in the global list.
+static void buildDictionaryList(EntryNav *rootNav)
+{
+ if (!rootNav->name().isEmpty() &&
+ rootNav->section()==Entry::VARIABLE_SEC &&
+ rootNav->type().find("dictionary<")!=-1 // it's a dictionary
+ )
+ {
+ addVariable(rootNav);
+ }
+ if (rootNav->children())
+ {
+ EntryNavListIterator eli(*rootNav->children());
+ EntryNav *e;
+ for (;(e=eli.current());++eli)
+ {
+ if (e->section()!=Entry::ENUM_SEC)
+ {
+ buildDictionaryList(e);
+ }
+ }
+ }
+}
+
+//----------------------------------------------------------------------
// Searches the Entry tree for Variable documentation sections.
// If found they are stored in their class or in the global list.
@@ -3114,7 +3179,7 @@ static void addInterfaceOrServiceToServiceOrSingleton(
MemberDef *const md = new MemberDef(
fileName, root->startLine, root->startColumn, root->type, rname,
"", "", root->protection, root->virt, root->stat, Member,
- type, 0, root->argList);
+ type, 0, root->argList, root->metaData);
md->setTagInfo(rootNav->tagInfo());
md->setMemberClass(cd);
md->setDocumentation(root->doc,root->docFile,root->docLine);
@@ -3301,7 +3366,7 @@ static void addMethodToClass(EntryNav *rootNav,ClassDef *cd,
root->stat && root->relatesType != MemberOf,
root->relates.isEmpty() ? Member :
root->relatesType == MemberOf ? Foreign : Related,
- mtype,root->tArgLists ? root->tArgLists->getLast() : 0,root->argList);
+ mtype,root->tArgLists ? root->tArgLists->getLast() : 0,root->argList, root->metaData);
md->setTagInfo(rootNav->tagInfo());
md->setMemberClass(cd);
md->setDocumentation(root->doc,root->docFile,root->docLine);
@@ -3691,7 +3756,7 @@ static void buildFunctionList(EntryNav *rootNav)
root->fileName,root->startLine,root->startColumn,
root->type,name,root->args,root->exception,
root->protection,root->virt,root->stat,Member,
- MemberType_Function,tArgList,root->argList);
+ MemberType_Function,tArgList,root->argList,root->metaData);
md->setTagInfo(rootNav->tagInfo());
md->setLanguage(root->lang);
@@ -6436,7 +6501,7 @@ static void findMember(EntryNav *rootNav,
funcType,funcName,funcArgs,exceptions,
declMd ? declMd->protection() : root->protection,
root->virt,root->stat,Member,
- mtype,tArgList,root->argList);
+ mtype,tArgList,root->argList,root->metaData);
//printf("new specialized member %s args=`%s'\n",md->name().data(),funcArgs.data());
md->setTagInfo(rootNav->tagInfo());
md->setLanguage(root->lang);
@@ -6503,7 +6568,7 @@ static void findMember(EntryNav *rootNav,
root->fileName,root->startLine,root->startColumn,
funcType,funcName,funcArgs,exceptions,
root->protection,root->virt,root->stat,Related,
- mtype,tArgList,root->argList);
+ mtype,tArgList,root->argList,root->metaData);
md->setTagInfo(rootNav->tagInfo());
md->setLanguage(root->lang);
md->setId(root->id);
@@ -6641,7 +6706,7 @@ static void findMember(EntryNav *rootNav,
isMemberOf ? Foreign : Related,
mtype,
(root->tArgLists ? root->tArgLists->getLast() : 0),
- funcArgs.isEmpty() ? 0 : root->argList);
+ funcArgs.isEmpty() ? 0 : root->argList,root->metaData);
if (isDefine && mdDefine)
{
@@ -6779,7 +6844,7 @@ localObjCMethod:
root->fileName,root->startLine,root->startColumn,
funcType,funcName,funcArgs,exceptions,
root->protection,root->virt,root->stat,Member,
- MemberType_Function,0,root->argList);
+ MemberType_Function,0,root->argList,root->metaData);
md->setTagInfo(rootNav->tagInfo());
md->setLanguage(root->lang);
md->setId(root->id);
@@ -7115,7 +7180,7 @@ static void findEnums(EntryNav *rootNav)
root->protection,Normal,FALSE,
isMemberOf ? Foreign : isRelated ? Related : Member,
MemberType_Enumeration,
- 0,0);
+ 0,0,root->metaData);
md->setTagInfo(rootNav->tagInfo());
md->setLanguage(root->lang);
md->setId(root->id);
@@ -7337,7 +7402,7 @@ static void addEnumValuesToEnums(EntryNav *rootNav)
fileName,root->startLine,root->startColumn,
root->type,root->name,root->args,0,
root->protection, Normal,root->stat,Member,
- MemberType_EnumValue,0,0);
+ MemberType_EnumValue,0,0,root->metaData);
if (md->getClassDef()) fmd->setMemberClass(md->getClassDef());
else if (md->getNamespaceDef()) fmd->setNamespace(md->getNamespaceDef());
else if (md->getFileDef()) fmd->setFileDef(md->getFileDef());
@@ -8467,7 +8532,7 @@ static void findDefineDocumentation(EntryNav *rootNav)
{
MemberDef *md=new MemberDef(rootNav->tagInfo()->tagName,1,1,
"#define",root->name,root->args,0,
- Public,Normal,FALSE,Member,MemberType_Define,0,0);
+ Public,Normal,FALSE,Member,MemberType_Define,0,0,"");
md->setTagInfo(rootNav->tagInfo());
md->setLanguage(root->lang);
//printf("Searching for `%s' fd=%p\n",filePathName.data(),fd);
@@ -9052,8 +9117,33 @@ static void generateGroupDocs()
//----------------------------------------------------------------------------
// generate module pages
+static void generateNamespaceClassDocs(ClassSDict *d)
+{
+ // for each class in the namespace...
+ ClassSDict::Iterator cli(*d);
+ ClassDef *cd;
+ for ( ; (cd=cli.current()) ; ++cli )
+ {
+ if ( ( cd->isLinkableInProject() &&
+ cd->templateMaster()==0
+ ) // skip external references, anonymous compounds and
+ // template instances and nested classes
+ && !cd->isHidden() && !cd->isEmbeddedInOuterScope()
+ )
+ {
+ msg("Generating docs for compound %s...\n",cd->name().data());
+
+ cd->writeDocumentation(*g_outputList);
+ cd->writeMemberList(*g_outputList);
+ }
+ cd->writeDocumentationForInnerClasses(*g_outputList);
+ }
+}
+
static void generateNamespaceDocs()
{
+ static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+
//writeNamespaceIndex(*g_outputList);
NamespaceSDict::Iterator nli(*Doxygen::namespaceSDict);
@@ -9068,24 +9158,12 @@ static void generateNamespaceDocs()
nd->writeDocumentation(*g_outputList);
}
- // for each class in the namespace...
- ClassSDict::Iterator cli(*nd->getClassSDict());
- ClassDef *cd;
- for ( ; (cd=cli.current()) ; ++cli )
+ generateNamespaceClassDocs(nd->getClassSDict());
+ if (sliceOpt)
{
- if ( ( cd->isLinkableInProject() &&
- cd->templateMaster()==0
- ) // skip external references, anonymous compounds and
- // template instances and nested classes
- && !cd->isHidden() && !cd->isEmbeddedInOuterScope()
- )
- {
- msg("Generating docs for compound %s...\n",cd->name().data());
-
- cd->writeDocumentation(*g_outputList);
- cd->writeMemberList(*g_outputList);
- }
- cd->writeDocumentationForInnerClasses(*g_outputList);
+ generateNamespaceClassDocs(nd->getInterfaceSDict());
+ generateNamespaceClassDocs(nd->getStructSDict());
+ generateNamespaceClassDocs(nd->getExceptionSDict());
}
}
}
@@ -11275,6 +11353,17 @@ void parseInput()
buildTypedefList(rootNav);
g_s.end();
+ if (Config_getBool(OPTIMIZE_OUTPUT_SLICE))
+ {
+ g_s.begin("Searching for documented sequences...\n");
+ buildSequenceList(rootNav);
+ g_s.end();
+
+ g_s.begin("Searching for documented dictionaries...\n");
+ buildDictionaryList(rootNav);
+ g_s.end();
+ }
+
g_s.begin("Searching for members imported via using declarations...\n");
// this should be after buildTypedefList in order to properly import
// used typedefs