diff --git a/Examples/php4/check.list b/Examples/php4/check.list index 4b760082c..9daad455b 100644 --- a/Examples/php4/check.list +++ b/Examples/php4/check.list @@ -10,7 +10,7 @@ overloading pointer pragmas reference -shadow +proxy simple sync value diff --git a/Examples/python/exceptshadow/Makefile b/Examples/python/exceptproxy/Makefile similarity index 100% rename from Examples/python/exceptshadow/Makefile rename to Examples/python/exceptproxy/Makefile diff --git a/Examples/python/exceptshadow/example.h b/Examples/python/exceptproxy/example.h similarity index 100% rename from Examples/python/exceptshadow/example.h rename to Examples/python/exceptproxy/example.h diff --git a/Examples/python/exceptshadow/example.i b/Examples/python/exceptproxy/example.i similarity index 100% rename from Examples/python/exceptshadow/example.i rename to Examples/python/exceptproxy/example.i diff --git a/Examples/python/exceptshadow/runme.py b/Examples/python/exceptproxy/runme.py similarity index 100% rename from Examples/python/exceptshadow/runme.py rename to Examples/python/exceptproxy/runme.py diff --git a/Examples/python/shadow/Makefile b/Examples/python/shadow/Makefile deleted file mode 100644 index 58d139643..000000000 --- a/Examples/python/shadow/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -TOP = ../.. -SWIG = $(TOP)/../preinst-swig -CXXSRCS = example.cxx -TARGET = example -INTERFACE = example.i -LIBS = -lm -SWIGOPT = - -all:: - $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python_cpp - -static:: - $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='mypython' INTERFACE='$(INTERFACE)' python_cpp_static - -clean:: - $(MAKE) -f $(TOP)/Makefile python_clean - rm -f $(TARGET).py - -check: all diff --git a/Examples/python/shadow/example.cxx b/Examples/python/shadow/example.cxx deleted file mode 100644 index 92a3add45..000000000 --- a/Examples/python/shadow/example.cxx +++ /dev/null @@ -1,31 +0,0 @@ -/* File : example.c */ - -#include "example.h" -#include -#ifndef M_PI -# define M_PI 3.14159265358979323846 -#endif - -/* Move the shape to a new location */ -void Shape::move(double dx, double dy) { - x += dx; - y += dy; -} - -int Shape::nshapes = 0; - -double Circle::area() { - return M_PI*radius*radius; -} - -double Circle::perimeter() { - return 2*M_PI*radius; -} - -double Square::area() { - return width*width; -} - -double Square::perimeter() { - return 4*width; -} diff --git a/Examples/python/shadow/example.h b/Examples/python/shadow/example.h deleted file mode 100644 index c0f9b1d57..000000000 --- a/Examples/python/shadow/example.h +++ /dev/null @@ -1,39 +0,0 @@ -/* File : example.h */ - -class Shape { -public: - Shape() { - nshapes++; - } - virtual ~Shape() { - nshapes--; - }; - double x, y; - void move(double dx, double dy); - virtual double area() = 0; - virtual double perimeter() = 0; - static int nshapes; -}; - -class Circle : public Shape { -private: - double radius; -public: - Circle(double r) : radius(r) { }; - virtual double area(); - virtual double perimeter(); -}; - -class Square : public Shape { -private: - double width; -public: - Square(double w) : width(w) { }; - virtual double area(); - virtual double perimeter(); -}; - - - - - diff --git a/Examples/python/shadow/example.i b/Examples/python/shadow/example.i deleted file mode 100644 index 75700b305..000000000 --- a/Examples/python/shadow/example.i +++ /dev/null @@ -1,10 +0,0 @@ -/* File : example.i */ -%module example - -%{ -#include "example.h" -%} - -/* Let's just grab the original header file here */ -%include "example.h" - diff --git a/Examples/python/shadow/index.html b/Examples/python/shadow/index.html deleted file mode 100644 index 30778c291..000000000 --- a/Examples/python/shadow/index.html +++ /dev/null @@ -1,19 +0,0 @@ - - -SWIG:Examples:python:proxy - - - - - -SWIG/Examples/python/proxy/ -
- -

Wrapping a simple C++ class

- -

-This example illustrates the wrapping of some C++ classes by proxy classes. - -


- - diff --git a/Examples/python/shadow/runme.py b/Examples/python/shadow/runme.py deleted file mode 100644 index f1272ae81..000000000 --- a/Examples/python/shadow/runme.py +++ /dev/null @@ -1,51 +0,0 @@ -# file: runme.py - -# This file illustrates the proxy class C++ interface generated -# by SWIG. - -import example - -# ----- Object creation ----- - -print "Creating some objects:" -c = example.Circle(10) -print " Created circle", c -s = example.Square(10) -print " Created square", s - -# ----- Access a static member ----- - -print "\nA total of", example.cvar.Shape_nshapes,"shapes were created" - -# ----- Member data access ----- - -# Set the location of the object - -c.x = 20 -c.y = 30 - -s.x = -10 -s.y = 5 - -print "\nHere is their current position:" -print " Circle = (%f, %f)" % (c.x,c.y) -print " Square = (%f, %f)" % (s.x,s.y) - -# ----- Call some methods ----- - -print "\nHere are some properties of the shapes:" -for o in [c,s]: - print " ", o - print " area = ", o.area() - print " perimeter = ", o.perimeter() - -print "\nGuess I'll clean up now" - -# Note: this invokes the virtual destructor -del c -del s - -s = 3 -print example.cvar.Shape_nshapes,"shapes remain" -print "Goodbye" -