From f72ed4fcacc5883ff62e5cc6b790677951a07adf Mon Sep 17 00:00:00 2001 From: davyxu Date: Sun, 26 Feb 2023 21:54:48 +0800 Subject: [PATCH] UE c++ --- gen/ppcpp/text.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gen/ppcpp/text.go b/gen/ppcpp/text.go index 92e0e02..d73c4d0 100644 --- a/gen/ppcpp/text.go +++ b/gen/ppcpp/text.go @@ -10,9 +10,11 @@ const RegTemplateText = `// Generated by github.com/davyxu/protoplus class {{.Name}}Meta : public MessageMeta { public: + static const int32 Id = {{StructMsgID .}}; virtual const char* GetMessageName( ) const override{ return "{{$.PackageName}}.{{.Name}}"; } virtual int32 GetMessageId( ) const override{ return {{StructMsgID .}}; } - virtual void* NewMessage() override { return {{$.PackageName}}::{{.Name}}::default_instance().New(); } + virtual google::protobuf::Message* NewMessage() override { return {{$.PackageName}}::{{.Name}}::default_instance().New(); } + virtual const google::protobuf::Descriptor* GetMessageType() const override{ return {{$.PackageName}}::{{.Name}}::GetDescriptor(); } }; {{end}} void StaticRegisterMeta( )