blob: d64c0eec450bd06c219cdfd7b36092c110ea84a3 [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package codegen
const fileSourceTmpl = `
{{- define "Source" -}}
{{- UseWire -}}
// WARNING: This file is machine generated by fidlgen.
#include <{{ .PrimaryHeader }}>
#include <memory>
{{ "" }}
{{- range .Decls }}
{{- if Eq .Kind Kinds.Const }}{{ template "ConstDefinition" . }}{{- end }}
{{- if Eq .Kind Kinds.Protocol }}
{{ template "ProtocolDefinition" . }}
{{ template "EventSenderDefinition" . }}
{{- end }}
{{- if Eq .Kind Kinds.Struct }}{{ template "StructDefinition" . }}{{- end }}
{{- if Eq .Kind Kinds.Union }}{{ template "UnionDefinition" . }}{{- end }}
{{- if Eq .Kind Kinds.Table }}{{ template "TableDefinition" . }}{{- end }}
{{- end }}
{{ "" }}
{{ EndOfFile }}
{{ end }}
`