API Code Generator
*gs.xml file and the
gsxml2cpp utility allow you to use your C++ classes in the space without a need for mapping or special knowledge regarding other APIs. This file is in charge of generating the C++ class serialization code, allowing you to use your C++ classes in the space. It can also be used to generate the C++ class header file and POJO Java file.
Here is the general flow:
- To define your classes in the space using the
*.gs.xmlfile, perform the following steps:
- Write a
*gs.xmlfile, defining its XML elements as desired.
- Run the gsxml2cpp command – this command generates the serializer code, which includes the classes defined in your
- Compile the serializer code – this is done using the
cpp outputparameter. For an example of how to do this, refer to the C++ Hello World Example.
- Compiling the serializer code generates a DLL/OS file in the format of:
serialize.so. Copy the DLL/SO file to the
You can now use your C++ classes inside the space.
For an explanation of the different
gs.xml elements, refer to the CPP API Mapping File section.
To find out about the supported C++ types, refer to the Supported Types section.
For an explanation of the
gsxml2cpp command and how to use it, refer to the gsxml2cpp Utility section.