Commit graph

208 commits

Author SHA1 Message Date
William S Fulton
c10a84c775 Cosmetic stray semi-colon removal after %typemap using quotes 2022-08-31 19:40:13 +01:00
William S Fulton
34c219b5f7 Merge branch 'imfunc'
* imfunc:
  Add special variable imfuncname expansion for C# and D
  Test and document imfuncname special variable expansion
  Update docs.
  Also expose  in proxyClassFunctionHandler
  Expose  to javaout typemaps.

Conflicts:
	CHANGES.current
2022-05-30 19:45:28 +01:00
William S Fulton
62e0685df6 Test and document imfuncname special variable expansion 2022-05-30 19:00:04 +01:00
William S Fulton
598736a6b2 %interface family of macros no longer add variable wrappers
The getter/setter methods used for wrapping methods are no longer
added to the interface class.

Closes #1524

Also add in testcase for enums.
2022-03-12 23:04:24 +00:00
William S Fulton
b6ece11fc1 Fixes for the family of %interface macros for overloaded methods
When C++ methods are not able to be overloaded in a derived class,
such as when they differ by just const, or the target language
parameters types are identical even when the C++ parameter types
are different, SWIG will ignore one of the overloaded methods with
a warning. A %ignore is required to explicitly ignore one of the
overloaded methods to avoid the warning message. Methods added
in the derived classes due to one of the %interface macros are now
similarly ignored/not added to the derived class.

The adding of additional methods into the parse tree is now more
robust and complete resulting in support for %feature and %rename
for the added methods.

Closes #1277
2022-03-12 23:04:24 +00:00
Olly Betts
b127e11f1e Fix typos in docs and comments 2022-02-27 18:15:46 +13:00
LindleyF
e25911b846
Merge branch 'swig:master' into imfunc 2022-02-02 16:15:17 -08:00
Lindley French
e10da8a9a1 Update docs. 2022-02-02 15:34:19 -08:00
Olly Betts
eb13261950 [Java] Note use of %ignore with %native
This is needed if you're wanting to effectively replace the generated
JNI wrapper for a C/C++ function.

Fixes https://sourceforge.net/p/swig/bugs/368/
2022-02-01 16:38:16 +13:00
Dimitris Apostolou
f586d920f7
Fix typos 2021-11-17 07:07:02 +02:00
William S Fulton
c3c4ec1e88 html link corrections 2021-02-24 22:07:36 +00:00
William S Fulton
c1b004f4fa Add access modifier support for interface feature
Add ability to change the modifiers for the C# and Java
interface generated when using the %interface macros.

For C# use the 'csinterfacemodifiers' typemap.
For Java use the 'javainterfacemodifiers' typemap.

For example:

  %typemap(csinterfacemodifiers) X "internal interface"

Closes #1874
2020-09-25 18:54:25 +01:00
William S Fulton
b7bcb338cf Add C++20 documentation chapter 2020-06-08 20:56:40 +01:00
William S Fulton
7070320335 Revert "Add C++20 documentation chapter"
This reverts commit 36e8d521de.

Conflicts:
	Doc/Manual/R.html
