~ubuntu-branches/ubuntu/quantal/swig2.0/quantal

« back to all changes in this revision

Viewing changes to Lib/java/boost_shared_ptr.i

  • Committer: Package Import Robot
  • Author(s): Stefano Rivera
  • Date: 2012-06-01 17:05:17 UTC
  • mfrom: (1.1.6) (10.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20120601170517-q0ik32ij61i4r6f0
Tags: 2.0.7-2ubuntu1
* Merge from Debian unstable (LP: #1006387). Remaining changes:
  - Drop libchicken-dev from the build-depends (in universe).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Users can provide their own SWIG_SHARED_PTR_TYPEMAPS macro before including this file to change the
 
2
// visibility of the constructor and getCPtr method if desired to public if using multiple modules.
 
3
#ifndef SWIG_SHARED_PTR_TYPEMAPS
 
4
#define SWIG_SHARED_PTR_TYPEMAPS(CONST, TYPE...) SWIG_SHARED_PTR_TYPEMAPS_IMPLEMENTATION(protected, protected, CONST, TYPE)
 
5
#endif
 
6
 
1
7
%include <shared_ptr.i>
2
8
 
3
9
// Language specific macro implementing all the customisations for handling the smart pointer
4
 
%define SWIG_SHARED_PTR_TYPEMAPS(CONST, TYPE...)
 
10
%define SWIG_SHARED_PTR_TYPEMAPS_IMPLEMENTATION(PTRCTOR_VISIBILITY, CPTR_VISIBILITY, CONST, TYPE...)
5
11
 
6
12
// %naturalvar is as documented for member variables
7
13
%naturalvar TYPE;
142
148
  private long swigCPtr;
143
149
  private boolean swigCMemOwnBase;
144
150
 
145
 
  public $javaclassname(long cPtr, boolean cMemoryOwn) {
 
151
  PTRCTOR_VISIBILITY $javaclassname(long cPtr, boolean cMemoryOwn) {
146
152
    swigCMemOwnBase = cMemoryOwn;
147
153
    swigCPtr = cPtr;
148
154
  }
149
155
 
150
 
  protected static long getCPtr($javaclassname obj) {
 
156
  CPTR_VISIBILITY static long getCPtr($javaclassname obj) {
151
157
    return (obj == null) ? 0 : obj.swigCPtr;
152
158
  }
153
159
%}
157
163
  private long swigCPtr;
158
164
  private boolean swigCMemOwnDerived;
159
165
 
160
 
  public $javaclassname(long cPtr, boolean cMemoryOwn) {
 
166
  PTRCTOR_VISIBILITY $javaclassname(long cPtr, boolean cMemoryOwn) {
161
167
    super($imclassname.$javaclazznameSWIGSmartPtrUpcast(cPtr), true);
162
168
    swigCMemOwnDerived = cMemoryOwn;
163
169
    swigCPtr = cPtr;
164
170
  }
165
171
 
166
 
  protected static long getCPtr($javaclassname obj) {
 
172
  CPTR_VISIBILITY static long getCPtr($javaclassname obj) {
167
173
    return (obj == null) ? 0 : obj.swigCPtr;
168
174
  }
169
175
%}