Commit graph

158 commits

Author SHA1 Message Date
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
34712c0108 Improve Java director exception customization documentation 2017-11-29 20:32:15 +00:00
William S Fulton
e67f9c5067 Enhance documentation with callback techniques
Add section about callbacks from C/C++ to target language via directors

[skip ci]
2017-11-01 07:47:54 +00:00
William S Fulton
ed4b84f4d3 Fix overloading of shared_ptr method overloading
Add 'equivalent' attribute to typecheck typemap.
Closes #1098.
2017-09-23 15:19:34 +01:00
William S Fulton
ce96d1b153 Library docs chapter tweaks
- Consistency in heading names
- html fixes
- shared_ptr corrections and add in subheadings
2017-09-15 08:45:39 +01:00
William S Fulton
9cc05a22f6 Improve docs for %rename and C++ features like default args 2017-09-14 18:51:36 +01:00
William S Fulton
d5d97a4069 Overloaded methods section renamed slightly in docs 2017-09-14 18:51:36 +01:00
William S Fulton
ff52610dc5 Move C++ 'Default arguments' section in manual 2017-09-14 18:51:36 +01:00
William S Fulton
330ef362f4 Add docs for C++11 ref-qualifiers 2017-08-30 18:17:04 +01:00
William S Fulton
959e627208 %template scope enforcement and class definition fixes
The scoping rules around %template have been specified and enforced.
The %template directive for a class template is the equivalent to an
explicit instantiation of a C++ class template. The scope for a valid
%template instantiation is now the same as the scope required for a
valid explicit instantiation of a C++ template. A definition of the
template for the explicit instantiation must be in scope where the
instantiation is declared and must not be enclosed within a different
namespace.

For example, a few %template and explicit instantiations of std::vector
are shown below:

  // valid
  namespace std {
    %template(vin) vector<int>;
    template class vector<int>;
  }

  // valid
  using namespace std;
  %template(vin) vector<int>;
  template class vector<int>;

  // valid
  using std::vector;
  %template(vin) vector<int>;
  template class vector<int>;

  // ill-formed
  namespace unrelated {
    using std::vector;
    %template(vin) vector<int>;
    template class vector<int>;
  }

  // ill-formed
  namespace unrelated {
    using namespace std;
    %template(vin) vector<int>;
    template class vector<int>;
  }

  // ill-formed
  namespace unrelated {
    namespace std {
      %template(vin) vector<int>;
      template class vector<int>;
    }
  }

  // ill-formed
  namespace unrelated {
    %template(vin) std::vector<int>;
    template class std::vector<int>;
  }

When the scope is incorrect, an error now occurs such as:

cpp_template_scope.i:34: Error: 'vector' resolves to 'std::vector' and
was incorrectly instantiated in scope 'unrelated' instead of within scope 'std'.

Previously SWIG accepted the ill-formed examples above but this led to
numerous subtle template scope problems especially in the presence of
using declarations and using directives as well as with %feature and %typemap.

Actually, a valid instantiation is one which conforms to the C++03
standard as C++11 made a change to disallow using declarations and
using directives to find a template.

  // valid C++03, ill-formed C++11
  using std::vector;
  template class vector<int>;

Similar fixes for defining classes using forward class references have
also been put in place. For example:

namespace Space1 {
  struct A;
}
namespace Space2 {
  struct Space1::A {
    void x();
  }
}

will now error out with:

cpp_class_definition.i:5: Error: 'Space1::A' resolves to 'Space1::A' and
was incorrectly instantiated in scope 'Space2' instead of within scope 'Space1'.
2017-08-16 00:24:25 +01:00
William S Fulton
97ae9d66bc Template documentation tweaks
Add subsections to the template documentation
Rewrite some of the template introduction
2017-08-16 00:24:25 +01:00
William S Fulton
d888fabc0c Style fixes for Python threads documentation changes 2017-03-24 08:22:16 +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
Brian Caine
391bb79cba Added support for guile's native pointer type 2016-12-16 15:15:13 +13:00
William S Fulton
08688d7d9d Add support for "ret" typemap where missing and improve documentation on it. 2016-09-29 08:07:26 +01:00
William S Fulton
4f681f751d Update Python docs on builtin slots 2016-08-18 07:11:00 +01:00
William S Fulton
9f37796e80 Add new C++11 type aliasing support to changes file 2016-06-25 16:08:44 +01:00
William S Fulton
64f5d23b13 Python docs on static linking section edits 2016-06-12 00:13:07 +01:00
William S Fulton
d18b6e2c8d Python module loading documentation tweaks 2016-06-11 00:59:00 +01:00
William S Fulton
d01efd82e1 Merge branch 'mromberg-implpkg'
* mromberg-implpkg:
  Minor edits to Python implicit namespace package docs
  use %inline for test
  use relative import for -builtin and python2
  Python3 removes support for relative imports
  Document implicit namespace packages for python
  disable namespace package build
  Attempt to calm the testing gods...
  use whatever name winders uses for .so files.
  Examples (and tests) for python namespace packages
  disable namespace package build
  spelling
  Attempt to calm the testing gods...
  use whatever name winders uses for .so files.
  Don't run example for old pythons
  Examples (and tests) for python namespace packages
  use importlib to load C extension modules for python 2.7 and newer
