From 54d4ba1e3cc7149b5244e67d7344a72f98525aa8 Mon Sep 17 00:00:00 2001 From: "Jonathan B. Coe" Date: Tue, 26 Mar 2019 19:51:38 +0000 Subject: [PATCH] A sketch of an idea - binding language drives the bindings generation --- sandbox/Shape.py.ffig | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 sandbox/Shape.py.ffig diff --git a/sandbox/Shape.py.ffig b/sandbox/Shape.py.ffig new file mode 100644 index 00000000..978b320f --- /dev/null +++ b/sandbox/Shape.py.ffig @@ -0,0 +1,24 @@ +import ffig + +ffig.src("tests/input/Shape.h") + +@ffig.class(clss="Shape") +class Shape: + + @ffig.property("Area") + def area(self) -> float: + pass + + @ffig.property("name") + def name(self) -> str: + pass + + +@ffig.class(clss="Circle") +class Circle(Shape): + + @ffig.ctor("Shape(double)"): + def __init__(self, radius): + print("Constructed a Circle with radius {radius}".format(radius=radius)) + pass +