Browse Source

I need to update the proto file to continue my work

tags/0.1.0
Shawqeem 3 years ago
parent
commit
93bd93b412
19 changed files with 899 additions and 138 deletions
  1. +53
    -1
      CAPI/proto/Message2Clients.grpc.pb.cc
  2. +209
    -4
      CAPI/proto/Message2Clients.grpc.pb.h
  3. +128
    -65
      CAPI/proto/Message2Clients.pb.cc
  4. +102
    -30
      CAPI/proto/Message2Clients.pb.h
  5. +0
    -0
      CAPI/proto/Message2Server.grpc.pb.cc
  6. +0
    -0
      CAPI/proto/Message2Server.grpc.pb.h
  7. +0
    -0
      CAPI/proto/Message2Server.pb.cc
  8. +0
    -0
      CAPI/proto/Message2Server.pb.h
  9. +0
    -0
      CAPI/proto/MessageType.grpc.pb.cc
  10. +0
    -0
      CAPI/proto/MessageType.grpc.pb.h
  11. +23
    -20
      CAPI/proto/MessageType.pb.cc
  12. +10
    -8
      CAPI/proto/MessageType.pb.h
  13. +283
    -0
      dependency/proto/.clang-format
  14. +5
    -3
      dependency/proto/Message2Clients.proto
  15. +0
    -0
      dependency/proto/Message2Server.proto
  16. +9
    -7
      dependency/proto/MessageType.proto
  17. +0
    -0
      dependency/proto/README.md
  18. +2
    -0
      dependency/proto/cpp_output.sh
  19. +75
    -0
      dependency/proto/format.sh

+ 53
- 1
CAPI/proto/Message2Clients.grpc.pb.cc View File

@@ -35,6 +35,7 @@ namespace protobuf
"/protobuf.AvailableService/CarryHuman", "/protobuf.AvailableService/CarryHuman",
"/protobuf.AvailableService/ReleaseHuman", "/protobuf.AvailableService/ReleaseHuman",
"/protobuf.AvailableService/HangHuman", "/protobuf.AvailableService/HangHuman",
"/protobuf.AvailableService/Escape",
}; };


std::unique_ptr<AvailableService::Stub> AvailableService::NewStub(const std::shared_ptr<::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) std::unique_ptr<AvailableService::Stub> AvailableService::NewStub(const std::shared_ptr<::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options)
@@ -57,7 +58,8 @@ namespace protobuf
rpcmethod_Attack_(AvailableService_method_names[8], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), rpcmethod_Attack_(AvailableService_method_names[8], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel),
rpcmethod_CarryHuman_(AvailableService_method_names[9], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), rpcmethod_CarryHuman_(AvailableService_method_names[9], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel),
rpcmethod_ReleaseHuman_(AvailableService_method_names[10], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), rpcmethod_ReleaseHuman_(AvailableService_method_names[10], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel),
rpcmethod_HangHuman_(AvailableService_method_names[11], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
rpcmethod_HangHuman_(AvailableService_method_names[11], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel),
rpcmethod_Escape_(AvailableService_method_names[12], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
{ {
} }


@@ -373,6 +375,34 @@ namespace protobuf
return result; return result;
} }


::grpc::Status AvailableService::Stub::Escape(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response)
{
return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Escape_, context, request, response);
}

void AvailableService::Stub::async::Escape(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f)
{
::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Escape_, context, request, response, std::move(f));
}

void AvailableService::Stub::async::Escape(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor)
{
::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Escape_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncEscapeRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
{
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Escape_, context, request);
}

::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncEscapeRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
{
auto* result =
this->PrepareAsyncEscapeRaw(context, request, cq);
result->StartCall();
return result;
}

AvailableService::Service::Service() AvailableService::Service::Service()
{ {
AddMethod(new ::grpc::internal::RpcServiceMethod( AddMethod(new ::grpc::internal::RpcServiceMethod(
@@ -541,6 +571,20 @@ namespace protobuf
this this
) )
)); ));
AddMethod(new ::grpc::internal::RpcServiceMethod(
AvailableService_method_names[12],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](AvailableService::Service* service,
::grpc::ServerContext* ctx,
const ::protobuf::IDMsg* req,
::protobuf::BoolRes* resp)
{
return service->Escape(ctx, req, resp);
},
this
)
));
} }


AvailableService::Service::~Service() AvailableService::Service::~Service()
@@ -641,4 +685,12 @@ namespace protobuf
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
} }


::grpc::Status AvailableService::Service::Escape(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response)
{
(void)context;
(void)request;
(void)response;
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

} // namespace protobuf } // namespace protobuf

+ 209
- 4
CAPI/proto/Message2Clients.grpc.pb.h View File

@@ -164,6 +164,15 @@ namespace protobuf
{ {
return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>>(PrepareAsyncHangHumanRaw(context, request, cq)); return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>>(PrepareAsyncHangHumanRaw(context, request, cq));
} }
virtual ::grpc::Status Escape(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) = 0;
std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>> AsyncEscape(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
{
return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>>(AsyncEscapeRaw(context, request, cq));
}
std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>> PrepareAsyncEscape(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
{
return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>>(PrepareAsyncEscapeRaw(context, request, cq));
}
class async_interface class async_interface
{ {
public: public:
@@ -195,6 +204,8 @@ namespace protobuf
virtual void ReleaseHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) = 0; virtual void ReleaseHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) = 0;
virtual void HangHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)>) = 0; virtual void HangHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)>) = 0;
virtual void HangHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) = 0; virtual void HangHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) = 0;
virtual void Escape(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)>) = 0;
virtual void Escape(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) = 0;
}; };
typedef class async_interface experimental_async_interface; typedef class async_interface experimental_async_interface;
virtual class async_interface* async() virtual class async_interface* async()
@@ -234,6 +245,8 @@ namespace protobuf
virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncReleaseHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncReleaseHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* AsyncHangHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* AsyncHangHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncHangHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncHangHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* AsyncEscapeRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncEscapeRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0;
}; };
class Stub final : public StubInterface class Stub final : public StubInterface
{ {
@@ -356,6 +369,15 @@ namespace protobuf
{ {
return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>>(PrepareAsyncHangHumanRaw(context, request, cq)); return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>>(PrepareAsyncHangHumanRaw(context, request, cq));
} }
::grpc::Status Escape(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) override;
std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>> AsyncEscape(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
{
return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>>(AsyncEscapeRaw(context, request, cq));
}
std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>> PrepareAsyncEscape(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq)
{
return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>>(PrepareAsyncEscapeRaw(context, request, cq));
}
class async final : class async final :
public StubInterface::async_interface public StubInterface::async_interface
{ {
@@ -381,6 +403,8 @@ namespace protobuf
void ReleaseHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override; void ReleaseHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override;
void HangHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)>) override; void HangHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)>) override;
void HangHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override; void HangHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override;
void Escape(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)>) override;
void Escape(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override;


private: private:
friend class Stub; friend class Stub;
@@ -432,6 +456,8 @@ namespace protobuf
::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncReleaseHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncReleaseHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AsyncHangHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AsyncHangHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncHangHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncHangHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AsyncEscapeRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncEscapeRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override;
const ::grpc::internal::RpcMethod rpcmethod_AddPlayer_; const ::grpc::internal::RpcMethod rpcmethod_AddPlayer_;
const ::grpc::internal::RpcMethod rpcmethod_Move_; const ::grpc::internal::RpcMethod rpcmethod_Move_;
const ::grpc::internal::RpcMethod rpcmethod_PickProp_; const ::grpc::internal::RpcMethod rpcmethod_PickProp_;
@@ -444,6 +470,7 @@ namespace protobuf
const ::grpc::internal::RpcMethod rpcmethod_CarryHuman_; const ::grpc::internal::RpcMethod rpcmethod_CarryHuman_;
const ::grpc::internal::RpcMethod rpcmethod_ReleaseHuman_; const ::grpc::internal::RpcMethod rpcmethod_ReleaseHuman_;
const ::grpc::internal::RpcMethod rpcmethod_HangHuman_; const ::grpc::internal::RpcMethod rpcmethod_HangHuman_;
const ::grpc::internal::RpcMethod rpcmethod_Escape_;
}; };
static std::unique_ptr<Stub> NewStub(const std::shared_ptr<::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); static std::unique_ptr<Stub> NewStub(const std::shared_ptr<::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());