2020-06-08 20:06:55 +01:00
William S Fulton
36e8d521de Add C++20 documentation chapter
[skip-ci]
2020-01-28 20:31:53 +00:00
William S Fulton
fb0adb14c3 Documentation: terminology consistency for command line options plus Doxygen tweaks. 2019-04-24 08:04:15 +01:00
William S Fulton
bc615e8a6e Correct out of date html links 2019-04-15 19:01:52 +01:00
William S Fulton
831fae3c69 Add the parameters typemap attribute to D and Java destructor wrapper typemaps
Added to the javadestruct, javadestruct_derived, ddispose, ddispose_derived
typemaps to mirror enhanced flexibility in the csdisposing and
csdisposing_derived (C#) typemaps. If provided the contents are generated
as the delete/dispose method's parameters declaration.
2019-04-08 19:20:50 +01:00
William S Fulton
34108deec7 Documentation for directors and virtual final methods 2019-03-03 14:52:57 +00:00
William S Fulton
be9d736597 Add back-reference to changes file 2019-02-18 19:28:35 +00:00
William S Fulton
d16d145787 Documentation section numbering update
[skip ci]
2019-02-11 19:02:03 +00:00
William S Fulton
940e32477d Update section numbering 2019-02-10 01:03:06 +00: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
4cdca98709 Update html chapter numbering for added Doxygen chapter 2018-05-25 07:56:44 +01:00
luz.paz
6f69830321 follow-up typos 2018-05-17 10:26:00 -04:00
luz.paz
60dfa31a67 Misc. typos
found via `codespell` and `grep`
2018-05-17 10:04:23 -04:00
William S Fulton
066c396ad6 Add C++17 documentation chapter 2018-05-14 21:29:46 +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
901f8357b0 Replace DirectorException::raiseJavaException with DirectorException::throwException
This is part of a plan to provide a common DirectorException api for
throwing the target language exception raised during a director method call.
2017-11-29 20:32:15 +00:00
William S Fulton
34712c0108 Improve Java director exception customization documentation 2017-11-29 20:32:15 +00:00
William S Fulton
077bb0b04f Improved Java director exceptions documentation 2017-11-16 20:03:58 +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
f674018126 Improvements to Java Memory Management docs 2017-09-19 20:36:04 +01:00
Jesse Rusak
175ab4e720 Avoid possible GC issues in Java example code
This prevents the previously-set element value from being collected
before or during the call to setElement. Since C++ could still have
a reference to during that time, it could lead to misbehavior.
2017-08-29 12:12:28 -04:00
William S Fulton
32a454cfef Merge branch 'templates-scope-enforcement'
* templates-scope-enforcement:
  Test a few %template errors
  Add using declarations to templates into typedef table.
  Fix type lookup in the presence of using directives and using declarations
  More docs on %template
  Testcase fix for nameclash in php
  %template scope enforcement and class definition fixes
  Template documentation tweaks
  More consistent formatting of examples in documentation
  More consistent formatting of examples in documentation
  Documentation corrections to use targetlang formatting
  More consistent formatting of examples in documentation
  More consistent formatting of examples in documentation
  More consistent formatting of examples in documentation
  Namespace documentation minor corrections
  Improve description of template_parameters_resolve
  Minor code optimisation in template_parameters_resolve
  Fix scope lookup for template parameters containing unary scope operators
  Typemap change for templates
2017-08-16 21:44:51 +01:00
William S Fulton
8052211ac5 More consistent formatting of examples in documentation 2017-08-16 00:24:25 +01:00
William S Fulton
7ee76f93f9 More consistent formatting of examples in documentation 2017-08-16 00:24:25 +01:00
Olly Betts
90f9117e10 Fix various comment and documentation typos 2017-08-13 18:04:33 +12:00
William S Fulton
10e73a5bfb Java jboxtype typemap documentation and tidy up 2017-06-05 20:47:49 +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
6ec243c093 Fix Java directorin typemap example 2017-01-17 19:27:16 +00:00
William S Fulton
19f21d1dd5 Reference %proxycode from javacode typemap section in docs 2017-01-13 20:52:33 +00: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
William S Fulton
92d694225a Update wiki links to new Github wiki site
[skip ci]
2017-01-05 18:39:57 +00:00
sunoru
9a6f82ab31 Realign for some comments. 2016-12-31 23:29:45 +08:00
sunoru
8985c34809 Fix some typos in docs and examples and make the code look nicer. 2016-12-31 23:06:56 +08:00
William S Fulton
eb6121fa30 Minor Java html doc correction 2016-12-18 17:49:47 +00:00
William S Fulton
108d82a886 Java doc update for directorin typemaps and Swig::LocalRefGuard
Motivated by fixes in patch #704

[skip ci]
2016-11-03 19:23:29 +00:00
William S Fulton
268b942865 Consistent formatting of example code in the docs 2016-10-23 20:16:35 +01:00
William S Fulton
0cfc6cbd83 %interface documentation corrections and tweaks
Correction is for %interface_impl.

[skip ci]
2016-07-13 22:09:51 +01:00