Commit Graph

437 Commits

Author SHA1 Message Date
William S Fulton ecc66fdcbd Add Doxygen test for constant and fix JavaDoc indentation 2018-06-17 00:17:07 +01:00
William S Fulton 50d7f36f45 Correct JavaDoc from doxygen comments indentation
Adds missing JavaDoc indentation for doxygen comments obtained from:
- enum values
- class methods
- constructors
- global functions/variables
2018-06-17 00:16:57 +01:00
William S Fulton 33921666a1 Merge branch 'vadz-doxygen'
This is the Doxygen work begun in Google Summer of Code projects 2008
and 2012 and subsequently improved by numerous contributors.

* vadz-doxygen: (314 commits)
  Add changes entry for Doxygen support
  Add some missing doctype tyemaps
  Doxygen warnings cleanup
  Move doxygen warning numbers
  Add Python doxygen example
  Doxygen example
  Add Doxygen to include paths
  Doxygen source rename
  More merge fixes from doxygen branches
  Correct python example headers
  Correct source code headers
  Another merge fix from doxygen branches
  Java enums output format fixes
  Add omitted doxygen_parsing_enums testcase
  PEP8 conformance for comment verifier module
  Clean up merge problem
  Doxygen html tweaks
  Update html chapter numbering for added Doxygen chapter
  Fixes to makechap.py to detect ill-formed headers
  html fixes for Doxygen
  Add missing CPlusPlus17.html file
  Format files to unix format
  Doxygen testcase tweak to match that in the html docs
  Doxygen html documentation updates and corrections
  Remove doxygen Examples subdirectory
  Beautify doxygen source code
  Code formatting fixes in doxygen code
  Remove unused doxygen code
  new_node refactor
  Various merge fixes in doxygen branches
  Unused variable warning fix
  Fix wrongly resetting indent after formulae in Doxygen comments
  Add support for doxygen:alias feature
  Get rid of meaningless return type of DoxygenParser methods
  Return enum, not untyped int, when classifying Doxygen commands
  Get rid of unnecessary "typedef enum" in C++ code
  Use slash, not backslash, in "C/C++" in the documentation
  Replace literal "<" with "&lt;" in HTML documentation
  Fix broken link to java.sun.com in Doxygen documentation
  Fix using com.sun.tools.javadoc package under macOS
  Fix error reporting for special characters in Doxygen parsing code
  Switch Python Doxygen unit tests to use inspect.getdoc()
  Use correct separator in Java class path under Windows.
  Remove executable permission from appveyor.yml.
  Use JAVA_HOME value in configure to detect Java.
  Display JAVA_HOME value in "make java_version".
  Fix harmless MSVC warning in DoxygenTranslator code.
  Reset "_last" for all but first enum elements.
  Don't duplicate Javadoc from global enum Doxygen comments twice.
  Move Doxygen comments concatenation from the parser to the lexer.
  Fix shift/reduce conflicts in Doxygen pre/post comment parsing.
  Rewrote part of the grammar dealing with Doxygen comments for enums.
  No changes, just remove spurious white space only differences.
  Move Doxygen comment mangling from the parser to the lexer.
  Merge "-builtin" autodoc bugs workarounds from master into test.
  Quote JAVA_HOME variable value in Java test suite makefile.
  Remove unused C_COMMENT_STRING terminal from the grammar.
  Fix missing returns in the Doxygen test suite code.
  Fix trimming whitespace from Doxygen comments.
  Remove code not doing anything from PyDocConverter.
  Remove unused <sstream> header.
  Remove unreferenced struct declaration.
  Remove unused Swig_warn() function.
  Remove any whitespace before ignored Doxygen commands.
  Remove trailing space from one of Doxygen tests.
  Fix autodoc strings generated in Python builtin case and the test.
  Fix Doxygen unit test in Python "-builtin" case.
  Use class docstrings in "-builtin" Python case.
  Don't indent Doxygen doc strings in generated Python code.
  Add a possibility to flexibly ignore custom Doxygen tags.
  Stop completely ignoring many Doxygen comments.
  Fix structural Doxygen comment recognition in the parser.
  No changes, just make checking for Doxygen structural tags more sane.
  Use "//", not "#", for comments in SWIG input.
  Allow upper case letters and digits in Doxygen words.
  Pass the node the Doxygen comment is attached to to DoxygenParser.
  Get rid of findCommand() which duplicaed commandBelongs().
  Recognize unknown Doxygen tags correctly.
  No real changes, just pass original command to commandBelongs().
  Describe Doxygen-specific %features in a single place.
  Give warnings for unknown Doxygen commands in Doxygen parser.
  Document the return type when translating Doxygen @return to Python.
  Fix translated Doxygen comments for overloaded functions in Python.
  Also merge Doxygen comments for overloaded constructors in Python.
  Allow using enum elements as default values for Python functions.
  Don't always use "*args" for all Python wrapper functions.
  No real changes, just make PYTHON::check_kwargs() const.
  Refactor: move makeParameterName() to common Language base class.
  Remove long line wrapping from Python parameter list generation code.
  Simplify and make more efficient building Python docstrings.
  Translate Doxygen code blocks to Sphinx code blocks.
  Add a simple test of multiple parameters to Doxygen test suite.
  Make Python parameters types hyperlinks in the doc strings.
  Make Language::classLookup() and enumLookup() static.
  Fix arguments of @param, @return etc translations to Python.
  Remove unused method from PyDocConverter.
  No real changes, just remove an unnecessary variable.
  Preserve relative indentation when parsing Doxygen comments.
  Use Sphinx-friendly formatting for overloaded functions documentation.
  Add poor man trailing white space detection to Doxygen Python tests.
  ...
