==== Patch <doxygen-1.5.5svn-manual-inheritance> level 1
Source: 753fe47b-1580-4fbf-99b0-fe3a23bba955:/local/doxygen/manual-inheritance:639 [local]
Target: afe2bf4a-e733-0410-8a33-86f594647bc7:/trunk:627 [mirrored]
        (https://doxygen.svn.sourceforge.net/svnroot/doxygen)
Log:
 r638@misuzu:  juliano | 2008-05-11 19:43:39 -0300
 Branch for manual inheritance.
 r639@misuzu:  juliano | 2008-05-11 20:39:38 -0300
 Manual inheritance.

=== src/entry.h
==================================================================
--- src/entry.h	(revision 627)
+++ src/entry.h	(patch doxygen-1.5.5svn-manual-inheritance level 1)
@@ -33,6 +33,8 @@
 enum Protection { Public, Protected, Private, Package } ;
 enum Specifier { Normal, Virtual, Pure } ;
 enum MethodTypes { Method, Signal, Slot, DCOP, Property, Event };
+enum RelatesType { Simple, Duplicate, MemberOf };
+enum Relationship { Member, Related, Foreign };
 
 struct ListItemInfo
 {
@@ -350,7 +352,7 @@
     int          inbodyLine;  //!< line number at which the body doc was found
     QCString     inbodyFile;  //!< file in which the body doc was found
     QCString     relates;     //!< related class (doc block)
-    bool         relatesDup;  //!< keep duplicate doc in original file also
+    RelatesType  relatesType; //!< how relates is handled
     QCString     read;        //!< property read accessor
     QCString     write;       //!< property write accessor
     QCString     inside;      //!< name of the class in which documents are found
=== src/util.cpp
==================================================================
--- src/util.cpp	(revision 627)
+++ src/util.cpp	(patch doxygen-1.5.5svn-manual-inheritance level 1)
@@ -3696,7 +3696,8 @@
 
     for (mmli.toFirst(); (mmd = mmli.current()); ++mmli)
     {
-      if (!mmd->isLinkable() || !mmd->isRelated() || !mmd->getClassDef())
+      if (!mmd->isLinkable() || (!mmd->isRelated() && !mmd->isForeign()) ||
+           !mmd->getClassDef())
         continue;
 
       if (!args) break;
=== src/commentscan.l
==================================================================
--- src/commentscan.l	(revision 627)
+++ src/commentscan.l	(patch doxygen-1.5.5svn-manual-inheritance level 1)
@@ -79,6 +79,7 @@
 static bool handleXRefItem(const QCString &);
 static bool handleRelated(const QCString &);
 static bool handleRelatedAlso(const QCString &);
+static bool handleMemberOf(const QCString &);
 static bool handleRefItem(const QCString &);
 static bool handleSection(const QCString &);
 static bool handleAnchor(const QCString &);
@@ -106,6 +107,7 @@
 static bool handlePublic(const QCString &s);
 static bool handlePublicSection(const QCString &s);
 static bool handleInherit(const QCString &);
+static bool handleExtends(const QCString &);
 
 typedef bool (*DocCmdFunc)(const QCString &name);
 
@@ -197,6 +199,9 @@
   { "public",          &handlePublic,           FALSE },
   { "publicsection",   &handlePublicSection,    FALSE },
   { "inherit",         &handleInherit,          TRUE  },
+  { "extends",         &handleExtends,          TRUE  },
+  { "implements",      &handleExtends,          TRUE  },
+  { "memberof",        &handleMemberOf,         TRUE  },
   { "arg",             0,                       TRUE  },
   { "attention",       0,                       TRUE  },
   { "author",          0,                       TRUE  },
@@ -840,6 +845,7 @@
 %x	FnParam
 %x	OverloadParam
 %x	InheritParam
+%x	ExtendsParam
 %x      ReadFormulaShort
 %x	ReadFormulaLong
 %x	AnchorLabel
@@ -920,7 +926,7 @@
 					  {
 					    if (cmdPtr->endsBrief)
 					    { 
-				              briefEndsAtDot=FALSE;
+					      briefEndsAtDot=FALSE;
 					      // this command forces the end of brief description
 					      setOutput(OutputDoc);
 					    }
@@ -1366,7 +1372,7 @@
   					}
 
 
-  /* --------- handle arguments of the relates(also) command ------------ */
+  /* ----- handle arguments of the relates(also)/memberof command ------- */
 
 <RelatesParam1>({ID}("::"|"."))*{ID}	{ // argument
   					  current->relates = yytext;
@@ -1382,7 +1388,7 @@
   					}
 <RelatesParam1>{DOCNL}			{ // missing argument
   					  warn(yyFileName,yyLineNr,
-					      "Warning: Missing argument of \\relates command"
+					      "Warning: Missing argument of \\relates or \\memberof command"
 					      );
   					  if (*yytext=='\n') yyLineNr++;
 					  addOutput('\n');
@@ -1800,6 +1806,25 @@
 					  BEGIN(Comment);
   					}
 
+  /* ----- handle argument of extends and implements commands ------- */
+
+<ExtendsParam>({ID}("::"|"."))*{ID}	{ // found argument
+					  current->extends->append(
+					    new BaseInfo(removeRedundantWhiteSpace(yytext),Public,Normal)
+					  );
+					  BEGIN( Comment );
+  					}
+<ExtendsParam>{DOCNL}			{ // missing argument
+  					  warn(yyFileName,yyLineNr,
+					      "Warning: \\extends or \\implements command has no argument"
+					      );
+  					  if (*yytext=='\n') yyLineNr++;
+					  addOutput('\n');
+					  BEGIN( Comment );
+  					}
+<ExtendsParam>.				{ // ignore other stuff
+  					}
+
   /* ----- handle language specific sections ------- */
 
 <SkipLang>[\\@]"~"[a-zA-Z]*        { /* language switch */
@@ -2060,11 +2085,18 @@
 
 static bool handleRelatedAlso(const QCString &)
 {
-  current->relatesDup = TRUE;
+  current->relatesType = Duplicate;
   BEGIN(RelatesParam1);
   return FALSE;
 }
 
+static bool handleMemberOf(const QCString &)
+{
+  current->relatesType = MemberOf;
+  BEGIN(RelatesParam1);
+  return FALSE;
+}
+
 static bool handleRefItem(const QCString &)
 {
   addOutput("@refitem ");
@@ -2257,53 +2289,52 @@
 
 static bool handlePrivate(const QCString &)
 {
-  endBrief();
-  current->protection = Private; 
+  current->protection = Private;
   return FALSE;
 }
 
 static bool handlePrivateSection(const QCString &)
 {
-  endBrief();
-  current->protection = protection = Private; 
+  current->protection = protection = Private;
   return FALSE;
 }
 
 static bool handleProtected(const QCString &)
 {
-  endBrief();
-  current->protection = Protected; 
+  current->protection = Protected;
   return FALSE;
 }
 
 static bool handleProtectedSection(const QCString &)
 {
-  endBrief();
   current->protection = protection = Protected ;
   return FALSE;
 }
 
 static bool handlePublic(const QCString &)
 {
-  endBrief();
   current->protection = Public;
   return FALSE;
 }
 
 static bool handlePublicSection(const QCString &)
 {
-  endBrief();
-  current->protection = protection = Public; 
+  current->protection = protection = Public;
   return FALSE;
 }
 
 static bool handleInherit(const QCString &)
 {
-  endBrief();
   BEGIN(InheritParam);
   return FALSE;
 }
 
+static bool handleExtends(const QCString &)
+{
+  BEGIN(ExtendsParam);
+  return FALSE;
+}
+
 //----------------------------------------------------------------------------
 
 static void checkFormula()
=== src/doxygen.cpp
==================================================================
--- src/doxygen.cpp	(revision 627)
+++ src/doxygen.cpp	(patch doxygen-1.5.5svn-manual-inheritance level 1)
@@ -1794,7 +1794,7 @@
                       root->fileName,root->startLine,
                       md->typeString(),memName,md->argsString(),
                       md->excpString(),root->protection,root->virt,
-                      md->isStatic(),FALSE,md->memberType(),
+                      md->isStatic(),Member,md->memberType(),
                       templAl.pointer(),al.pointer()
                       );
                   }
@@ -1880,7 +1880,7 @@
     bool fromAnnScope,
     MemberDef *fromAnnMemb,
     Protection prot,
-    bool related)
+    Relationship related)
 {
   Entry *root = rootNav->entry();
 
@@ -2145,7 +2145,7 @@
   MemberDef *md=new MemberDef(
       root->fileName,root->startLine,
       root->type,name,root->args,0,
-      Public, Normal,root->stat,FALSE,
+      Public, Normal,root->stat,Member,
       mtype,0,0);
   md->setTagInfo(rootNav->tagInfo());
   md->setDocumentation(root->doc,root->docFile,root->docLine);
@@ -2447,6 +2447,7 @@
     QCString type=root->type.stripWhiteSpace();
     ClassDef *cd=0;
     bool isRelated=FALSE;
+    bool isMemberOf=FALSE;
 
     QCString classScope=stripAnonymousNamespaceScope(scope);
     classScope=stripTemplateSpecifiersFromScope(classScope,FALSE);
@@ -2467,7 +2468,7 @@
                               FALSE,  // from Anonymous scope
                               0,      // anonymous member
                               Public, // protection
-                              FALSE   // related to a class
+                              Member  // related to a class
                              );
          }
       }
