Introduction



This is the SPL Operator Code Generation API documentation. This API is used
to develop generic SPL primitive operators using code generator templates
(.cgt files), in order to achieve a level of reusability and genericity that
is not available to SPL primitive operators written in pure C++ or Java.


There are three main classes of interest in this API:
- SPL::CodeGen: Provides helper routines for common code generation tasks
(such as errorln, br>SPL::CodeGen::emitClassemitClass@endlink,or@link<br>SPL::CodeGen::getOutputTupleCppInitializer<br>getOutputTupleCppInitializer@endlink)<br>-SPL::CodeGen::Type:Provideshelperroutinesforcommontypeinspection<br>tasks(suchas@linkSPL::CodeGen::Type::isPrimitiveisPrimitive@endlinkor<br>@linkSPL::CodeGen::Type::getElementTypegetElementType@endlink)<br>-SPL::Operator::Instance::OperatorInstanceanditssupportclasses(suchas<br>@linkSPL::Operator::Instance::ContextContext@endlink,@link<br>SPL::Operator::Instance::ParameterParameter@endlink,etc.):Theseareused<br>toaccessthe<i>operatorinstancemodel</i>.<br><br>@subsectionoim_secOperatorInstanceModel<br><br>Theoperatorinstancemodelcapturestheconfigurationoftheoperator<br>instanceforwhichcodewillbegenerated.Theconfigurationoftheoperator<br>instanceisbasedonitsinvocationinthe%SPLsourcecodeaftercomposite<br>operatorexpansionisperformedbythecompiler.<br><br>AdditionaldetailsaboutusageofthisAPIcanbefoundinthe"Developing<br>operators"sectionofthe"StreamsKnowledgeCenter".<br>