2018-06-07 08:13:10 +01:00
William S Fulton ec2cb809cd Add Doxygen to include paths 2018-05-29 06:59:26 +01:00
William S Fulton ac85784a76 Doxygen source rename
Source/DoxygenTranslator/src directory is renamed Source/Doxygen
Renamed files in this directory to short names using lowercase as is the
convention for the rest of the SWIG source.
C++ extension is also .cxx like other SWIG source code.

I used doxy as the prefix for most file renames because without this
Doxygen/parser.* would be easily confused with CParse/parser.* so
Doxygen/doxyparser.* is renamed from DoxygenTranslator/src/DoxygenParser.*
2018-05-26 12:52:52 +01:00
William S Fulton 8344aec3a3 Java enums output format fixes
Restore generated Java enum code output to what it was pre-doxygen code changes.
Improves code with doxygen comments too.
2018-05-25 08:27:47 +01:00
William S Fulton 73c585b994 Code formatting fixes in doxygen code 2018-05-25 07:56:39 +01:00
William S Fulton 0483caaed5 Remove unused doxygen code 2018-05-19 12:24:43 +01:00
William S Fulton 0cfd53cff7 Merge branch 'master' into vadz-doxygen
* master:
  Add Octave 4.4 to Travis allow_failures
  Fixes for appveyor image changes
  Javascript test-suite Makefile parallel jobs
  Add changes entry for csconstruct, dconstruct and javaconstruct fix
  Fix lookup of csconstruct, dconstructor and javaconstruct typemaps
  Javascript %nspace fix in generated C++ code
  Add C++17 documentation chapter
  Add changes notes for C++17 nested namespaces support
  Test for invalid C++17 nested namespace aliases
  Test c++17 nested namespaces and %nspace
  Add c++17 nested namespaces runtime test for C#
  Add c++17 nested namespaces runtime test for Python
  Add support for c++17 nested namespaces
  Update CHANGES.current
  .travis.yml: test against Octave 4.4
  Examples/test-suite/register_par.i: rename 'tree' to 'swig_tree'
  Examples/octave/module_load/runme.m: update 'exist()' statements for Octave >= 4.4
  Examples/octave/module_load/runme.m: do not use duplicate function names
  Examples/Makefile.in: unset OCTAVE_PATH when running Octave for tests
  Lib/octave: fix getting/setting global variables for Octave >= 4.4
  Lib/octave: use new class for function member dereference with Octave >= 4.4
  Lib/octave: fix operator installation for Octave >= 4.4
  Lib/Octave: in Octave >= 4.4, assign reference to base class in subclass
  Lib/octave: fix call to mlock() for Octave >= 4.4
  Lib/octave: fix call to octave::call_stack::current() for Octave >= 4.4
  Lib/octave: 'octave_exit' not longer exists in Octave >= 4.4
  Lib/octave: replace is_bool_type() with islogical() for Octave >= 4.4
  Lib/octave: replace is_numeric_type() with isnumeric() for Octave >= 4.4
  Lib/octave: replace is_cell() with iscell() for Octave >= 4.4
  Lib/octave: call octave::feval() instead of feval() for Octave >= 4.4
  Lib/octave: fix function name passed to unwind_protect::begin_frame()
  C#, D, Java methodmodifiers on destructors
  Javascript assert.h - move to header section
  Appveyor cl compiler warning fixes during configure
  Java vector wrappers cast correction
  test-suite fixes (Java directors) for compilers that don't support varargs
  Go - use director.swg like other languages
  test-suite fixes (2) for compilers that don't support varargs
  Consistent spacing in generated exception specifications
  test-suite fixes for compilers that don't support vararg macros
  Enhance Travis testing to use gcc 8 and test C++17 and C17
  Enhance SWIG_isfinite for older standards: C++03/C++98/C89
  test-suite support for gcc-8 targeting C++11 and C++14
  Scilab portability fixes - remove use of strdup
  Scilab array overbounds fix handling char type exceptions
  test-suite fix for c++17 and throw macro
  Remove use of 'register' in C source
  test-suite support for C++17: switch testing of the deprecated C++17 'register' keyword from C++ to C
  Examples update to support C++17: exception specification throw removal
  Cosmetic syntax tweak using throw in Octave directors
  test-suite support for C++17 (Java): exception specification throw removal
  test-suite support for C++17: exception specification throw removal
  __cplusplus macro usage tweak
  Improve detection of Python's 2to3 tool
  Correct C shared library creation when specifing CC to configure
  Remove superfluous parens in generated Python scripts.
  [ci] guile 2.2 build no longer expected to fail
  guile - resstructure some configure tests
  Disable guile configuration if guile-config and guile report a different version
  Fix guile executable detection on early 2.0.x guile versions
  guile - drop GDB_INTERFACE related stuff
  guile - replace obsolete scm_listify with scm_list_n
  guile - use more reliable method of finding guile executable based on guile-config
  Fix go version matching in configure for go1.10
  [Python] Suppress new pycodestyle warning
  Add if-no-present action for jsv8inc arg
  Fix typo in help --with-jscoreinc and --with-jscorelib
  Fix off-by-one error
  * Makefile.in (configfiles): Update URLs for latest configfiles.
  Add changes entry for Ruby %alias fix for global functions
  [Ruby] Pass Qnil instead of NULL to rb_funcall()
  Fix typo
  Fix ruby %alias directive for native c functions
  Stop testing Python on Appveyor msys/mingw
  Fix -Wimplicit-fallthrough gcc-7.3 warning
2018-05-17 19:57:02 +01:00
luz.paz 60dfa31a67 Misc. typos
found via `codespell` and `grep`
2018-05-17 10:04:23 -04:00
William S Fulton 63a5a8af88 Fix lookup of csconstruct, dconstructor and javaconstruct typemaps
The C++ namespace was previously ignored in the lookup type
2018-05-15 22:26:35 +01:00
William S Fulton ee17f8d04f C#, D, Java methodmodifiers on destructors
Add support so that the %csmethodmodifiers, %dmethodmodifiers,
%javamethodmodifiers can modify the method modifiers for the destructor wrappers
in the proxy class: dispose, Dispose, delete. With this feature, it is now possible
to make a C# proxy class sealed, eg when wrapping a class X, the virtual method modifiers
can be removed using:

  %typemap(csclassmodifiers) X "public sealed class"
  %csmethodmodifiers X::~X "public /*virtual*/";
2018-05-11 18:09:51 +01:00
William S Fulton 9fb996b83f Consistent spacing in generated exception specifications 2018-05-06 09:46:37 +01:00
Vadim Zeitlin b7f78dd5a7 Merge branch 'master' into doxygen 2018-03-19 21:54:46 +01:00
William S Fulton b4f4ce4fd5 Fix Java swigReleaseOwnership() and swigTakeOwnership() regression
Fixes segfault when using non-director classes.
Restores a dynamic_cast which was previously removed.
The dynamic_cast is not needed for the swig_connect_director call ...
we'll have to find another solution for #449 for Java.

Closes #1184
2018-03-09 08:13:41 +00:00
William S Fulton 49af1907b8 Add missing Java throws clause for interfaces when using the %interface family of macros.
Fixes #1156.
2018-01-12 07:34:32 +00:00
William S Fulton 7aa28e37ec Java director exception handling improvements
When a director method throws an exception and it is caught by DirectorException
and passed back to Java using DirectorException::raiseJavaException, the Java
stack trace now contains the original source line that threw the exception.

Director exception handling code improved slightly to add some missing
ExceptionClear calls before calling JNI code.
2017-11-10 19:50:22 +00:00
William S Fulton dafe2d6949 Add director typemaps for pointer const ref types 2017-10-24 23:47:40 +01:00
William S Fulton ae044c1c2f Generation of director method declarations fixes
- Fixes generation of director method declarations containing C++11 ref-qualifiers.
- Fixes generation of director method declarations returning more complex types such
  as const ref pointers.
- Rewrite Swig_method_call to use more up to date code in the core.
2017-10-23 18:55:14 +01:00
William S Fulton 3f8b8fe734 Enhancements for directorin typemaps
The directorin typemaps will now generate a temporary variable
(specified after the type), such as:
%typemap(directorin) MyType (MyType *temp) { ... use temp ... }

The shared_ptr director typemaps have been fixed for use in functions
that take more than one parameter.
2017-10-16 19:28:27 +01:00
Vadim Zeitlin db65ae5aea Merge branch 'master' into doxygen
Fix the usual conflicts in autodoc unit test due to fixing the
divergences in autodoc generation between builtin and default cases in
this branch.
2017-09-19 14:02:53 +02:00
William S Fulton a2d65ca3bb Merge branch 'asibross-master' into director-smartptr-ownership
* asibross-master:
  Missing smart pointer handling in Java director extra methods implementation.

Conflicts:
	Source/Modules/java.cxx
2017-05-25 08:00:35 +01:00
William S Fulton 05badeb1a4 Remove undocumented features used in directors
The jsdowncast and csdowncast features are not documented and I think
these are a relic of something that was never finished.
2017-05-21 17:43:06 +01:00
William S Fulton b90a8d7444 Remove unnecessary dynamic_cast in C#/D/Java directors
Also revert the removal of dynamic_cast in the csdowncast feature.
2017-05-21 17:42:27 +01:00
William S Fulton 07ab80b49e Add raise methods for throwing c++ exceptions in C#, Java, D
The director c++ exceptions are thrown in a helper method instead of in
the director overloaded method. This circumvents compiler warnings about
throwing exceptions when the method has an exception specification or
noexcept. If the exception is thrown, abort will still be called!
In Java, the "director:noexcept" typemap can be used to do something
else. This typemap should be ported to the other languages too.
2017-05-13 17:01:15 +01:00
William S Fulton cedfbfbee8 Revert "java : noexcept method can't raise Swig::DirectorException"
This reverts commit e13eaaae21.
2017-05-13 16:16:29 +01:00
Christophe Duvernois e13eaaae21 java : noexcept method can't raise Swig::DirectorException 2017-04-28 11:45:02 +02:00
Christophe Duvernois 4777a0ad3c #526 : propagate c++11 noexcept to director classes 2017-04-27 23:37:15 +02:00
Vadim Zeitlin 294ab27b90 Merge branch 'master' into doxygen
Merge 3.0.12 release changes from master.
2017-02-01 02:21:35 +01:00
Andrey Starodubtsev 347aa187d5 WIP: #704 (java directorargout + java/typemaps.i fixes)
- use `makeParameterName` instead of plain `Getattr("name")` as
  @wsfulton suggested
2017-01-22 13:05:46 +03:00
Andrey Starodubtsev 4ba9de370e Merge branch 'master' into directorargout_and_java_typemaps 2017-01-21 17:41:31 +03:00
William S Fulton 3d2e57b0f2 Add %proxycode directive for adding code into proxy classes for C#, D and Java 2017-01-13 20:43:50 +00:00
Vadim Zeitlin e668c47b70 Merge branch 'master' into doxygen
The way Python docstrings are indented has changed on master, so use the
standard inspect module in Python autodoc unit test to ignore the differences
in their indentation level between -builtin and non-builtin cases to make the
test still pass with the branch version, which avoids the use of different
(but almost identical) values in the test itself.
2016-12-12 01:24:17 +01:00
Andrey Starodubtsev c7adb7901d Merge branch 'master' into directorargout_and_java_typemaps 2016-08-05 11:20:01 +03:00
Andrey Starodubtsev b2bcf040c0 java directorargout + java/typemaps.i fixes
- directorargout didn't work - it used string "jresult" instead of
  argument name