@@ -468,6 +495,7 @@ namespace protobuf
virtual ::grpc::Status CarryHuman(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response); virtual ::grpc::Status CarryHuman(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response);
virtual ::grpc::Status ReleaseHuman(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response); virtual ::grpc::Status ReleaseHuman(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response);
virtual ::grpc::Status HangHuman(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response); virtual ::grpc::Status HangHuman(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response);
virtual ::grpc::Status Escape(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response);
}; };
template<class BaseClass> template<class BaseClass>
class WithAsyncMethod_AddPlayer : public BaseClass class WithAsyncMethod_AddPlayer : public BaseClass
@@ -805,7 +833,35 @@ namespace protobuf
::grpc::Service::RequestAsyncUnary(11, context, request, response, new_call_cq, notification_cq, tag); ::grpc::Service::RequestAsyncUnary(11, context, request, response, new_call_cq, notification_cq, tag);
} }
}; };
typedef WithAsyncMethod_AddPlayer<WithAsyncMethod_Move<WithAsyncMethod_PickProp<WithAsyncMethod_UseProp<WithAsyncMethod_UseSkill<WithAsyncMethod_SendMessage<WithAsyncMethod_FixMachine<WithAsyncMethod_SaveHuman<WithAsyncMethod_Attack<WithAsyncMethod_CarryHuman<WithAsyncMethod_ReleaseHuman<WithAsyncMethod_HangHuman<Service>>>>>>>>>>>> AsyncService;
template<class BaseClass>
class WithAsyncMethod_Escape : public BaseClass
{
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/)
{
}

public:
WithAsyncMethod_Escape()
{
::grpc::Service::MarkMethodAsync(12);
}
~WithAsyncMethod_Escape() override
{
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status Escape(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override
{
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
void RequestEscape(::grpc::ServerContext* context, ::protobuf::IDMsg* request, ::grpc::ServerAsyncResponseWriter<::protobuf::BoolRes>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag)
{
::grpc::Service::RequestAsyncUnary(12, context, request, response, new_call_cq, notification_cq, tag);
}
};
typedef WithAsyncMethod_AddPlayer<WithAsyncMethod_Move<WithAsyncMethod_PickProp<WithAsyncMethod_UseProp<WithAsyncMethod_UseSkill<WithAsyncMethod_SendMessage<WithAsyncMethod_FixMachine<WithAsyncMethod_SaveHuman<WithAsyncMethod_Attack<WithAsyncMethod_CarryHuman<WithAsyncMethod_ReleaseHuman<WithAsyncMethod_HangHuman<WithAsyncMethod_Escape<Service>>>>>>>>>>>>> AsyncService;
template<class BaseClass> template<class BaseClass>
class WithCallbackMethod_AddPlayer : public BaseClass class WithCallbackMethod_AddPlayer : public BaseClass
{ {
@@ -1250,7 +1306,46 @@ namespace protobuf
return nullptr; return nullptr;
} }
}; };
typedef WithCallbackMethod_AddPlayer<WithCallbackMethod_Move<WithCallbackMethod_PickProp<WithCallbackMethod_UseProp<WithCallbackMethod_UseSkill<WithCallbackMethod_SendMessage<WithCallbackMethod_FixMachine<WithCallbackMethod_SaveHuman<WithCallbackMethod_Attack<WithCallbackMethod_CarryHuman<WithCallbackMethod_ReleaseHuman<WithCallbackMethod_HangHuman<Service>>>>>>>>>>>> CallbackService;
template<class BaseClass>
class WithCallbackMethod_Escape : public BaseClass
{
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/)
{
}

public:
WithCallbackMethod_Escape()
{
::grpc::Service::MarkMethodCallback(12, new ::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response)
{ return this->Escape(context, request, response); }));
}
void SetMessageAllocatorFor_Escape(
::grpc::MessageAllocator<::protobuf::IDMsg, ::protobuf::BoolRes>* allocator
)
{
::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(12);
static_cast<::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>*>(handler)
->SetMessageAllocator(allocator);
}
~WithCallbackMethod_Escape() override
{
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status Escape(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override
{
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
virtual ::grpc::ServerUnaryReactor* Escape(
::grpc::CallbackServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/
)
{
return nullptr;
}
};
typedef WithCallbackMethod_AddPlayer<WithCallbackMethod_Move<WithCallbackMethod_PickProp<WithCallbackMethod_UseProp<WithCallbackMethod_UseSkill<WithCallbackMethod_SendMessage<WithCallbackMethod_FixMachine<WithCallbackMethod_SaveHuman<WithCallbackMethod_Attack<WithCallbackMethod_CarryHuman<WithCallbackMethod_ReleaseHuman<WithCallbackMethod_HangHuman<WithCallbackMethod_Escape<Service>>>>>>>>>>>>> CallbackService;
typedef CallbackService ExperimentalCallbackService; typedef CallbackService ExperimentalCallbackService;
template<class BaseClass> template<class BaseClass>
class WithGenericMethod_AddPlayer : public BaseClass class WithGenericMethod_AddPlayer : public BaseClass
@@ -1541,6 +1636,30 @@ namespace protobuf
} }
}; };
template<class BaseClass> template<class BaseClass>
class WithGenericMethod_Escape : public BaseClass
{
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/)
{
}

public:
WithGenericMethod_Escape()
{
::grpc::Service::MarkMethodGeneric(12);
}
~WithGenericMethod_Escape() override
{
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status Escape(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override
{
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
};
template<class BaseClass>
class WithRawMethod_AddPlayer : public BaseClass class WithRawMethod_AddPlayer : public BaseClass
{ {
private: private:
@@ -1877,6 +1996,34 @@ namespace protobuf
} }
}; };
template<class BaseClass> template<class BaseClass>
class WithRawMethod_Escape : public BaseClass
{
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/)
{
}

public:
WithRawMethod_Escape()
{
::grpc::Service::MarkMethodRaw(12);
}
~WithRawMethod_Escape() override
{
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status Escape(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override
{
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
void RequestEscape(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag)
{
::grpc::Service::RequestAsyncUnary(12, context, request, response, new_call_cq, notification_cq, tag);
}
};
template<class BaseClass>
class WithRawCallbackMethod_AddPlayer : public BaseClass class WithRawCallbackMethod_AddPlayer : public BaseClass
{ {
private: private:
@@ -2249,6 +2396,37 @@ namespace protobuf
} }
}; };
template<class BaseClass> template<class BaseClass>
class WithRawCallbackMethod_Escape : public BaseClass
{
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/)
{
}

public:
WithRawCallbackMethod_Escape()
{
::grpc::Service::MarkMethodRawCallback(12, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response)
{ return this->Escape(context, request, response); }));
}
~WithRawCallbackMethod_Escape() override
{
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status Escape(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override
{
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
virtual ::grpc::ServerUnaryReactor* Escape(
::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/
)
{
return nullptr;
}
};
template<class BaseClass>
class WithStreamedUnaryMethod_Move : public BaseClass class WithStreamedUnaryMethod_Move : public BaseClass
{ {
private: private:
@@ -2491,7 +2669,34 @@ namespace protobuf
// replace default version of method with streamed unary // replace default version of method with streamed unary
virtual ::grpc::Status StreamedHangHuman(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* server_unary_streamer) = 0; virtual ::grpc::Status StreamedHangHuman(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* server_unary_streamer) = 0;
}; };
typedef WithStreamedUnaryMethod_Move<WithStreamedUnaryMethod_PickProp<WithStreamedUnaryMethod_UseProp<WithStreamedUnaryMethod_UseSkill<WithStreamedUnaryMethod_SendMessage<WithStreamedUnaryMethod_Attack<WithStreamedUnaryMethod_CarryHuman<WithStreamedUnaryMethod_ReleaseHuman<WithStreamedUnaryMethod_HangHuman<Service>>>>>>>>> StreamedUnaryService;
template<class BaseClass>
class WithStreamedUnaryMethod_Escape : public BaseClass
{
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/)
{
}

public:
WithStreamedUnaryMethod_Escape()
{
::grpc::Service::MarkMethodStreamed(12, new ::grpc::internal::StreamedUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* streamer)
{ return this->StreamedEscape(context, streamer); }));
}
~WithStreamedUnaryMethod_Escape() override
{
BaseClassMustBeDerivedFromService(this);
}
// disable regular version of this method
::grpc::Status Escape(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override
{
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
// replace default version of method with streamed unary
virtual ::grpc::Status StreamedEscape(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* server_unary_streamer) = 0;
};
typedef WithStreamedUnaryMethod_Move<WithStreamedUnaryMethod_PickProp<WithStreamedUnaryMethod_UseProp<WithStreamedUnaryMethod_UseSkill<WithStreamedUnaryMethod_SendMessage<WithStreamedUnaryMethod_Attack<WithStreamedUnaryMethod_CarryHuman<WithStreamedUnaryMethod_ReleaseHuman<WithStreamedUnaryMethod_HangHuman<WithStreamedUnaryMethod_Escape<Service>>>>>>>>>> StreamedUnaryService;
template<class BaseClass> template<class BaseClass>
class WithSplitStreamingMethod_AddPlayer : public BaseClass class WithSplitStreamingMethod_AddPlayer : public BaseClass
{ {
@@ -2520,7 +2725,7 @@ namespace protobuf
virtual ::grpc::Status StreamedAddPlayer(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer<::protobuf::PlayerMsg, ::protobuf::MessageToClient>* server_split_streamer) = 0; virtual ::grpc::Status StreamedAddPlayer(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer<::protobuf::PlayerMsg, ::protobuf::MessageToClient>* server_split_streamer) = 0;
}; };
typedef WithSplitStreamingMethod_AddPlayer<Service> SplitStreamedService; typedef WithSplitStreamingMethod_AddPlayer<Service> SplitStreamedService;
typedef WithSplitStreamingMethod_AddPlayer<WithStreamedUnaryMethod_Move<WithStreamedUnaryMethod_PickProp<WithStreamedUnaryMethod_UseProp<WithStreamedUnaryMethod_UseSkill<WithStreamedUnaryMethod_SendMessage<WithStreamedUnaryMethod_Attack<WithStreamedUnaryMethod_CarryHuman<WithStreamedUnaryMethod_ReleaseHuman<WithStreamedUnaryMethod_HangHuman<Service>>>>>>>>>> StreamedService;
typedef WithSplitStreamingMethod_AddPlayer<WithStreamedUnaryMethod_Move<WithStreamedUnaryMethod_PickProp<WithStreamedUnaryMethod_UseProp<WithStreamedUnaryMethod_UseSkill<WithStreamedUnaryMethod_SendMessage<WithStreamedUnaryMethod_Attack<WithStreamedUnaryMethod_CarryHuman<WithStreamedUnaryMethod_ReleaseHuman<WithStreamedUnaryMethod_HangHuman<WithStreamedUnaryMethod_Escape<Service>>>>>>>>>>> StreamedService;
}; };


} // namespace protobuf } // namespace protobuf


+ 128
- 65
CAPI/proto/Message2Clients.pb.cc View File

@@ -40,10 +40,11 @@ namespace protobuf
, ,
guid_(int64_t{0}), guid_(int64_t{0}),
chair_time_(0), chair_time_(0),
ground_time_(0),
player_id_(int64_t{0}),
on_chair_(false), on_chair_(false),
on_ground_(false)
on_ground_(false),
view_range_(0),
ground_time_(0),
player_id_(int64_t{0})
{ {
} }
struct MessageOfHumanDefaultTypeInternal struct MessageOfHumanDefaultTypeInternal
@@ -82,7 +83,8 @@ namespace protobuf


, ,
movable_(false), movable_(false),
playerid_(int64_t{0})
playerid_(int64_t{0}),
view_range_(0)
{ {
} }
struct MessageOfButcherDefaultTypeInternal struct MessageOfButcherDefaultTypeInternal
@@ -294,6 +296,7 @@ const uint32_t TableStruct_Message2Clients_2eproto::offsets[] PROTOBUF_SECTION_V
PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfHuman, on_ground_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfHuman, on_ground_),
PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfHuman, ground_time_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfHuman, ground_time_),
PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfHuman, player_id_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfHuman, player_id_),
PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfHuman, view_range_),
PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfHuman, buff_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfHuman, buff_),
~0u, // no _has_bits_ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfButcher, _internal_metadata_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfButcher, _internal_metadata_),
@@ -312,6 +315,7 @@ const uint32_t TableStruct_Message2Clients_2eproto::offsets[] PROTOBUF_SECTION_V
PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfButcher, guid_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfButcher, guid_),
PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfButcher, movable_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfButcher, movable_),
PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfButcher, playerid_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfButcher, playerid_),
PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfButcher, view_range_),
PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfButcher, buff_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfButcher, buff_),
~0u, // no _has_bits_ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfProp, _internal_metadata_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfProp, _internal_metadata_),
@@ -378,14 +382,14 @@ const uint32_t TableStruct_Message2Clients_2eproto::offsets[] PROTOBUF_SECTION_V
}; };
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{0, -1, -1, sizeof(::protobuf::MessageOfHuman)}, {0, -1, -1, sizeof(::protobuf::MessageOfHuman)},
{22, -1, -1, sizeof(::protobuf::MessageOfButcher)},
{40, -1, -1, sizeof(::protobuf::MessageOfProp)},
{52, -1, -1, sizeof(::protobuf::MessageOfPickedProp)},
{63, -1, -1, sizeof(::protobuf::MessageOfMap_Row)},
{70, -1, -1, sizeof(::protobuf::MessageOfMap)},
{77, -1, -1, sizeof(::protobuf::MessageToClient)},
{87, -1, -1, sizeof(::protobuf::MoveRes)},
{95, -1, -1, sizeof(::protobuf::BoolRes)},
{23, -1, -1, sizeof(::protobuf::MessageOfButcher)},
{42, -1, -1, sizeof(::protobuf::MessageOfProp)},
{54, -1, -1, sizeof(::protobuf::MessageOfPickedProp)},
{65, -1, -1, sizeof(::protobuf::MessageOfMap_Row)},
{72, -1, -1, sizeof(::protobuf::MessageOfMap)},
{79, -1, -1, sizeof(::protobuf::MessageToClient)},
{89, -1, -1, sizeof(::protobuf::MoveRes)},
{97, -1, -1, sizeof(::protobuf::BoolRes)},
}; };


