generate method
void
generate(
- OutputFileOptions<
CppOptions> generatorOptions, - Root root,
- StringSink sink, {
- required String dartPackageName,
override
Generates C++ file of type specified in generatorOptions
Implementation
@override
void generate(
OutputFileOptions<CppOptions> generatorOptions,
Root root,
StringSink sink, {
required String dartPackageName,
}) {
assert(generatorOptions.fileType == FileType.header ||
generatorOptions.fileType == FileType.source);
if (generatorOptions.fileType == FileType.header) {
const CppHeaderGenerator().generate(
generatorOptions.languageOptions,
root,
sink,
dartPackageName: dartPackageName,
);
} else if (generatorOptions.fileType == FileType.source) {
const CppSourceGenerator().generate(
generatorOptions.languageOptions,
root,
sink,
dartPackageName: dartPackageName,
);
}
}