inside the %{ ... %} blocks you have to include declarations for all the C++ funcions, classes and methods you want to wrap. That code is copied on the generated C++ source file as is.
If you are proficient programing in C/C++, I advice you to take a look at the C++ code generated for simple examples, you will promptly understand what is going on.