@@ -2534,6 +2535,7 @@
     if (!root->relates.isEmpty()) // related variable
     {
       isRelated=TRUE;
+      isMemberOf=(root->relatesType == MemberOf);
       if (getClass(root->relates)==0 && !scope.isEmpty())
         scope=mergeScopes(scope,root->relates);
       else 
@@ -2575,7 +2577,7 @@
                                   TRUE,  // from anonymous scope
                                   0,     // from anonymous member
                                   root->protection,
-                                  isRelated
+                                  isMemberOf ? Foreign : isRelated ? Related : Member
                                  );
             added=TRUE;
           }
@@ -2599,7 +2601,7 @@
                          FALSE,  // from anonymous scope
                          md,     // from anonymous member
                          root->protection, 
-                         isRelated);
+                         isMemberOf ? Foreign : isRelated ? Related : Member);
     }
     else if (!name.isEmpty()) // global variable
     {
@@ -2668,7 +2670,10 @@
   MemberDef *md=new MemberDef(
       root->fileName,root->startLine,
       root->type,name,root->args,root->exception,
-      root->protection,root->virt,root->stat,!root->relates.isEmpty(),
+      root->protection,root->virt,
+      root->stat && root->relatesType != MemberOf,
+      root->relates.isEmpty() ? Member :
+          root->relatesType == MemberOf ? Foreign : Related,
       mtype,root->tArgLists ? root->tArgLists->last() : 0,root->argList);
   md->setTagInfo(rootNav->tagInfo());
   md->setMemberClass(cd);
@@ -2793,13 +2798,13 @@
 
     Debug::print(Debug::Functions,0,
                  "FUNCTION_SEC:\n"
-                 "  `%s' `%s'::`%s' `%s' relates=`%s' relatesDup=`%d' file=`%s' line=`%d' bodyLine=`%d' #tArgLists=%d mGrpId=%d spec=%d proto=%d docFile=%s\n",
+                 "  `%s' `%s'::`%s' `%s' relates=`%s' relatesType=`%d' file=`%s' line=`%d' bodyLine=`%d' #tArgLists=%d mGrpId=%d spec=%d proto=%d docFile=%s\n",
                  root->type.data(),
                  rootNav->parent()->name().data(),
                  root->name.data(),
                  root->args.data(),
                  root->relates.data(),
-                 root->relatesDup,
+                 root->relatesType,
                  root->fileName.data(),
                  root->startLine,
                  root->bodyLine,
@@ -2876,7 +2881,7 @@
                  || rootNav->parent()->section()==Entry::OBJCIMPL_SEC
                 ) &&
                !isMember &&
-               (root->relates.isEmpty() || root->relatesDup) &&
+               (root->relates.isEmpty() || root->relatesType == Duplicate) &&
                root->type.left(7)!="extern " && root->type.left(8)!="typedef " 
               )
       // no member => unrelated function 
