IBM Streams 4.3.0
Creating C++ primitive operators
You can create a C++ primitive operator in Streams Studio.
Before you begin
Tip: Streams Studio provides cheat sheets to guide you through the tasks of creating C++ primitive operators. You can use the cheat sheets as an alternative to following the steps outlined in this task. To open the cheat sheets in Streams Studio:
- From the main menu, click .
- In the Cheat Sheet Selection window, expand IBM Streams.
- Select one of the C++ primitive operator cheat sheets and click OK. The cheat sheet opens in the Cheat Sheets view.
About this task
- Define the C++ operator templates in the *.cgt files.
- (Optional) If your C++ operators use external shared libraries, implement the shared libraries in the SPL Project/impl directory to bundle the artifacts with the SPL project.
- (Optional) Create a makefile to build the shared libraries.
- (Optional) Specify the shared libraries in the operator model.
- Define attributes for the operators in the model operator.
- Create a Main composite to test your C++ operator.
Procedure
To create and implement C++ primitive operators, complete the following steps:
Results
With this set up, all your source code is in the SPL project.
The C++ project provides the tools to build and develop of the C++
shared libraries. The SPL project provides the tools for the development
of SPL toolkit elements. If auto-build is not configured for the C++
project, you can do the following build sequence manually to build
the shared libraries and the SPL applications:
- To build the shared library, in the Project Explorer view, right-click the C++ Project and click Build Project. The shared libraries are rebuilt and placed in the SPL Project/impl/lib folder.
- To build the SPL project, in the Project Explorer view, right-click the SPL project and click Build Active Configurations. The SPL applications in the SPL Project are rebuilt.