mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 16:46:47 +00:00
To use protobuf, run cmake as follows: cmake -DUSE_PROTOBUF=1 .. For this, protobuf library has to be installed on the system. Further changes: Clean up splitter/merger: default are N-to-1-merger and 1-to-N-splitter. Fix bug in nanomsg message deallocation. Setup proper buffer sizes for nanomsg/zeromq via cmake/bash script. chmod +x for start scripts.
699 lines
20 KiB
C++
699 lines
20 KiB
C++
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
// source: payload.proto
|
|
|
|
#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
|
|
#include "payload.pb.h"
|
|
|
|
#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 sampler {
|
|
|
|
namespace {
|
|
|
|
const ::google::protobuf::Descriptor* Content_descriptor_ = NULL;
|
|
const ::google::protobuf::internal::GeneratedMessageReflection*
|
|
Content_reflection_ = NULL;
|
|
const ::google::protobuf::Descriptor* Payload_descriptor_ = NULL;
|
|
const ::google::protobuf::internal::GeneratedMessageReflection*
|
|
Payload_reflection_ = NULL;
|
|
|
|
} // namespace
|
|
|
|
|
|
void protobuf_AssignDesc_payload_2eproto() {
|
|
protobuf_AddDesc_payload_2eproto();
|
|
const ::google::protobuf::FileDescriptor* file =
|
|
::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
|
|
"payload.proto");
|
|
GOOGLE_CHECK(file != NULL);
|
|
Content_descriptor_ = file->message_type(0);
|
|
static const int Content_offsets_[5] = {
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Content, a_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Content, b_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Content, x_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Content, y_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Content, z_),
|
|
};
|
|
Content_reflection_ =
|
|
new ::google::protobuf::internal::GeneratedMessageReflection(
|
|
Content_descriptor_,
|
|
Content::default_instance_,
|
|
Content_offsets_,
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Content, _has_bits_[0]),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Content, _unknown_fields_),
|
|
-1,
|
|
::google::protobuf::DescriptorPool::generated_pool(),
|
|
::google::protobuf::MessageFactory::generated_factory(),
|
|
sizeof(Content));
|
|
Payload_descriptor_ = file->message_type(1);
|
|
static const int Payload_offsets_[1] = {
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Payload, data_),
|
|
};
|
|
Payload_reflection_ =
|
|
new ::google::protobuf::internal::GeneratedMessageReflection(
|
|
Payload_descriptor_,
|
|
Payload::default_instance_,
|
|
Payload_offsets_,
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Payload, _has_bits_[0]),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Payload, _unknown_fields_),
|
|
-1,
|
|
::google::protobuf::DescriptorPool::generated_pool(),
|
|
::google::protobuf::MessageFactory::generated_factory(),
|
|
sizeof(Payload));
|
|
}
|
|
|
|
namespace {
|
|
|
|
GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
|
|
inline void protobuf_AssignDescriptorsOnce() {
|
|
::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
|
|
&protobuf_AssignDesc_payload_2eproto);
|
|
}
|
|
|
|
void protobuf_RegisterTypes(const ::std::string&) {
|
|
protobuf_AssignDescriptorsOnce();
|
|
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
|
|
Content_descriptor_, &Content::default_instance());
|
|
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
|
|
Payload_descriptor_, &Payload::default_instance());
|
|
}
|
|
|
|
} // namespace
|
|
|
|
void protobuf_ShutdownFile_payload_2eproto() {
|
|
delete Content::default_instance_;
|
|
delete Content_reflection_;
|
|
delete Payload::default_instance_;
|
|
delete Payload_reflection_;
|
|
}
|
|
|
|
void protobuf_AddDesc_payload_2eproto() {
|
|
static bool already_here = false;
|
|
if (already_here) return;
|
|
already_here = true;
|
|
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
|
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
|
|
"\n\rpayload.proto\022\007sampler\"@\n\007Content\022\t\n\001a"
|
|
"\030\001 \001(\001\022\t\n\001b\030\002 \001(\001\022\t\n\001x\030\003 \001(\005\022\t\n\001y\030\004 \001(\005\022"
|
|
"\t\n\001z\030\005 \001(\005\")\n\007Payload\022\036\n\004data\030\001 \003(\0132\020.sa"
|
|
"mpler.Content", 133);
|
|
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
|
|
"payload.proto", &protobuf_RegisterTypes);
|
|
Content::default_instance_ = new Content();
|
|
Payload::default_instance_ = new Payload();
|
|
Content::default_instance_->InitAsDefaultInstance();
|
|
Payload::default_instance_->InitAsDefaultInstance();
|
|
::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_payload_2eproto);
|
|
}
|
|
|
|
// Force AddDescriptors() to be called at static initialization time.
|
|
struct StaticDescriptorInitializer_payload_2eproto {
|
|
StaticDescriptorInitializer_payload_2eproto() {
|
|
protobuf_AddDesc_payload_2eproto();
|
|
}
|
|
} static_descriptor_initializer_payload_2eproto_;
|
|
|
|
// ===================================================================
|
|
|
|
#ifndef _MSC_VER
|
|
const int Content::kAFieldNumber;
|
|
const int Content::kBFieldNumber;
|
|
const int Content::kXFieldNumber;
|
|
const int Content::kYFieldNumber;
|
|
const int Content::kZFieldNumber;
|
|
#endif // !_MSC_VER
|
|
|
|
Content::Content()
|
|
: ::google::protobuf::Message() {
|
|
SharedCtor();
|
|
}
|
|
|
|
void Content::InitAsDefaultInstance() {
|
|
}
|
|
|
|
Content::Content(const Content& from)
|
|
: ::google::protobuf::Message() {
|
|
SharedCtor();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void Content::SharedCtor() {
|
|
_cached_size_ = 0;
|
|
a_ = 0;
|
|
b_ = 0;
|
|
x_ = 0;
|
|
y_ = 0;
|
|
z_ = 0;
|
|
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
|
}
|
|
|
|
Content::~Content() {
|
|
SharedDtor();
|
|
}
|
|
|
|
void Content::SharedDtor() {
|
|
if (this != default_instance_) {
|
|
}
|
|
}
|
|
|
|
void Content::SetCachedSize(int size) const {
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
_cached_size_ = size;
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
}
|
|
const ::google::protobuf::Descriptor* Content::descriptor() {
|
|
protobuf_AssignDescriptorsOnce();
|
|
return Content_descriptor_;
|
|
}
|
|
|
|
const Content& Content::default_instance() {
|
|
if (default_instance_ == NULL) protobuf_AddDesc_payload_2eproto();
|
|
return *default_instance_;
|
|
}
|
|
|
|
Content* Content::default_instance_ = NULL;
|
|
|
|
Content* Content::New() const {
|
|
return new Content;
|
|
}
|
|
|
|
void Content::Clear() {
|
|
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
|
a_ = 0;
|
|
b_ = 0;
|
|
x_ = 0;
|
|
y_ = 0;
|
|
z_ = 0;
|
|
}
|
|
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
|
mutable_unknown_fields()->Clear();
|
|
}
|
|
|
|
bool Content::MergePartialFromCodedStream(
|
|
::google::protobuf::io::CodedInputStream* input) {
|
|
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
|
|
::google::protobuf::uint32 tag;
|
|
while ((tag = input->ReadTag()) != 0) {
|
|
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
|
// optional double a = 1;
|
|
case 1: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) {
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
|
|
input, &a_)));
|
|
set_has_a();
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(17)) goto parse_b;
|
|
break;
|
|
}
|
|
|
|
// optional double b = 2;
|
|
case 2: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) {
|
|
parse_b:
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
|
|
input, &b_)));
|
|
set_has_b();
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(24)) goto parse_x;
|
|
break;
|
|
}
|
|
|
|
// optional int32 x = 3;
|
|
case 3: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
|
|
parse_x:
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
|
|
input, &x_)));
|
|
set_has_x();
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(32)) goto parse_y;
|
|
break;
|
|
}
|
|
|
|
// optional int32 y = 4;
|
|
case 4: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
|
|
parse_y:
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
|
|
input, &y_)));
|
|
set_has_y();
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(40)) goto parse_z;
|
|
break;
|
|
}
|
|
|
|
// optional int32 z = 5;
|
|
case 5: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
|
|
parse_z:
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
|
|
input, &z_)));
|
|
set_has_z();
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectAtEnd()) return true;
|
|
break;
|
|
}
|
|
|
|
default: {
|
|
handle_uninterpreted:
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
|
|
return true;
|
|
}
|
|
DO_(::google::protobuf::internal::WireFormat::SkipField(
|
|
input, tag, mutable_unknown_fields()));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
return true;
|
|
#undef DO_
|
|
}
|
|
|
|
void Content::SerializeWithCachedSizes(
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
|
// optional double a = 1;
|
|
if (has_a()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->a(), output);
|
|
}
|
|
|
|
// optional double b = 2;
|
|
if (has_b()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->b(), output);
|
|
}
|
|
|
|
// optional int32 x = 3;
|
|
if (has_x()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->x(), output);
|
|
}
|
|
|
|
// optional int32 y = 4;
|
|
if (has_y()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->y(), output);
|
|
}
|
|
|
|
// optional int32 z = 5;
|
|
if (has_z()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->z(), output);
|
|
}
|
|
|
|
if (!unknown_fields().empty()) {
|
|
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
|
unknown_fields(), output);
|
|
}
|
|
}
|
|
|
|
::google::protobuf::uint8* Content::SerializeWithCachedSizesToArray(
|
|
::google::protobuf::uint8* target) const {
|
|
// optional double a = 1;
|
|
if (has_a()) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->a(), target);
|
|
}
|
|
|
|
// optional double b = 2;
|
|
if (has_b()) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->b(), target);
|
|
}
|
|
|
|
// optional int32 x = 3;
|
|
if (has_x()) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->x(), target);
|
|
}
|
|
|
|
// optional int32 y = 4;
|
|
if (has_y()) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->y(), target);
|
|
}
|
|
|
|
// optional int32 z = 5;
|
|
if (has_z()) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->z(), target);
|
|
}
|
|
|
|
if (!unknown_fields().empty()) {
|
|
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
|
unknown_fields(), target);
|
|
}
|
|
return target;
|
|
}
|
|
|
|
int Content::ByteSize() const {
|
|
int total_size = 0;
|
|
|
|
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
|
// optional double a = 1;
|
|
if (has_a()) {
|
|
total_size += 1 + 8;
|
|
}
|
|
|
|
// optional double b = 2;
|
|
if (has_b()) {
|
|
total_size += 1 + 8;
|
|
}
|
|
|
|
// optional int32 x = 3;
|
|
if (has_x()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::Int32Size(
|
|
this->x());
|
|
}
|
|
|
|
// optional int32 y = 4;
|
|
if (has_y()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::Int32Size(
|
|
this->y());
|
|
}
|
|
|
|
// optional int32 z = 5;
|
|
if (has_z()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::Int32Size(
|
|
this->z());
|
|
}
|
|
|
|
}
|
|
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 Content::MergeFrom(const ::google::protobuf::Message& from) {
|
|
GOOGLE_CHECK_NE(&from, this);
|
|
const Content* source =
|
|
::google::protobuf::internal::dynamic_cast_if_available<const Content*>(
|
|
&from);
|
|
if (source == NULL) {
|
|
::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
|
} else {
|
|
MergeFrom(*source);
|
|
}
|
|
}
|
|
|
|
void Content::MergeFrom(const Content& from) {
|
|
GOOGLE_CHECK_NE(&from, this);
|
|
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
|
if (from.has_a()) {
|
|
set_a(from.a());
|
|
}
|
|
if (from.has_b()) {
|
|
set_b(from.b());
|
|
}
|
|
if (from.has_x()) {
|
|
set_x(from.x());
|
|
}
|
|
if (from.has_y()) {
|
|
set_y(from.y());
|
|
}
|
|
if (from.has_z()) {
|
|
set_z(from.z());
|
|
}
|
|
}
|
|
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
|
|
}
|
|
|
|
void Content::CopyFrom(const ::google::protobuf::Message& from) {
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void Content::CopyFrom(const Content& from) {
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool Content::IsInitialized() const {
|
|
|
|
return true;
|
|
}
|
|
|
|
void Content::Swap(Content* other) {
|
|
if (other != this) {
|
|
std::swap(a_, other->a_);
|
|
std::swap(b_, other->b_);
|
|
std::swap(x_, other->x_);
|
|
std::swap(y_, other->y_);
|
|
std::swap(z_, other->z_);
|
|
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 Content::GetMetadata() const {
|
|
protobuf_AssignDescriptorsOnce();
|
|
::google::protobuf::Metadata metadata;
|
|
metadata.descriptor = Content_descriptor_;
|
|
metadata.reflection = Content_reflection_;
|
|
return metadata;
|
|
}
|
|
|
|
|
|
// ===================================================================
|
|
|
|
#ifndef _MSC_VER
|
|
const int Payload::kDataFieldNumber;
|
|
#endif // !_MSC_VER
|
|
|
|
Payload::Payload()
|
|
: ::google::protobuf::Message() {
|
|
SharedCtor();
|
|
}
|
|
|
|
void Payload::InitAsDefaultInstance() {
|
|
}
|
|
|
|
Payload::Payload(const Payload& from)
|
|
: ::google::protobuf::Message() {
|
|
SharedCtor();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void Payload::SharedCtor() {
|
|
_cached_size_ = 0;
|
|
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
|
}
|
|
|
|
Payload::~Payload() {
|
|
SharedDtor();
|
|
}
|
|
|
|
void Payload::SharedDtor() {
|
|
if (this != default_instance_) {
|
|
}
|
|
}
|
|
|
|
void Payload::SetCachedSize(int size) const {
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
_cached_size_ = size;
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
}
|
|
const ::google::protobuf::Descriptor* Payload::descriptor() {
|
|
protobuf_AssignDescriptorsOnce();
|
|
return Payload_descriptor_;
|
|
}
|
|
|
|
const Payload& Payload::default_instance() {
|
|
if (default_instance_ == NULL) protobuf_AddDesc_payload_2eproto();
|
|
return *default_instance_;
|
|
}
|
|
|
|
Payload* Payload::default_instance_ = NULL;
|
|
|
|
Payload* Payload::New() const {
|
|
return new Payload;
|
|
}
|
|
|
|
void Payload::Clear() {
|
|
data_.Clear();
|
|
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
|
mutable_unknown_fields()->Clear();
|
|
}
|
|
|
|
bool Payload::MergePartialFromCodedStream(
|
|
::google::protobuf::io::CodedInputStream* input) {
|
|
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
|
|
::google::protobuf::uint32 tag;
|
|
while ((tag = input->ReadTag()) != 0) {
|
|
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
|
// repeated .sampler.Content data = 1;
|
|
case 1: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
|
|
parse_data:
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
|
|
input, add_data()));
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(10)) goto parse_data;
|
|
if (input->ExpectAtEnd()) return true;
|
|
break;
|
|
}
|
|
|
|
default: {
|
|
handle_uninterpreted:
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
|
|
return true;
|
|
}
|
|
DO_(::google::protobuf::internal::WireFormat::SkipField(
|
|
input, tag, mutable_unknown_fields()));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
return true;
|
|
#undef DO_
|
|
}
|
|
|
|
void Payload::SerializeWithCachedSizes(
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
|
// repeated .sampler.Content data = 1;
|
|
for (int i = 0; i < this->data_size(); i++) {
|
|
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
|
1, this->data(i), output);
|
|
}
|
|
|
|
if (!unknown_fields().empty()) {
|
|
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
|
unknown_fields(), output);
|
|
}
|
|
}
|
|
|
|
::google::protobuf::uint8* Payload::SerializeWithCachedSizesToArray(
|
|
::google::protobuf::uint8* target) const {
|
|
// repeated .sampler.Content data = 1;
|
|
for (int i = 0; i < this->data_size(); i++) {
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
|
WriteMessageNoVirtualToArray(
|
|
1, this->data(i), target);
|
|
}
|
|
|
|
if (!unknown_fields().empty()) {
|
|
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
|
unknown_fields(), target);
|
|
}
|
|
return target;
|
|
}
|
|
|
|
int Payload::ByteSize() const {
|
|
int total_size = 0;
|
|
|
|
// repeated .sampler.Content data = 1;
|
|
total_size += 1 * this->data_size();
|
|
for (int i = 0; i < this->data_size(); i++) {
|
|
total_size +=
|
|
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
|
this->data(i));
|
|
}
|
|
|
|
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 Payload::MergeFrom(const ::google::protobuf::Message& from) {
|
|
GOOGLE_CHECK_NE(&from, this);
|
|
const Payload* source =
|
|
::google::protobuf::internal::dynamic_cast_if_available<const Payload*>(
|
|
&from);
|
|
if (source == NULL) {
|
|
::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
|
} else {
|
|
MergeFrom(*source);
|
|
}
|
|
}
|
|
|
|
void Payload::MergeFrom(const Payload& from) {
|
|
GOOGLE_CHECK_NE(&from, this);
|
|
data_.MergeFrom(from.data_);
|
|
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
|
|
}
|
|
|
|
void Payload::CopyFrom(const ::google::protobuf::Message& from) {
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void Payload::CopyFrom(const Payload& from) {
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool Payload::IsInitialized() const {
|
|
|
|
return true;
|
|
}
|
|
|
|
void Payload::Swap(Payload* other) {
|
|
if (other != this) {
|
|
data_.Swap(&other->data_);
|
|
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 Payload::GetMetadata() const {
|
|
protobuf_AssignDescriptorsOnce();
|
|
::google::protobuf::Metadata metadata;
|
|
metadata.descriptor = Payload_descriptor_;
|
|
metadata.reflection = Payload_reflection_;
|
|
return metadata;
|
|
}
|
|
|
|
|
|
// @@protoc_insertion_point(namespace_scope)
|
|
|
|
} // namespace sampler
|
|
|
|
// @@protoc_insertion_point(global_scope)
|