- java/typemaps.i didn't work with directors
- test for using java/typemaps.i in directors added
2016-06-08 15:04:47 +03:00
Vladimir Kalinin 0145a07cc3 fix for nested ignored types 2016-05-18 18:07:04 +03:00
William S Fulton ac495d5c66 Merge branch 'char-escaping'
* char-escaping:
  Add missing string_constant.i testcase
  changes file update for char wrappers
  C# char wrappers fixes for enum values, static const member char values and %csconst
  D testing added for %dmanifestconst and char constants
  Fix wrapping D constants using %dmanifestconst
  Php fix for enum value of '\0'
  Fix static const char member variables wrappers with %javaconst(1).
  Expand char testing in enums and %constant
  Java char changes file update
  Java enum and static member variable escaping fix for chars
  Add tests for enum values and static const member variables chars containing escape sequences
  Minor documentation tweak

Conflicts:
	CHANGES.current
2016-03-12 23:27:51 +00:00
William S Fulton 2dec8c5514 Add limited support for %interface_impl and %shared_ptr 2016-03-06 21:20:23 +00:00
William S Fulton 21ee09fc19 Multiple inheritance warning wording tweak 2016-03-06 10:45:39 +00:00
William S Fulton 7d76617dc3 Add checks for interface name symbol clashes 2016-03-03 22:48:35 +00:00
William S Fulton a1245ef398 Re-organization of the interface feature common code
Move code to new feature.cxx file.
Activate it in the allocate phase rather than in individual languages.
2016-03-03 08:55:20 +00:00
William S Fulton 14d2341512 Add $interfacename family of special variable expansions
This is a simple expansion expanding to the name of the interface and is
not qualified like $javainterfacename and $csinterfacename.
Expansion within typemaps is much like $javainterfacename otherwise.
Note that expansion within the pure java code typemap,
'javainterfacecode' and similarly pure C# code typemap,
'csinterfacecode' works like $javaclassname/$csclassname and
$&interfacename should not be used, just $interfacename.
2016-02-29 21:18:42 +00:00
William S Fulton c71dba5021 Interface name handling improvements and special variable changes
Support expansion of name attribute in: %feature("interface", name="%s")
%s expands to the proxy class name and all the usual %rename functions
can be used (regex, strip, camelcase etc) to derive the interface name
from the proxy class name.
Rename $interfacename family of special variables to $javainterfacename for Java
Rename $interfacename family of special variables to $csinterfacename for C#
This is to free up $interfacename for simple interface name expansion in forthcoming commit
2016-02-29 20:18:01 +00:00
William S Fulton 50fec04759 Support namespaces and nspace with the interface feature for Java 2016-02-26 18:17:14 +00:00
William S Fulton 1737fc9b9b Add Java premature garbage collection prevention parameter (pgcpp) to interface feature
pgcpp was turned off but it is still needed for the interface feature
to prevent premature garbage collection of the proxy class being passed
into the C++ layer.
2016-02-24 08:30:10 +00:00
William S Fulton e7bb3afa0c Create javainterfacecode and csinterfacecode typemaps
The interface feature is no longer hard coded and can
be controlled by a user via these new typemaps.
2016-02-23 07:30:00 +00:00
William S Fulton c33b4dc34e Improve interface feature checks
Use common code for missing feature:interface:name attribute checks
Check that all base classes are also marked as interfaces
2016-02-13 13:03:40 +00:00
William S Fulton 645147a5b2 Comments added to interface feature implementation and cosmetic code changes 2016-02-12 20:23:35 +00:00
William S Fulton fc4be01106 Refactor multiple inheritance warnings
Slightly simplify choosing single base class when handling
multiple inheritance and make consistent across more languages.
Modula3 multiple inheritance warnings now warn for all bases
2016-02-12 08:45:22 +00:00
Vladimir Kalinin 5768d87deb director generation fixes
Conflicts:
	Lib/java/feature_interface.i
	Source/Modules/csharp.cxx
	Source/Modules/java.cxx