@@ -3019,7 +3024,7 @@
           md=new MemberDef(
               root->fileName,root->startLine,
               root->type,name,root->args,root->exception,
-              root->protection,root->virt,root->stat,FALSE,
+              root->protection,root->virt,root->stat,Member,
               MemberDef::Function,tArgList,root->argList);
 
           md->setTagInfo(rootNav->tagInfo());
@@ -3133,8 +3138,8 @@
             Doxygen::functionNameSDict->append(name,mn);
           }
           addMemberToGroups(root,md);
-          if (!root->relatesDup) // if this is a relatesalso command, allow find
-                                 // Member to pick it up
+          if (root->relatesType == Simple) // if this is a relatesalso command,
+                                           // allow find Member to pick it up
           {
             rootNav->changeSection(Entry::EMPTY_SEC); // Otherwise we have finished 
                                                       // with this entry.
@@ -3557,7 +3562,7 @@
           LockingPtr<ArgumentList>  mdAl = md->argumentList();
           LockingPtr<ArgumentList> rmdAl = rmd->argumentList();
           //printf("  Member found: related=`%d'\n",rmd->isRelated());
-          if (rmd->isRelated() && // related function
+          if ((rmd->isRelated() || rmd->isForeign()) && // related function
               matchArguments2( md->getOuterScope(), md->getFileDef(), mdAl.pointer(),
                               rmd->getOuterScope(),rmd->getFileDef(),rmdAl.pointer(),
                               TRUE
@@ -3567,6 +3572,8 @@
             //printf("  Found related member `%s'\n",md->name().data());
             if (rmd->relatedAlso())
               md->setRelatedAlso(rmd->relatedAlso());
+            else if (rmd->isForeign())
+              md->makeForeign();
             else
               md->makeRelated();
           } 
@@ -4932,7 +4939,7 @@
         }
       }
     } 
