| {{/* | |
| // 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. | |
| */}} | |
| {{- define "Filename:Implementation" -}} | |
| {{- .LibrarySlashes }}/cpp/fidl.cc | |
| {{- end }} | |
| {{- define "File:Implementation" -}} | |
| {{- UseHLCPP -}} | |
| // WARNING: This file is machine generated by fidlgen. | |
| {{ range $experiment := .Experiments }} | |
| // fidl_experiment = {{ $experiment }} | |
| {{- end }} | |
| {{- /* When the library name only has one component, it is always special. | |
| Those libraries should not define business logic types or protocols, and we | |
| do not support them in the bindings. */}} | |
| {{- if not .SingleComponentLibraryName }} | |
| #include <{{ .Library | Filename "Header" }}> | |
| #include "lib/fidl/cpp/internal/implementation.h" | |
| // | |
| // Domain objects definitions | |
| // | |
| {{- range .Decls }} | |
| {{- if Eq .Kind Kinds.Bits }}{{ template "BitsDefinition" . }}{{- end }} | |
| {{- if Eq .Kind Kinds.Const }}{{ template "ConstDefinition" . }}{{- end }} | |
| {{- if Eq .Kind Kinds.Enum }}{{ template "EnumDefinition" . }}{{- 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 }} | |
| // | |
| // Proxies and stubs definitions | |
| // | |
| {{- range (call .ProtocolsForTransport "Channel") }} | |
| {{ template "ProtocolDefinition" .WithHlMessaging }} | |
| {{- end }} | |
| {{- end }}{{/* if not SingleComponentLibraryName */}} | |
| {{ EndOfFile }} | |
| {{ end }} |