aboutsummaryrefslogtreecommitdiffstats
path: root/examples/samplebinding/doc/samplebinding.rst
diff options
context:
space:
mode:
Diffstat (limited to 'examples/samplebinding/doc/samplebinding.rst')
-rw-r--r--examples/samplebinding/doc/samplebinding.rst23
1 files changed, 18 insertions, 5 deletions
diff --git a/examples/samplebinding/doc/samplebinding.rst b/examples/samplebinding/doc/samplebinding.rst
index 8d74be281..defb55d6b 100644
--- a/examples/samplebinding/doc/samplebinding.rst
+++ b/examples/samplebinding/doc/samplebinding.rst
@@ -54,8 +54,8 @@ done by specifying a special XML file called a typesystem file.
In the typesystem file you specify things like:
- * which C++ classes should have bindings (Icecream) and what kind of
- semantics (value / object)
+ * Which C++ classes should have bindings (Icecream, Truck) and with what
+ kind of semantics (value / object)
* Ownership rules (who deletes the C++ objects, C++ or Python)
@@ -181,17 +181,30 @@ On Windows:
mkdir build
cd build
- cmake -H.. -B. -G Ninja -DCMAKE_BUILD_TYPE=Release
+ cmake -S.. -B. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl.exe
ninja
ninja install
cd ..
+Use the Python module
++++++++++++++++++++++
+
The final example can then be run by:
.. code-block:: bash
python main.py
+In the ``main.py`` script, two types are derived from :code:`Icecream` for
+different “flavors” after importing the classes from the :code:`Universe`
+module. Then, a :code:`truck` is created to deliver some regular flavored
+Icecreams and two special ones.
+
+If the delivery fails, a new :code:`truck` is created with the old flavors
+copied over, and a new *magical* flavor that will surely satisfy all customers.
+
+Try running it to see if the ice creams are delivered.
+
Windows troubleshooting
+++++++++++++++++++++++
@@ -207,13 +220,13 @@ passing the compiler on the command line:
.. code-block:: bash
- cmake -H.. -B. -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe
+ cmake -S.. -B. -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe
or by using the -G option:
.. code-block:: bash
- cmake -H.. -B. -G "Visual Studio 14 Win64"
+ cmake -S.. -B. -G "Visual Studio 14 Win64"
If the ``-G "Visual Studio 14 Win64"`` option is used, a ``sln`` file
will be generated, and can be used with ``MSBuild``