1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- #pragma once
- #include "classsourcegeneratorbase.h"
- namespace QtProtobuf {
- namespace generator {
- class ProtobufSourceGenerator : public ClassSourceGeneratorBase
- {
- const google::protobuf::Descriptor *mMessage;
- public:
- ProtobufSourceGenerator(const google::protobuf::Descriptor *message, const std::shared_ptr<google::protobuf::io::ZeroCopyOutputStream> &out);
- ProtobufSourceGenerator(const google::protobuf::Descriptor *message, const std::shared_ptr<::google::protobuf::io::Printer> &printer);
- void printRegisterBody();
- void printFieldsOrdering();
- void printConstructor();
- void run() override {
- printDisclaimer();
- printClassHeaderInclude();
- printNamespaces();
- printFieldsOrdering();
- printRegisterBody();
- printConstructor();
- encloseNamespaces();
- }
- };
- }
- }
|