2016-05-24 22:48:37 +01:00
William S Fulton
4253740d40 Minor edits to Python implicit namespace package docs 2016-05-24 22:46:46 +01:00
William S Fulton
b0ba1cae76 html doc fixes
[skip ci]
2016-05-06 07:36:58 +01:00
William S Fulton
cd6c8806f0 Documentation and CHANGES entry for interface feature 2016-03-11 19:47:31 +00:00
William S Fulton
4e67d5c7a8 Minor html fixes 2015-12-30 22:22:33 +00:00
William S Fulton
925b2a336f HTML fixes for documentation - add meta tag and loose.dtd 2015-12-30 22:22:32 +00:00
William S Fulton
fc68136880 link fixes 2015-12-30 22:22:32 +00:00
William S Fulton
019bdf9067 More link fixes in the docs 2015-12-30 22:22:32 +00:00
William S Fulton
cacb36bedb Docs - remove html tags from headings 2015-12-30 22:22:32 +00:00
William S Fulton
01611702ec Python 2 Unicode strings can be used as inputs to char * or std::string types
Requires SWIG_PYTHON_2_UNICODE to be defined when compiling generated code.
2015-12-19 03:55:26 +00:00
William S Fulton
803ba97a83 Update docs for shared_ptr 2015-10-01 22:36:01 +01:00
William S Fulton
c6f8aadc64 Cosmetic corrections - Mac OS X 2015-08-02 20:14:20 +01:00
William S Fulton
f482adc6d1 Add documentation and CHANGES for special variables and typemap attributes.
Also add info about special variable expansions in special variable
macros.
2015-07-22 23:28:26 +01:00
William S Fulton
3b859ab539 Html doc fixes 2015-07-05 17:16:37 +01:00
William S Fulton
4010d25b91 HTML corrections
[skip ci]
2015-04-13 20:36:12 +01:00
William S Fulton
2e8dfbcc3e Add Scilab to html docs 2015-01-27 19:30:24 +00:00
William S Fulton
055e96da09 Update html 2015-01-13 07:58:33 +00:00
Ian Lance Taylor
3fc574e7d6 Go: Document memory management of C++ classes allocated in Go. Fixes #266. 2014-11-17 08:59:04 -08:00
Olly Betts
1a99212c2c [PHP] Add support for specifying any PHP interfaces a wrapped class
implements, e.g.: %typemap("phpinterfaces") MyIterator "Iterator";
2014-09-12 12:48:37 -03:00
Ian Lance Taylor
1addbb46a8 [Go] Add imtype, goin, goout, godirectorin, and godirectorout
typemaps, to support writing Go code to convert between types.
2014-09-05 17:54:19 -07:00
William S Fulton
eeb1133606 Javascript html links and typo fixes 2014-05-27 23:39:46 +01:00
William S Fulton
4a680e5545 html doc chapter numbering update since adding Javascript 2014-05-09 23:39:03 +01:00
William S Fulton
98a5569e1b Few tweaks to Lua html docs 2014-03-16 21:11:03 +00:00
William S Fulton
785d93d9fb html fixes and section updates 2014-03-15 22:45:43 +00:00
William S Fulton
abc27fd157 Further Ruby html doc formatting changes 2013-06-08 02:00:47 +01:00
William S Fulton
030b97c891 Documentation sectioning update 2013-05-25 00:15:48 +01:00
William S Fulton
4bf045ce2c Move installation and install check instructions from README to Preface section in the documentation. 2013-05-03 19:55:42 +01:00
William S Fulton
e9b76e4c85 Add more references about the SWIG license to the legal.html website page
Also add in references to the release notes.
2013-05-03 19:55:41 +01:00
William S Fulton
067b883813 Guile doc sections update 2013-05-03 19:55:41 +01:00
William S Fulton
a1c3e54ab4 Improvements to documentation for csdirectorin 'pre', 'post' and 'terminator' support. 2013-01-11 22:18:35 +00:00
William S Fulton
236b007c93 More Android docs about the STL and the new extend example
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13836 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-09-13 19:04:29 +00:00