apply doxygen-svndiff.patch from #2763155

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-cherylfoil@11697 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2009-10-13 21:27:09 +00:00
commit 45518cd0d1
15 changed files with 467 additions and 170 deletions

View file

@ -1304,6 +1304,15 @@ public:
// Note that this is used in enumValue() amongst other places
Setattr(n, "value", tmpValue);
{
EnumFeature enum_feature = decodeEnumFeature(parentNode(n));
if ((enum_feature == ProperEnum) && Getattr(parentNode(n), "sym:name") && !Getattr(parentNode(n), "unnamedinstance")) {
// Wrap (non-anonymous) C/C++ enum with a proper Java enum
// Emit the enum item.
if (!Getattr(n, "_last")) // Only the first enum item has this attribute set
Printf(enum_code, ",\n");
//translate and write javadoc comment if flagged
if (doxygen_javadoc_flag){
String *doxygen_comments;
@ -1314,14 +1323,7 @@ public:
Delete(doxygen_comments);
}
}
{
EnumFeature enum_feature = decodeEnumFeature(parentNode(n));
if ((enum_feature == ProperEnum) && Getattr(parentNode(n), "sym:name") && !Getattr(parentNode(n), "unnamedinstance")) {
// Wrap (non-anonymous) C/C++ enum with a proper Java enum
// Emit the enum item.
if (!Getattr(n, "_last")) // Only the first enum item has this attribute set
Printf(enum_code, ",\n");
Printf(enum_code, " %s", symname);
if (Getattr(n, "enumvalue")) {
String *value = enumValue(n);
@ -1841,7 +1843,6 @@ public:
emitBanner(f_proxy);
if (Len(package) > 0){
Printf(f_proxy, "LETS TEST THIS NAO THX \n\n\n");
Printf(f_proxy, "package %s;\n", package);
}
Clear(proxy_class_def);

View file

@ -7,7 +7,7 @@
* Python language module for SWIG.
* ----------------------------------------------------------------------------- */
char cvsroot_python_cxx[] = "$Id: python.cxx 10453 2008-05-15 21:18:44Z wsfulton $";
char cvsroot_python_cxx[] = "$Id$";
#include "swigmod.h"
#define ctab2 " "
@ -3124,6 +3124,13 @@ public:
if (!fastproxy || olddefs) {
Printv(f_shadow, tab4, "def ", symname, "(", parms, ")", returnTypeAnnotation(n), ":", NIL);
Printv(f_shadow, " return ", funcCall(Swig_name_member(class_name, symname), callParms), "\n", NIL);
if (doxygen) {
String *doxygen_comments;
if (DoxygenTranslator::getDocumentation(n, PyDoc, doxygen_comments)) {
Printf(f_shadow, Char(pythoncode(doxygen_comments, tab8)));
Delete(doxygen_comments);
}
}
}
} else {
Printv(f_shadow, tab4, "def ", symname, "(",parms , ")", returnTypeAnnotation(n), ":", NIL);