2016-02-12 07:09:17 +00:00
William S Fulton 212300c62b interfaces branch merge fixes 2016-02-11 20:21:25 +00:00
William S Fulton abccc13a4a Merge branch 'interfaces' into interfaces2
* interfaces:
  Remove unnecessary interfaces for concrete classes
  cosmetic code formatting changes
  Correct interface name attributes that are internal
  interface macro changes to support templates
  Test non-virtual method in Derived classes
  interface tests for a most derived class inheriting the interfaces further up the chain
  Rename GetCPtr/getCPtr to SWIGInterfaceUpcast
  interface feature support for const ref pointers (used by the STL)
  Interface feature support for arrays
  More interface feature testing for return values
  interface feature support for passing by value
  interface feature support for references
  Multiple inheritance parameters as pointers testing
  Simplify multiple_inheritance_abstract Java runtime test
  Warning fixes
  Rename test functions in multiple_inheritance_abstract testcase
  Formatting fixes in generated code for interface feature
  Cosmetic spacing changes in test case
  interface feature typemap corrections to handle NULL pointers
  interface test added
  javadirectorin fix
  interface implementation visibility
  interface inheritance (2)
  interface inheritance (1)
  feature:interface ported to Java
  propagate non-abstract "interface" base methods (3)
  propagate non-abstract "interface" base methods (2)
  propagate non-abstract "interface" base methods (1)
  namespace support added GetCPtr now returns HandleRef "feature:interface:name" is now mandatory attribute
  interfaces (1)
  interfaces (1)

Conflicts:
	Source/Modules/csharp.cxx
	Source/Modules/java.cxx
2016-02-11 19:37:31 +00:00
William S Fulton 3931b5800c Remove unnecessary interfaces for concrete classes
Add Java test for checking expected base and interfaces are generated (to be expanded further)
In the example, E was previously implementing IA, IB, IC. Now it doesn't implement any.
C# virtual/override still to be fixed for this test case
2016-02-10 20:54:39 +00:00
William S Fulton 993214872f cosmetic code formatting changes 2016-02-09 07:39:46 +00:00
William S Fulton dd6af222f4 Correct interface name attributes that are internal
Attributes with 'feature:' prefix are reserved for %feature, not internal usage.
2016-02-09 07:22:07 +00:00
William S Fulton 72e5c221b6 Rename GetCPtr/getCPtr to SWIGInterfaceUpcast
This is then similarly named to other similar functions:
SWIGUpcast and SWIGSmartPtrUpcast
2016-02-08 20:49:46 +00:00
William S Fulton f78b9264b8 Warning fixes 2016-02-06 16:34:33 +00:00
William S Fulton a7370b7bc0 Formatting fixes in generated code for interface feature 2016-02-06 16:34:24 +00:00
William S Fulton 7339de974d Fix static const char member variables wrappers with %javaconst(1).
This fixes the case when an integer is used as the initializer, such as:

  struct W { static const char w = 100; };

The "valuetype" attribute has been added to the "cdecl" Node which enables
us to distinguish the declared type from the type of the initializer.
2016-01-27 09:01:00 +00:00
William S Fulton 83584e504a Java enum and static member variable escaping fix for chars
For example:
  enum X { x = '\1' };
  struct A {
    static const char a = '\n';
  };
2016-01-26 20:18:45 +00:00
Petre Eftime 0a07cd4c30 Prevent redefinition warnings when compiling with SWIG<module> defined
Signed-off-by: Petre Eftime <petre.p.eftime@intel.com>
2015-12-22 14:33:21 +02:00
William S Fulton faeaacf112 smartptr feature support - factor out common code 2015-09-25 22:57:59 +01:00
Vadim Zeitlin dc23904408 Don't duplicate Javadoc from global enum Doxygen comments twice.
The commit d52de0f36f did fix the bug with
missing Javadoc comments for the nested enums, but it also resulted in the
Javadoc being generated twice for global enums, remove the code outputting the
same Javadoc for the second time to fix this.
2015-07-27 01:14:48 +02:00
Vadim Zeitlin 302955a152 Another merge with master.
Updated Doxygen error numbers yet again, as Python errors got added in the
meanwhile, pushing the Doxygen ones further off.

And re-merged PEP8/whitespace-related conflicts in autodoc_runme.py once again
(if anybody is looking for a motivating example about why significant
whitespace is bad, here is a great use case).
2015-07-20 00:44:26 +02:00
Anbiru Shouta 977240b3f4 Clearer variable name in Java director generated code
Closes #463
2015-07-17 22:34:08 +01:00
Asi Bross ce7f269f9c Missing smart pointer handling in Java director extra methods implementation.
Added proper smart pointer casting to the generated *change_ownership method.

Fixing issue #370.
2015-05-11 09:34:31 +03:00
William S Fulton 775afd3579 Refactor Java director swig_override array code
Remove code duplication: Use new Swig::BoolArray to replace multiple
instances of ZeroedBoolArray.

Refactors #403 and #413.
2015-05-10 11:40:42 +01:00
Lindley French 8f19d77fec Don't include an STL header in SWIG. 2015-05-07 11:29:47 -07:00
Lindley French 159b3c7958 Use a bitset which is automatically initialized to 0, instead of a bool array which is not. 2015-05-06 11:33:28 -07:00
Lindley French 5f0181bfdd Too hard to conditionally define the memset....instead just make sure the array is defined even if it's unused. 2015-05-01 12:40:07 -07:00
Lindley French e8ca8fb2e6 Only output memset if the array exists. 2015-04-30 23:14:48 -07:00
Lindley French 8acca78953 Zero-initialize swig_override in the director constructor. 2015-04-30 21:16:30 -07:00
Olly Betts 2c08e33099 Correct java warning to save javabase not csbase 2015-03-27 12:30:19 +13:00
Olly Betts 7ba0652677 Create director_common.swg for language-indep code
Move -DSWIG_DIRECTOR_STATIC handling there, so this is now supported for
all languages with director support, not just Python and PHP.
2015-03-12 19:51:11 +13:00
Vadim Zeitlin 300ccce46c Another merge with master.
Change Doxygen error codes to start at 740 instead of at 720 as the latter was
taken by Scilab in the meanwhile.

Resolve conflicts in autodoc_runme.py once again.
2015-02-16 23:46:39 +01:00
William S Fulton 2e01533b23 Partial support for %constant and structs
Test case is slightly modified from the test case in issue #250

