zserio.extension.python.ServiceEmitter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zserio Show documentation
Show all versions of zserio Show documentation
Zserio Serialization Framework Compiler
The newest version!
package zserio.extension.python;
import zserio.ast.ServiceType;
import zserio.extension.common.OutputFileManager;
import zserio.extension.common.PackedTypesCollector;
import zserio.extension.common.ZserioExtensionException;
/**
* Service emitter.
*/
final class ServiceEmitter extends PythonDefaultEmitter
{
public ServiceEmitter(OutputFileManager outputFileManager, PythonExtensionParameters pythonParameters,
PackedTypesCollector packedTypesCollector)
{
super(outputFileManager, pythonParameters, packedTypesCollector);
}
@Override
public void beginService(ServiceType serviceType) throws ZserioExtensionException
{
if (!getWithServiceCode())
return;
final ServiceEmitterTemplateData templateData =
new ServiceEmitterTemplateData(getTemplateDataContext(), serviceType);
processSourceTemplate(TEMPLATE_SOURCE_NAME, templateData, serviceType);
}
static final String TEMPLATE_SOURCE_NAME = "Service.py.ftl";
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy