Made rdoc documentation spit the full name of

class/methods to avoid name clashes.
rdoc, unfortunately, needs patching to recognize
this properly.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9761 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Gonzalo Garramuno 2007-05-03 10:48:17 +00:00
commit 95a3ecf285
2 changed files with 12 additions and 6 deletions

View file

@ -6,6 +6,13 @@ Version 1.3.32 (in progress)
Fixed Ruby documentation to use the proper css styles for
each section. Added autodoc section to Ruby's docs to
document the features supported by Ruby in documenting its modules.
Made rdoc documentation spit out the full name of the class +
method name. Albeit this will make the current rdoc not recognize
the method, this is still needed to disambiguate between different
classes with similar methods (rdoc was created to document the
ruby source which only contains one class per c file, unlike swig)
I have patched rdoc to make it more friendly to swig. This
patch needs to be merged in the ruby std library now.
05/03/2007: gga
[Ruby]

View file

@ -453,7 +453,6 @@ private:
parent = parentNode(parent);
}
Append(basenamestr, "#");
Append(super_names, basenamestr );
Delete(basenamestr);
base = Next(base);
@ -463,7 +462,7 @@ private:
String* full_name;
if ( module ) {
full_name = NewString(module);
Append(full_name, "::");
if (class_name && Len(class_name) > 0) Append(full_name, "::");
}
else
full_name = NewString("");
@ -532,23 +531,23 @@ private:
Append(doc, "\n\n");
break;
case AUTODOC_CTOR:
Printf(doc, " Document-method: new\n\n", class_name);
Printf(doc, " Document-method: %s.new\n\n", full_name);
break;
case AUTODOC_DTOR:
break;
case AUTODOC_STATICFUNC:
Printf(doc, " Document-method: %s\n\n", full_name);
Printf(doc, " Document-method: %s.%s\n\n", full_name, symname);
break;
case AUTODOC_FUNC:
case AUTODOC_METHOD:
case AUTODOC_GETTER:
Printf(doc, " Document-method: %s\n\n", symname);
Printf(doc, " Document-method: %s.%s\n\n", full_name, symname);
break;
case AUTODOC_SETTER:
Printf(doc, " Document-method: %s=\n\n", symname);
Printf(doc, " Document-method: %s.%s=\n\n", full_name, symname);
break;
}
}