update docs about private/protected class/members

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7421 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-09-10 21:12:35 +00:00
commit 1a359fc4e5

View file

@ -775,10 +775,14 @@ SWIG is unable to support kwargs when wrapping overloaded methods, so the defaul
<p> <p>
SWIG can only wrap class members that are declared public. Anything SWIG wraps class members that are public following the C++
specified in a private or protected section will simply be ignored (although conventions, i.e., by explicit public declaration or by the use of
the internal code generator sometimes looks at the contents of the private and protected the <tt using</tt> directive. In general, anything specified in a
sections so that it can properly generate code for default constructors and destructors). private or protected section will be ignored, although the internal
code generator sometimes looks at the contents of the private and
protected sections so that it can properly generate code for default
constructors and destructors. Directors could also modify the way
non-public virtual protected members are treated.
</p> </p>
<p> <p>
@ -1065,20 +1069,24 @@ if possible (consider using references instead).
<p> <p>
SWIG supports C++ public inheritance of classes and allows both SWIG supports C++ inheritance of classes and allows both single and
single and multiple inheritance. The SWIG type-checker knows about the multiple inheritance, as limited or allowed by the target
relationship between base and derived classes and allows pointers language. The SWIG type-checker knows about the relationship between
to any object of a derived class to be used in functions of a base base and derived classes and allows pointers to any object of a
class. The type-checker properly casts pointer values and is safe to derived class to be used in functions of a base class. The
use with multiple inheritance. type-checker properly casts pointer values and is safe to use with
multiple inheritance.
</p> </p>
<p> SWIG does not support private or protected inheritance (it is <p> SWIG treats private or protected inheritance as close to the C++
parsed, but it has no effect on the generated code). Note: private spirit, and target language capabilities, as possible. In most of the
and protected inheritance do not define an "isa" relationship between cases, this means that swig will parse the non-public inheritance
classes so it would have no effect on type-checking anyways. declarations, but that will have no effect in the generated code,
besides the implicit policies derived for constructor and
destructors.
</p> </p>
<p> <p>
The following example shows how SWIG handles inheritance. For clarity, The following example shows how SWIG handles inheritance. For clarity,
the full C++ code has been omitted.</p> the full C++ code has been omitted.</p>