This repository has been archived on 2024-12-15. You can view files and clone it, but cannot push or open issues or pull requests.
ProtoBufTest/Client/proto/request.pb.cc

345 lines
10 KiB
C++
Raw Normal View History

2015-02-22 19:18:51 +00:00
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: request.proto
2015-02-22 19:18:51 +00:00
#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "request.pb.h"
2015-02-22 19:18:51 +00:00
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
namespace Messages {
2015-02-22 19:18:51 +00:00
namespace {
const ::google::protobuf::Descriptor* Request_descriptor_ = NULL;
2015-02-22 19:18:51 +00:00
const ::google::protobuf::internal::GeneratedMessageReflection*
Request_reflection_ = NULL;
2015-02-22 19:18:51 +00:00
} // namespace
void protobuf_AssignDesc_request_2eproto() {
protobuf_AddDesc_request_2eproto();
2015-02-22 19:18:51 +00:00
const ::google::protobuf::FileDescriptor* file =
::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
"request.proto");
2015-02-22 19:18:51 +00:00
GOOGLE_CHECK(file != NULL);
Request_descriptor_ = file->message_type(0);
static const int Request_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Request, text_),
2015-02-22 19:18:51 +00:00
};
Request_reflection_ =
2015-02-22 19:18:51 +00:00
new ::google::protobuf::internal::GeneratedMessageReflection(
Request_descriptor_,
Request::default_instance_,
Request_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Request, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Request, _unknown_fields_),
2015-02-22 19:18:51 +00:00
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(Request));
2015-02-22 19:18:51 +00:00
}
namespace {
GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
inline void protobuf_AssignDescriptorsOnce() {
::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
&protobuf_AssignDesc_request_2eproto);
2015-02-22 19:18:51 +00:00
}
void protobuf_RegisterTypes(const ::std::string&) {
protobuf_AssignDescriptorsOnce();
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Request_descriptor_, &Request::default_instance());
2015-02-22 19:18:51 +00:00
}
} // namespace
void protobuf_ShutdownFile_request_2eproto() {
delete Request::default_instance_;
delete Request_reflection_;
2015-02-22 19:18:51 +00:00
}
void protobuf_AddDesc_request_2eproto() {
2015-02-22 19:18:51 +00:00
static bool already_here = false;
if (already_here) return;
already_here = true;
GOOGLE_PROTOBUF_VERIFY_VERSION;
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
"\n\rrequest.proto\022\010Messages\"\027\n\007Request\022\014\n\004"
"text\030\001 \001(\t", 50);
2015-02-22 19:18:51 +00:00
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"request.proto", &protobuf_RegisterTypes);
Request::default_instance_ = new Request();
Request::default_instance_->InitAsDefaultInstance();
::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_request_2eproto);
2015-02-22 19:18:51 +00:00
}
// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_request_2eproto {
StaticDescriptorInitializer_request_2eproto() {
protobuf_AddDesc_request_2eproto();
2015-02-22 19:18:51 +00:00
}
} static_descriptor_initializer_request_2eproto_;
2015-02-22 19:18:51 +00:00
// ===================================================================
#ifndef _MSC_VER
const int Request::kTextFieldNumber;
2015-02-22 19:18:51 +00:00
#endif // !_MSC_VER
Request::Request()
2015-02-22 19:18:51 +00:00
: ::google::protobuf::Message() {
SharedCtor();
// @@protoc_insertion_point(constructor:Messages.Request)
2015-02-22 19:18:51 +00:00
}
void Request::InitAsDefaultInstance() {
2015-02-22 19:18:51 +00:00
}
Request::Request(const Request& from)
2015-02-22 19:18:51 +00:00
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:Messages.Request)
2015-02-22 19:18:51 +00:00
}
void Request::SharedCtor() {
2015-02-22 19:18:51 +00:00
::google::protobuf::internal::GetEmptyString();
_cached_size_ = 0;
text_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2015-02-22 19:18:51 +00:00
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Request::~Request() {
// @@protoc_insertion_point(destructor:Messages.Request)
2015-02-22 19:18:51 +00:00
SharedDtor();
}
void Request::SharedDtor() {
if (text_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
delete text_;
2015-02-22 19:18:51 +00:00
}
if (this != default_instance_) {
}
}
void Request::SetCachedSize(int size) const {
2015-02-22 19:18:51 +00:00
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Request::descriptor() {
2015-02-22 19:18:51 +00:00
protobuf_AssignDescriptorsOnce();
return Request_descriptor_;
2015-02-22 19:18:51 +00:00
}
const Request& Request::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_request_2eproto();
2015-02-22 19:18:51 +00:00
return *default_instance_;
}
Request* Request::default_instance_ = NULL;
2015-02-22 19:18:51 +00:00
Request* Request::New() const {
return new Request;
2015-02-22 19:18:51 +00:00
}
void Request::Clear() {
if (has_text()) {
if (text_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
text_->clear();
2015-02-22 19:18:51 +00:00
}
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool Request::MergePartialFromCodedStream(
2015-02-22 19:18:51 +00:00
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:Messages.Request)
2015-02-22 19:18:51 +00:00
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional string text = 1;
2015-02-22 19:18:51 +00:00
case 1: {
if (tag == 10) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_text()));
2015-02-22 19:18:51 +00:00
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->text().data(), this->text().length(),
2015-02-22 19:18:51 +00:00
::google::protobuf::internal::WireFormat::PARSE,
"text");
2015-02-22 19:18:51 +00:00
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:Messages.Request)
2015-02-22 19:18:51 +00:00
return true;
failure:
// @@protoc_insertion_point(parse_failure:Messages.Request)
2015-02-22 19:18:51 +00:00
return false;
#undef DO_
}
void Request::SerializeWithCachedSizes(
2015-02-22 19:18:51 +00:00
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:Messages.Request)
// optional string text = 1;
if (has_text()) {
2015-02-22 19:18:51 +00:00
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->text().data(), this->text().length(),
2015-02-22 19:18:51 +00:00
::google::protobuf::internal::WireFormat::SERIALIZE,
"text");
2015-02-22 19:18:51 +00:00
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->text(), output);
2015-02-22 19:18:51 +00:00
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:Messages.Request)
2015-02-22 19:18:51 +00:00
}
::google::protobuf::uint8* Request::SerializeWithCachedSizesToArray(
2015-02-22 19:18:51 +00:00
::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:Messages.Request)
// optional string text = 1;
if (has_text()) {
2015-02-22 19:18:51 +00:00
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->text().data(), this->text().length(),
2015-02-22 19:18:51 +00:00
::google::protobuf::internal::WireFormat::SERIALIZE,
"text");
2015-02-22 19:18:51 +00:00
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->text(), target);
2015-02-22 19:18:51 +00:00
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:Messages.Request)
2015-02-22 19:18:51 +00:00
return target;
}
int Request::ByteSize() const {
2015-02-22 19:18:51 +00:00
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// optional string text = 1;
if (has_text()) {
2015-02-22 19:18:51 +00:00
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->text());
2015-02-22 19:18:51 +00:00
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Request::MergeFrom(const ::google::protobuf::Message& from) {
2015-02-22 19:18:51 +00:00
GOOGLE_CHECK_NE(&from, this);
const Request* source =
::google::protobuf::internal::dynamic_cast_if_available<const Request*>(
2015-02-22 19:18:51 +00:00
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void Request::MergeFrom(const Request& from) {
2015-02-22 19:18:51 +00:00
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_text()) {
set_text(from.text());
2015-02-22 19:18:51 +00:00
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void Request::CopyFrom(const ::google::protobuf::Message& from) {
2015-02-22 19:18:51 +00:00
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Request::CopyFrom(const Request& from) {
2015-02-22 19:18:51 +00:00
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Request::IsInitialized() const {
2015-02-22 19:18:51 +00:00
return true;
}
void Request::Swap(Request* other) {
2015-02-22 19:18:51 +00:00
if (other != this) {
std::swap(text_, other->text_);
2015-02-22 19:18:51 +00:00
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata Request::GetMetadata() const {
2015-02-22 19:18:51 +00:00
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = Request_descriptor_;
metadata.reflection = Request_reflection_;
2015-02-22 19:18:51 +00:00
return metadata;
}
// @@protoc_insertion_point(namespace_scope)
} // namespace Messages
2015-02-22 19:18:51 +00:00
// @@protoc_insertion_point(global_scope)