| //////////////////////////////////////////////////////////////////////////////// |
| // Do not modify! |
| // Generated by embed |
| //////////////////////////////////////////////////////////////////////////////// |
| |
| package main |
| |
| var embedded = map[string]string{ |
| stringdefgo_tmpl_file: stringdefgo_tmpl, |
| stringdefapi_tmpl_file: stringdefapi_tmpl, |
| } |
| var embedded_utf8 = map[string]bool{ |
| stringdefgo_tmpl_file: stringdefgo_tmpl_utf8, |
| stringdefapi_tmpl_file: stringdefapi_tmpl_utf8, |
| } |
| |
| const stringdefgo_tmpl_file = `stringdefgo.tmpl` |
| const stringdefgo_tmpl_utf8 = true |
| const stringdefgo_tmpl = `{{/* |
| * Copyright (C) 2016 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */}} |
| |
| {{define "StringDefGo"}} |
| §{{$.Copyright}}§ |
| package {{$.Package}}¶ |
| ¶ |
| import (Ȧ |
| "android.googlesource.com/platform/tools/gpu/framework/binary"¶ |
| "android.googlesource.com/platform/tools/gpu/framework/stringtable/msg"¶ |
| «)¶ |
| |
| {{range $.Entries}} |
| {{$name := ToCamel .Key}} |
| ¶ |
| // {{$name}} returns a {{.Key}} message with the provided arguments.¶ |
| func {{$name}}( |
| {{if .Parameters}} |
| {{range $i, $p := .Parameters}} |
| {{if $i}},•{{end}}{{$p.Identifier}} |
| {{end}} |
| •interface{} |
| {{end}}) *msg.Msg {Ȧ |
| return &msg.Msg{Ȧ |
| Identifier: "{{.Key}}",¶ |
| {{if eq (len .Parameters) 0}} |
| Arguments: map[string]binary.Object{},¶ |
| {{else}} |
| Arguments: map[string]binary.Object{Ȧ |
| {{range $i, $p := .Parameters}} |
| "{{$p.Identifier}}":║msg.BoxOrPanic({{$p.Identifier}}),¶ |
| {{end}} |
| «},¶ |
| {{end}} |
| «}¶ |
| «}¶ |
| {{end}} |
| {{end}} |
| ` |
| const stringdefapi_tmpl_file = `stringdefapi.tmpl` |
| const stringdefapi_tmpl_utf8 = true |
| const stringdefapi_tmpl = `{{/* |
| * Copyright (C) 2016 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */}} |
| |
| {{define "StringDefApi"}} |
| §{{$.Copyright}}§ |
| |
| type•u32•MsgID¶ |
| ¶ |
| extern•MsgID•newMsg(Severity•s,•message•msg)¶ |
| extern•void•addTag(MsgID•msgID,•message•tag)¶ |
| ¶ |
| enum Severity {¶ |
| » |
| SEVERITY_EMERGENCY•=•0x00000000,¶ |
| SEVERITY_ALERT•••••=•0x00000001,¶ |
| SEVERITY_CRITICAL••=•0x00000002,¶ |
| SEVERITY_ERROR•••••=•0x00000003,¶ |
| SEVERITY_WARNING•••=•0x00000004,¶ |
| SEVERITY_NOTICE••••=•0x00000005,¶ |
| SEVERITY_INFO••••••=•0x00000006,¶ |
| SEVERITY_DEBUG•••••=•0x00000007,¶ |
| « |
| }¶¶ |
| |
| {{range $.Entries}} |
| {{$name := .Key}} |
| // {{$name}} represents message with the arguments as fields.¶ |
| @unused¶ |
| class {{$name}} { |
| {{if .Parameters}} |
| ¶ |
| » |
| {{range $i, $p := .Parameters}} |
| {{$p.Type}}•{{$p.Identifier}}¶ |
| {{end}} |
| « |
| {{end}} |
| }¶ |
| ¶ |
| {{end}} |
| {{end}} |
| ` |