static ::PROTOBUF_NAMESPACE_ID::Message const* const file_default_instances[] = { static ::PROTOBUF_NAMESPACE_ID::Message const* const file_default_instances[] = {
@@ -402,7 +406,7 @@ static ::PROTOBUF_NAMESPACE_ID::Message const* const file_default_instances[] =


const char descriptor_table_protodef_Message2Clients_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = const char descriptor_table_protodef_Message2Clients_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\025Message2Clients.proto\022\010protobuf\032\021Messa" "\n\025Message2Clients.proto\022\010protobuf\032\021Messa"
"geType.proto\032\024Message2Server.proto\"\201\003\n\016M"
"geType.proto\032\024Message2Server.proto\"\225\003\n\016M"
"essageOfHuman\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\022\r\n\005s" "essageOfHuman\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\022\r\n\005s"
"peed\030\003 \001(\005\022\014\n\004life\030\004 \001(\005\022\023\n\013hanged_time\030" "peed\030\003 \001(\005\022\014\n\004life\030\004 \001(\005\022\023\n\013hanged_time\030"
"\005 \001(\005\022\"\n\032time_until_skill_available\030\006 \001(" "\005 \001(\005\022\"\n\032time_until_skill_available\030\006 \001("
@@ -411,15 +415,16 @@ const char descriptor_table_protodef_Message2Clients_2eproto[] PROTOBUF_SECTION_
"_type\030\t \001(\0162\023.protobuf.HumanType\022\014\n\004guid" "_type\030\t \001(\0162\023.protobuf.HumanType\022\014\n\004guid"
"\030\n \001(\003\022\020\n\010on_chair\030\013 \001(\010\022\022\n\nchair_time\030\014" "\030\n \001(\003\022\020\n\010on_chair\030\013 \001(\010\022\022\n\nchair_time\030\014"
" \001(\001\022\021\n\ton_ground\030\r \001(\010\022\023\n\013ground_time\030\016" " \001(\001\022\021\n\ton_ground\030\r \001(\010\022\023\n\013ground_time\030\016"
" \001(\001\022\021\n\tplayer_id\030\017 \001(\003\022%\n\004buff\030\020 \003(\0162\027."
"protobuf.HumanBuffType\"\270\002\n\020MessageOfButc"
"her\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\022\r\n\005speed\030\003 \001(\005"
"\022\016\n\006damage\030\004 \001(\005\022\"\n\032time_until_skill_ava"
"ilable\030\005 \001(\001\022\"\n\005place\030\006 \001(\0162\023.protobuf.P"
"laceType\022 \n\004prop\030\007 \001(\0162\022.protobuf.PropTy"
"pe\022+\n\014butcher_type\030\010 \001(\0162\025.protobuf.Butc"
"herType\022\014\n\004guid\030\t \001(\003\022\017\n\007movable\030\n \001(\010\022\020"
"\n\010playerID\030\013 \001(\003\022\'\n\004buff\030\014 \003(\0162\031.protobu"
" \001(\001\022\021\n\tplayer_id\030\017 \001(\003\022\022\n\nview_range\030\020 "
"\001(\005\022%\n\004buff\030\021 \003(\0162\027.protobuf.HumanBuffTy"
"pe\"\314\002\n\020MessageOfButcher\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030"
"\002 \001(\005\022\r\n\005speed\030\003 \001(\005\022\016\n\006damage\030\004 \001(\005\022\"\n\032"
"time_until_skill_available\030\005 \001(\001\022\"\n\005plac"
"e\030\006 \001(\0162\023.protobuf.PlaceType\022 \n\004prop\030\007 \001"
"(\0162\022.protobuf.PropType\022+\n\014butcher_type\030\010"
" \001(\0162\025.protobuf.ButcherType\022\014\n\004guid\030\t \001("
"\003\022\017\n\007movable\030\n \001(\010\022\020\n\010playerID\030\013 \001(\003\022\022\n\n"
"view_range\030\014 \001(\005\022\'\n\004buff\030\r \003(\0162\031.protobu"
"f.ButcherBuffType\"\223\001\n\rMessageOfProp\022 \n\004t" "f.ButcherBuffType\"\223\001\n\rMessageOfProp\022 \n\004t"
"ype\030\001 \001(\0162\022.protobuf.PropType\022\t\n\001x\030\002 \001(\005" "ype\030\001 \001(\0162\022.protobuf.PropType\022\t\n\001x\030\002 \001(\005"
"\022\t\n\001y\030\003 \001(\005\022\030\n\020facing_direction\030\004 \001(\001\022\014\n" "\022\t\n\001y\030\003 \001(\005\022\030\n\020facing_direction\030\004 \001(\001\022\014\n"
@@ -437,7 +442,7 @@ const char descriptor_table_protodef_Message2Clients_2eproto[] PROTOBUF_SECTION_
"+\n\013map_massage\030\004 \001(\0132\026.protobuf.MessageO" "+\n\013map_massage\030\004 \001(\0132\026.protobuf.MessageO"
"fMap\"5\n\007MoveRes\022\024\n\014actual_speed\030\001 \001(\003\022\024\n" "fMap\"5\n\007MoveRes\022\024\n\014actual_speed\030\001 \001(\003\022\024\n"
"\014actual_angle\030\002 \001(\001\"\036\n\007BoolRes\022\023\n\013act_su" "\014actual_angle\030\002 \001(\001\"\036\n\007BoolRes\022\023\n\013act_su"
"ccess\030\001 \001(\0102\371\004\n\020AvailableService\022=\n\tAddP"
"ccess\030\001 \001(\0102\247\005\n\020AvailableService\022=\n\tAddP"
"layer\022\023.protobuf.PlayerMsg\032\031.protobuf.Me" "layer\022\023.protobuf.PlayerMsg\032\031.protobuf.Me"
"ssageToClient0\001\022,\n\004Move\022\021.protobuf.MoveM" "ssageToClient0\001\022,\n\004Move\022\021.protobuf.MoveM"
"sg\032\021.protobuf.MoveRes\0220\n\010PickProp\022\021.prot" "sg\032\021.protobuf.MoveRes\0220\n\010PickProp\022\021.prot"
@@ -453,7 +458,8 @@ const char descriptor_table_protodef_Message2Clients_2eproto[] PROTOBUF_SECTION_
"f.IDMsg\032\021.protobuf.BoolRes\0222\n\014ReleaseHum" "f.IDMsg\032\021.protobuf.BoolRes\0222\n\014ReleaseHum"
"an\022\017.protobuf.IDMsg\032\021.protobuf.BoolRes\022/" "an\022\017.protobuf.IDMsg\032\021.protobuf.BoolRes\022/"
"\n\tHangHuman\022\017.protobuf.IDMsg\032\021.protobuf." "\n\tHangHuman\022\017.protobuf.IDMsg\032\021.protobuf."
"BoolResb\006proto3";
"BoolRes\022,\n\006Escape\022\017.protobuf.IDMsg\032\021.pro"
"tobuf.BoolResb\006proto3";
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* const descriptor_table_Message2Clients_2eproto_deps[2] = { static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* const descriptor_table_Message2Clients_2eproto_deps[2] = {
&::descriptor_table_Message2Server_2eproto, &::descriptor_table_Message2Server_2eproto,
&::descriptor_table_MessageType_2eproto, &::descriptor_table_MessageType_2eproto,
@@ -462,7 +468,7 @@ static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_Message2Cli
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_Message2Clients_2eproto = { const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_Message2Clients_2eproto = {
false, false,
false, false,
2095,
2181,
descriptor_table_protodef_Message2Clients_2eproto, descriptor_table_protodef_Message2Clients_2eproto,
"Message2Clients.proto", "Message2Clients.proto",
&descriptor_table_Message2Clients_2eproto_once, &descriptor_table_Message2Clients_2eproto_once,
@@ -509,13 +515,13 @@ namespace protobuf
buff_(from.buff_) buff_(from.buff_)
{ {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&x_, &from.x_, static_cast<size_t>(reinterpret_cast<char*>(&on_ground_) - reinterpret_cast<char*>(&x_)) + sizeof(on_ground_));
::memcpy(&x_, &from.x_, static_cast<size_t>(reinterpret_cast<char*>(&player_id_) - reinterpret_cast<char*>(&x_)) + sizeof(player_id_));
// @@protoc_insertion_point(copy_constructor:protobuf.MessageOfHuman) // @@protoc_insertion_point(copy_constructor:protobuf.MessageOfHuman)
} }


inline void MessageOfHuman::SharedCtor() inline void MessageOfHuman::SharedCtor()
{ {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(reinterpret_cast<char*>(&x_) - reinterpret_cast<char*>(this)), 0, static_cast<size_t>(reinterpret_cast<char*>(&on_ground_) - reinterpret_cast<char*>(&x_)) + sizeof(on_ground_));
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(reinterpret_cast<char*>(&x_) - reinterpret_cast<char*>(this)), 0, static_cast<size_t>(reinterpret_cast<char*>(&player_id_) - reinterpret_cast<char*>(&x_)) + sizeof(player_id_));
} }


MessageOfHuman::~MessageOfHuman() MessageOfHuman::~MessageOfHuman()
@@ -553,7 +559,7 @@ namespace protobuf
(void)cached_has_bits; (void)cached_has_bits;


buff_.Clear(); buff_.Clear();
::memset(&x_, 0, static_cast<size_t>(reinterpret_cast<char*>(&on_ground_) - reinterpret_cast<char*>(&x_)) + sizeof(on_ground_));
::memset(&x_, 0, static_cast<size_t>(reinterpret_cast<char*>(&player_id_) - reinterpret_cast<char*>(&x_)) + sizeof(player_id_));
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
} }


@@ -721,14 +727,24 @@ namespace protobuf
else else
goto handle_unusual; goto handle_unusual;
continue; continue;
// repeated .protobuf.HumanBuffType buff = 16;
// int32 view_range = 16;
case 16: case 16:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 130))
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 128))
{
view_range_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
}
else
goto handle_unusual;
continue;
// repeated .protobuf.HumanBuffType buff = 17;
case 17:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 138))
{ {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_buff(), ptr, ctx); ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_buff(), ptr, ctx);
CHK_(ptr); CHK_(ptr);
} }
else if (static_cast<uint8_t>(tag) == 128)
else if (static_cast<uint8_t>(tag) == 136)
{ {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr); CHK_(ptr);
@@ -894,13 +910,20 @@ namespace protobuf
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(15, this->_internal_player_id(), target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(15, this->_internal_player_id(), target);
} }


// repeated .protobuf.HumanBuffType buff = 16;
// int32 view_range = 16;
if (this->_internal_view_range() != 0)
{
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(16, this->_internal_view_range(), target);
}

// repeated .protobuf.HumanBuffType buff = 17;
{ {
int byte_size = _buff_cached_byte_size_.load(std::memory_order_relaxed); int byte_size = _buff_cached_byte_size_.load(std::memory_order_relaxed);
if (byte_size > 0) if (byte_size > 0)
{ {
target = stream->WriteEnumPacked( target = stream->WriteEnumPacked(
16, buff_, byte_size, target
17, buff_, byte_size, target
); );
} }
} }
@@ -924,7 +947,7 @@ namespace protobuf
// Prevent compiler warnings about cached_has_bits being unused // Prevent compiler warnings about cached_has_bits being unused
(void)cached_has_bits; (void)cached_has_bits;