Use of constant objects does not seem to work in Python - the type is
SwigPyObject instead of constant_directive.Type1.
2014-12-18 07:01:08 +00:00
Vadim Zeitlin 9b857e6cf1 Merge latest master into doxygen branch. 2014-12-15 02:55:26 +01:00
William S Fulton 0664ecdeb7 Fix strongly typed enums for Java when using simple enum wrappers 2014-11-24 07:04:54 +00:00
William S Fulton fcef37d682 Fix incorrect symbol clash error in C# and Java when using %rename for enums
When using using 'simple enum' wrappers
2014-11-21 19:50:23 +00:00
William S Fulton ede58b8744 Cosmetic formatting 2014-11-21 18:58:08 +00:00
William S Fulton 296d45aec5 Merge branch 'alexey-pelykh-cpp11_strongly_typed_enums__direct_inject_in_java'
* alexey-pelykh-cpp11_strongly_typed_enums__direct_inject_in_java:
  Enhance cpp11_strongly_typed_enumerations testcase and turn it on
  Simplify/improve strongly typed enum implementation for Java
  Rewrite some Java director nested class support code for strongly typed enums
  Expand director_nested_class test to test more than one level of nesting
  Add director_nested_class testcase
  Removed useless code (it does not affect output, at least on our testcases)
  Java/Fix: swig_connect_director used not-fully-qualified classname (proper)
  Java/Fix: swig_connect_director used not-fully-qualified classname
  Java: fix generation of ProxyName when JNI descriptor is requested - for inner classes '$' should be used as separator instead of '/'
  Java: fix invalid director 'self' variable type name (wasn't fully qualified)
  Clean-up test suite and fix issue with nspace, as well as keep the fix for Class::Struct::EnumClass being JNI-referenced as Struct_EnumClass
  C++11 strongly-typed enums fix for Java only (proper)
  Revert "C++11 strongly-typed enums fix for Java only"
  Additional test cases for C++11 strongly-typed enums
  C++11 strongly-typed enums fix for Java only
2014-11-21 07:34:12 +00:00
William S Fulton 77b338151e Simplify/improve strongly typed enum implementation for Java 2014-11-21 07:32:15 +00:00
William S Fulton 089865ba57 Rewrite some Java director nested class support code for strongly typed enums 2014-11-20 07:26:09 +00:00
Alexey Pelykh 837d2bfd04 Removed useless code (it does not affect output, at least on our testcases) 2014-11-03 12:10:10 +02:00
William S Fulton 6029b2f7d8 Fix for 'self' being used as a parameter name 2014-10-30 07:22:59 +00:00
William S Fulton 36ae32e941 Merge remote-tracking branch 'vadz/py-args'
* vadz/py-args:
  Allow using enum elements as default values for Python functions.
  Don't always use "*args" for all Python wrapper functions.
  No real changes, just make PYTHON::check_kwargs() const.
  Refactor: move makeParameterName() to common Language base class.
  Remove long line wrapping from Python parameter list generation code.
2014-10-27 20:02:59 +00:00
William S Fulton b57a675d00 Cosmetic comment changes
Note: copyrights are in the COPYRIGHT file
2014-10-21 07:34:51 +01:00
Alexey Pelykh afbb47dc8f Java/Fix: swig_connect_director used not-fully-qualified classname (proper) 2014-09-04 12:22:56 +03:00
Alexey Pelykh 8a69da7d82 Java/Fix: swig_connect_director used not-fully-qualified classname 2014-09-04 12:05:23 +03:00
Alexey Pelykh e7db081d5e Java: fix generation of ProxyName when JNI descriptor is requested - for inner classes '$' should be used as separator instead of '/' 2014-09-03 09:37:25 +03:00
Alexey Pelykh 7b9027db89 Java: fix invalid director 'self' variable type name (wasn't fully qualified) 2014-08-31 19:26:31 +03:00
Alexey Pelykh abb888cfdd Clean-up test suite and fix issue with nspace, as well as keep the fix for Class::Struct::EnumClass being JNI-referenced as Struct_EnumClass 2014-08-31 12:14:29 +03:00
Alexey Pelykh d318f03efe C++11 strongly-typed enums fix for Java only (proper) 2014-08-30 11:58:52 +03:00
Alexey Pelykh fd926cf284 Revert "C++11 strongly-typed enums fix for Java only"
This reverts commit cf139a90db.
2014-08-30 09:15:25 +03:00
Alexey Pelykh cf139a90db C++11 strongly-typed enums fix for Java only 2014-08-29 19:39:39 +03:00
Vadim Zeitlin 8c76270619 Refactor: move makeParameterName() to common Language base class.
This method was duplicated more or less identically for 4 languages and will
be needed for another one soon, so put it in the base class from which it can
be simply reused instead.

No changes in the program behaviour whatsoever.
2014-08-22 17:45:23 +02:00
Vadim Zeitlin 9f1af8921f Refactor: move makeParameterName() to common Language base class.
This method was duplicated more or less identically for 4 languages and will
be needed for another one soon, so put it in the base class from which it can
be simply reused instead.

No changes in the program behaviour whatsoever.
2014-08-16 13:11:22 +02:00
Vadim Zeitlin f684242467 Replace DoxygenTranslator debug parameters with a single flags one.
This makes the code more readable and more extensible as more flags are easier
to add in the future than more boolean parameters.

No user-visible changes.
2014-08-13 16:11:30 +02:00
Vadim Zeitlin 4f032332c9 Work around apparent clang bug.
Clang seems to be confused by "tm" being the name both of a local variable and
a struct tm from the standard <time.h> header, included indirectly in the
doxygen branch from java.cxx via "swig.h" and <stdlin.h>.

Just removing the unnecessary cast helps to clear the confusion.
2014-05-15 01:01:31 +02:00
Vadim Zeitlin 984d5fa299 Initialize doxygenTranslator pointer to NULL when it is unused.
No real changes, but avoid having pointer with junk contents, even if it's
unused.

This also avoid the need for checking whether it's used before deleting it.
2014-05-07 18:46:30 +02:00