]> git.saurik.com Git - wxWidgets.git/blame - wxPython/wxSWIG/swig_lib/pointer.i
reSWIGged
[wxWidgets.git] / wxPython / wxSWIG / swig_lib / pointer.i
CommitLineData
c90f71dd
RD
1//
2// SWIG Pointer manipulation library
3//
4// This library can be used to manipulate C pointers.
5%title "SWIG Pointer Library"
6
7%module pointer
8
9
10%section "Pointer Handling Library",noinfo,after,pre,nosort,skip=1,chop_left=3,chop_right=0,chop_top=0,chop_bottom=0
11
12%text %{
13%include pointer.i
14
15The pointer.i library provides run-time support for managing and
16manipulating a variety of C/C++ pointer values. In particular,
17you can create various kinds of objects and dereference common
18pointer types. This is done through a common set of functions:
19
20 ptrcast - Casts a pointer to a new type
21 ptrvalue - Dereferences a pointer
22 ptrset - Set the value of an object referenced by
23 a pointer.
24 ptrcreate - Create a new object and return a pointer.
25 ptrfree - Free the memory allocated by ptrcreate.
26 ptradd - Increment/decrement a pointer value.
27 ptrmap - Make two datatypes equivalent to each other.
28 (Is a runtime equivalent of typedef).
29
30When creating, dereferencing, or setting the value of pointer
31variable, only the common C datatypes of int, short, long, float,
32double, char, and char * are currently supported. Other
33datatypes may generate an error.
34
35One of the more interesting aspects of this library is that
36it operates with a wide range of datatypes. For example,
37the "ptrvalue" function can dereference "double *", "int *",
38"long *", "char *", and other datatypes. Since SWIG encodes
39pointers with type information, this can be done transparently
40and in most cases, you can dereference a pointer without
41ever knowing what type it actually is.
42
43This library is primarily designed for utility, not high
44performance (the dynamic determination of pointer types takes
45more work than most normal wrapper functions). As a result,
46you may achieve better performance by writing customized
47"helper" functions if you're making lots of calls to these
48functions in inner loops or other intensive operations.
49%}
50
51// This library is a pretty hideous mess of language dependent code.
52// Grab the implementation from the appropriate libray
53
54%include ptrlang.i
55
56
57
58