// repeated .protobuf.HumanBuffType buff = 16;
// repeated .protobuf.HumanBuffType buff = 17;
{ {
size_t data_size = 0; size_t data_size = 0;
unsigned int count = static_cast<unsigned int>(this->_internal_buff_size()); unsigned int count = static_cast<unsigned int>(this->_internal_buff_size());
@@ -1023,6 +1046,27 @@ namespace protobuf
total_size += 1 + 8; total_size += 1 + 8;
} }


// bool on_chair = 11;
if (this->_internal_on_chair() != 0)
{
total_size += 1 + 1;
}

// bool on_ground = 13;
if (this->_internal_on_ground() != 0)
{
total_size += 1 + 1;
}

// int32 view_range = 16;
if (this->_internal_view_range() != 0)
{
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
this->_internal_view_range()
);
}

// double ground_time = 14; // double ground_time = 14;
static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
double tmp_ground_time = this->_internal_ground_time(); double tmp_ground_time = this->_internal_ground_time();
@@ -1039,18 +1083,6 @@ namespace protobuf
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_player_id()); total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_player_id());
} }


// bool on_chair = 11;
if (this->_internal_on_chair() != 0)
{
total_size += 1 + 1;
}

// bool on_ground = 13;
if (this->_internal_on_ground() != 0)
{
total_size += 1 + 1;
}

return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
} }


@@ -1129,6 +1161,18 @@ namespace protobuf
{ {
_internal_set_chair_time(from._internal_chair_time()); _internal_set_chair_time(from._internal_chair_time());
} }
if (from._internal_on_chair() != 0)
{
_internal_set_on_chair(from._internal_on_chair());
}
if (from._internal_on_ground() != 0)
{
_internal_set_on_ground(from._internal_on_ground());
}
if (from._internal_view_range() != 0)
{
_internal_set_view_range(from._internal_view_range());
}
static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
double tmp_ground_time = from._internal_ground_time(); double tmp_ground_time = from._internal_ground_time();
uint64_t raw_ground_time; uint64_t raw_ground_time;
@@ -1141,14 +1185,6 @@ namespace protobuf
{ {
_internal_set_player_id(from._internal_player_id()); _internal_set_player_id(from._internal_player_id());
} }
if (from._internal_on_chair() != 0)
{
_internal_set_on_chair(from._internal_on_chair());
}
if (from._internal_on_ground() != 0)
{
_internal_set_on_ground(from._internal_on_ground());
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
} }


@@ -1172,7 +1208,7 @@ namespace protobuf
_internal_metadata_.InternalSwap(&other->_internal_metadata_); _internal_metadata_.InternalSwap(&other->_internal_metadata_);
buff_.InternalSwap(&other->buff_); buff_.InternalSwap(&other->buff_);
::PROTOBUF_NAMESPACE_ID::internal::memswap< ::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(MessageOfHuman, on_ground_) + sizeof(MessageOfHuman::on_ground_) - PROTOBUF_FIELD_OFFSET(MessageOfHuman, x_)>(
PROTOBUF_FIELD_OFFSET(MessageOfHuman, player_id_) + sizeof(MessageOfHuman::player_id_) - PROTOBUF_FIELD_OFFSET(MessageOfHuman, x_)>(
reinterpret_cast<char*>(&x_), reinterpret_cast<char*>(&x_),
reinterpret_cast<char*>(&other->x_) reinterpret_cast<char*>(&other->x_)
); );
@@ -1208,13 +1244,13 @@ namespace protobuf
buff_(from.buff_) buff_(from.buff_)
{ {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&x_, &from.x_, static_cast<size_t>(reinterpret_cast<char*>(&playerid_) - reinterpret_cast<char*>(&x_)) + sizeof(playerid_));
::memcpy(&x_, &from.x_, static_cast<size_t>(reinterpret_cast<char*>(&view_range_) - reinterpret_cast<char*>(&x_)) + sizeof(view_range_));
// @@protoc_insertion_point(copy_constructor:protobuf.MessageOfButcher) // @@protoc_insertion_point(copy_constructor:protobuf.MessageOfButcher)
} }


inline void MessageOfButcher::SharedCtor() inline void MessageOfButcher::SharedCtor()
{ {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(reinterpret_cast<char*>(&x_) - reinterpret_cast<char*>(this)), 0, static_cast<size_t>(reinterpret_cast<char*>(&playerid_) - reinterpret_cast<char*>(&x_)) + sizeof(playerid_));
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(reinterpret_cast<char*>(&x_) - reinterpret_cast<char*>(this)), 0, static_cast<size_t>(reinterpret_cast<char*>(&view_range_) - reinterpret_cast<char*>(&x_)) + sizeof(view_range_));
} }


MessageOfButcher::~MessageOfButcher() MessageOfButcher::~MessageOfButcher()
@@ -1252,7 +1288,7 @@ namespace protobuf
(void)cached_has_bits; (void)cached_has_bits;


buff_.Clear(); buff_.Clear();
::memset(&x_, 0, static_cast<size_t>(reinterpret_cast<char*>(&playerid_) - reinterpret_cast<char*>(&x_)) + sizeof(playerid_));
::memset(&x_, 0, static_cast<size_t>(reinterpret_cast<char*>(&view_range_) - reinterpret_cast<char*>(&x_)) + sizeof(view_range_));
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
} }


@@ -1380,14 +1416,24 @@ namespace protobuf
else else
goto handle_unusual; goto handle_unusual;
continue; continue;
// repeated .protobuf.ButcherBuffType buff = 12;
// int32 view_range = 12;
case 12: case 12:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98))
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 96))
{
view_range_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
}
else
goto handle_unusual;
continue;
// repeated .protobuf.ButcherBuffType buff = 13;
case 13:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106))
{ {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_buff(), ptr, ctx); ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_buff(), ptr, ctx);
CHK_(ptr); CHK_(ptr);
} }
else if (static_cast<uint8_t>(tag) == 96)
else if (static_cast<uint8_t>(tag) == 104)
{ {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr); CHK_(ptr);
@@ -1517,13 +1563,20 @@ namespace protobuf
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(11, this->_internal_playerid(), target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(11, this->_internal_playerid(), target);
} }


// repeated .protobuf.ButcherBuffType buff = 12;
// int32 view_range = 12;
if (this->_internal_view_range() != 0)
{
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(12, this->_internal_view_range(), target);
}

// repeated .protobuf.ButcherBuffType buff = 13;
{ {
int byte_size = _buff_cached_byte_size_.load(std::memory_order_relaxed); int byte_size = _buff_cached_byte_size_.load(std::memory_order_relaxed);
if (byte_size > 0) if (byte_size > 0)
{ {
target = stream->WriteEnumPacked( target = stream->WriteEnumPacked(
12, buff_, byte_size, target
13, buff_, byte_size, target
); );
} }
} }
@@ -1547,7 +1600,7 @@ namespace protobuf
// Prevent compiler warnings about cached_has_bits being unused // Prevent compiler warnings about cached_has_bits being unused
(void)cached_has_bits; (void)cached_has_bits;


// repeated .protobuf.ButcherBuffType buff = 12;
// repeated .protobuf.ButcherBuffType buff = 13;
{ {
size_t data_size = 0; size_t data_size = 0;
unsigned int count = static_cast<unsigned int>(this->_internal_buff_size()); unsigned int count = static_cast<unsigned int>(this->_internal_buff_size());
@@ -1642,6 +1695,12 @@ namespace protobuf
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_playerid()); total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_playerid());
} }


// int32 view_range = 12;
if (this->_internal_view_range() != 0)
{
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_view_range());
}

return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
} }


@@ -1716,6 +1775,10 @@ namespace protobuf
{ {
_internal_set_playerid(from._internal_playerid()); _internal_set_playerid(from._internal_playerid());
} }
if (from._internal_view_range() != 0)
{
_internal_set_view_range(from._internal_view_range());
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
} }


@@ -1739,7 +1802,7 @@ namespace protobuf
_internal_metadata_.InternalSwap(&other->_internal_metadata_); _internal_metadata_.InternalSwap(&other->_internal_metadata_);
buff_.InternalSwap(&other->buff_); buff_.InternalSwap(&other->buff_);
::PROTOBUF_NAMESPACE_ID::internal::memswap< ::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(MessageOfButcher, playerid_) + sizeof(MessageOfButcher::playerid_) - PROTOBUF_FIELD_OFFSET(MessageOfButcher, x_)>(
PROTOBUF_FIELD_OFFSET(MessageOfButcher, view_range_) + sizeof(MessageOfButcher::view_range_) - PROTOBUF_FIELD_OFFSET(MessageOfButcher, x_)>(
reinterpret_cast<char*>(&x_), reinterpret_cast<char*>(&x_),
reinterpret_cast<char*>(&other->x_) reinterpret_cast<char*>(&other->x_)
); );


