writeCloseNamespace method

  1. @override
void writeCloseNamespace(
  1. CppOptions generatorOptions,
  2. Root root,
  3. Indent indent, {
  4. required String dartPackageName,
})
override

Writes code to indent that closes file namespace if needed.

This method is not required, and does not need to be overridden.

Implementation

@override
void writeCloseNamespace(
  CppOptions generatorOptions,
  Root root,
  Indent indent, {
  required String dartPackageName,
}) {
  if (generatorOptions.namespace != null) {
    indent.writeln('}  // namespace ${generatorOptions.namespace}');
  }
  final String guardName = _getGuardName(generatorOptions.headerIncludePath);
  indent.writeln('#endif  // $guardName');
}