-    if (!found && !root->relatesDup) // no match
+    if (!found && root->relatesType != Duplicate) // no match
     {
       QCString fullFuncDecl=decl;
       if (root->argList) fullFuncDecl+=argListToString(root->argList,TRUE);
@@ -5118,6 +5125,7 @@
   QCString exceptions;
   QCString funcSpec;
   bool isRelated=FALSE;
+  bool isMemberOf=FALSE;
   bool isFriend=FALSE;
   bool done;
   do
@@ -5199,6 +5207,7 @@
   if (!root->relates.isEmpty()) 
   {                             // related member, prefix user specified scope
     isRelated=TRUE;
+    isMemberOf=(root->relatesType == MemberOf);
     if (getClass(root->relates)==0 && !scopeName.isEmpty())
       scopeName= mergeScopes(scopeName,root->relates);
     else 
@@ -5379,11 +5388,12 @@
            "  related=`%s'\n" 
            "  exceptions=`%s'\n"
            "  isRelated=%d\n"
+           "  isMemberOf=%d\n"
            "  isFriend=%d\n"
            "  isFunc=%d\n\n",
            namespaceName.data(),className.data(),
            funcType.data(),funcSpec.data(),funcName.data(),funcArgs.data(),funcTempList.data(),
-           funcDecl.data(),root->relates.data(),exceptions.data(),isRelated,isFriend,
+           funcDecl.data(),root->relates.data(),exceptions.data(),isRelated,isMemberOf,isFriend,
            isFunc
           );
 
@@ -5625,7 +5635,7 @@
           MemberDef *md=new MemberDef(
               root->fileName,root->startLine,
               funcType,funcName,funcArgs,exceptions,
-              root->protection,root->virt,root->stat,FALSE,
+              root->protection,root->virt,root->stat,Member,
               mtype,tArgList,root->argList);
           //printf("new specialized member %s args=`%s'\n",md->name().data(),funcArgs.data());
           md->setTagInfo(rootNav->tagInfo());
@@ -5689,7 +5699,7 @@
           MemberDef *md=new MemberDef(
               root->fileName,root->startLine,
               funcType,funcName,funcArgs,exceptions,
-              root->protection,root->virt,root->stat,TRUE,
+              root->protection,root->virt,root->stat,Related,
               mtype,tArgList,root->argList);
           md->setTagInfo(rootNav->tagInfo());
           md->setTypeConstraints(root->typeConstr);
@@ -5818,7 +5828,9 @@
           MemberDef *md=new MemberDef(
               root->fileName,root->startLine,
               funcType,funcName,funcArgs,exceptions,
-              root->protection,root->virt,root->stat,TRUE,
+              root->protection,root->virt,
+              root->stat && !isMemberOf,
+              isMemberOf ? Foreign : isRelated ? Related : Member,
               mtype,
               (root->tArgLists ? root->tArgLists->last() : 0),
               funcArgs.isEmpty() ? 0 : root->argList);
@@ -5901,7 +5913,7 @@
           cd->insertMember(md);
           cd->insertUsedFile(root->fileName);
           md->setRefItems(root->sli);
-          if (root->relatesDup) md->setRelatedAlso(cd);
+          if (root->relatesType == Duplicate) md->setRelatedAlso(cd);
           addMemberToGroups(root,md);
           //printf("Adding member=%s\n",md->name().data());
           if (newMemberName)
@@ -5911,7 +5923,7 @@
             Doxygen::memberNameSDict->append(funcName,mn);
           }
         }
-        if (root->relatesDup)
+        if (root->relatesType == Duplicate)
         {
           if (!findGlobalMember(rootNav,namespaceName,funcName,funcTempList,funcArgs,funcDecl))
           {
@@ -5944,7 +5956,7 @@
         MemberDef *md=new MemberDef(
             root->fileName,root->startLine,
             funcType,funcName,funcArgs,exceptions,
-            root->protection,root->virt,root->stat,FALSE,
+            root->protection,root->virt,root->stat,Member,
             MemberDef::Function,0,root->argList);
         md->setTagInfo(rootNav->tagInfo());
         md->makeImplementationDetail();
@@ -6024,7 +6036,7 @@
   //printf("rootNav->parent()->name()=%s\n",rootNav->parent()->name().data());
   bool isFunc=TRUE;
 
-  if (root->relatesDup && !root->relates.isEmpty())
+  if (root->relatesType == Duplicate && !root->relates.isEmpty())
   {
     QCString tmp = root->relates;
     root->relates.resize(0);
@@ -6209,6 +6221,7 @@
     MemberNameSDict *mnsd=0;
     bool isGlobal;
     bool isRelated=FALSE;
+    bool isMemberOf=FALSE;
     //printf("Found enum with name `%s' relates=%s\n",root->name.data(),root->relates.data());
     int i;
 
@@ -6236,6 +6249,7 @@
     if (!root->relates.isEmpty()) 
     {   // related member, prefix user specified scope
       isRelated=TRUE;
+      isMemberOf=(root->relatesType == MemberOf);
       if (getClass(root->relates)==0 && !scope.isEmpty())
         scope=mergeScopes(scope,root->relates);
       else 
@@ -6268,7 +6282,9 @@
       md = new MemberDef(
           root->fileName,root->startLine,
           0,name,0,0,
-          root->protection,Normal,FALSE,isRelated,MemberDef::Enumeration,
+          root->protection,Normal,FALSE,
+          isMemberOf ? Foreign : isRelated ? Related : Member,
+          MemberDef::Enumeration,
           0,0);
       md->setTagInfo(rootNav->tagInfo());
       if (!isGlobal) md->setMemberClass(cd); else md->setFileDef(fd);
@@ -7467,7 +7483,7 @@
     {
       MemberDef *md=new MemberDef("<tagfile>",1,
                     "#define",root->name,root->args,0,
-                    Public,Normal,FALSE,FALSE,MemberDef::Define,0,0);
+                    Public,Normal,FALSE,Member,MemberDef::Define,0,0);
       md->setTagInfo(rootNav->tagInfo());
       //printf("Searching for `%s' fd=%p\n",filePathName.data(),fd);
       md->setFileDef(rootNav->parent()->fileDef());
=== src/pre.l
==================================================================
--- src/pre.l	(revision 627)
+++ src/pre.l	(patch doxygen-1.5.5svn-manual-inheritance level 1)
@@ -1027,7 +1027,7 @@
   MemberDef *md=new MemberDef(
       g_yyFileName,g_yyLineNr,
       "#define",g_defName,g_defArgsStr,0,
-      Public,Normal,FALSE,FALSE,MemberDef::Define,0,0);
+      Public,Normal,FALSE,Member,MemberDef::Define,0,0);
   if (!g_defArgsStr.isEmpty())
   {
     ArgumentList *argList = new ArgumentList;
=== src/entry.cpp
==================================================================
--- src/entry.cpp	(revision 627)
+++ src/entry.cpp	(patch doxygen-1.5.5svn-manual-inheritance level 1)
@@ -69,7 +69,7 @@
   mGrpId = -1;
   tagInfo = 0;
   sli = 0;
-  relatesDup = FALSE;
+  relatesType = Simple;
   hidden = FALSE;
   groupDocType = GROUPDOC_NORMAL;
   reset();
@@ -98,7 +98,7 @@
   docLine     = e.docLine;
   docFile     = e.docFile.copy();
   relates     = e.relates.copy();
-  relatesDup  = e.relatesDup;
+  relatesType = e.relatesType;
   read        = e.read.copy();
   write       = e.write.copy();
   brief       = e.brief.copy();
@@ -255,7 +255,7 @@
   docFile.resize(0);
   docLine=-1;
   relates.resize(0);
-  relatesDup=FALSE;
+  relatesType=Simple;
   brief.resize(0);
   briefFile.resize(0);
   briefLine=-1;
=== src/memberdef.cpp
==================================================================
--- src/memberdef.cpp	(revision 627)
+++ src/memberdef.cpp	(patch doxygen-1.5.5svn-manual-inheritance level 1)
@@ -306,8 +306,9 @@
     MemberDefImpl();
    ~MemberDefImpl();
     void init(Definition *def,const char *t,const char *a,const char *e,
-              Protection p,Specifier v,bool s,bool r,MemberDef::MemberType mt,
-              const ArgumentList *tal,const ArgumentList *al
+              Protection p,Specifier v,bool s,Relationship r,
+              MemberDef::MemberType mt,const ArgumentList *tal,
+              const ArgumentList *al
              );
 
     ClassDef     *classDef;   // member of or related to 
@@ -395,7 +396,7 @@
     bool hasDocumentedParams;
     bool hasDocumentedReturnType;
     bool isDMember;
-    bool related;             // is this a member that is only related to a class
+    Relationship related;     // relationship of this to the class
     bool stat;                // is it a static function?
     bool proto;               // is it a prototype;
     bool docEnumValues;       // is an enum with documented enum values.
@@ -439,8 +440,9 @@
 
 void MemberDefImpl::init(Definition *def,
                      const char *t,const char *a,const char *e,
-                     Protection p,Specifier v,bool s,bool r,MemberDef::MemberType mt,
-                     const ArgumentList *tal,const ArgumentList *al
+                     Protection p,Specifier v,bool s,Relationship r,
+                     MemberDef::MemberType mt,const ArgumentList *tal,
+                     const ArgumentList *al
                     )
 {
   classDef=0;
@@ -572,7 +574,7 @@
  * \param v  The degree of `virtualness' of the member, possible values are:
  *           \c Normal, \c Virtual, \c Pure.
  * \param s  A boolean that is true iff the member is static.
- * \param r  A boolean that is true iff the member is only related.
+ * \param r  The relationship between the class and the member.
  * \param mt The kind of member. See #MemberDef::MemberType for a list of 
  *           all types.
  * \param tal The template arguments of this member.
@@ -582,7 +584,7 @@
 
 MemberDef::MemberDef(const char *df,int dl,
                      const char *t,const char *na,const char *a,const char *e,
-                     Protection p,Specifier v,bool s,bool r,MemberType mt,
+                     Protection p,Specifier v,bool s,Relationship r,MemberType mt,
                      const ArgumentList *tal,const ArgumentList *al
                     ) : Definition(df,dl,removeRedundantWhiteSpace(na))
 {
@@ -3196,9 +3198,15 @@
 bool MemberDef::isRelated() const
 { 
   makeResident();
-  return m_impl->related; 
+  return m_impl->related == Related;
 }
 
+bool MemberDef::isForeign() const
+{ 
+  makeResident();
+  return m_impl->related == Foreign; 
+}
+
 bool MemberDef::isStatic() const
 { 
   makeResident();
@@ -3633,9 +3641,15 @@
 void MemberDef::makeRelated()
 { 
   makeResident();
-  m_impl->related=TRUE; 
+  m_impl->related = Related; 
 }
 
+void MemberDef::makeForeign()
+{ 
+  makeResident();
+  m_impl->related = Foreign; 
+}
+
 void MemberDef::setHasDocumentedParams(bool b)
 { 
   makeResident();
@@ -3833,7 +3847,7 @@
   marshalBool         (Doxygen::symbolStorage,m_impl->hasDocumentedParams);
   marshalBool         (Doxygen::symbolStorage,m_impl->hasDocumentedReturnType);
   marshalBool         (Doxygen::symbolStorage,m_impl->isDMember);
-  marshalBool         (Doxygen::symbolStorage,m_impl->related);
+  marshalInt          (Doxygen::symbolStorage,(int)m_impl->related);
   marshalBool         (Doxygen::symbolStorage,m_impl->stat);
   marshalBool         (Doxygen::symbolStorage,m_impl->proto);
   marshalBool         (Doxygen::symbolStorage,m_impl->docEnumValues);
@@ -3933,7 +3947,7 @@
   m_impl->hasDocumentedParams     = unmarshalBool         (Doxygen::symbolStorage);
   m_impl->hasDocumentedReturnType = unmarshalBool         (Doxygen::symbolStorage);
   m_impl->isDMember               = unmarshalBool         (Doxygen::symbolStorage);
-  m_impl->related                 = unmarshalBool         (Doxygen::symbolStorage);
+  m_impl->related                 = (Relationship)unmarshalInt(Doxygen::symbolStorage);
   m_impl->stat                    = unmarshalBool         (Doxygen::symbolStorage);
   m_impl->proto                   = unmarshalBool         (Doxygen::symbolStorage);
   m_impl->docEnumValues           = unmarshalBool         (Doxygen::symbolStorage);
=== src/index.cpp
==================================================================
--- src/index.cpp	(revision 627)
+++ src/index.cpp	(patch doxygen-1.5.5svn-manual-inheritance level 1)
@@ -1577,7 +1577,8 @@
         g_memberIndexLetterUsed[CMHL_Events][letter].append(md);
         documentedClassMembers[CMHL_Events]++;
       }
-      else if (md->isRelated() || (md->isFriend() && !isFriendToHide))
+      else if (md->isRelated() || md->isForeign() ||
+               (md->isFriend() && !isFriendToHide))
       {
         g_memberIndexLetterUsed[CMHL_Related][letter].append(md);
         documentedClassMembers[CMHL_Related]++;
=== src/marshal.cpp
==================================================================
--- src/marshal.cpp	(revision 627)
+++ src/marshal.cpp	(patch doxygen-1.5.5svn-manual-inheritance level 1)
@@ -395,7 +395,7 @@
   marshalInt(s,e->inbodyLine);
   marshalQCString(s,e->inbodyFile);
   marshalQCString(s,e->relates);
-  marshalBool(s,e->relatesDup);
+  marshalInt(s,e->relatesType);
   marshalQCString(s,e->read);
   marshalQCString(s,e->write);
   marshalQCString(s,e->inside);
@@ -788,7 +788,7 @@
   e->inbodyLine       = unmarshalInt(s);
   e->inbodyFile       = unmarshalQCString(s);
   e->relates          = unmarshalQCString(s);
-  e->relatesDup       = unmarshalBool(s);
+  e->relatesType      = (RelatesType)unmarshalInt(s);
   e->read             = unmarshalQCString(s);
   e->write            = unmarshalQCString(s);
   e->inside           = unmarshalQCString(s);
=== src/memberdef.h
==================================================================
--- src/memberdef.h	(revision 627)
+++ src/memberdef.h	(patch doxygen-1.5.5svn-manual-inheritance level 1)
@@ -69,7 +69,7 @@
     MemberDef(const char *defFileName,int defLine,
               const char *type,const char *name,const char *args,
               const char *excp,Protection prot,Specifier virt,bool stat,
-              bool related,MemberType t,const ArgumentList *tal,
+              Relationship related,MemberType t,const ArgumentList *tal,
               const ArgumentList *al);
    ~MemberDef(); 
     DefType definitionType() const        { return TypeMember; }
@@ -133,6 +133,7 @@
     bool isProperty() const;
     bool isEvent() const;
     bool isRelated() const;
+    bool isForeign() const;
     bool isStatic() const;
     bool isInline() const;
     bool isExplicit() const;
@@ -257,6 +258,7 @@
     void setTemplateSpecialization(bool b);
     
     void makeRelated();
+    void makeForeign();
     void setHasDocumentedParams(bool b);
     void setHasDocumentedReturnType(bool b);
     void setInheritsDocsFrom(MemberDef *md);
=== examples/manual.c
==================================================================
--- examples/manual.c	(revision 627)
+++ examples/manual.c	(patch doxygen-1.5.5svn-manual-inheritance level 1)
@@ -0,0 +1,87 @@
+/**
+ * \file manual.c
+ */
+
+typedef struct Object Object;
+typedef struct Vehicle Vehicle;
+typedef struct Car Car;
+typedef struct Truck Truck;
+
+/*!
+ * Base object class.
+ */
+struct Object
+{
+  int ref;    //!< \private Reference count.
+};
+
+
+/*!
+ * Increments object reference count by one.
+ * \public \memberof Object
+ */
+static Object * objRef(Object *obj);
+
+
+/*!
+ * Decrements object reference count by one.
+ * \public \memberof Object
+ */
+static Object * objUnref(Object *obj);
+
+
+/*!
+ * Vehicle class.
+ * \extends Object
+ */
+struct Vehicle
+{
+  Object base;    //!< \protected Base class.
+};
+
+
+/*!
+ * Starts the vehicle.
+ * \public \memberof Vehicle
+ */
+void vehicleStart(Vehicle *obj);
+
+
+/*!
+ * Stops the vehicle.
+ * \public \memberof Vehicle
+ */
+void vehicleStop(Vehicle *obj);
+
+
+/*!
+ * Car class.
+ * \extends Vehicle
+ */
+struct Car
+{
+  Vehicle base;    //!< \protected Base class.
+};
+
+
+/*!
+ * Truck class.
+ * \extends Vehicle
+ */
+struct Truck
+{
+  Vehicle base;    //!< \protected Base class.
+};
+
+
+/*!
+ * Main function.
+ *
+ * Ref vehicleStart(), objRef(), objUnref().
+ */
+int main(void)
+{
+  Car c;
+  vehicleStart((Vehicle*) c);
+}
+

Property changes on: examples/manual.c
___________________________________________________________________
Name: svn:eol-style
 +native

=== examples/manual.cfg
==================================================================
--- examples/manual.cfg	(revision 627)
+++ examples/manual.cfg	(patch doxygen-1.5.5svn-manual-inheritance level 1)
@@ -0,0 +1,15 @@
+PROJECT_NAME           = "Manual inheritance and membership"
+OUTPUT_DIRECTORY       = manual
+GENERATE_LATEX         = NO
+GENERATE_MAN           = NO
+GENERATE_RTF           = NO
+CASE_SENSE_NAMES       = NO
+INPUT                  = manual.c
+QUIET                  = YES
+JAVADOC_AUTOBRIEF      = YES
+EXTRACT_PRIVATE        = YES
+EXTRACT_STATIC         = YES
+TYPEDEF_HIDES_STRUCT   = YES
+INLINE_SOURCES         = YES
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION    = YES