+ 102
- 30
CAPI/proto/Message2Clients.pb.h View File

@@ -268,7 +268,7 @@ namespace protobuf


enum : int enum : int
{ {
kBuffFieldNumber = 16,
kBuffFieldNumber = 17,
kXFieldNumber = 1, kXFieldNumber = 1,
kYFieldNumber = 2, kYFieldNumber = 2,
kSpeedFieldNumber = 3, kSpeedFieldNumber = 3,
@@ -280,12 +280,13 @@ namespace protobuf
kHumanTypeFieldNumber = 9, kHumanTypeFieldNumber = 9,
kGuidFieldNumber = 10, kGuidFieldNumber = 10,
kChairTimeFieldNumber = 12, kChairTimeFieldNumber = 12,
kGroundTimeFieldNumber = 14,
kPlayerIdFieldNumber = 15,
kOnChairFieldNumber = 11, kOnChairFieldNumber = 11,
kOnGroundFieldNumber = 13, kOnGroundFieldNumber = 13,
kViewRangeFieldNumber = 16,
kGroundTimeFieldNumber = 14,
kPlayerIdFieldNumber = 15,
}; };
// repeated .protobuf.HumanBuffType buff = 16;
// repeated .protobuf.HumanBuffType buff = 17;
int buff_size() const; int buff_size() const;


private: private:
@@ -415,26 +416,6 @@ namespace protobuf
double _internal_chair_time() const; double _internal_chair_time() const;
void _internal_set_chair_time(double value); void _internal_set_chair_time(double value);


public:
// double ground_time = 14;
void clear_ground_time();
double ground_time() const;
void set_ground_time(double value);

private:
double _internal_ground_time() const;
void _internal_set_ground_time(double value);

public:
// int64 player_id = 15;
void clear_player_id();
int64_t player_id() const;
void set_player_id(int64_t value);

private:
int64_t _internal_player_id() const;
void _internal_set_player_id(int64_t value);

public: public:
// bool on_chair = 11; // bool on_chair = 11;
void clear_on_chair(); void clear_on_chair();
@@ -455,6 +436,36 @@ namespace protobuf
bool _internal_on_ground() const; bool _internal_on_ground() const;
void _internal_set_on_ground(bool value); void _internal_set_on_ground(bool value);


public:
// int32 view_range = 16;
void clear_view_range();
int32_t view_range() const;
void set_view_range(int32_t value);

private:
int32_t _internal_view_range() const;
void _internal_set_view_range(int32_t value);

public:
// double ground_time = 14;
void clear_ground_time();
double ground_time() const;
void set_ground_time(double value);

private:
double _internal_ground_time() const;
void _internal_set_ground_time(double value);

public:
// int64 player_id = 15;
void clear_player_id();
int64_t player_id() const;
void set_player_id(int64_t value);

private:
int64_t _internal_player_id() const;
void _internal_set_player_id(int64_t value);

public: public:
// @@protoc_insertion_point(class_scope:protobuf.MessageOfHuman) // @@protoc_insertion_point(class_scope:protobuf.MessageOfHuman)


@@ -478,10 +489,11 @@ namespace protobuf
int human_type_; int human_type_;
int64_t guid_; int64_t guid_;
double chair_time_; double chair_time_;
double ground_time_;
int64_t player_id_;
bool on_chair_; bool on_chair_;
bool on_ground_; bool on_ground_;
int32_t view_range_;
double ground_time_;
int64_t player_id_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_Message2Clients_2eproto; friend struct ::TableStruct_Message2Clients_2eproto;
}; };
@@ -646,7 +658,7 @@ namespace protobuf


enum : int enum : int
{ {
kBuffFieldNumber = 12,
kBuffFieldNumber = 13,
kXFieldNumber = 1, kXFieldNumber = 1,
kYFieldNumber = 2, kYFieldNumber = 2,
kSpeedFieldNumber = 3, kSpeedFieldNumber = 3,
@@ -658,8 +670,9 @@ namespace protobuf
kButcherTypeFieldNumber = 8, kButcherTypeFieldNumber = 8,
kMovableFieldNumber = 10, kMovableFieldNumber = 10,
kPlayerIDFieldNumber = 11, kPlayerIDFieldNumber = 11,
kViewRangeFieldNumber = 12,
}; };
// repeated .protobuf.ButcherBuffType buff = 12;
// repeated .protobuf.ButcherBuffType buff = 13;
int buff_size() const; int buff_size() const;


private: private:
@@ -789,6 +802,16 @@ namespace protobuf
int64_t _internal_playerid() const; int64_t _internal_playerid() const;
void _internal_set_playerid(int64_t value); void _internal_set_playerid(int64_t value);


public:
// int32 view_range = 12;
void clear_view_range();
int32_t view_range() const;
void set_view_range(int32_t value);

private:
int32_t _internal_view_range() const;
void _internal_set_view_range(int32_t value);

public: public:
// @@protoc_insertion_point(class_scope:protobuf.MessageOfButcher) // @@protoc_insertion_point(class_scope:protobuf.MessageOfButcher)


@@ -812,6 +835,7 @@ namespace protobuf
int butcher_type_; int butcher_type_;
bool movable_; bool movable_;
int64_t playerid_; int64_t playerid_;
int32_t view_range_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_Message2Clients_2eproto; friend struct ::TableStruct_Message2Clients_2eproto;
}; };
@@ -2718,7 +2742,31 @@ namespace protobuf
// @@protoc_insertion_point(field_set:protobuf.MessageOfHuman.player_id) // @@protoc_insertion_point(field_set:protobuf.MessageOfHuman.player_id)
} }


// repeated .protobuf.HumanBuffType buff = 16;
// int32 view_range = 16;
inline void MessageOfHuman::clear_view_range()
{
view_range_ = 0;
}
inline int32_t MessageOfHuman::_internal_view_range() const
{
return view_range_;
}
inline int32_t MessageOfHuman::view_range() const
{
// @@protoc_insertion_point(field_get:protobuf.MessageOfHuman.view_range)
return _internal_view_range();
}
inline void MessageOfHuman::_internal_set_view_range(int32_t value)
{
view_range_ = value;
}
inline void MessageOfHuman::set_view_range(int32_t value)
{
_internal_set_view_range(value);
// @@protoc_insertion_point(field_set:protobuf.MessageOfHuman.view_range)
}

// repeated .protobuf.HumanBuffType buff = 17;
inline int MessageOfHuman::_internal_buff_size() const inline int MessageOfHuman::_internal_buff_size() const
{ {
return buff_.size(); return buff_.size();
@@ -3040,7 +3088,31 @@ namespace protobuf
// @@protoc_insertion_point(field_set:protobuf.MessageOfButcher.playerID) // @@protoc_insertion_point(field_set:protobuf.MessageOfButcher.playerID)
} }


// repeated .protobuf.ButcherBuffType buff = 12;
// int32 view_range = 12;
inline void MessageOfButcher::clear_view_range()
{
view_range_ = 0;
}
inline int32_t MessageOfButcher::_internal_view_range() const
{
return view_range_;
}
inline int32_t MessageOfButcher::view_range() const
{
// @@protoc_insertion_point(field_get:protobuf.MessageOfButcher.view_range)
return _internal_view_range();
}
inline void MessageOfButcher::_internal_set_view_range(int32_t value)
{
view_range_ = value;
}
inline void MessageOfButcher::set_view_range(int32_t value)
{
_internal_set_view_range(value);
// @@protoc_insertion_point(field_set:protobuf.MessageOfButcher.view_range)
}

