(enum *EnumDescriptor)
| 2615 | } |
| 2616 | |
| 2617 | func (g *Generator) generateEnumRegistration(enum *EnumDescriptor) { |
| 2618 | // // We always print the full (proto-world) package name here. |
| 2619 | pkg := enum.File().GetPackage() |
| 2620 | if pkg != "" { |
| 2621 | pkg += "." |
| 2622 | } |
| 2623 | // The full type name |
| 2624 | typeName := enum.TypeName() |
| 2625 | // The full type name, CamelCased. |
| 2626 | ccTypeName := CamelCaseSlice(typeName) |
| 2627 | g.addInitf("%s.RegisterEnum(%q, %[3]s_name, %[3]s_value)", g.Pkg["proto"], pkg+ccTypeName, ccTypeName) |
| 2628 | } |
| 2629 | |
| 2630 | // And now lots of helper functions. |
| 2631 |
no test coverage detected