working commit
This commit is contained in:
@@ -90,7 +90,7 @@ PRE_UNINSTALL = :
|
|||||||
POST_UNINSTALL = :
|
POST_UNINSTALL = :
|
||||||
sbin_PROGRAMS = helmetd$(EXEEXT)
|
sbin_PROGRAMS = helmetd$(EXEEXT)
|
||||||
noinst_PROGRAMS = udpclient_test$(EXEEXT) service_test$(EXEEXT) \
|
noinst_PROGRAMS = udpclient_test$(EXEEXT) service_test$(EXEEXT) \
|
||||||
tunclient_test$(EXEEXT)
|
tunclient_test$(EXEEXT) message_test$(EXEEXT)
|
||||||
subdir = .
|
subdir = .
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||||
@@ -111,6 +111,9 @@ am_helmetd_OBJECTS = helmetd.$(OBJEXT) tunclient.$(OBJEXT) \
|
|||||||
udpclient.$(OBJEXT) resolver.$(OBJEXT) iprouter.$(OBJEXT)
|
udpclient.$(OBJEXT) resolver.$(OBJEXT) iprouter.$(OBJEXT)
|
||||||
helmetd_OBJECTS = $(am_helmetd_OBJECTS)
|
helmetd_OBJECTS = $(am_helmetd_OBJECTS)
|
||||||
helmetd_LDADD = $(LDADD)
|
helmetd_LDADD = $(LDADD)
|
||||||
|
am_message_test_OBJECTS = message_test.$(OBJEXT) hello.pb.$(OBJEXT)
|
||||||
|
message_test_OBJECTS = $(am_message_test_OBJECTS)
|
||||||
|
message_test_LDADD = $(LDADD)
|
||||||
am_service_test_OBJECTS = service_test.$(OBJEXT) tunclient.$(OBJEXT) \
|
am_service_test_OBJECTS = service_test.$(OBJEXT) tunclient.$(OBJEXT) \
|
||||||
service.$(OBJEXT) interface.$(OBJEXT)
|
service.$(OBJEXT) interface.$(OBJEXT)
|
||||||
service_test_OBJECTS = $(am_service_test_OBJECTS)
|
service_test_OBJECTS = $(am_service_test_OBJECTS)
|
||||||
@@ -163,10 +166,12 @@ AM_V_CCLD = $(am__v_CCLD_$(V))
|
|||||||
am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
|
am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
|
||||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||||
am__v_CCLD_1 =
|
am__v_CCLD_1 =
|
||||||
SOURCES = $(helmetd_SOURCES) $(service_test_SOURCES) \
|
SOURCES = $(helmetd_SOURCES) $(message_test_SOURCES) \
|
||||||
$(tunclient_test_SOURCES) $(udpclient_test_SOURCES)
|
$(service_test_SOURCES) $(tunclient_test_SOURCES) \
|
||||||
DIST_SOURCES = $(helmetd_SOURCES) $(service_test_SOURCES) \
|
$(udpclient_test_SOURCES)
|
||||||
$(tunclient_test_SOURCES) $(udpclient_test_SOURCES)
|
DIST_SOURCES = $(helmetd_SOURCES) $(message_test_SOURCES) \
|
||||||
|
$(service_test_SOURCES) $(tunclient_test_SOURCES) \
|
||||||
|
$(udpclient_test_SOURCES)
|
||||||
am__can_run_installinfo = \
|
am__can_run_installinfo = \
|
||||||
case $$AM_UPDATE_INFO_DIR in \
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
n|no|NO) false;; \
|
n|no|NO) false;; \
|
||||||
@@ -336,6 +341,9 @@ udpclient_test_SOURCES = \
|
|||||||
udpclient.cpp udpclient.hpp \
|
udpclient.cpp udpclient.hpp \
|
||||||
udpclient_test.cpp
|
udpclient_test.cpp
|
||||||
|
|
||||||
|
message_test_SOURCES = message_test.cpp \
|
||||||
|
hello.pb.cc hello.pb.h
|
||||||
|
|
||||||
ASTYLE_OPTS = --indent=spaces=8 --style=java
|
ASTYLE_OPTS = --indent=spaces=8 --style=java
|
||||||
all: defines.h
|
all: defines.h
|
||||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
$(MAKE) $(AM_MAKEFLAGS) all-am
|
||||||
@@ -440,6 +448,10 @@ helmetd$(EXEEXT): $(helmetd_OBJECTS) $(helmetd_DEPENDENCIES) $(EXTRA_helmetd_DEP
|
|||||||
@rm -f helmetd$(EXEEXT)
|
@rm -f helmetd$(EXEEXT)
|
||||||
$(AM_V_CXXLD)$(CXXLINK) $(helmetd_OBJECTS) $(helmetd_LDADD) $(LIBS)
|
$(AM_V_CXXLD)$(CXXLINK) $(helmetd_OBJECTS) $(helmetd_LDADD) $(LIBS)
|
||||||
|
|
||||||
|
message_test$(EXEEXT): $(message_test_OBJECTS) $(message_test_DEPENDENCIES) $(EXTRA_message_test_DEPENDENCIES)
|
||||||
|
@rm -f message_test$(EXEEXT)
|
||||||
|
$(AM_V_CXXLD)$(CXXLINK) $(message_test_OBJECTS) $(message_test_LDADD) $(LIBS)
|
||||||
|
|
||||||
service_test$(EXEEXT): $(service_test_OBJECTS) $(service_test_DEPENDENCIES) $(EXTRA_service_test_DEPENDENCIES)
|
service_test$(EXEEXT): $(service_test_OBJECTS) $(service_test_DEPENDENCIES) $(EXTRA_service_test_DEPENDENCIES)
|
||||||
@rm -f service_test$(EXEEXT)
|
@rm -f service_test$(EXEEXT)
|
||||||
$(AM_V_CXXLD)$(CXXLINK) $(service_test_OBJECTS) $(service_test_LDADD) $(LIBS)
|
$(AM_V_CXXLD)$(CXXLINK) $(service_test_OBJECTS) $(service_test_LDADD) $(LIBS)
|
||||||
@@ -830,12 +842,15 @@ uninstall-am: uninstall-sbinPROGRAMS
|
|||||||
.PRECIOUS: Makefile
|
.PRECIOUS: Makefile
|
||||||
|
|
||||||
|
|
||||||
test: tunclient_test
|
test: message_test
|
||||||
./tunclient_test
|
./message_test
|
||||||
|
|
||||||
run: helmetd
|
run: helmetd
|
||||||
./helmetd
|
./helmetd
|
||||||
|
|
||||||
|
proto:
|
||||||
|
$(PROTOC) --cpp_out=. hello.proto
|
||||||
|
|
||||||
hello.pb.cc hello.pb.h: hello.proto
|
hello.pb.cc hello.pb.h: hello.proto
|
||||||
$(PROTOC) --cpp_out=. hello.proto
|
$(PROTOC) --cpp_out=. hello.proto
|
||||||
format:
|
format:
|
||||||
|
|||||||
+12
-3
@@ -19,7 +19,8 @@ helmetd_SOURCES = helmetd.cpp \
|
|||||||
noinst_PROGRAMS = \
|
noinst_PROGRAMS = \
|
||||||
udpclient_test \
|
udpclient_test \
|
||||||
service_test \
|
service_test \
|
||||||
tunclient_test
|
tunclient_test \
|
||||||
|
message_test
|
||||||
|
|
||||||
tunclient_test_SOURCES = tunclient_test.cpp \
|
tunclient_test_SOURCES = tunclient_test.cpp \
|
||||||
tunclient.cpp tunclient.hpp \
|
tunclient.cpp tunclient.hpp \
|
||||||
@@ -37,12 +38,20 @@ udpclient_test_SOURCES = \
|
|||||||
udpclient.cpp udpclient.hpp \
|
udpclient.cpp udpclient.hpp \
|
||||||
udpclient_test.cpp
|
udpclient_test.cpp
|
||||||
|
|
||||||
test: tunclient_test
|
message_test_SOURCES = message_test.cpp \
|
||||||
./tunclient_test
|
hello.pb.cc hello.pb.h
|
||||||
|
|
||||||
|
|
||||||
|
test: message_test
|
||||||
|
./message_test
|
||||||
|
|
||||||
run: helmetd
|
run: helmetd
|
||||||
./helmetd
|
./helmetd
|
||||||
|
|
||||||
|
proto:
|
||||||
|
$(PROTOC) --cpp_out=. hello.proto
|
||||||
|
|
||||||
|
|
||||||
hello.pb.cc hello.pb.h: hello.proto
|
hello.pb.cc hello.pb.h: hello.proto
|
||||||
$(PROTOC) --cpp_out=. hello.proto
|
$(PROTOC) --cpp_out=. hello.proto
|
||||||
|
|
||||||
|
|||||||
+22
-7
@@ -90,7 +90,7 @@ PRE_UNINSTALL = :
|
|||||||
POST_UNINSTALL = :
|
POST_UNINSTALL = :
|
||||||
sbin_PROGRAMS = helmetd$(EXEEXT)
|
sbin_PROGRAMS = helmetd$(EXEEXT)
|
||||||
noinst_PROGRAMS = udpclient_test$(EXEEXT) service_test$(EXEEXT) \
|
noinst_PROGRAMS = udpclient_test$(EXEEXT) service_test$(EXEEXT) \
|
||||||
tunclient_test$(EXEEXT)
|
tunclient_test$(EXEEXT) message_test$(EXEEXT)
|
||||||
subdir = .
|
subdir = .
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||||
@@ -111,6 +111,9 @@ am_helmetd_OBJECTS = helmetd.$(OBJEXT) tunclient.$(OBJEXT) \
|
|||||||
udpclient.$(OBJEXT) resolver.$(OBJEXT) iprouter.$(OBJEXT)
|
udpclient.$(OBJEXT) resolver.$(OBJEXT) iprouter.$(OBJEXT)
|
||||||
helmetd_OBJECTS = $(am_helmetd_OBJECTS)
|
helmetd_OBJECTS = $(am_helmetd_OBJECTS)
|
||||||
helmetd_LDADD = $(LDADD)
|
helmetd_LDADD = $(LDADD)
|
||||||
|
am_message_test_OBJECTS = message_test.$(OBJEXT) hello.pb.$(OBJEXT)
|
||||||
|
message_test_OBJECTS = $(am_message_test_OBJECTS)
|
||||||
|
message_test_LDADD = $(LDADD)
|
||||||
am_service_test_OBJECTS = service_test.$(OBJEXT) tunclient.$(OBJEXT) \
|
am_service_test_OBJECTS = service_test.$(OBJEXT) tunclient.$(OBJEXT) \
|
||||||
service.$(OBJEXT) interface.$(OBJEXT)
|
service.$(OBJEXT) interface.$(OBJEXT)
|
||||||
service_test_OBJECTS = $(am_service_test_OBJECTS)
|
service_test_OBJECTS = $(am_service_test_OBJECTS)
|
||||||
@@ -163,10 +166,12 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
|||||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||||
am__v_CCLD_1 =
|
am__v_CCLD_1 =
|
||||||
SOURCES = $(helmetd_SOURCES) $(service_test_SOURCES) \
|
SOURCES = $(helmetd_SOURCES) $(message_test_SOURCES) \
|
||||||
$(tunclient_test_SOURCES) $(udpclient_test_SOURCES)
|
$(service_test_SOURCES) $(tunclient_test_SOURCES) \
|
||||||
DIST_SOURCES = $(helmetd_SOURCES) $(service_test_SOURCES) \
|
$(udpclient_test_SOURCES)
|
||||||
$(tunclient_test_SOURCES) $(udpclient_test_SOURCES)
|
DIST_SOURCES = $(helmetd_SOURCES) $(message_test_SOURCES) \
|
||||||
|
$(service_test_SOURCES) $(tunclient_test_SOURCES) \
|
||||||
|
$(udpclient_test_SOURCES)
|
||||||
am__can_run_installinfo = \
|
am__can_run_installinfo = \
|
||||||
case $$AM_UPDATE_INFO_DIR in \
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
n|no|NO) false;; \
|
n|no|NO) false;; \
|
||||||
@@ -336,6 +341,9 @@ udpclient_test_SOURCES = \
|
|||||||
udpclient.cpp udpclient.hpp \
|
udpclient.cpp udpclient.hpp \
|
||||||
udpclient_test.cpp
|
udpclient_test.cpp
|
||||||
|
|
||||||
|
message_test_SOURCES = message_test.cpp \
|
||||||
|
hello.pb.cc hello.pb.h
|
||||||
|
|
||||||
ASTYLE_OPTS = --indent=spaces=8 --style=java
|
ASTYLE_OPTS = --indent=spaces=8 --style=java
|
||||||
all: defines.h
|
all: defines.h
|
||||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
$(MAKE) $(AM_MAKEFLAGS) all-am
|
||||||
@@ -440,6 +448,10 @@ helmetd$(EXEEXT): $(helmetd_OBJECTS) $(helmetd_DEPENDENCIES) $(EXTRA_helmetd_DEP
|
|||||||
@rm -f helmetd$(EXEEXT)
|
@rm -f helmetd$(EXEEXT)
|
||||||
$(AM_V_CXXLD)$(CXXLINK) $(helmetd_OBJECTS) $(helmetd_LDADD) $(LIBS)
|
$(AM_V_CXXLD)$(CXXLINK) $(helmetd_OBJECTS) $(helmetd_LDADD) $(LIBS)
|
||||||
|
|
||||||
|
message_test$(EXEEXT): $(message_test_OBJECTS) $(message_test_DEPENDENCIES) $(EXTRA_message_test_DEPENDENCIES)
|
||||||
|
@rm -f message_test$(EXEEXT)
|
||||||
|
$(AM_V_CXXLD)$(CXXLINK) $(message_test_OBJECTS) $(message_test_LDADD) $(LIBS)
|
||||||
|
|
||||||
service_test$(EXEEXT): $(service_test_OBJECTS) $(service_test_DEPENDENCIES) $(EXTRA_service_test_DEPENDENCIES)
|
service_test$(EXEEXT): $(service_test_OBJECTS) $(service_test_DEPENDENCIES) $(EXTRA_service_test_DEPENDENCIES)
|
||||||
@rm -f service_test$(EXEEXT)
|
@rm -f service_test$(EXEEXT)
|
||||||
$(AM_V_CXXLD)$(CXXLINK) $(service_test_OBJECTS) $(service_test_LDADD) $(LIBS)
|
$(AM_V_CXXLD)$(CXXLINK) $(service_test_OBJECTS) $(service_test_LDADD) $(LIBS)
|
||||||
@@ -830,12 +842,15 @@ uninstall-am: uninstall-sbinPROGRAMS
|
|||||||
.PRECIOUS: Makefile
|
.PRECIOUS: Makefile
|
||||||
|
|
||||||
|
|
||||||
test: tunclient_test
|
test: message_test
|
||||||
./tunclient_test
|
./message_test
|
||||||
|
|
||||||
run: helmetd
|
run: helmetd
|
||||||
./helmetd
|
./helmetd
|
||||||
|
|
||||||
|
proto:
|
||||||
|
$(PROTOC) --cpp_out=. hello.proto
|
||||||
|
|
||||||
hello.pb.cc hello.pb.h: hello.proto
|
hello.pb.cc hello.pb.h: hello.proto
|
||||||
$(PROTOC) --cpp_out=. hello.proto
|
$(PROTOC) --cpp_out=. hello.proto
|
||||||
format:
|
format:
|
||||||
|
|||||||
+655
-177
@@ -18,18 +18,45 @@ namespace _pb = ::PROTOBUF_NAMESPACE_ID;
|
|||||||
namespace _pbi = _pb::internal;
|
namespace _pbi = _pb::internal;
|
||||||
|
|
||||||
namespace control {
|
namespace control {
|
||||||
|
PROTOBUF_CONSTEXPR Header::Header(
|
||||||
|
::_pbi::ConstantInitialized): _impl_{
|
||||||
|
/*decltype(_impl_.meta_)*/nullptr
|
||||||
|
, /*decltype(_impl_._cached_size_)*/{}} {}
|
||||||
|
struct HeaderDefaultTypeInternal {
|
||||||
|
PROTOBUF_CONSTEXPR HeaderDefaultTypeInternal()
|
||||||
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
||||||
|
~HeaderDefaultTypeInternal() {}
|
||||||
|
union {
|
||||||
|
Header _instance;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HeaderDefaultTypeInternal _Header_default_instance_;
|
||||||
|
PROTOBUF_CONSTEXPR Meta::Meta(
|
||||||
|
::_pbi::ConstantInitialized): _impl_{
|
||||||
|
/*decltype(_impl_.rpcname_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||||
|
, /*decltype(_impl_._cached_size_)*/{}} {}
|
||||||
|
struct MetaDefaultTypeInternal {
|
||||||
|
PROTOBUF_CONSTEXPR MetaDefaultTypeInternal()
|
||||||
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
||||||
|
~MetaDefaultTypeInternal() {}
|
||||||
|
union {
|
||||||
|
Meta _instance;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MetaDefaultTypeInternal _Meta_default_instance_;
|
||||||
PROTOBUF_CONSTEXPR Hello::Hello(
|
PROTOBUF_CONSTEXPR Hello::Hello(
|
||||||
::_pbi::ConstantInitialized): _impl_{
|
::_pbi::ConstantInitialized): _impl_{
|
||||||
/*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
/*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||||
, /*decltype(_impl_.id_)*/0
|
, /*decltype(_impl_.meta_)*/nullptr
|
||||||
, /*decltype(_impl_._cached_size_)*/{}} {}
|
, /*decltype(_impl_.id_)*/0
|
||||||
|
, /*decltype(_impl_._cached_size_)*/{}} {}
|
||||||
struct HelloDefaultTypeInternal {
|
struct HelloDefaultTypeInternal {
|
||||||
PROTOBUF_CONSTEXPR HelloDefaultTypeInternal()
|
PROTOBUF_CONSTEXPR HelloDefaultTypeInternal()
|
||||||
: _instance(::_pbi::ConstantInitialized{}) {}
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
||||||
~HelloDefaultTypeInternal() {}
|
~HelloDefaultTypeInternal() {}
|
||||||
union {
|
union {
|
||||||
Hello _instance;
|
Hello _instance;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HelloDefaultTypeInternal _Hello_default_instance_;
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HelloDefaultTypeInternal _Hello_default_instance_;
|
||||||
} // namespace control
|
} // namespace control
|
||||||
@@ -37,245 +64,696 @@ namespace control {
|
|||||||
|
|
||||||
// ===================================================================
|
// ===================================================================
|
||||||
|
|
||||||
class Hello::_Internal {
|
class Header::_Internal {
|
||||||
public:
|
public:
|
||||||
|
static const ::control::Meta& meta(const Header* msg);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const ::control::Meta&
|
||||||
|
Header::_Internal::meta(const Header* msg) {
|
||||||
|
return *msg->_impl_.meta_;
|
||||||
|
}
|
||||||
|
Header::Header(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
||||||
|
bool is_message_owned)
|
||||||
|
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
|
||||||
|
SharedCtor(arena, is_message_owned);
|
||||||
|
// @@protoc_insertion_point(arena_constructor:control.Header)
|
||||||
|
}
|
||||||
|
Header::Header(const Header& from)
|
||||||
|
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
|
||||||
|
Header* const _this = this; (void)_this;
|
||||||
|
new (&_impl_) Impl_{
|
||||||
|
decltype(_impl_.meta_){nullptr}
|
||||||
|
, /*decltype(_impl_._cached_size_)*/{}};
|
||||||
|
|
||||||
|
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
|
||||||
|
if (from._internal_has_meta()) {
|
||||||
|
_this->_impl_.meta_ = new ::control::Meta(*from._impl_.meta_);
|
||||||
|
}
|
||||||
|
// @@protoc_insertion_point(copy_constructor:control.Header)
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void Header::SharedCtor(
|
||||||
|
::_pb::Arena* arena, bool is_message_owned) {
|
||||||
|
(void)arena;
|
||||||
|
(void)is_message_owned;
|
||||||
|
new (&_impl_) Impl_{
|
||||||
|
decltype(_impl_.meta_){nullptr}
|
||||||
|
, /*decltype(_impl_._cached_size_)*/{}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
Header::~Header() {
|
||||||
|
// @@protoc_insertion_point(destructor:control.Header)
|
||||||
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
|
||||||
|
(void)arena;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
SharedDtor();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void Header::SharedDtor() {
|
||||||
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
||||||
|
if (this != internal_default_instance()) delete _impl_.meta_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Header::SetCachedSize(int size) const {
|
||||||
|
_impl_._cached_size_.Set(size);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Header::Clear() {
|
||||||
|
// @@protoc_insertion_point(message_clear_start:control.Header)
|
||||||
|
uint32_t cached_has_bits = 0;
|
||||||
|
// Prevent compiler warnings about cached_has_bits being unused
|
||||||
|
(void) cached_has_bits;
|
||||||
|
|
||||||
|
if (GetArenaForAllocation() == nullptr && _impl_.meta_ != nullptr) {
|
||||||
|
delete _impl_.meta_;
|
||||||
|
}
|
||||||
|
_impl_.meta_ = nullptr;
|
||||||
|
_internal_metadata_.Clear<std::string>();
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* Header::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
|
||||||
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
||||||
|
while (!ctx->Done(&ptr)) {
|
||||||
|
uint32_t tag;
|
||||||
|
ptr = ::_pbi::ReadTag(ptr, &tag);
|
||||||
|
switch (tag >> 3) {
|
||||||
|
// .control.Meta meta = 1;
|
||||||
|
case 1:
|
||||||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
||||||
|
ptr = ctx->ParseMessage(_internal_mutable_meta(), ptr);
|
||||||
|
CHK_(ptr);
|
||||||
|
} else
|
||||||
|
goto handle_unusual;
|
||||||
|
continue;
|
||||||
|
default:
|
||||||
|
goto handle_unusual;
|
||||||
|
} // switch
|
||||||
|
handle_unusual:
|
||||||
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
||||||
|
CHK_(ptr);
|
||||||
|
ctx->SetLastTag(tag);
|
||||||
|
goto message_done;
|
||||||
|
}
|
||||||
|
ptr = UnknownFieldParse(
|
||||||
|
tag,
|
||||||
|
_internal_metadata_.mutable_unknown_fields<std::string>(),
|
||||||
|
ptr, ctx);
|
||||||
|
CHK_(ptr != nullptr);
|
||||||
|
} // while
|
||||||
|
message_done:
|
||||||
|
return ptr;
|
||||||
|
failure:
|
||||||
|
ptr = nullptr;
|
||||||
|
goto message_done;
|
||||||
|
#undef CHK_
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t* Header::_InternalSerialize(
|
||||||
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
||||||
|
// @@protoc_insertion_point(serialize_to_array_start:control.Header)
|
||||||
|
uint32_t cached_has_bits = 0;
|
||||||
|
(void) cached_has_bits;
|
||||||
|
|
||||||
|
// .control.Meta meta = 1;
|
||||||
|
if (this->_internal_has_meta()) {
|
||||||
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
||||||
|
InternalWriteMessage(1, _Internal::meta(this),
|
||||||
|
_Internal::meta(this).GetCachedSize(), target, stream);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
||||||
|
target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
|
||||||
|
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
|
||||||
|
}
|
||||||
|
// @@protoc_insertion_point(serialize_to_array_end:control.Header)
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t Header::ByteSizeLong() const {
|
||||||
|
// @@protoc_insertion_point(message_byte_size_start:control.Header)
|
||||||
|
size_t total_size = 0;
|
||||||
|
|
||||||
|
uint32_t cached_has_bits = 0;
|
||||||
|
// Prevent compiler warnings about cached_has_bits being unused
|
||||||
|
(void) cached_has_bits;
|
||||||
|
|
||||||
|
// .control.Meta meta = 1;
|
||||||
|
if (this->_internal_has_meta()) {
|
||||||
|
total_size += 1 +
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
||||||
|
*_impl_.meta_);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
||||||
|
total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
|
||||||
|
}
|
||||||
|
int cached_size = ::_pbi::ToCachedSize(total_size);
|
||||||
|
SetCachedSize(cached_size);
|
||||||
|
return total_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Header::CheckTypeAndMergeFrom(
|
||||||
|
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
|
||||||
|
MergeFrom(*::_pbi::DownCast<const Header*>(
|
||||||
|
&from));
|
||||||
|
}
|
||||||
|
|
||||||
|
void Header::MergeFrom(const Header& from) {
|
||||||
|
Header* const _this = this;
|
||||||
|
// @@protoc_insertion_point(class_specific_merge_from_start:control.Header)
|
||||||
|
GOOGLE_DCHECK_NE(&from, _this);
|
||||||
|
uint32_t cached_has_bits = 0;
|
||||||
|
(void) cached_has_bits;
|
||||||
|
|
||||||
|
if (from._internal_has_meta()) {
|
||||||
|
_this->_internal_mutable_meta()->::control::Meta::MergeFrom(
|
||||||
|
from._internal_meta());
|
||||||
|
}
|
||||||
|
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Header::CopyFrom(const Header& from) {
|
||||||
|
// @@protoc_insertion_point(class_specific_copy_from_start:control.Header)
|
||||||
|
if (&from == this) return;
|
||||||
|
Clear();
|
||||||
|
MergeFrom(from);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Header::IsInitialized() const {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Header::InternalSwap(Header* other) {
|
||||||
|
using std::swap;
|
||||||
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
||||||
|
swap(_impl_.meta_, other->_impl_.meta_);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string Header::GetTypeName() const {
|
||||||
|
return "control.Header";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ===================================================================
|
||||||
|
|
||||||
|
class Meta::_Internal {
|
||||||
|
public:
|
||||||
|
};
|
||||||
|
|
||||||
|
Meta::Meta(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
||||||
|
bool is_message_owned)
|
||||||
|
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
|
||||||
|
SharedCtor(arena, is_message_owned);
|
||||||
|
// @@protoc_insertion_point(arena_constructor:control.Meta)
|
||||||
|
}
|
||||||
|
Meta::Meta(const Meta& from)
|
||||||
|
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
|
||||||
|
Meta* const _this = this; (void)_this;
|
||||||
|
new (&_impl_) Impl_{
|
||||||
|
decltype(_impl_.rpcname_){}
|
||||||
|
, /*decltype(_impl_._cached_size_)*/{}};
|
||||||
|
|
||||||
|
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
|
||||||
|
_impl_.rpcname_.InitDefault();
|
||||||
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
|
_impl_.rpcname_.Set("", GetArenaForAllocation());
|
||||||
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
|
if (!from._internal_rpcname().empty()) {
|
||||||
|
_this->_impl_.rpcname_.Set(from._internal_rpcname(),
|
||||||
|
_this->GetArenaForAllocation());
|
||||||
|
}
|
||||||
|
// @@protoc_insertion_point(copy_constructor:control.Meta)
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void Meta::SharedCtor(
|
||||||
|
::_pb::Arena* arena, bool is_message_owned) {
|
||||||
|
(void)arena;
|
||||||
|
(void)is_message_owned;
|
||||||
|
new (&_impl_) Impl_{
|
||||||
|
decltype(_impl_.rpcname_){}
|
||||||
|
, /*decltype(_impl_._cached_size_)*/{}
|
||||||
|
};
|
||||||
|
_impl_.rpcname_.InitDefault();
|
||||||
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
|
_impl_.rpcname_.Set("", GetArenaForAllocation());
|
||||||
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
|
}
|
||||||
|
|
||||||
|
Meta::~Meta() {
|
||||||
|
// @@protoc_insertion_point(destructor:control.Meta)
|
||||||
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
|
||||||
|
(void)arena;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
SharedDtor();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void Meta::SharedDtor() {
|
||||||
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
||||||
|
_impl_.rpcname_.Destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Meta::SetCachedSize(int size) const {
|
||||||
|
_impl_._cached_size_.Set(size);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Meta::Clear() {
|
||||||
|
// @@protoc_insertion_point(message_clear_start:control.Meta)
|
||||||
|
uint32_t cached_has_bits = 0;
|
||||||
|
// Prevent compiler warnings about cached_has_bits being unused
|
||||||
|
(void) cached_has_bits;
|
||||||
|
|
||||||
|
_impl_.rpcname_.ClearToEmpty();
|
||||||
|
_internal_metadata_.Clear<std::string>();
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* Meta::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
|
||||||
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
||||||
|
while (!ctx->Done(&ptr)) {
|
||||||
|
uint32_t tag;
|
||||||
|
ptr = ::_pbi::ReadTag(ptr, &tag);
|
||||||
|
switch (tag >> 3) {
|
||||||
|
// string rpcname = 1;
|
||||||
|
case 1:
|
||||||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
||||||
|
auto str = _internal_mutable_rpcname();
|
||||||
|
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
||||||
|
CHK_(ptr);
|
||||||
|
CHK_(::_pbi::VerifyUTF8(str, nullptr));
|
||||||
|
} else
|
||||||
|
goto handle_unusual;
|
||||||
|
continue;
|
||||||
|
default:
|
||||||
|
goto handle_unusual;
|
||||||
|
} // switch
|
||||||
|
handle_unusual:
|
||||||
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
||||||
|
CHK_(ptr);
|
||||||
|
ctx->SetLastTag(tag);
|
||||||
|
goto message_done;
|
||||||
|
}
|
||||||
|
ptr = UnknownFieldParse(
|
||||||
|
tag,
|
||||||
|
_internal_metadata_.mutable_unknown_fields<std::string>(),
|
||||||
|
ptr, ctx);
|
||||||
|
CHK_(ptr != nullptr);
|
||||||
|
} // while
|
||||||
|
message_done:
|
||||||
|
return ptr;
|
||||||
|
failure:
|
||||||
|
ptr = nullptr;
|
||||||
|
goto message_done;
|
||||||
|
#undef CHK_
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t* Meta::_InternalSerialize(
|
||||||
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
||||||
|
// @@protoc_insertion_point(serialize_to_array_start:control.Meta)
|
||||||
|
uint32_t cached_has_bits = 0;
|
||||||
|
(void) cached_has_bits;
|
||||||
|
|
||||||
|
// string rpcname = 1;
|
||||||
|
if (!this->_internal_rpcname().empty()) {
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||||
|
this->_internal_rpcname().data(), static_cast<int>(this->_internal_rpcname().length()),
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||||
|
"control.Meta.rpcname");
|
||||||
|
target = stream->WriteStringMaybeAliased(
|
||||||
|
1, this->_internal_rpcname(), target);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
||||||
|
target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
|
||||||
|
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
|
||||||
|
}
|
||||||
|
// @@protoc_insertion_point(serialize_to_array_end:control.Meta)
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t Meta::ByteSizeLong() const {
|
||||||
|
// @@protoc_insertion_point(message_byte_size_start:control.Meta)
|
||||||
|
size_t total_size = 0;
|
||||||
|
|
||||||
|
uint32_t cached_has_bits = 0;
|
||||||
|
// Prevent compiler warnings about cached_has_bits being unused
|
||||||
|
(void) cached_has_bits;
|
||||||
|
|
||||||
|
// string rpcname = 1;
|
||||||
|
if (!this->_internal_rpcname().empty()) {
|
||||||
|
total_size += 1 +
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
||||||
|
this->_internal_rpcname());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
||||||
|
total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
|
||||||
|
}
|
||||||
|
int cached_size = ::_pbi::ToCachedSize(total_size);
|
||||||
|
SetCachedSize(cached_size);
|
||||||
|
return total_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Meta::CheckTypeAndMergeFrom(
|
||||||
|
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
|
||||||
|
MergeFrom(*::_pbi::DownCast<const Meta*>(
|
||||||
|
&from));
|
||||||
|
}
|
||||||
|
|
||||||
|
void Meta::MergeFrom(const Meta& from) {
|
||||||
|
Meta* const _this = this;
|
||||||
|
// @@protoc_insertion_point(class_specific_merge_from_start:control.Meta)
|
||||||
|
GOOGLE_DCHECK_NE(&from, _this);
|
||||||
|
uint32_t cached_has_bits = 0;
|
||||||
|
(void) cached_has_bits;
|
||||||
|
|
||||||
|
if (!from._internal_rpcname().empty()) {
|
||||||
|
_this->_internal_set_rpcname(from._internal_rpcname());
|
||||||
|
}
|
||||||
|
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Meta::CopyFrom(const Meta& from) {
|
||||||
|
// @@protoc_insertion_point(class_specific_copy_from_start:control.Meta)
|
||||||
|
if (&from == this) return;
|
||||||
|
Clear();
|
||||||
|
MergeFrom(from);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Meta::IsInitialized() const {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Meta::InternalSwap(Meta* other) {
|
||||||
|
using std::swap;
|
||||||
|
auto* lhs_arena = GetArenaForAllocation();
|
||||||
|
auto* rhs_arena = other->GetArenaForAllocation();
|
||||||
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
||||||
|
&_impl_.rpcname_, lhs_arena,
|
||||||
|
&other->_impl_.rpcname_, rhs_arena
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string Meta::GetTypeName() const {
|
||||||
|
return "control.Meta";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ===================================================================
|
||||||
|
|
||||||
|
class Hello::_Internal {
|
||||||
|
public:
|
||||||
|
static const ::control::Meta& meta(const Hello* msg);
|
||||||
|
};
|
||||||
|
|
||||||
|
const ::control::Meta&
|
||||||
|
Hello::_Internal::meta(const Hello* msg) {
|
||||||
|
return *msg->_impl_.meta_;
|
||||||
|
}
|
||||||
Hello::Hello(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
Hello::Hello(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
||||||
bool is_message_owned)
|
bool is_message_owned)
|
||||||
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
|
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
|
||||||
SharedCtor(arena, is_message_owned);
|
SharedCtor(arena, is_message_owned);
|
||||||
// @@protoc_insertion_point(arena_constructor:control.Hello)
|
// @@protoc_insertion_point(arena_constructor:control.Hello)
|
||||||
}
|
}
|
||||||
Hello::Hello(const Hello& from)
|
Hello::Hello(const Hello& from)
|
||||||
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
|
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
|
||||||
Hello* const _this = this;
|
Hello* const _this = this; (void)_this;
|
||||||
(void)_this;
|
new (&_impl_) Impl_{
|
||||||
new (&_impl_) Impl_{
|
decltype(_impl_.name_){}
|
||||||
decltype(_impl_.name_) {}
|
, decltype(_impl_.meta_){nullptr}
|
||||||
, decltype(_impl_.id_) {}
|
, decltype(_impl_.id_){}
|
||||||
, /*decltype(_impl_._cached_size_)*/{}};
|
, /*decltype(_impl_._cached_size_)*/{}};
|
||||||
|
|
||||||
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
|
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
|
||||||
_impl_.name_.InitDefault();
|
_impl_.name_.InitDefault();
|
||||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
_impl_.name_.Set("", GetArenaForAllocation());
|
_impl_.name_.Set("", GetArenaForAllocation());
|
||||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
if (!from._internal_name().empty()) {
|
if (!from._internal_name().empty()) {
|
||||||
_this->_impl_.name_.Set(from._internal_name(),
|
_this->_impl_.name_.Set(from._internal_name(),
|
||||||
_this->GetArenaForAllocation());
|
_this->GetArenaForAllocation());
|
||||||
}
|
}
|
||||||
_this->_impl_.id_ = from._impl_.id_;
|
if (from._internal_has_meta()) {
|
||||||
// @@protoc_insertion_point(copy_constructor:control.Hello)
|
_this->_impl_.meta_ = new ::control::Meta(*from._impl_.meta_);
|
||||||
|
}
|
||||||
|
_this->_impl_.id_ = from._impl_.id_;
|
||||||
|
// @@protoc_insertion_point(copy_constructor:control.Hello)
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void Hello::SharedCtor(
|
inline void Hello::SharedCtor(
|
||||||
::_pb::Arena* arena, bool is_message_owned) {
|
::_pb::Arena* arena, bool is_message_owned) {
|
||||||
(void)arena;
|
(void)arena;
|
||||||
(void)is_message_owned;
|
(void)is_message_owned;
|
||||||
new (&_impl_) Impl_{
|
new (&_impl_) Impl_{
|
||||||
decltype(_impl_.name_) {}
|
decltype(_impl_.name_){}
|
||||||
, decltype(_impl_.id_) {
|
, decltype(_impl_.meta_){nullptr}
|
||||||
0
|
, decltype(_impl_.id_){0}
|
||||||
}
|
, /*decltype(_impl_._cached_size_)*/{}
|
||||||
, /*decltype(_impl_._cached_size_)*/{}
|
};
|
||||||
};
|
_impl_.name_.InitDefault();
|
||||||
_impl_.name_.InitDefault();
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
_impl_.name_.Set("", GetArenaForAllocation());
|
||||||
_impl_.name_.Set("", GetArenaForAllocation());
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Hello::~Hello() {
|
Hello::~Hello() {
|
||||||
// @@protoc_insertion_point(destructor:control.Hello)
|
// @@protoc_insertion_point(destructor:control.Hello)
|
||||||
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
|
||||||
(void)arena;
|
(void)arena;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SharedDtor();
|
SharedDtor();
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void Hello::SharedDtor() {
|
inline void Hello::SharedDtor() {
|
||||||
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
||||||
_impl_.name_.Destroy();
|
_impl_.name_.Destroy();
|
||||||
|
if (this != internal_default_instance()) delete _impl_.meta_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hello::SetCachedSize(int size) const {
|
void Hello::SetCachedSize(int size) const {
|
||||||
_impl_._cached_size_.Set(size);
|
_impl_._cached_size_.Set(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hello::Clear() {
|
void Hello::Clear() {
|
||||||
// @@protoc_insertion_point(message_clear_start:control.Hello)
|
// @@protoc_insertion_point(message_clear_start:control.Hello)
|
||||||
uint32_t cached_has_bits = 0;
|
uint32_t cached_has_bits = 0;
|
||||||
// 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;
|
||||||
|
|
||||||
_impl_.name_.ClearToEmpty();
|
_impl_.name_.ClearToEmpty();
|
||||||
_impl_.id_ = 0;
|
if (GetArenaForAllocation() == nullptr && _impl_.meta_ != nullptr) {
|
||||||
_internal_metadata_.Clear<std::string>();
|
delete _impl_.meta_;
|
||||||
|
}
|
||||||
|
_impl_.meta_ = nullptr;
|
||||||
|
_impl_.id_ = 0;
|
||||||
|
_internal_metadata_.Clear<std::string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* Hello::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
|
const char* Hello::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
|
||||||
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
||||||
while (!ctx->Done(&ptr)) {
|
while (!ctx->Done(&ptr)) {
|
||||||
uint32_t tag;
|
uint32_t tag;
|
||||||
ptr = ::_pbi::ReadTag(ptr, &tag);
|
ptr = ::_pbi::ReadTag(ptr, &tag);
|
||||||
switch (tag >> 3) {
|
switch (tag >> 3) {
|
||||||
// int32 id = 1;
|
// .control.Meta meta = 1;
|
||||||
case 1:
|
case 1:
|
||||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
||||||
_impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
|
ptr = ctx->ParseMessage(_internal_mutable_meta(), ptr);
|
||||||
CHK_(ptr);
|
CHK_(ptr);
|
||||||
} else
|
} else
|
||||||
goto handle_unusual;
|
goto handle_unusual;
|
||||||
continue;
|
continue;
|
||||||
// string name = 2;
|
// int32 id = 2;
|
||||||
case 2:
|
case 2:
|
||||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
|
||||||
auto str = _internal_mutable_name();
|
_impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
|
||||||
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
CHK_(ptr);
|
||||||
CHK_(ptr);
|
} else
|
||||||
CHK_(::_pbi::VerifyUTF8(str, nullptr));
|
goto handle_unusual;
|
||||||
} else
|
continue;
|
||||||
goto handle_unusual;
|
// string name = 3;
|
||||||
continue;
|
case 3:
|
||||||
default:
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
|
||||||
goto handle_unusual;
|
auto str = _internal_mutable_name();
|
||||||
} // switch
|
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
||||||
handle_unusual:
|
CHK_(ptr);
|
||||||
if ((tag == 0) || ((tag & 7) == 4)) {
|
CHK_(::_pbi::VerifyUTF8(str, nullptr));
|
||||||
CHK_(ptr);
|
} else
|
||||||
ctx->SetLastTag(tag);
|
goto handle_unusual;
|
||||||
goto message_done;
|
continue;
|
||||||
}
|
default:
|
||||||
ptr = UnknownFieldParse(
|
goto handle_unusual;
|
||||||
tag,
|
} // switch
|
||||||
_internal_metadata_.mutable_unknown_fields<std::string>(),
|
handle_unusual:
|
||||||
ptr, ctx);
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
||||||
CHK_(ptr != nullptr);
|
CHK_(ptr);
|
||||||
} // while
|
ctx->SetLastTag(tag);
|
||||||
|
goto message_done;
|
||||||
|
}
|
||||||
|
ptr = UnknownFieldParse(
|
||||||
|
tag,
|
||||||
|
_internal_metadata_.mutable_unknown_fields<std::string>(),
|
||||||
|
ptr, ctx);
|
||||||
|
CHK_(ptr != nullptr);
|
||||||
|
} // while
|
||||||
message_done:
|
message_done:
|
||||||
return ptr;
|
return ptr;
|
||||||
failure:
|
failure:
|
||||||
ptr = nullptr;
|
ptr = nullptr;
|
||||||
goto message_done;
|
goto message_done;
|
||||||
#undef CHK_
|
#undef CHK_
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t* Hello::_InternalSerialize(
|
uint8_t* Hello::_InternalSerialize(
|
||||||
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
||||||
// @@protoc_insertion_point(serialize_to_array_start:control.Hello)
|
// @@protoc_insertion_point(serialize_to_array_start:control.Hello)
|
||||||
uint32_t cached_has_bits = 0;
|
uint32_t cached_has_bits = 0;
|
||||||
(void) cached_has_bits;
|
(void) cached_has_bits;
|
||||||
|
|
||||||
// int32 id = 1;
|
// .control.Meta meta = 1;
|
||||||
if (this->_internal_id() != 0) {
|
if (this->_internal_has_meta()) {
|
||||||
target = stream->EnsureSpace(target);
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
||||||
target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_id(), target);
|
InternalWriteMessage(1, _Internal::meta(this),
|
||||||
}
|
_Internal::meta(this).GetCachedSize(), target, stream);
|
||||||
|
}
|
||||||
|
|
||||||
// string name = 2;
|
// int32 id = 2;
|
||||||
if (!this->_internal_name().empty()) {
|
if (this->_internal_id() != 0) {
|
||||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
target = stream->EnsureSpace(target);
|
||||||
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
|
target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_id(), target);
|
||||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
}
|
||||||
"control.Hello.name");
|
|
||||||
target = stream->WriteStringMaybeAliased(
|
|
||||||
2, this->_internal_name(), target);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
// string name = 3;
|
||||||
target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
|
if (!this->_internal_name().empty()) {
|
||||||
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||||
}
|
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
|
||||||
// @@protoc_insertion_point(serialize_to_array_end:control.Hello)
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||||
return target;
|
"control.Hello.name");
|
||||||
|
target = stream->WriteStringMaybeAliased(
|
||||||
|
3, this->_internal_name(), target);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
||||||
|
target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
|
||||||
|
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
|
||||||
|
}
|
||||||
|
// @@protoc_insertion_point(serialize_to_array_end:control.Hello)
|
||||||
|
return target;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t Hello::ByteSizeLong() const {
|
size_t Hello::ByteSizeLong() const {
|
||||||
// @@protoc_insertion_point(message_byte_size_start:control.Hello)
|
// @@protoc_insertion_point(message_byte_size_start:control.Hello)
|
||||||
size_t total_size = 0;
|
size_t total_size = 0;
|
||||||
|
|
||||||
uint32_t cached_has_bits = 0;
|
uint32_t cached_has_bits = 0;
|
||||||
// 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;
|
||||||
|
|
||||||
// string name = 2;
|
// string name = 3;
|
||||||
if (!this->_internal_name().empty()) {
|
if (!this->_internal_name().empty()) {
|
||||||
total_size += 1 +
|
total_size += 1 +
|
||||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
||||||
this->_internal_name());
|
this->_internal_name());
|
||||||
}
|
}
|
||||||
|
|
||||||
// int32 id = 1;
|
// .control.Meta meta = 1;
|
||||||
if (this->_internal_id() != 0) {
|
if (this->_internal_has_meta()) {
|
||||||
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_id());
|
total_size += 1 +
|
||||||
}
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
||||||
|
*_impl_.meta_);
|
||||||
|
}
|
||||||
|
|
||||||
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
// int32 id = 2;
|
||||||
total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
|
if (this->_internal_id() != 0) {
|
||||||
}
|
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_id());
|
||||||
int cached_size = ::_pbi::ToCachedSize(total_size);
|
}
|
||||||
SetCachedSize(cached_size);
|
|
||||||
return total_size;
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
||||||
|
total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
|
||||||
|
}
|
||||||
|
int cached_size = ::_pbi::ToCachedSize(total_size);
|
||||||
|
SetCachedSize(cached_size);
|
||||||
|
return total_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hello::CheckTypeAndMergeFrom(
|
void Hello::CheckTypeAndMergeFrom(
|
||||||
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
|
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
|
||||||
MergeFrom(*::_pbi::DownCast<const Hello*>(
|
MergeFrom(*::_pbi::DownCast<const Hello*>(
|
||||||
&from));
|
&from));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hello::MergeFrom(const Hello& from) {
|
void Hello::MergeFrom(const Hello& from) {
|
||||||
Hello* const _this = this;
|
Hello* const _this = this;
|
||||||
// @@protoc_insertion_point(class_specific_merge_from_start:control.Hello)
|
// @@protoc_insertion_point(class_specific_merge_from_start:control.Hello)
|
||||||
GOOGLE_DCHECK_NE(&from, _this);
|
GOOGLE_DCHECK_NE(&from, _this);
|
||||||
uint32_t cached_has_bits = 0;
|
uint32_t cached_has_bits = 0;
|
||||||
(void) cached_has_bits;
|
(void) cached_has_bits;
|
||||||
|
|
||||||
if (!from._internal_name().empty()) {
|
if (!from._internal_name().empty()) {
|
||||||
_this->_internal_set_name(from._internal_name());
|
_this->_internal_set_name(from._internal_name());
|
||||||
}
|
}
|
||||||
if (from._internal_id() != 0) {
|
if (from._internal_has_meta()) {
|
||||||
_this->_internal_set_id(from._internal_id());
|
_this->_internal_mutable_meta()->::control::Meta::MergeFrom(
|
||||||
}
|
from._internal_meta());
|
||||||
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
|
}
|
||||||
|
if (from._internal_id() != 0) {
|
||||||
|
_this->_internal_set_id(from._internal_id());
|
||||||
|
}
|
||||||
|
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hello::CopyFrom(const Hello& from) {
|
void Hello::CopyFrom(const Hello& from) {
|
||||||
// @@protoc_insertion_point(class_specific_copy_from_start:control.Hello)
|
// @@protoc_insertion_point(class_specific_copy_from_start:control.Hello)
|
||||||
if (&from == this) return;
|
if (&from == this) return;
|
||||||
Clear();
|
Clear();
|
||||||
MergeFrom(from);
|
MergeFrom(from);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Hello::IsInitialized() const {
|
bool Hello::IsInitialized() const {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hello::InternalSwap(Hello* other) {
|
void Hello::InternalSwap(Hello* other) {
|
||||||
using std::swap;
|
using std::swap;
|
||||||
auto* lhs_arena = GetArenaForAllocation();
|
auto* lhs_arena = GetArenaForAllocation();
|
||||||
auto* rhs_arena = other->GetArenaForAllocation();
|
auto* rhs_arena = other->GetArenaForAllocation();
|
||||||
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
||||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
||||||
&_impl_.name_, lhs_arena,
|
&_impl_.name_, lhs_arena,
|
||||||
&other->_impl_.name_, rhs_arena
|
&other->_impl_.name_, rhs_arena
|
||||||
);
|
);
|
||||||
swap(_impl_.id_, other->_impl_.id_);
|
::PROTOBUF_NAMESPACE_ID::internal::memswap<
|
||||||
|
PROTOBUF_FIELD_OFFSET(Hello, _impl_.id_)
|
||||||
|
+ sizeof(Hello::_impl_.id_)
|
||||||
|
- PROTOBUF_FIELD_OFFSET(Hello, _impl_.meta_)>(
|
||||||
|
reinterpret_cast<char*>(&_impl_.meta_),
|
||||||
|
reinterpret_cast<char*>(&other->_impl_.meta_));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Hello::GetTypeName() const {
|
std::string Hello::GetTypeName() const {
|
||||||
return "control.Hello";
|
return "control.Hello";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// @@protoc_insertion_point(namespace_scope)
|
// @@protoc_insertion_point(namespace_scope)
|
||||||
} // namespace control
|
} // namespace control
|
||||||
PROTOBUF_NAMESPACE_OPEN
|
PROTOBUF_NAMESPACE_OPEN
|
||||||
|
template<> PROTOBUF_NOINLINE ::control::Header*
|
||||||
|
Arena::CreateMaybeMessage< ::control::Header >(Arena* arena) {
|
||||||
|
return Arena::CreateMessageInternal< ::control::Header >(arena);
|
||||||
|
}
|
||||||
|
template<> PROTOBUF_NOINLINE ::control::Meta*
|
||||||
|
Arena::CreateMaybeMessage< ::control::Meta >(Arena* arena) {
|
||||||
|
return Arena::CreateMessageInternal< ::control::Meta >(arena);
|
||||||
|
}
|
||||||
template<> PROTOBUF_NOINLINE ::control::Hello*
|
template<> PROTOBUF_NOINLINE ::control::Hello*
|
||||||
Arena::CreateMaybeMessage< ::control::Hello >(Arena* arena) {
|
Arena::CreateMaybeMessage< ::control::Hello >(Arena* arena) {
|
||||||
return Arena::CreateMessageInternal< ::control::Hello >(arena);
|
return Arena::CreateMessageInternal< ::control::Hello >(arena);
|
||||||
}
|
}
|
||||||
PROTOBUF_NAMESPACE_CLOSE
|
PROTOBUF_NAMESPACE_CLOSE
|
||||||
|
|
||||||
|
|||||||
+551
-7
@@ -42,17 +42,299 @@ struct TableStruct_hello_2eproto {
|
|||||||
static const uint32_t offsets[];
|
static const uint32_t offsets[];
|
||||||
};
|
};
|
||||||
namespace control {
|
namespace control {
|
||||||
|
class Header;
|
||||||
|
struct HeaderDefaultTypeInternal;
|
||||||
|
extern HeaderDefaultTypeInternal _Header_default_instance_;
|
||||||
class Hello;
|
class Hello;
|
||||||
struct HelloDefaultTypeInternal;
|
struct HelloDefaultTypeInternal;
|
||||||
extern HelloDefaultTypeInternal _Hello_default_instance_;
|
extern HelloDefaultTypeInternal _Hello_default_instance_;
|
||||||
|
class Meta;
|
||||||
|
struct MetaDefaultTypeInternal;
|
||||||
|
extern MetaDefaultTypeInternal _Meta_default_instance_;
|
||||||
} // namespace control
|
} // namespace control
|
||||||
PROTOBUF_NAMESPACE_OPEN
|
PROTOBUF_NAMESPACE_OPEN
|
||||||
|
template<> ::control::Header* Arena::CreateMaybeMessage<::control::Header>(Arena*);
|
||||||
template<> ::control::Hello* Arena::CreateMaybeMessage<::control::Hello>(Arena*);
|
template<> ::control::Hello* Arena::CreateMaybeMessage<::control::Hello>(Arena*);
|
||||||
|
template<> ::control::Meta* Arena::CreateMaybeMessage<::control::Meta>(Arena*);
|
||||||
PROTOBUF_NAMESPACE_CLOSE
|
PROTOBUF_NAMESPACE_CLOSE
|
||||||
namespace control {
|
namespace control {
|
||||||
|
|
||||||
// ===================================================================
|
// ===================================================================
|
||||||
|
|
||||||
|
class Header final :
|
||||||
|
public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:control.Header) */ {
|
||||||
|
public:
|
||||||
|
inline Header() : Header(nullptr) {}
|
||||||
|
~Header() override;
|
||||||
|
explicit PROTOBUF_CONSTEXPR Header(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
|
||||||
|
|
||||||
|
Header(const Header& from);
|
||||||
|
Header(Header&& from) noexcept
|
||||||
|
: Header() {
|
||||||
|
*this = ::std::move(from);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline Header& operator=(const Header& from) {
|
||||||
|
CopyFrom(from);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
inline Header& operator=(Header&& from) noexcept {
|
||||||
|
if (this == &from) return *this;
|
||||||
|
if (GetOwningArena() == from.GetOwningArena()
|
||||||
|
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||||
|
&& GetOwningArena() != nullptr
|
||||||
|
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||||
|
) {
|
||||||
|
InternalSwap(&from);
|
||||||
|
} else {
|
||||||
|
CopyFrom(from);
|
||||||
|
}
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const Header& default_instance() {
|
||||||
|
return *internal_default_instance();
|
||||||
|
}
|
||||||
|
static inline const Header* internal_default_instance() {
|
||||||
|
return reinterpret_cast<const Header*>(
|
||||||
|
&_Header_default_instance_);
|
||||||
|
}
|
||||||
|
static constexpr int kIndexInFileMessages =
|
||||||
|
0;
|
||||||
|
|
||||||
|
friend void swap(Header& a, Header& b) {
|
||||||
|
a.Swap(&b);
|
||||||
|
}
|
||||||
|
inline void Swap(Header* other) {
|
||||||
|
if (other == this) return;
|
||||||
|
#ifdef PROTOBUF_FORCE_COPY_IN_SWAP
|
||||||
|
if (GetOwningArena() != nullptr &&
|
||||||
|
GetOwningArena() == other->GetOwningArena()) {
|
||||||
|
#else // PROTOBUF_FORCE_COPY_IN_SWAP
|
||||||
|
if (GetOwningArena() == other->GetOwningArena()) {
|
||||||
|
#endif // !PROTOBUF_FORCE_COPY_IN_SWAP
|
||||||
|
InternalSwap(other);
|
||||||
|
} else {
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void UnsafeArenaSwap(Header* other) {
|
||||||
|
if (other == this) return;
|
||||||
|
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
|
||||||
|
InternalSwap(other);
|
||||||
|
}
|
||||||
|
|
||||||
|
// implements Message ----------------------------------------------
|
||||||
|
|
||||||
|
Header* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
|
||||||
|
return CreateMaybeMessage<Header>(arena);
|
||||||
|
}
|
||||||
|
void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final;
|
||||||
|
void CopyFrom(const Header& from);
|
||||||
|
void MergeFrom(const Header& from);
|
||||||
|
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
|
||||||
|
bool IsInitialized() const final;
|
||||||
|
|
||||||
|
size_t ByteSizeLong() const final;
|
||||||
|
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
|
||||||
|
uint8_t* _InternalSerialize(
|
||||||
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
|
||||||
|
int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
|
||||||
|
|
||||||
|
private:
|
||||||
|
void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
|
||||||
|
void SharedDtor();
|
||||||
|
void SetCachedSize(int size) const;
|
||||||
|
void InternalSwap(Header* other);
|
||||||
|
|
||||||
|
private:
|
||||||
|
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
|
||||||
|
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
|
||||||
|
return "control.Header";
|
||||||
|
}
|
||||||
|
protected:
|
||||||
|
explicit Header(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
||||||
|
bool is_message_owned = false);
|
||||||
|
public:
|
||||||
|
|
||||||
|
std::string GetTypeName() const final;
|
||||||
|
|
||||||
|
// nested types ----------------------------------------------------
|
||||||
|
|
||||||
|
// accessors -------------------------------------------------------
|
||||||
|
|
||||||
|
enum : int {
|
||||||
|
kMetaFieldNumber = 1,
|
||||||
|
};
|
||||||
|
// .control.Meta meta = 1;
|
||||||
|
bool has_meta() const;
|
||||||
|
private:
|
||||||
|
bool _internal_has_meta() const;
|
||||||
|
public:
|
||||||
|
void clear_meta();
|
||||||
|
const ::control::Meta& meta() const;
|
||||||
|
PROTOBUF_NODISCARD ::control::Meta* release_meta();
|
||||||
|
::control::Meta* mutable_meta();
|
||||||
|
void set_allocated_meta(::control::Meta* meta);
|
||||||
|
private:
|
||||||
|
const ::control::Meta& _internal_meta() const;
|
||||||
|
::control::Meta* _internal_mutable_meta();
|
||||||
|
public:
|
||||||
|
void unsafe_arena_set_allocated_meta(
|
||||||
|
::control::Meta* meta);
|
||||||
|
::control::Meta* unsafe_arena_release_meta();
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(class_scope:control.Header)
|
||||||
|
private:
|
||||||
|
class _Internal;
|
||||||
|
|
||||||
|
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
|
||||||
|
typedef void InternalArenaConstructable_;
|
||||||
|
typedef void DestructorSkippable_;
|
||||||
|
struct Impl_ {
|
||||||
|
::control::Meta* meta_;
|
||||||
|
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||||
|
};
|
||||||
|
union { Impl_ _impl_; };
|
||||||
|
friend struct ::TableStruct_hello_2eproto;
|
||||||
|
};
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
|
||||||
|
class Meta final :
|
||||||
|
public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:control.Meta) */ {
|
||||||
|
public:
|
||||||
|
inline Meta() : Meta(nullptr) {}
|
||||||
|
~Meta() override;
|
||||||
|
explicit PROTOBUF_CONSTEXPR Meta(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
|
||||||
|
|
||||||
|
Meta(const Meta& from);
|
||||||
|
Meta(Meta&& from) noexcept
|
||||||
|
: Meta() {
|
||||||
|
*this = ::std::move(from);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline Meta& operator=(const Meta& from) {
|
||||||
|
CopyFrom(from);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
inline Meta& operator=(Meta&& from) noexcept {
|
||||||
|
if (this == &from) return *this;
|
||||||
|
if (GetOwningArena() == from.GetOwningArena()
|
||||||
|
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||||
|
&& GetOwningArena() != nullptr
|
||||||
|
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||||
|
) {
|
||||||
|
InternalSwap(&from);
|
||||||
|
} else {
|
||||||
|
CopyFrom(from);
|
||||||
|
}
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const Meta& default_instance() {
|
||||||
|
return *internal_default_instance();
|
||||||
|
}
|
||||||
|
static inline const Meta* internal_default_instance() {
|
||||||
|
return reinterpret_cast<const Meta*>(
|
||||||
|
&_Meta_default_instance_);
|
||||||
|
}
|
||||||
|
static constexpr int kIndexInFileMessages =
|
||||||
|
1;
|
||||||
|
|
||||||
|
friend void swap(Meta& a, Meta& b) {
|
||||||
|
a.Swap(&b);
|
||||||
|
}
|
||||||
|
inline void Swap(Meta* other) {
|
||||||
|
if (other == this) return;
|
||||||
|
#ifdef PROTOBUF_FORCE_COPY_IN_SWAP
|
||||||
|
if (GetOwningArena() != nullptr &&
|
||||||
|
GetOwningArena() == other->GetOwningArena()) {
|
||||||
|
#else // PROTOBUF_FORCE_COPY_IN_SWAP
|
||||||
|
if (GetOwningArena() == other->GetOwningArena()) {
|
||||||
|
#endif // !PROTOBUF_FORCE_COPY_IN_SWAP
|
||||||
|
InternalSwap(other);
|
||||||
|
} else {
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void UnsafeArenaSwap(Meta* other) {
|
||||||
|
if (other == this) return;
|
||||||
|
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
|
||||||
|
InternalSwap(other);
|
||||||
|
}
|
||||||
|
|
||||||
|
// implements Message ----------------------------------------------
|
||||||
|
|
||||||
|
Meta* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
|
||||||
|
return CreateMaybeMessage<Meta>(arena);
|
||||||
|
}
|
||||||
|
void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final;
|
||||||
|
void CopyFrom(const Meta& from);
|
||||||
|
void MergeFrom(const Meta& from);
|
||||||
|
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
|
||||||
|
bool IsInitialized() const final;
|
||||||
|
|
||||||
|
size_t ByteSizeLong() const final;
|
||||||
|
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
|
||||||
|
uint8_t* _InternalSerialize(
|
||||||
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
|
||||||
|
int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
|
||||||
|
|
||||||
|
private:
|
||||||
|
void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
|
||||||
|
void SharedDtor();
|
||||||
|
void SetCachedSize(int size) const;
|
||||||
|
void InternalSwap(Meta* other);
|
||||||
|
|
||||||
|
private:
|
||||||
|
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
|
||||||
|
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
|
||||||
|
return "control.Meta";
|
||||||
|
}
|
||||||
|
protected:
|
||||||
|
explicit Meta(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
||||||
|
bool is_message_owned = false);
|
||||||
|
public:
|
||||||
|
|
||||||
|
std::string GetTypeName() const final;
|
||||||
|
|
||||||
|
// nested types ----------------------------------------------------
|
||||||
|
|
||||||
|
// accessors -------------------------------------------------------
|
||||||
|
|
||||||
|
enum : int {
|
||||||
|
kRpcnameFieldNumber = 1,
|
||||||
|
};
|
||||||
|
// string rpcname = 1;
|
||||||
|
void clear_rpcname();
|
||||||
|
const std::string& rpcname() const;
|
||||||
|
template <typename ArgT0 = const std::string&, typename... ArgT>
|
||||||
|
void set_rpcname(ArgT0&& arg0, ArgT... args);
|
||||||
|
std::string* mutable_rpcname();
|
||||||
|
PROTOBUF_NODISCARD std::string* release_rpcname();
|
||||||
|
void set_allocated_rpcname(std::string* rpcname);
|
||||||
|
private:
|
||||||
|
const std::string& _internal_rpcname() const;
|
||||||
|
inline PROTOBUF_ALWAYS_INLINE void _internal_set_rpcname(const std::string& value);
|
||||||
|
std::string* _internal_mutable_rpcname();
|
||||||
|
public:
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(class_scope:control.Meta)
|
||||||
|
private:
|
||||||
|
class _Internal;
|
||||||
|
|
||||||
|
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
|
||||||
|
typedef void InternalArenaConstructable_;
|
||||||
|
typedef void DestructorSkippable_;
|
||||||
|
struct Impl_ {
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr rpcname_;
|
||||||
|
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||||
|
};
|
||||||
|
union { Impl_ _impl_; };
|
||||||
|
friend struct ::TableStruct_hello_2eproto;
|
||||||
|
};
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
|
||||||
class Hello final :
|
class Hello final :
|
||||||
public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:control.Hello) */ {
|
public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:control.Hello) */ {
|
||||||
public:
|
public:
|
||||||
@@ -92,7 +374,7 @@ class Hello final :
|
|||||||
&_Hello_default_instance_);
|
&_Hello_default_instance_);
|
||||||
}
|
}
|
||||||
static constexpr int kIndexInFileMessages =
|
static constexpr int kIndexInFileMessages =
|
||||||
0;
|
2;
|
||||||
|
|
||||||
friend void swap(Hello& a, Hello& b) {
|
friend void swap(Hello& a, Hello& b) {
|
||||||
a.Swap(&b);
|
a.Swap(&b);
|
||||||
@@ -156,10 +438,11 @@ class Hello final :
|
|||||||
// accessors -------------------------------------------------------
|
// accessors -------------------------------------------------------
|
||||||
|
|
||||||
enum : int {
|
enum : int {
|
||||||
kNameFieldNumber = 2,
|
kNameFieldNumber = 3,
|
||||||
kIdFieldNumber = 1,
|
kMetaFieldNumber = 1,
|
||||||
|
kIdFieldNumber = 2,
|
||||||
};
|
};
|
||||||
// string name = 2;
|
// string name = 3;
|
||||||
void clear_name();
|
void clear_name();
|
||||||
const std::string& name() const;
|
const std::string& name() const;
|
||||||
template <typename ArgT0 = const std::string&, typename... ArgT>
|
template <typename ArgT0 = const std::string&, typename... ArgT>
|
||||||
@@ -173,7 +456,25 @@ class Hello final :
|
|||||||
std::string* _internal_mutable_name();
|
std::string* _internal_mutable_name();
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// int32 id = 1;
|
// .control.Meta meta = 1;
|
||||||
|
bool has_meta() const;
|
||||||
|
private:
|
||||||
|
bool _internal_has_meta() const;
|
||||||
|
public:
|
||||||
|
void clear_meta();
|
||||||
|
const ::control::Meta& meta() const;
|
||||||
|
PROTOBUF_NODISCARD ::control::Meta* release_meta();
|
||||||
|
::control::Meta* mutable_meta();
|
||||||
|
void set_allocated_meta(::control::Meta* meta);
|
||||||
|
private:
|
||||||
|
const ::control::Meta& _internal_meta() const;
|
||||||
|
::control::Meta* _internal_mutable_meta();
|
||||||
|
public:
|
||||||
|
void unsafe_arena_set_allocated_meta(
|
||||||
|
::control::Meta* meta);
|
||||||
|
::control::Meta* unsafe_arena_release_meta();
|
||||||
|
|
||||||
|
// int32 id = 2;
|
||||||
void clear_id();
|
void clear_id();
|
||||||
int32_t id() const;
|
int32_t id() const;
|
||||||
void set_id(int32_t value);
|
void set_id(int32_t value);
|
||||||
@@ -191,6 +492,7 @@ class Hello final :
|
|||||||
typedef void DestructorSkippable_;
|
typedef void DestructorSkippable_;
|
||||||
struct Impl_ {
|
struct Impl_ {
|
||||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
|
||||||
|
::control::Meta* meta_;
|
||||||
int32_t id_;
|
int32_t id_;
|
||||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||||
};
|
};
|
||||||
@@ -206,9 +508,247 @@ class Hello final :
|
|||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||||
#endif // __GNUC__
|
#endif // __GNUC__
|
||||||
|
// Header
|
||||||
|
|
||||||
|
// .control.Meta meta = 1;
|
||||||
|
inline bool Header::_internal_has_meta() const {
|
||||||
|
return this != internal_default_instance() && _impl_.meta_ != nullptr;
|
||||||
|
}
|
||||||
|
inline bool Header::has_meta() const {
|
||||||
|
return _internal_has_meta();
|
||||||
|
}
|
||||||
|
inline void Header::clear_meta() {
|
||||||
|
if (GetArenaForAllocation() == nullptr && _impl_.meta_ != nullptr) {
|
||||||
|
delete _impl_.meta_;
|
||||||
|
}
|
||||||
|
_impl_.meta_ = nullptr;
|
||||||
|
}
|
||||||
|
inline const ::control::Meta& Header::_internal_meta() const {
|
||||||
|
const ::control::Meta* p = _impl_.meta_;
|
||||||
|
return p != nullptr ? *p : reinterpret_cast<const ::control::Meta&>(
|
||||||
|
::control::_Meta_default_instance_);
|
||||||
|
}
|
||||||
|
inline const ::control::Meta& Header::meta() const {
|
||||||
|
// @@protoc_insertion_point(field_get:control.Header.meta)
|
||||||
|
return _internal_meta();
|
||||||
|
}
|
||||||
|
inline void Header::unsafe_arena_set_allocated_meta(
|
||||||
|
::control::Meta* meta) {
|
||||||
|
if (GetArenaForAllocation() == nullptr) {
|
||||||
|
delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.meta_);
|
||||||
|
}
|
||||||
|
_impl_.meta_ = meta;
|
||||||
|
if (meta) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:control.Header.meta)
|
||||||
|
}
|
||||||
|
inline ::control::Meta* Header::release_meta() {
|
||||||
|
|
||||||
|
::control::Meta* temp = _impl_.meta_;
|
||||||
|
_impl_.meta_ = nullptr;
|
||||||
|
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||||
|
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
|
||||||
|
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
|
||||||
|
if (GetArenaForAllocation() == nullptr) { delete old; }
|
||||||
|
#else // PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||||
|
if (GetArenaForAllocation() != nullptr) {
|
||||||
|
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
|
||||||
|
}
|
||||||
|
#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||||
|
return temp;
|
||||||
|
}
|
||||||
|
inline ::control::Meta* Header::unsafe_arena_release_meta() {
|
||||||
|
// @@protoc_insertion_point(field_release:control.Header.meta)
|
||||||
|
|
||||||
|
::control::Meta* temp = _impl_.meta_;
|
||||||
|
_impl_.meta_ = nullptr;
|
||||||
|
return temp;
|
||||||
|
}
|
||||||
|
inline ::control::Meta* Header::_internal_mutable_meta() {
|
||||||
|
|
||||||
|
if (_impl_.meta_ == nullptr) {
|
||||||
|
auto* p = CreateMaybeMessage<::control::Meta>(GetArenaForAllocation());
|
||||||
|
_impl_.meta_ = p;
|
||||||
|
}
|
||||||
|
return _impl_.meta_;
|
||||||
|
}
|
||||||
|
inline ::control::Meta* Header::mutable_meta() {
|
||||||
|
::control::Meta* _msg = _internal_mutable_meta();
|
||||||
|
// @@protoc_insertion_point(field_mutable:control.Header.meta)
|
||||||
|
return _msg;
|
||||||
|
}
|
||||||
|
inline void Header::set_allocated_meta(::control::Meta* meta) {
|
||||||
|
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
|
||||||
|
if (message_arena == nullptr) {
|
||||||
|
delete _impl_.meta_;
|
||||||
|
}
|
||||||
|
if (meta) {
|
||||||
|
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
|
||||||
|
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(meta);
|
||||||
|
if (message_arena != submessage_arena) {
|
||||||
|
meta = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
|
||||||
|
message_arena, meta, submessage_arena);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
_impl_.meta_ = meta;
|
||||||
|
// @@protoc_insertion_point(field_set_allocated:control.Header.meta)
|
||||||
|
}
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Meta
|
||||||
|
|
||||||
|
// string rpcname = 1;
|
||||||
|
inline void Meta::clear_rpcname() {
|
||||||
|
_impl_.rpcname_.ClearToEmpty();
|
||||||
|
}
|
||||||
|
inline const std::string& Meta::rpcname() const {
|
||||||
|
// @@protoc_insertion_point(field_get:control.Meta.rpcname)
|
||||||
|
return _internal_rpcname();
|
||||||
|
}
|
||||||
|
template <typename ArgT0, typename... ArgT>
|
||||||
|
inline PROTOBUF_ALWAYS_INLINE
|
||||||
|
void Meta::set_rpcname(ArgT0&& arg0, ArgT... args) {
|
||||||
|
|
||||||
|
_impl_.rpcname_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
|
||||||
|
// @@protoc_insertion_point(field_set:control.Meta.rpcname)
|
||||||
|
}
|
||||||
|
inline std::string* Meta::mutable_rpcname() {
|
||||||
|
std::string* _s = _internal_mutable_rpcname();
|
||||||
|
// @@protoc_insertion_point(field_mutable:control.Meta.rpcname)
|
||||||
|
return _s;
|
||||||
|
}
|
||||||
|
inline const std::string& Meta::_internal_rpcname() const {
|
||||||
|
return _impl_.rpcname_.Get();
|
||||||
|
}
|
||||||
|
inline void Meta::_internal_set_rpcname(const std::string& value) {
|
||||||
|
|
||||||
|
_impl_.rpcname_.Set(value, GetArenaForAllocation());
|
||||||
|
}
|
||||||
|
inline std::string* Meta::_internal_mutable_rpcname() {
|
||||||
|
|
||||||
|
return _impl_.rpcname_.Mutable(GetArenaForAllocation());
|
||||||
|
}
|
||||||
|
inline std::string* Meta::release_rpcname() {
|
||||||
|
// @@protoc_insertion_point(field_release:control.Meta.rpcname)
|
||||||
|
return _impl_.rpcname_.Release();
|
||||||
|
}
|
||||||
|
inline void Meta::set_allocated_rpcname(std::string* rpcname) {
|
||||||
|
if (rpcname != nullptr) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
_impl_.rpcname_.SetAllocated(rpcname, GetArenaForAllocation());
|
||||||
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
|
if (_impl_.rpcname_.IsDefault()) {
|
||||||
|
_impl_.rpcname_.Set("", GetArenaForAllocation());
|
||||||
|
}
|
||||||
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
|
// @@protoc_insertion_point(field_set_allocated:control.Meta.rpcname)
|
||||||
|
}
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
|
||||||
// Hello
|
// Hello
|
||||||
|
|
||||||
// int32 id = 1;
|
// .control.Meta meta = 1;
|
||||||
|
inline bool Hello::_internal_has_meta() const {
|
||||||
|
return this != internal_default_instance() && _impl_.meta_ != nullptr;
|
||||||
|
}
|
||||||
|
inline bool Hello::has_meta() const {
|
||||||
|
return _internal_has_meta();
|
||||||
|
}
|
||||||
|
inline void Hello::clear_meta() {
|
||||||
|
if (GetArenaForAllocation() == nullptr && _impl_.meta_ != nullptr) {
|
||||||
|
delete _impl_.meta_;
|
||||||
|
}
|
||||||
|
_impl_.meta_ = nullptr;
|
||||||
|
}
|
||||||
|
inline const ::control::Meta& Hello::_internal_meta() const {
|
||||||
|
const ::control::Meta* p = _impl_.meta_;
|
||||||
|
return p != nullptr ? *p : reinterpret_cast<const ::control::Meta&>(
|
||||||
|
::control::_Meta_default_instance_);
|
||||||
|
}
|
||||||
|
inline const ::control::Meta& Hello::meta() const {
|
||||||
|
// @@protoc_insertion_point(field_get:control.Hello.meta)
|
||||||
|
return _internal_meta();
|
||||||
|
}
|
||||||
|
inline void Hello::unsafe_arena_set_allocated_meta(
|
||||||
|
::control::Meta* meta) {
|
||||||
|
if (GetArenaForAllocation() == nullptr) {
|
||||||
|
delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.meta_);
|
||||||
|
}
|
||||||
|
_impl_.meta_ = meta;
|
||||||
|
if (meta) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:control.Hello.meta)
|
||||||
|
}
|
||||||
|
inline ::control::Meta* Hello::release_meta() {
|
||||||
|
|
||||||
|
::control::Meta* temp = _impl_.meta_;
|
||||||
|
_impl_.meta_ = nullptr;
|
||||||
|
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||||
|
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
|
||||||
|
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
|
||||||
|
if (GetArenaForAllocation() == nullptr) { delete old; }
|
||||||
|
#else // PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||||
|
if (GetArenaForAllocation() != nullptr) {
|
||||||
|
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
|
||||||
|
}
|
||||||
|
#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||||
|
return temp;
|
||||||
|
}
|
||||||
|
inline ::control::Meta* Hello::unsafe_arena_release_meta() {
|
||||||
|
// @@protoc_insertion_point(field_release:control.Hello.meta)
|
||||||
|
|
||||||
|
::control::Meta* temp = _impl_.meta_;
|
||||||
|
_impl_.meta_ = nullptr;
|
||||||
|
return temp;
|
||||||
|
}
|
||||||
|
inline ::control::Meta* Hello::_internal_mutable_meta() {
|
||||||
|
|
||||||
|
if (_impl_.meta_ == nullptr) {
|
||||||
|
auto* p = CreateMaybeMessage<::control::Meta>(GetArenaForAllocation());
|
||||||
|
_impl_.meta_ = p;
|
||||||
|
}
|
||||||
|
return _impl_.meta_;
|
||||||
|
}
|
||||||
|
inline ::control::Meta* Hello::mutable_meta() {
|
||||||
|
::control::Meta* _msg = _internal_mutable_meta();
|
||||||
|
// @@protoc_insertion_point(field_mutable:control.Hello.meta)
|
||||||
|
return _msg;
|
||||||
|
}
|
||||||
|
inline void Hello::set_allocated_meta(::control::Meta* meta) {
|
||||||
|
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
|
||||||
|
if (message_arena == nullptr) {
|
||||||
|
delete _impl_.meta_;
|
||||||
|
}
|
||||||
|
if (meta) {
|
||||||
|
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
|
||||||
|
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(meta);
|
||||||
|
if (message_arena != submessage_arena) {
|
||||||
|
meta = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
|
||||||
|
message_arena, meta, submessage_arena);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
_impl_.meta_ = meta;
|
||||||
|
// @@protoc_insertion_point(field_set_allocated:control.Hello.meta)
|
||||||
|
}
|
||||||
|
|
||||||
|
// int32 id = 2;
|
||||||
inline void Hello::clear_id() {
|
inline void Hello::clear_id() {
|
||||||
_impl_.id_ = 0;
|
_impl_.id_ = 0;
|
||||||
}
|
}
|
||||||
@@ -228,7 +768,7 @@ inline void Hello::set_id(int32_t value) {
|
|||||||
// @@protoc_insertion_point(field_set:control.Hello.id)
|
// @@protoc_insertion_point(field_set:control.Hello.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
// string name = 2;
|
// string name = 3;
|
||||||
inline void Hello::clear_name() {
|
inline void Hello::clear_name() {
|
||||||
_impl_.name_.ClearToEmpty();
|
_impl_.name_.ClearToEmpty();
|
||||||
}
|
}
|
||||||
@@ -281,6 +821,10 @@ inline void Hello::set_allocated_name(std::string* name) {
|
|||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
#endif // __GNUC__
|
#endif // __GNUC__
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
// @@protoc_insertion_point(namespace_scope)
|
// @@protoc_insertion_point(namespace_scope)
|
||||||
|
|
||||||
|
|||||||
+13
-4
@@ -4,9 +4,18 @@ package control;
|
|||||||
option optimize_for = LITE_RUNTIME;
|
option optimize_for = LITE_RUNTIME;
|
||||||
option cc_generic_services = false;
|
option cc_generic_services = false;
|
||||||
|
|
||||||
|
message Header {
|
||||||
message Hello {
|
Meta meta = 1;
|
||||||
int32 id = 1;
|
}
|
||||||
string name = 2;
|
message Meta {
|
||||||
|
string rpcname = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message Hello {
|
||||||
|
Meta meta = 1;
|
||||||
|
int32 id = 2;
|
||||||
|
string name = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
|
||||||
|
#include <expected>
|
||||||
|
#include <string>
|
||||||
|
#include <cstring>
|
||||||
|
#include <iostream>
|
||||||
|
#include <format>
|
||||||
|
|
||||||
|
#include <hello.pb.h>
|
||||||
|
|
||||||
|
int main(int argc, char** argv) {
|
||||||
|
control::Hello msg;
|
||||||
|
msg.set_id(1);
|
||||||
|
msg.set_name("bare");
|
||||||
|
|
||||||
|
auto meta = msg.mutable_meta();
|
||||||
|
meta->set_rpcname("getHello");
|
||||||
|
|
||||||
|
std::string buffer;
|
||||||
|
msg.SerializeToString(&buffer);
|
||||||
|
|
||||||
|
control::Header newmsg;
|
||||||
|
newmsg.ParsePartialFromString(buffer);
|
||||||
|
|
||||||
|
auto newmeta = newmsg.meta();
|
||||||
|
std::cout << std::format("{}\n", meta->rpcname());
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user