// repeated .protobuf.ButcherBuffType buff = 13;
inline int MessageOfButcher::_internal_buff_size() const inline int MessageOfButcher::_internal_buff_size() const
{ {
return buff_.size(); return buff_.size();


+ 0
- 0
CAPI/proto/Message2Server.grpc.pb.cc View File


+ 0
- 0
CAPI/proto/Message2Server.grpc.pb.h View File


+ 0
- 0
CAPI/proto/Message2Server.pb.cc View File


+ 0
- 0
CAPI/proto/Message2Server.pb.h View File


+ 0
- 0
CAPI/proto/MessageType.grpc.pb.cc View File


+ 0
- 0
CAPI/proto/MessageType.grpc.pb.h View File


+ 23
- 20
CAPI/proto/MessageType.pb.cc View File

@@ -26,30 +26,31 @@ static constexpr ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema* schemas = n
static constexpr ::PROTOBUF_NAMESPACE_ID::Message* const* file_default_instances = nullptr; static constexpr ::PROTOBUF_NAMESPACE_ID::Message* const* file_default_instances = nullptr;


const char descriptor_table_protodef_MessageType_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = const char descriptor_table_protodef_MessageType_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\021MessageType.proto\022\010protobuf*]\n\tPlaceTy"
"pe\022\023\n\017NULL_PLACE_TYPE\020\000\022\010\n\004WALL\020\001\022\t\n\005GRA"
"SS\020\002\022\013\n\007MACHINE\020\003\022\010\n\004GATE\020\004\022\017\n\013HIDDEN_GA"
"TE\020\005*8\n\tShapeType\022\023\n\017NULL_SHAPE_TYPE\020\000\022\n"
"\n\006CIRCLE\020\001\022\n\n\006SQUARE\020\002*N\n\010PropType\022\022\n\016NU"
"LL_PROP_TYPE\020\000\022\n\n\006PTYPE1\020\001\022\n\n\006PTYPE2\020\002\022\n"
"\n\006PTYPE3\020\003\022\n\n\006PTYPE4\020\004*d\n\rHumanBuffType\022"
"\023\n\017NULL_HBUFF_TYPE\020\000\022\016\n\nHBUFFTYPE1\020\001\022\016\n\n"
"HBUFFTYPE2\020\002\022\016\n\nHBUFFTYPE3\020\003\022\016\n\nHBUFFTYP"
"E4\020\004*f\n\017ButcherBuffType\022\023\n\017NULL_BBUFF_TY"
"PE\020\000\022\016\n\nBBUFFTYPE1\020\001\022\016\n\nBBUFFTYPE2\020\002\022\016\n\n"
"BBUFFTYPE3\020\003\022\016\n\nBBUFFTYPE4\020\004*2\n\nPlayerTy"
"pe\022\020\n\014HUMAN_PLAYER\020\000\022\022\n\016BUTCHER_PLAYER\020\001"
"*`\n\tHumanType\022\023\n\017NULL_HUMAN_TYPE\020\000\022\016\n\nHU"
"MANTYPE1\020\001\022\016\n\nHUMANTYPE2\020\002\022\016\n\nHUMANTYPE3"
"\020\003\022\016\n\nHUMANTYPE4\020\004*l\n\013ButcherType\022\025\n\021NUL"
"L_BUTCHER_TYPE\020\000\022\020\n\014BUTCHERTYPE1\020\001\022\020\n\014BU"
"TCHERTYPE2\020\002\022\020\n\014BUTCHERTYPE3\020\003\022\020\n\014BUTCHE"
"RTYPE4\020\004b\006proto3";
"\n\021MessageType.proto\022\010protobuf*g\n\tPlaceTy"
"pe\022\023\n\017NULL_PLACE_TYPE\020\000\022\010\n\004LAND\020\001\022\010\n\004WAL"
"L\020\002\022\t\n\005GRASS\020\003\022\013\n\007MACHINE\020\004\022\010\n\004GATE\020\005\022\017\n"
"\013HIDDEN_GATE\020\006*8\n\tShapeType\022\023\n\017NULL_SHAP"
"E_TYPE\020\000\022\n\n\006CIRCLE\020\001\022\n\n\006SQUARE\020\002*N\n\010Prop"
"Type\022\022\n\016NULL_PROP_TYPE\020\000\022\n\n\006PTYPE1\020\001\022\n\n\006"
"PTYPE2\020\002\022\n\n\006PTYPE3\020\003\022\n\n\006PTYPE4\020\004*d\n\rHuma"
"nBuffType\022\023\n\017NULL_HBUFF_TYPE\020\000\022\016\n\nHBUFFT"
"YPE1\020\001\022\016\n\nHBUFFTYPE2\020\002\022\016\n\nHBUFFTYPE3\020\003\022\016"
"\n\nHBUFFTYPE4\020\004*f\n\017ButcherBuffType\022\023\n\017NUL"
"L_BBUFF_TYPE\020\000\022\016\n\nBBUFFTYPE1\020\001\022\016\n\nBBUFFT"
"YPE2\020\002\022\016\n\nBBUFFTYPE3\020\003\022\016\n\nBBUFFTYPE4\020\004*H"
"\n\nPlayerType\022\024\n\020NULL_PLAYER_TYPE\020\000\022\020\n\014HU"
"MAN_PLAYER\020\001\022\022\n\016BUTCHER_PLAYER\020\002*`\n\tHuma"
"nType\022\023\n\017NULL_HUMAN_TYPE\020\000\022\016\n\nHUMANTYPE1"
"\020\001\022\016\n\nHUMANTYPE2\020\002\022\016\n\nHUMANTYPE3\020\003\022\016\n\nHU"
"MANTYPE4\020\004*l\n\013ButcherType\022\025\n\021NULL_BUTCHE"
"R_TYPE\020\000\022\020\n\014BUTCHERTYPE1\020\001\022\020\n\014BUTCHERTYP"
"E2\020\002\022\020\n\014BUTCHERTYPE3\020\003\022\020\n\014BUTCHERTYPE4\020\004"
"b\006proto3";
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_MessageType_2eproto_once; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_MessageType_2eproto_once;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_MessageType_2eproto = { const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_MessageType_2eproto = {
false, false,
false, false,
736,
768,
descriptor_table_protodef_MessageType_2eproto, descriptor_table_protodef_MessageType_2eproto,
"MessageType.proto", "MessageType.proto",
&descriptor_table_MessageType_2eproto_once, &descriptor_table_MessageType_2eproto_once,
@@ -87,6 +88,7 @@ namespace protobuf
case 3: case 3:
case 4: case 4:
case 5: case 5:
case 6:
return true; return true;
default: default:
return false; return false;
@@ -182,6 +184,7 @@ namespace protobuf
{ {
case 0: case 0:
case 1: case 1:
case 2:
return true; return true;
default: default:
return false; return false;


+ 10
- 8
CAPI/proto/MessageType.pb.h View File

@@ -59,11 +59,12 @@ namespace protobuf
enum PlaceType : int enum PlaceType : int
{ {
NULL_PLACE_TYPE = 0, NULL_PLACE_TYPE = 0,
WALL = 1,
GRASS = 2,
MACHINE = 3,
GATE = 4,
HIDDEN_GATE = 5,
LAND = 1,
WALL = 2,
GRASS = 3,
MACHINE = 4,
GATE = 5,
HIDDEN_GATE = 6,
PlaceType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(), PlaceType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
PlaceType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max() PlaceType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max()
}; };
@@ -217,13 +218,14 @@ namespace protobuf
} }
enum PlayerType : int enum PlayerType : int
{ {
HUMAN_PLAYER = 0,
BUTCHER_PLAYER = 1,
NULL_PLAYER_TYPE = 0,
HUMAN_PLAYER = 1,
BUTCHER_PLAYER = 2,
PlayerType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(), PlayerType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
PlayerType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max() PlayerType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max()
}; };
bool PlayerType_IsValid(int value); bool PlayerType_IsValid(int value);
constexpr PlayerType PlayerType_MIN = HUMAN_PLAYER;
constexpr PlayerType PlayerType_MIN = NULL_PLAYER_TYPE;
constexpr PlayerType PlayerType_MAX = BUTCHER_PLAYER; constexpr PlayerType PlayerType_MAX = BUTCHER_PLAYER;
constexpr int PlayerType_ARRAYSIZE = PlayerType_MAX + 1; constexpr int PlayerType_ARRAYSIZE = PlayerType_MAX + 1;




+ 283
- 0
dependency/proto/.clang-format View File

@@ -0,0 +1,283 @@
---
BasedOnStyle: Microsoft
Language: CSharp
AccessModifierOffset: -4
AlignAfterOpenBracket: BlockIndent
AlignArrayOfStructures: None
AlignConsecutiveMacros: None
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Right
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortEnumsOnASingleLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
AttributeMacros:
- __capability
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: true
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: true
BreakBeforeBraces: Custom
BreakInheritanceList: AfterColon
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: AfterColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: false
ColumnLimit: 0
CommentPragmas: '^ THU pragma:'
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: Always
ExperimentalAutoDetectBinPacking: false
PackConstructorInitializers: CurrentLine
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Merge
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 1
SortPriority: 0
CaseSensitive: false
IndentAccessModifiers: false
IndentCaseLabels: true
IndentCaseBlocks: true
IndentExternBlock: AfterExternBlock
IndentGotoLabels: true
IndentPPDirectives: None
IndentRequires: false
IndentWidth: 4
IndentWrappedFunctionNames: true
InsertTrailingCommas: None
LambdaBodyIndentation: Signature
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
PointerAlignment: Left
QualifierAlignment: Leave
ReferenceAlignment: Pointer
ReflowComments: true
SeparateDefinitionBlocks: Leave
SortIncludes: Never
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterForeachMacros: true
AfterFunctionDefinitionName: false
AfterFunctionDeclarationName: false
AfterIfMacros: true
AfterOverloadedOperator: false
BeforeNonEmptyParentheses: false
SpaceBeforeRangeBasedForLoopColon: true
SpacesInSquareBrackets: false
SpaceInEmptyBlock: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: Never
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInLineCommentPrefix:
Minimum: 1
SpacesInParentheses: false
SpaceBeforeSquareBrackets: false
Standard: Latest
TabWidth: 4
UseTab: Never
---
BasedOnStyle: Google
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: BlockIndent
AlignArrayOfStructures: None
AlignConsecutiveMacros: None
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Right
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortEnumsOnASingleLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
AttributeMacros:
- __capability
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: true
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: true
BreakBeforeBraces: Custom
BreakInheritanceList: AfterColon
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: AfterColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: false
ColumnLimit: 0
CommentPragmas: '^ THU pragma:'
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: Always
ExperimentalAutoDetectBinPacking: false
PackConstructorInitializers: CurrentLine
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Merge
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 1
SortPriority: 0
CaseSensitive: false
IndentAccessModifiers: false
IndentCaseLabels: true
IndentCaseBlocks: true
IndentExternBlock: AfterExternBlock
IndentGotoLabels: true
IndentPPDirectives: None
IndentRequires: false
IndentWidth: 4
IndentWrappedFunctionNames: true
InsertTrailingCommas: None
LambdaBodyIndentation: Signature
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
PointerAlignment: Left
QualifierAlignment: Leave
ReferenceAlignment: Pointer
ReflowComments: true
SeparateDefinitionBlocks: Leave
SortIncludes: Never
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterForeachMacros: true
AfterFunctionDefinitionName: false
AfterFunctionDeclarationName: false
AfterIfMacros: true
AfterOverloadedOperator: false
BeforeNonEmptyParentheses: false
SpaceBeforeRangeBasedForLoopColon: true
SpacesInSquareBrackets: false
SpaceInEmptyBlock: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: Never
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInLineCommentPrefix:
Minimum: 1
SpacesInParentheses: false
SpaceBeforeSquareBrackets: false
Standard: c++17
TabWidth: 4
UseTab: Never


+ 5
- 3
dependency/proto/Message2Clients.proto View File

@@ -22,7 +22,8 @@ message MessageOfHuman
bool on_ground = 13; // 是否倒地 bool on_ground = 13; // 是否倒地
double ground_time = 14; // 倒地时间 double ground_time = 14; // 倒地时间
int64 player_id = 15; int64 player_id = 15;
repeated HumanBuffType buff = 16;
int32 view_range = 16; // 视野距离
repeated HumanBuffType buff = 17;
} }


message MessageOfButcher message MessageOfButcher
@@ -38,8 +39,8 @@ message MessageOfButcher
int64 guid = 9; int64 guid = 9;
bool movable = 10; // 是否进入了攻击后摇 bool movable = 10; // 是否进入了攻击后摇
int64 playerID = 11; int64 playerID = 11;
repeated ButcherBuffType buff = 12;
int32 view_range = 12; // 视野距离
repeated ButcherBuffType buff = 13;
} }


