From 7f40e488e27bcea4bb15045df05479dc5fbd9d6d Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sat, 12 Jan 2019 14:58:16 +0100 Subject: Added declfile, declline, and declcolumn attributes to the location element in the XML output --- src/definition.cpp | 17 +- src/definition.h | 3 + src/doxygen.cpp | 39 +- src/memberdef.cpp | 61 ++- src/memberdef.h | 8 +- src/xmlgen.cpp | 8 +- templates/xml/compound.xsd | 3 + testing/016/016__copydoc_8c.xml | 8 +- testing/019/group__g1.xml | 2 +- testing/019/group__g2.xml | 2 +- testing/019/group__g3.xml | 4 +- testing/027/struct_object.xml | 4 +- testing/027/struct_vehicle.xml | 4 +- testing/036/036__link_8c.xml | 2 +- testing/046/046__related_8cpp.xml | 2 +- testing/046/class_test.xml | 4 +- testing/047/047__return_8cpp.xml | 6 +- testing/054/054__parblock_8cpp.xml | 4 +- testing/067/067__link__varargs_8cpp.xml | 4 +- testing/068/068__ref__varargs_8cpp.xml | 4 +- testing/069/069__link__variadic__template_8cpp.xml | 20 +- testing/070/070__ref__variadic__template_8cpp.xml | 20 +- testing/074/namespacens.xml | 162 +++--- testing/074/struct_foo.xml | 580 ++++++++++----------- ...xml__namespace__members__in__file__scope_8h.xml | 2 +- testing/081/namespace_n.xml | 50 ++ testing/081_decl_def.cpp | 18 + testing/082/namespace_n.xml | 50 ++ testing/082_decl_def.cpp | 18 + testing/decl_def.h | 10 + 30 files changed, 680 insertions(+), 439 deletions(-) mode change 100755 => 100644 testing/074/namespacens.xml mode change 100755 => 100644 testing/074/struct_foo.xml create mode 100644 testing/081/namespace_n.xml create mode 100644 testing/081_decl_def.cpp create mode 100644 testing/082/namespace_n.xml create mode 100644 testing/082_decl_def.cpp create mode 100644 testing/decl_def.h diff --git a/src/definition.cpp b/src/definition.cpp index 62a4e69..ae229ad 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -57,6 +57,7 @@ class DefinitionImpl DefinitionImpl(); ~DefinitionImpl(); void init(const char *df, const char *n); + void setDefFileName(const QCString &df); SectionDict *sectionDict; // dictionary of all sections, not accessible @@ -82,7 +83,7 @@ class DefinitionImpl Definition *outerScope; // not owner - // where the item was found + // where the item was defined QCString defFileName; QCString defFileExt; @@ -112,7 +113,7 @@ DefinitionImpl::~DefinitionImpl() delete inbodyDocs; } -void DefinitionImpl::init(const char *df, const char *n) +void DefinitionImpl::setDefFileName(const QCString &df) { defFileName = df; int lastDot = defFileName.findRev('.'); @@ -120,6 +121,11 @@ void DefinitionImpl::init(const char *df, const char *n) { defFileExt = defFileName.mid(lastDot); } +} + +void DefinitionImpl::init(const char *df, const char *n) +{ + setDefFileName(df); QCString name = n; if (name!="") { @@ -147,6 +153,13 @@ void DefinitionImpl::init(const char *df, const char *n) lang = SrcLangExt_Unknown; } +void Definition::setDefFile(const QCString &df,int defLine,int defCol) +{ + m_impl->setDefFileName(df); + m_defLine = defLine; + m_defColumn = defCol; +} + //----------------------------------------------------------------------------------------- static bool matchExcludedSymbols(const char *name) diff --git a/src/definition.h b/src/definition.h index c0428a0..c382013 100644 --- a/src/definition.h +++ b/src/definition.h @@ -288,6 +288,9 @@ class Definition : public DefinitionIntf /*! Sets a unique id for the symbol. Used for libclang integration. */ void setId(const char *name); + /*! Set a new file name and position */ + void setDefFile(const QCString& df,int defLine,int defColumn); + /*! Sets the documentation of this definition to \a d. */ virtual void setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace=TRUE); diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 26f7637..08d3bc7 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -2449,7 +2449,8 @@ static MemberDef *addVariableToFile( Entry *root = rootNav->entry(); Debug::print(Debug::Variables,0, " global variable:\n" - " type=`%s' scope=`%s' name=`%s' args=`%s' prot=`%d mtype=%d lang=%d\n", + " file='%s' type=`%s' scope=`%s' name=`%s' args=`%s' prot=`%d mtype=%d lang=%d\n", + qPrint(root->fileName), qPrint(root->type), qPrint(scope), qPrint(name), @@ -2593,11 +2594,23 @@ static MemberDef *addVariableToFile( ) // not a php array variable { - Debug::print(Debug::Variables,0, " variable already found: scope=%s\n",qPrint(md->getOuterScope()->name())); addMemberDocs(rootNav,md,def,0,FALSE); md->setRefItems(root->sli); + // if md is a variable forward declaration and root is the definition that + // turn md into the defintion + if (!root->explicitExternal && md->isExternal()) + { + md->setDeclFile(md->getDefFileName(),md->getDefLine(),md->getDefColumn()); + md->setExplicitExternal(FALSE,root->fileName,root->startLine,root->startColumn); + } + // if md is the definition and root point at a declaration, then add the + // declaration info + else if (root->explicitExternal && !md->isExternal()) + { + md->setDeclFile(root->fileName,root->startLine,root->startColumn); + } return md; } } @@ -2636,7 +2649,7 @@ static MemberDef *addVariableToFile( md->enableCallerGraph(root->callerGraph); md->enableReferencedByRelation(root->referencedByRelation); md->enableReferencesRelation(root->referencesRelation); - md->setExplicitExternal(root->explicitExternal); + md->setExplicitExternal(root->explicitExternal,fileName,root->startLine,root->startColumn); //md->setOuterScope(fd); if (!root->explicitExternal) { @@ -3752,7 +3765,13 @@ static void buildFunctionList(EntryNav *rootNav) // definition, then turn md into a definition. if (md->isPrototype() && !root->proto) { - md->setPrototype(FALSE); + md->setDeclFile(md->getDefFileName(),md->getDefLine(),md->getDefColumn()); + md->setPrototype(FALSE,root->fileName,root->startLine,root->startColumn); + } + // if md is already the definition, then add the declaration info + else if (!md->isPrototype() && root->proto) + { + md->setDeclFile(root->fileName,root->startLine,root->startColumn); } } } @@ -3781,7 +3800,7 @@ static void buildFunctionList(EntryNav *rootNav) md->setDocumentation(root->doc,root->docFile,root->docLine); md->setBriefDescription(root->brief,root->briefFile,root->briefLine); md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine); - md->setPrototype(root->proto); + md->setPrototype(root->proto,root->fileName,root->startLine,root->startColumn); md->setDocsForDefinition(!root->proto); md->setTypeConstraints(root->typeConstr); //md->setBody(root->body); @@ -6544,7 +6563,7 @@ static void findMember(EntryNav *rootNav, md->setBriefDescription(root->brief,root->briefFile,root->briefLine); md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine); md->setDocsForDefinition(!root->proto); - md->setPrototype(root->proto); + md->setPrototype(root->proto,root->fileName,root->startLine,root->startColumn); md->addSectionsToDefinition(root->anchors); md->setBodySegment(root->bodyLine,root->endBodyLine); FileDef *fd=rootNav->fileDef(); @@ -6614,7 +6633,7 @@ static void findMember(EntryNav *rootNav, md->setBriefDescription(root->brief,root->briefFile,root->briefLine); md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine); md->setDocsForDefinition(!root->proto); - md->setPrototype(root->proto); + md->setPrototype(root->proto,root->fileName,root->startLine,root->startColumn); md->addSectionsToDefinition(root->anchors); md->setBodySegment(root->bodyLine,root->endBodyLine); FileDef *fd=rootNav->fileDef(); @@ -6816,7 +6835,7 @@ static void findMember(EntryNav *rootNav, md->setDocumentation(root->doc,root->docFile,root->docLine); md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine); md->setDocsForDefinition(!root->proto); - md->setPrototype(root->proto); + md->setPrototype(root->proto,root->fileName,root->startLine,root->startColumn); md->setBriefDescription(root->brief,root->briefFile,root->briefLine); md->addSectionsToDefinition(root->anchors); md->setMemberGroupId(root->mGrpId); @@ -6891,7 +6910,7 @@ localObjCMethod: md->setBriefDescription(root->brief,root->briefFile,root->briefLine); md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine); md->setDocsForDefinition(!root->proto); - md->setPrototype(root->proto); + md->setPrototype(root->proto,root->fileName,root->startLine,root->startColumn); md->addSectionsToDefinition(root->anchors); md->setBodySegment(root->bodyLine,root->endBodyLine); FileDef *fd=rootNav->fileDef(); @@ -7452,7 +7471,7 @@ static void addEnumValuesToEnums(EntryNav *rootNav) fmd->setInitializer(root->initializer); fmd->setMaxInitLines(root->initLines); fmd->setMemberGroupId(root->mGrpId); - fmd->setExplicitExternal(root->explicitExternal); + fmd->setExplicitExternal(root->explicitExternal,fileName,root->startLine,root->startColumn); fmd->setRefItems(root->sli); fmd->setAnchor(); md->insertEnumField(fmd); diff --git a/src/memberdef.cpp b/src/memberdef.cpp index bcef5ac..29ae057 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -596,6 +596,9 @@ class MemberDefImpl // FALSE => block is put before declaration. ClassDef *category; MemberDef *categoryRelation; + QCString declFileName; + int declLine; + int declColumn; }; MemberDefImpl::MemberDefImpl() : @@ -609,7 +612,9 @@ MemberDefImpl::MemberDefImpl() : defTmpArgLists(0), classSectionSDict(0), category(0), - categoryRelation(0) + categoryRelation(0), + declLine(-1), + declColumn(-1) { } @@ -4740,6 +4745,24 @@ MemberDef *MemberDef::getGroupAlias() const return m_impl->groupAlias; } +QCString MemberDef::getDeclFileName() const +{ + return m_impl->declFileName; +} + +int MemberDef::getDeclLine() const +{ + return m_impl->declLine; +} + +int MemberDef::getDeclColumn() const +{ + return m_impl->declColumn; +} + + +//---------------------------------------------- + void MemberDef::setMemberType(MemberType t) { m_impl->mtype=t; @@ -4788,11 +4811,6 @@ void MemberDef::setMaxInitLines(int lines) } } -void MemberDef::setExplicitExternal(bool b) -{ - m_impl->explExt=b; -} - void MemberDef::setReadAccessor(const char *r) { m_impl->read=r; @@ -4862,9 +4880,38 @@ void MemberDef::setAnonymousEnumType(MemberDef *md) m_impl->annEnumType = md; } -void MemberDef::setPrototype(bool p) +void MemberDef::setPrototype(bool p,const QCString &df,int line,int column) { m_impl->proto=p; + if (p) + { + setDeclFile(df,line,column); + } + else + { + setDefFile(df,line,column); + } +} + +void MemberDef::setExplicitExternal(bool b,const QCString &df,int line,int column) +{ + m_impl->explExt=b; + if (b) + { + setDeclFile(df,line,column); + } + else + { + setDefFile(df,line,column); + } +} + + +void MemberDef::setDeclFile(const QCString &df,int line,int column) +{ + m_impl->declFileName = df; + m_impl->declLine = line; + m_impl->declColumn = column; } void MemberDef::setMemberGroupId(int id) diff --git a/src/memberdef.h b/src/memberdef.h index 2c88438..650d9a5 100644 --- a/src/memberdef.h +++ b/src/memberdef.h @@ -274,6 +274,9 @@ class MemberDef : public Definition QCString fieldType() const; bool isReference() const; + QCString getDeclFileName() const; + int getDeclLine() const; + int getDeclColumn() const; //----------------------------------------------------------------------------------- // ---- setters ----- @@ -297,7 +300,6 @@ class MemberDef : public Definition void setGroupDef(GroupDef *gd,Grouping::GroupPri_t pri, const QCString &fileName,int startLine,bool hasDocs, MemberDef *member=0); - void setExplicitExternal(bool b); void setReadAccessor(const char *r); void setWriteAccessor(const char *w); void setTemplateSpecialization(bool b); @@ -330,7 +332,9 @@ class MemberDef : public Definition bool addExample(const char *anchor,const char *name,const char *file); // prototype related members - void setPrototype(bool p); + void setPrototype(bool p,const QCString &df,int line, int column); + void setExplicitExternal(bool b,const QCString &df,int line,int column); + void setDeclFile(const QCString &df,int line,int column); // argument related members void setArgumentList(ArgumentList *al); diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 8b8e648..3c71840 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -975,7 +975,7 @@ static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,De { t << " getDefFileName()) << "\" line=\"" - << md->getDefLine() << "\"" << " column=\"" + << md->getDefLine() << "\" column=\"" << md->getDefColumn() << "\"" ; if (md->getStartBodyLine()!=-1) { @@ -987,6 +987,12 @@ static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,De t << " bodystart=\"" << md->getStartBodyLine() << "\" bodyend=\"" << md->getEndBodyLine() << "\""; } + if (md->getDeclLine()!=-1) + { + t << " declfile=\"" << stripFromPath(md->getDeclFileName()) << "\" declline=\"" + << md->getDeclLine() << "\" declcolumn=\"" + << md->getDeclColumn() << "\""; + } t << "/>" << endl; } diff --git a/templates/xml/compound.xsd b/templates/xml/compound.xsd index 2d72d41..1715822 100644 --- a/templates/xml/compound.xsd +++ b/templates/xml/compound.xsd @@ -302,6 +302,9 @@ + + + diff --git a/testing/016/016__copydoc_8c.xml b/testing/016/016__copydoc_8c.xml index 992122d..b0e2246 100644 --- a/testing/016/016__copydoc_8c.xml +++ b/testing/016/016__copydoc_8c.xml @@ -20,7 +20,7 @@ - + void @@ -34,7 +34,7 @@ - + void @@ -48,7 +48,7 @@ - + void @@ -63,7 +63,7 @@ - + diff --git a/testing/019/group__g1.xml b/testing/019/group__g1.xml index 23d9c31..2d45709 100644 --- a/testing/019/group__g1.xml +++ b/testing/019/group__g1.xml @@ -16,7 +16,7 @@ - + diff --git a/testing/019/group__g2.xml b/testing/019/group__g2.xml index 51df509..3429ad9 100644 --- a/testing/019/group__g2.xml +++ b/testing/019/group__g2.xml @@ -17,7 +17,7 @@ - + diff --git a/testing/019/group__g3.xml b/testing/019/group__g3.xml index 1c2b33b..6ef7640 100644 --- a/testing/019/group__g3.xml +++ b/testing/019/group__g3.xml @@ -16,7 +16,7 @@ - + void @@ -30,7 +30,7 @@ - + diff --git a/testing/027/struct_object.xml b/testing/027/struct_object.xml index e14caa5..9d93be7 100644 --- a/testing/027/struct_object.xml +++ b/testing/027/struct_object.xml @@ -36,7 +36,7 @@ - + Object * @@ -54,7 +54,7 @@ - + diff --git a/testing/027/struct_vehicle.xml b/testing/027/struct_vehicle.xml index acf10a0..c217fc6 100644 --- a/testing/027/struct_vehicle.xml +++ b/testing/027/struct_vehicle.xml @@ -40,7 +40,7 @@ - + void @@ -58,7 +58,7 @@ - + diff --git a/testing/036/036__link_8c.xml b/testing/036/036__link_8c.xml index c0dea58..aba069f 100644 --- a/testing/036/036__link_8c.xml +++ b/testing/036/036__link_8c.xml @@ -20,7 +20,7 @@ - + diff --git a/testing/046/046__related_8cpp.xml b/testing/046/046__related_8cpp.xml index 9f5eab6..c36c6c5 100644 --- a/testing/046/046__related_8cpp.xml +++ b/testing/046/046__related_8cpp.xml @@ -16,7 +16,7 @@ - + diff --git a/testing/046/class_test.xml b/testing/046/class_test.xml index 9a1bd9c..1445e35 100644 --- a/testing/046/class_test.xml +++ b/testing/046/class_test.xml @@ -38,7 +38,7 @@ - + void @@ -52,7 +52,7 @@ - + diff --git a/testing/047/047__return_8cpp.xml b/testing/047/047__return_8cpp.xml index b57a0c3..a29062f 100644 --- a/testing/047/047__return_8cpp.xml +++ b/testing/047/047__return_8cpp.xml @@ -16,7 +16,7 @@ - + int @@ -31,7 +31,7 @@ - + int @@ -46,7 +46,7 @@ - + diff --git a/testing/054/054__parblock_8cpp.xml b/testing/054/054__parblock_8cpp.xml index 5567908..e9aec90 100644 --- a/testing/054/054__parblock_8cpp.xml +++ b/testing/054/054__parblock_8cpp.xml @@ -91,7 +91,7 @@ - + void @@ -181,7 +181,7 @@ - + diff --git a/testing/067/067__link__varargs_8cpp.xml b/testing/067/067__link__varargs_8cpp.xml index 76eb543..8bf0051 100644 --- a/testing/067/067__link__varargs_8cpp.xml +++ b/testing/067/067__link__varargs_8cpp.xml @@ -20,7 +20,7 @@ - + void @@ -41,7 +41,7 @@ - + diff --git a/testing/068/068__ref__varargs_8cpp.xml b/testing/068/068__ref__varargs_8cpp.xml index 8e0dc00..ae5f28f 100644 --- a/testing/068/068__ref__varargs_8cpp.xml +++ b/testing/068/068__ref__varargs_8cpp.xml @@ -20,7 +20,7 @@ - + void @@ -41,7 +41,7 @@ - + diff --git a/testing/069/069__link__variadic__template_8cpp.xml b/testing/069/069__link__variadic__template_8cpp.xml index c93a732..00677f8 100644 --- a/testing/069/069__link__variadic__template_8cpp.xml +++ b/testing/069/069__link__variadic__template_8cpp.xml @@ -20,7 +20,7 @@ - + @@ -49,7 +49,7 @@ - + @@ -78,7 +78,7 @@ - + @@ -107,7 +107,7 @@ - + @@ -136,7 +136,7 @@ - + @@ -165,7 +165,7 @@ - + @@ -194,7 +194,7 @@ - + @@ -223,7 +223,7 @@ - + @@ -252,7 +252,7 @@ - + @@ -281,7 +281,7 @@ - + diff --git a/testing/070/070__ref__variadic__template_8cpp.xml b/testing/070/070__ref__variadic__template_8cpp.xml index 0f581e5..54d385b 100644 --- a/testing/070/070__ref__variadic__template_8cpp.xml +++ b/testing/070/070__ref__variadic__template_8cpp.xml @@ -20,7 +20,7 @@ - + @@ -49,7 +49,7 @@ - + @@ -78,7 +78,7 @@ - + @@ -107,7 +107,7 @@ - + @@ -136,7 +136,7 @@ - + @@ -165,7 +165,7 @@ - + @@ -194,7 +194,7 @@ - + @@ -223,7 +223,7 @@ - + @@ -252,7 +252,7 @@ - + @@ -281,7 +281,7 @@ - + diff --git a/testing/074/namespacens.xml b/testing/074/namespacens.xml old mode 100755 new mode 100644 index 4eccf88..db46c7d --- a/testing/074/namespacens.xml +++ b/testing/074/namespacens.xml @@ -1,81 +1,81 @@ - - - - ns - - - int - int ns::operator""_op - (unsigned long long) - operator""_op - - unsigned long long - - - An operator. - - - - - - - - - int - int ns::operator""_oq - (unsigned long long) - operator""_oq - - unsigned long long - - - Another operator. - - - - - - - - - void - void ns::foo - (std::initializer_list< int * >) - foo - - std::initializer_list< int * > - - - Function. - - - - - - - - - - A namespace. - - - - - - Link to an UDL w/o spaces: operator""_op - - - Link to an UDL with spaces: operator""_oq - - - Link to a function with spaces: foo(std::initializer_list< int* >) - - - Link to a function w/o spaces: foo(std::initializer_list<int*>) - - - - - - - + + + + ns + + + int + int ns::operator""_op + (unsigned long long) + operator""_op + + unsigned long long + + + An operator. + + + + + + + + + int + int ns::operator""_oq + (unsigned long long) + operator""_oq + + unsigned long long + + + Another operator. + + + + + + + + + void + void ns::foo + (std::initializer_list< int * >) + foo + + std::initializer_list< int * > + + + Function. + + + + + + + + + + A namespace. + + + + + + Link to an UDL w/o spaces: operator""_op + + + Link to an UDL with spaces: operator""_oq + + + Link to a function with spaces: foo(std::initializer_list< int* >) + + + Link to a function w/o spaces: foo(std::initializer_list<int*>) + + + + + + + diff --git a/testing/074/struct_foo.xml b/testing/074/struct_foo.xml old mode 100755 new mode 100644 index 7096238..e031314 --- a/testing/074/struct_foo.xml +++ b/testing/074/struct_foo.xml @@ -1,290 +1,290 @@ - - - - Foo - - - - Foo::Foo - () - Foo - - - - Constructor - - - - - - - Foo & - Foo& Foo::operator<< - (int i) - operator<< - - int - i - - - - - overloaded less than operator - - - - - - - const Foo & - const Foo& Foo::operator<< - (int i) const - operator<< - - int - i - - - - - overloaded const less than operator - - - - - - - int - int Foo::operator() - (int i) - operator() - - int - i - - - - - overloaded call operator - - - - - - - int - int Foo::operator() - (int i) const - operator() - - int - i - - - - - overloaded call operator - - - - - - - Foo & - Foo& Foo::operator&= - (const Foo &rhs) - operator&= - - const Foo & - rhs - - - - - and equal operator - - - - - - - const Foo & - const Foo& Foo::operator&= - (const Foo &rhs) const - operator&= - - const Foo & - rhs - - - - - and equal operator - - - - - - - int * - int* Foo::operator->* - (int *p) - operator->* - - int * - p - - - - - Member pointer operator - - - - - - - - Foo - - Foo Foo::fun - () const - fun - - Fun with itself. - - - - - - - - - - - - Foo - - static Foo Foo::fun - (Foo a, Foo b) - fun - - - Foo - - a - - - - Foo - - b - - - Fun of two. - - - - - - - fun() const - - - - - fun() const - - - - - title - - - - - - - - - - - - Foo class. - - - - - Foo::Foo() constructor for details. - - - Foo constant. - - - less than operator. - - - const less than operator. - - - call operator. - - - const call operator. - - - and equal operator. - - - const and equal operator. - - - member pointer operator. - - - - - - - Foo - Foo - - - Foo - fun - - - Foo - fun - - - Foo - operator&= - - - Foo - operator&= - - - Foo - operator() - - - Foo - operator() - - - Foo - operator->* - - - Foo - operator<< - - - Foo - operator<< - - - - + + + + Foo + + + + Foo::Foo + () + Foo + + + + Constructor + + + + + + + Foo & + Foo& Foo::operator<< + (int i) + operator<< + + int + i + + + + + overloaded less than operator + + + + + + + const Foo & + const Foo& Foo::operator<< + (int i) const + operator<< + + int + i + + + + + overloaded const less than operator + + + + + + + int + int Foo::operator() + (int i) + operator() + + int + i + + + + + overloaded call operator + + + + + + + int + int Foo::operator() + (int i) const + operator() + + int + i + + + + + overloaded call operator + + + + + + + Foo & + Foo& Foo::operator&= + (const Foo &rhs) + operator&= + + const Foo & + rhs + + + + + and equal operator + + + + + + + const Foo & + const Foo& Foo::operator&= + (const Foo &rhs) const + operator&= + + const Foo & + rhs + + + + + and equal operator + + + + + + + int * + int* Foo::operator->* + (int *p) + operator->* + + int * + p + + + + + Member pointer operator + + + + + + + + Foo + + Foo Foo::fun + () const + fun + + Fun with itself. + + + + + + + + + + + + Foo + + static Foo Foo::fun + (Foo a, Foo b) + fun + + + Foo + + a + + + + Foo + + b + + + Fun of two. + + + + + + + fun() const + + + + + fun() const + + + + + title + + + + + + + + + + + + Foo class. + + + + + Foo::Foo() constructor for details. + + + Foo constant. + + + less than operator. + + + const less than operator. + + + call operator. + + + const call operator. + + + and equal operator. + + + const and equal operator. + + + member pointer operator. + + + + + + + Foo + Foo + + + Foo + fun + + + Foo + fun + + + Foo + operator&= + + + Foo + operator&= + + + Foo + operator() + + + Foo + operator() + + + Foo + operator->* + + + Foo + operator<< + + + Foo + operator<< + + + + diff --git a/testing/078/078__xml__namespace__members__in__file__scope_8h.xml b/testing/078/078__xml__namespace__members__in__file__scope_8h.xml index e0a0343..728054f 100644 --- a/testing/078/078__xml__namespace__members__in__file__scope_8h.xml +++ b/testing/078/078__xml__namespace__members__in__file__scope_8h.xml @@ -31,7 +31,7 @@ - + diff --git a/testing/081/namespace_n.xml b/testing/081/namespace_n.xml new file mode 100644 index 0000000..59d3a92 --- /dev/null +++ b/testing/081/namespace_n.xml @@ -0,0 +1,50 @@ + + + + N + + + int + int N::var + + var + + variable declaration + + + Detailed docs. + + + + + + + + + void + void N::foo + (int param) + foo + + int + param + + + function declaration + + + Detailed docs. + + + + + + + + + + Namespace + + + + diff --git a/testing/081_decl_def.cpp b/testing/081_decl_def.cpp new file mode 100644 index 0000000..5623828 --- /dev/null +++ b/testing/081_decl_def.cpp @@ -0,0 +1,18 @@ +// objective: test for declation and definition order independence: decl first +// check: namespace_n.xml +// config: INPUT = $INPUTDIR/decl_def.h $INPUTDIR/081_decl_def.cpp +#include "test.h" + +/** Namespace */ +namespace N +{ + +/** Detailed docs. */ +int var; + +/** Detailed docs. */ +void foo(int param) +{ +} + +} diff --git a/testing/082/namespace_n.xml b/testing/082/namespace_n.xml new file mode 100644 index 0000000..81867fe --- /dev/null +++ b/testing/082/namespace_n.xml @@ -0,0 +1,50 @@ + + + + N + + + int + int N::var + + var + + variable declaration + + + Detailed docs. + + + + + + + + + void + void N::foo + (int param) + foo + + int + param + + + function declaration + + + Detailed docs. + + + + + + + + + + Namespace + + + + diff --git a/testing/082_decl_def.cpp b/testing/082_decl_def.cpp new file mode 100644 index 0000000..905f7f4 --- /dev/null +++ b/testing/082_decl_def.cpp @@ -0,0 +1,18 @@ +// objective: test for declation and definition order independence: def first +// check: namespace_n.xml +// config: INPUT = $INPUTDIR/082_decl_def.cpp $INPUTDIR/decl_def.h +#include "test.h" + +/** Namespace */ +namespace N +{ + +/** Detailed docs. */ +int var; + +/** Detailed docs. */ +void foo(int param) +{ +} + +} diff --git a/testing/decl_def.h b/testing/decl_def.h new file mode 100644 index 0000000..6e39335 --- /dev/null +++ b/testing/decl_def.h @@ -0,0 +1,10 @@ +namespace N +{ + +/** @brief variable declaration */ +extern int var; + +/** @brief function declaration */ +void foo(int param); + +} -- cgit v0.12