.. _cpp-introduction: C++ SDK ======= :ref:`Overview ` | C++ | :ref:`Python ` | :ref:`.Net ` | :ref:`Java ` | :ref:`Matlab ` | :ref:`Urbi ` .. toctree:: :hidden: install_guide tutorials examples tips-and-tricks Please make sure to have read the :ref:`naoqi-overview` section first. There are a few things that are C++ specific. One key difference is that there are two types of proxies. * **Specialized proxies**. They correspond to Aldebaran features, such as ALMotion, ALTextToSpeech, ALVideoDevice etc. These proxies are optimized, efficient and easy to use: once created, they give direct access to already existing methods. Always prefer this kind of proxy to *generic proxies* if it exists for a desired module - in addition to being optimized, they give you compile-time type checking, which helps you see problems earlier. .. code-block:: cpp #include const std::string phraseToSay = "Hello world"; AL::ALTextToSpeechProxy tts("nao.local" , 9559); tts.say("Hello world"); * **Generic proxies**. They give access to any module including the ones which also have specialized proxies. The generic proxy has no information about the methods which are bound to these modules, contrary to *specialized proxies*. This means that the user must specify himself the name and parameters of the methods: if there is a mistake somewhere, it will raise an exception during execution. This kind of proxy is slower and more error-prone, but very flexible since it can adapt to any module. For user-created modules that have no specialized proxy, this is your only choice. .. code-block:: cpp #include const std::string phraseToSay = "Hello world"; AL::ALProxy proxy("nao.local", 9559); proxy.callVoid("say", phraseToSay); // Or, if the method returns something, you // must use a template parameter bool ping = proxy->call("ping"); Installation ------------ Please read the :ref:`cpp-install-guide` section. Samples and tutorials ---------------------- The main tutorial can be found in the :ref:`cpp-create-module` section. If you still want to use the old method, calling ``CMake`` with a toolchain file, you can still do it. But please read the :ref:`cpp-tutos-porting-1.12` tutorial. You should mostly be fine without touching any ``CMakeLists.txt`` file, but if you want your code to work in the next release, you should really port your code It's advised you use :ref:`qiBuild ` to build your projects. Please follow the :ref:`cpp-tutos-using-qibuild` tutorial to get you started with qiBuild. Please make sure to also read the :ref:`naoqi-local-remote-modules` section. To get the list of all samples and tutorials, see the :ref:`cpp-tutos-examples` section Reference documentation ----------------------- * :ref:`naoqi-cpp-api` * :ref:`qibuild-ref`