message MessageOfProp // 可拾取道具的信息 message MessageOfProp // 可拾取道具的信息
@@ -106,5 +107,6 @@ service AvailableService
rpc CarryHuman (IDMsg) returns (BoolRes); rpc CarryHuman (IDMsg) returns (BoolRes);
rpc ReleaseHuman (IDMsg) returns (BoolRes); rpc ReleaseHuman (IDMsg) returns (BoolRes);
rpc HangHuman (IDMsg) returns (BoolRes); rpc HangHuman (IDMsg) returns (BoolRes);
rpc Escape (IDMsg) returns (BoolRes);


} }

+ 0
- 0
dependency/proto/Message2Server.proto View File


+ 9
- 7
dependency/proto/MessageType.proto View File

@@ -7,11 +7,12 @@ enum PlaceType // 地图中的所有物件类型
NULL_PLACE_TYPE = 0; NULL_PLACE_TYPE = 0;
// 地图情况,其中Gate是总体的大门,HiddenGate是地窖 // 地图情况,其中Gate是总体的大门,HiddenGate是地窖
WALL = 1;
GRASS = 2;
MACHINE = 3;
GATE = 4;
HIDDEN_GATE = 5;
LAND = 1;
WALL = 2;
GRASS = 3;
MACHINE = 4;
GATE = 5;
HIDDEN_GATE = 6;
// 待补充有特殊效果的地形 // 待补充有特殊效果的地形


} }
@@ -55,8 +56,9 @@ enum ButcherBuffType // 屠夫可用的增益效果类型


enum PlayerType enum PlayerType
{ {
HUMAN_PLAYER = 0;
BUTCHER_PLAYER = 1;
NULL_PLAYER_TYPE = 0;
HUMAN_PLAYER = 1;
BUTCHER_PLAYER = 2;
} }


enum HumanType enum HumanType


+ 0
- 0
dependency/proto/README.md View File


+ 2
- 0
dependency/proto/cpp_output.sh View File

@@ -4,5 +4,7 @@ protoc MessageType.proto --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_cpp_p
protoc MessageType.proto --cpp_out=. protoc MessageType.proto --cpp_out=.
protoc Message2Server.proto --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` protoc Message2Server.proto --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_cpp_plugin`
protoc Message2Server.proto --cpp_out=. protoc Message2Server.proto --cpp_out=.
chmod -R 755 ./
./format.sh
mv -f ./*.h ../../CAPI/proto mv -f ./*.h ../../CAPI/proto
mv -f ./*.cc ../../CAPI/proto mv -f ./*.cc ../../CAPI/proto

+ 75
- 0
dependency/proto/format.sh View File

@@ -0,0 +1,75 @@
clang-format --version
if [ $? -eq 0 ]
then
for i in {1..10}
do
find . -iname "*.cs" \
-or -iname "*.c" \
-or -iname "*.h" \
-or -iname "*.C" \
-or -iname "*.H" \
-or -iname "*.cpp" \
-or -iname "*.hpp" \
-or -iname "*.cc" \
-or -iname "*.hh" \
-or -iname "*.c++" \
-or -iname "*.h++" \
-or -iname "*.cxx" \
-or -iname "*.hxx" \
-or -iname "*.i" \
-or -iname "*.ixx" \
-or -iname "*.ipp" \
-or -iname "*.i++" \
| xargs clang-format -i
done
fi
clang-format-15 --version
if [ $? -eq 0 ]
then
for i in {1..10}
do
find . -iname "*.cs" \
-or -iname "*.c" \
-or -iname "*.h" \
-or -iname "*.C" \
-or -iname "*.H" \
-or -iname "*.cpp" \
-or -iname "*.hpp" \
-or -iname "*.cc" \
-or -iname "*.hh" \
-or -iname "*.c++" \
-or -iname "*.h++" \
-or -iname "*.cxx" \
-or -iname "*.hxx" \
-or -iname "*.i" \
-or -iname "*.ixx" \
-or -iname "*.ipp" \
-or -iname "*.i++" \
| xargs clang-format-15 -i
done
fi
clang-format-14 --version
if [ $? -eq 0 ]
then
for i in {1..10}
do
find . -iname "*.cs" \
-or -iname "*.c" \
-or -iname "*.h" \
-or -iname "*.C" \
-or -iname "*.H" \
-or -iname "*.cpp" \
-or -iname "*.hpp" \
-or -iname "*.cc" \
-or -iname "*.hh" \
-or -iname "*.c++" \
-or -iname "*.h++" \
-or -iname "*.cxx" \
-or -iname "*.hxx" \
-or -iname "*.i" \
-or -iname "*.ixx" \
-or -iname "*.ipp" \
-or -iname "*.i++" \
| xargs clang-format-14 -i
done
fi

Loading…
Cancel
Save