diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2017-11-16 12:53:13 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2017-11-16 12:53:13 +0200 |
| commit | 65d01ff549d80fbe13ff5e966df216c9f7c03653 (patch) | |
| tree | 2a1898d07dea2b05749217c3d0937235c0bc4ecf /Software | |
| parent | 5f7356702aa6683407cd1a2ef6cf57a46a35794b (diff) | |
| download | Tango-65d01ff549d80fbe13ff5e966df216c9f7c03653.tar.gz Tango-65d01ff549d80fbe13ff5e966df216c9f7c03653.zip | |
Fixed issue with proto-tc output.
Added relative include path for native protobuf tester.
Modified C++ compiler to use default folder structure.
Implemented pre-build event for native protobuf tester.
Diffstat (limited to 'Software')
23 files changed, 4995 insertions, 12 deletions
diff --git a/Software/Visual Studio/Native/Tango.ProtoTest/CalculateRequest.pb.cc b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/CalculateRequest.pb.cc index 240b597f4..240b597f4 100644 --- a/Software/Visual Studio/Native/Tango.ProtoTest/CalculateRequest.pb.cc +++ b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/CalculateRequest.pb.cc diff --git a/Software/Visual Studio/Native/Tango.ProtoTest/CalculateRequest.pb.h b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/CalculateRequest.pb.h index 3e527af42..3e527af42 100644 --- a/Software/Visual Studio/Native/Tango.ProtoTest/CalculateRequest.pb.h +++ b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/CalculateRequest.pb.h diff --git a/Software/Visual Studio/Native/Tango.ProtoTest/CalculateResponse.pb.cc b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/CalculateResponse.pb.cc index d7c9ab538..d7c9ab538 100644 --- a/Software/Visual Studio/Native/Tango.ProtoTest/CalculateResponse.pb.cc +++ b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/CalculateResponse.pb.cc diff --git a/Software/Visual Studio/Native/Tango.ProtoTest/CalculateResponse.pb.h b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/CalculateResponse.pb.h index 1bcf86e80..1bcf86e80 100644 --- a/Software/Visual Studio/Native/Tango.ProtoTest/CalculateResponse.pb.h +++ b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/CalculateResponse.pb.h diff --git a/Software/Visual Studio/Native/Tango.ProtoTest/PMR/Job.pb.cc b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/Job.pb.cc new file mode 100644 index 000000000..78a895b4b --- /dev/null +++ b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/Job.pb.cc @@ -0,0 +1,525 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Job.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "Job.pb.h" + +#include <algorithm> + +#include <google/protobuf/stubs/common.h> +#include <google/protobuf/stubs/port.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 Tango { +namespace PMR { +namespace Jobs { +class JobDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed<Job> + _instance; +} _Job_default_instance_; + +namespace protobuf_Job_2eproto { + + +namespace { + +::google::protobuf::Metadata file_level_metadata[1]; + +} // namespace + +PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, +}; + +PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + ::google::protobuf::internal::AuxillaryParseTableField(), +}; +PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, +}; + +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Job, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Job, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Job, segments_), +}; +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(Job)}, +}; + +static ::google::protobuf::Message const * const file_default_instances[] = { + reinterpret_cast<const ::google::protobuf::Message*>(&_Job_default_instance_), +}; + +namespace { + +void protobuf_AssignDescriptors() { + AddDescriptors(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "Job.proto", schemas, file_default_instances, TableStruct::offsets, factory, + file_level_metadata, NULL, NULL); +} + +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); +} + +} // namespace +void TableStruct::InitDefaultsImpl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::google::protobuf::internal::InitProtobufDefaults(); + ::Tango::PMR::Jobs::protobuf_Segment_2eproto::InitDefaults(); + _Job_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_Job_default_instance_);} + +void InitDefaults() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); +} +namespace { +void AddDescriptorsImpl() { + InitDefaults(); + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + "\n\tJob.proto\022\016Tango.PMR.Jobs\032\rSegment.pro" + "to\">\n\003Job\022\014\n\004Name\030\001 \001(\t\022)\n\010Segments\030\002 \003(" + "\0132\027.Tango.PMR.Jobs.SegmentB\032\n\030com.twine." + "tango.pmr.jobsb\006proto3" + }; + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + descriptor, 142); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "Job.proto", &protobuf_RegisterTypes); + ::Tango::PMR::Jobs::protobuf_Segment_2eproto::AddDescriptors(); +} +} // anonymous namespace + +void AddDescriptors() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); +} +// Force AddDescriptors() to be called at dynamic initialization time. +struct StaticDescriptorInitializer { + StaticDescriptorInitializer() { + AddDescriptors(); + } +} static_descriptor_initializer; + +} // namespace protobuf_Job_2eproto + + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int Job::kNameFieldNumber; +const int Job::kSegmentsFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +Job::Job() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_Job_2eproto::InitDefaults(); + } + SharedCtor(); + // @@protoc_insertion_point(constructor:Tango.PMR.Jobs.Job) +} +Job::Job(const Job& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + segments_(from.segments_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.name().size() > 0) { + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + // @@protoc_insertion_point(copy_constructor:Tango.PMR.Jobs.Job) +} + +void Job::SharedCtor() { + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + _cached_size_ = 0; +} + +Job::~Job() { + // @@protoc_insertion_point(destructor:Tango.PMR.Jobs.Job) + SharedDtor(); +} + +void Job::SharedDtor() { + name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +void Job::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* Job::descriptor() { + protobuf_Job_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_Job_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const Job& Job::default_instance() { + protobuf_Job_2eproto::InitDefaults(); + return *internal_default_instance(); +} + +Job* Job::New(::google::protobuf::Arena* arena) const { + Job* n = new Job; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void Job::Clear() { +// @@protoc_insertion_point(message_clear_start:Tango.PMR.Jobs.Job) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + segments_.Clear(); + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + _internal_metadata_.Clear(); +} + +bool Job::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:Tango.PMR.Jobs.Job) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string Name = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast<int>(this->name().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "Tango.PMR.Jobs.Job.Name")); + } else { + goto handle_unusual; + } + break; + } + + // repeated .Tango.PMR.Jobs.Segment Segments = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_segments())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:Tango.PMR.Jobs.Job) + return true; +failure: + // @@protoc_insertion_point(parse_failure:Tango.PMR.Jobs.Job) + return false; +#undef DO_ +} + +void Job::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:Tango.PMR.Jobs.Job) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string Name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast<int>(this->name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "Tango.PMR.Jobs.Job.Name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->name(), output); + } + + // repeated .Tango.PMR.Jobs.Segment Segments = 2; + for (unsigned int i = 0, + n = static_cast<unsigned int>(this->segments_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->segments(static_cast<int>(i)), output); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } + // @@protoc_insertion_point(serialize_end:Tango.PMR.Jobs.Job) +} + +::google::protobuf::uint8* Job::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:Tango.PMR.Jobs.Job) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string Name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast<int>(this->name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "Tango.PMR.Jobs.Job.Name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->name(), target); + } + + // repeated .Tango.PMR.Jobs.Segment Segments = 2; + for (unsigned int i = 0, + n = static_cast<unsigned int>(this->segments_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 2, this->segments(static_cast<int>(i)), deterministic, target); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:Tango.PMR.Jobs.Job) + return target; +} + +size_t Job::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Tango.PMR.Jobs.Job) + size_t total_size = 0; + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } + // repeated .Tango.PMR.Jobs.Segment Segments = 2; + { + unsigned int count = static_cast<unsigned int>(this->segments_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->segments(static_cast<int>(i))); + } + } + + // string Name = 1; + if (this->name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void Job::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Tango.PMR.Jobs.Job) + GOOGLE_DCHECK_NE(&from, this); + const Job* source = + ::google::protobuf::internal::DynamicCastToGenerated<const Job>( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Tango.PMR.Jobs.Job) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Tango.PMR.Jobs.Job) + MergeFrom(*source); + } +} + +void Job::MergeFrom(const Job& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Tango.PMR.Jobs.Job) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + segments_.MergeFrom(from.segments_); + if (from.name().size() > 0) { + + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } +} + +void Job::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Tango.PMR.Jobs.Job) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Job::CopyFrom(const Job& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Tango.PMR.Jobs.Job) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Job::IsInitialized() const { + return true; +} + +void Job::Swap(Job* other) { + if (other == this) return; + InternalSwap(other); +} +void Job::InternalSwap(Job* other) { + using std::swap; + segments_.InternalSwap(&other->segments_); + name_.Swap(&other->name_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata Job::GetMetadata() const { + protobuf_Job_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_Job_2eproto::file_level_metadata[kIndexInFileMessages]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// Job + +// string Name = 1; +void Job::clear_name() { + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +const ::std::string& Job::name() const { + // @@protoc_insertion_point(field_get:Tango.PMR.Jobs.Job.Name) + return name_.GetNoArena(); +} +void Job::set_name(const ::std::string& value) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:Tango.PMR.Jobs.Job.Name) +} +#if LANG_CXX11 +void Job::set_name(::std::string&& value) { + + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:Tango.PMR.Jobs.Job.Name) +} +#endif +void Job::set_name(const char* value) { + GOOGLE_DCHECK(value != NULL); + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:Tango.PMR.Jobs.Job.Name) +} +void Job::set_name(const char* value, size_t size) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast<const char*>(value), size)); + // @@protoc_insertion_point(field_set_pointer:Tango.PMR.Jobs.Job.Name) +} +::std::string* Job::mutable_name() { + + // @@protoc_insertion_point(field_mutable:Tango.PMR.Jobs.Job.Name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +::std::string* Job::release_name() { + // @@protoc_insertion_point(field_release:Tango.PMR.Jobs.Job.Name) + + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void Job::set_allocated_name(::std::string* name) { + if (name != NULL) { + + } else { + + } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:Tango.PMR.Jobs.Job.Name) +} + +// repeated .Tango.PMR.Jobs.Segment Segments = 2; +int Job::segments_size() const { + return segments_.size(); +} +void Job::clear_segments() { + segments_.Clear(); +} +const ::Tango::PMR::Jobs::Segment& Job::segments(int index) const { + // @@protoc_insertion_point(field_get:Tango.PMR.Jobs.Job.Segments) + return segments_.Get(index); +} +::Tango::PMR::Jobs::Segment* Job::mutable_segments(int index) { + // @@protoc_insertion_point(field_mutable:Tango.PMR.Jobs.Job.Segments) + return segments_.Mutable(index); +} +::Tango::PMR::Jobs::Segment* Job::add_segments() { + // @@protoc_insertion_point(field_add:Tango.PMR.Jobs.Job.Segments) + return segments_.Add(); +} +::google::protobuf::RepeatedPtrField< ::Tango::PMR::Jobs::Segment >* +Job::mutable_segments() { + // @@protoc_insertion_point(field_mutable_list:Tango.PMR.Jobs.Job.Segments) + return &segments_; +} +const ::google::protobuf::RepeatedPtrField< ::Tango::PMR::Jobs::Segment >& +Job::segments() const { + // @@protoc_insertion_point(field_list:Tango.PMR.Jobs.Job.Segments) + return segments_; +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + +} // namespace Jobs +} // namespace PMR +} // namespace Tango + +// @@protoc_insertion_point(global_scope) diff --git a/Software/Visual Studio/Native/Tango.ProtoTest/PMR/Job.pb.h b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/Job.pb.h new file mode 100644 index 000000000..6cd09051c --- /dev/null +++ b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/Job.pb.h @@ -0,0 +1,290 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Job.proto + +#ifndef PROTOBUF_Job_2eproto__INCLUDED +#define PROTOBUF_Job_2eproto__INCLUDED + +#include <string> + +#include <google/protobuf/stubs/common.h> + +#if GOOGLE_PROTOBUF_VERSION < 3004000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/arena.h> +#include <google/protobuf/arenastring.h> +#include <google/protobuf/generated_message_table_driven.h> +#include <google/protobuf/generated_message_util.h> +#include <google/protobuf/metadata.h> +#include <google/protobuf/message.h> +#include <google/protobuf/repeated_field.h> // IWYU pragma: export +#include <google/protobuf/extension_set.h> // IWYU pragma: export +#include <google/protobuf/unknown_field_set.h> +#include "Segment.pb.h" +// @@protoc_insertion_point(includes) +namespace Tango { +namespace PMR { +namespace Jobs { +class Job; +class JobDefaultTypeInternal; +extern JobDefaultTypeInternal _Job_default_instance_; +} // namespace Jobs +} // namespace PMR +} // namespace Tango + +namespace Tango { +namespace PMR { +namespace Jobs { + +namespace protobuf_Job_2eproto { +// Internal implementation detail -- do not call these. +struct TableStruct { + static const ::google::protobuf::internal::ParseTableField entries[]; + static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; + static const ::google::protobuf::internal::ParseTable schema[]; + static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; + static void InitDefaultsImpl(); +}; +void AddDescriptors(); +void InitDefaults(); +} // namespace protobuf_Job_2eproto + +// =================================================================== + +class Job : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Tango.PMR.Jobs.Job) */ { + public: + Job(); + virtual ~Job(); + + Job(const Job& from); + + inline Job& operator=(const Job& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + Job(Job&& from) noexcept + : Job() { + *this = ::std::move(from); + } + + inline Job& operator=(Job&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor(); + static const Job& default_instance(); + + static inline const Job* internal_default_instance() { + return reinterpret_cast<const Job*>( + &_Job_default_instance_); + } + static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = + 0; + + void Swap(Job* other); + friend void swap(Job& a, Job& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline Job* New() const PROTOBUF_FINAL { return New(NULL); } + + Job* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void CopyFrom(const Job& from); + void MergeFrom(const Job& from); + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; + + size_t ByteSizeLong() const PROTOBUF_FINAL; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(Job* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated .Tango.PMR.Jobs.Segment Segments = 2; + int segments_size() const; + void clear_segments(); + static const int kSegmentsFieldNumber = 2; + const ::Tango::PMR::Jobs::Segment& segments(int index) const; + ::Tango::PMR::Jobs::Segment* mutable_segments(int index); + ::Tango::PMR::Jobs::Segment* add_segments(); + ::google::protobuf::RepeatedPtrField< ::Tango::PMR::Jobs::Segment >* + mutable_segments(); + const ::google::protobuf::RepeatedPtrField< ::Tango::PMR::Jobs::Segment >& + segments() const; + + // string Name = 1; + void clear_name(); + static const int kNameFieldNumber = 1; + const ::std::string& name() const; + void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif + void set_name(const char* value); + void set_name(const char* value, size_t size); + ::std::string* mutable_name(); + ::std::string* release_name(); + void set_allocated_name(::std::string* name); + + // @@protoc_insertion_point(class_scope:Tango.PMR.Jobs.Job) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::RepeatedPtrField< ::Tango::PMR::Jobs::Segment > segments_; + ::google::protobuf::internal::ArenaStringPtr name_; + mutable int _cached_size_; + friend struct protobuf_Job_2eproto::TableStruct; +}; +// =================================================================== + + +// =================================================================== + +#if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// Job + +// string Name = 1; +inline void Job::clear_name() { + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& Job::name() const { + // @@protoc_insertion_point(field_get:Tango.PMR.Jobs.Job.Name) + return name_.GetNoArena(); +} +inline void Job::set_name(const ::std::string& value) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:Tango.PMR.Jobs.Job.Name) +} +#if LANG_CXX11 +inline void Job::set_name(::std::string&& value) { + + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:Tango.PMR.Jobs.Job.Name) +} +#endif +inline void Job::set_name(const char* value) { + GOOGLE_DCHECK(value != NULL); + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:Tango.PMR.Jobs.Job.Name) +} +inline void Job::set_name(const char* value, size_t size) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast<const char*>(value), size)); + // @@protoc_insertion_point(field_set_pointer:Tango.PMR.Jobs.Job.Name) +} +inline ::std::string* Job::mutable_name() { + + // @@protoc_insertion_point(field_mutable:Tango.PMR.Jobs.Job.Name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* Job::release_name() { + // @@protoc_insertion_point(field_release:Tango.PMR.Jobs.Job.Name) + + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void Job::set_allocated_name(::std::string* name) { + if (name != NULL) { + + } else { + + } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:Tango.PMR.Jobs.Job.Name) +} + +// repeated .Tango.PMR.Jobs.Segment Segments = 2; +inline int Job::segments_size() const { + return segments_.size(); +} +inline void Job::clear_segments() { + segments_.Clear(); +} +inline const ::Tango::PMR::Jobs::Segment& Job::segments(int index) const { + // @@protoc_insertion_point(field_get:Tango.PMR.Jobs.Job.Segments) + return segments_.Get(index); +} +inline ::Tango::PMR::Jobs::Segment* Job::mutable_segments(int index) { + // @@protoc_insertion_point(field_mutable:Tango.PMR.Jobs.Job.Segments) + return segments_.Mutable(index); +} +inline ::Tango::PMR::Jobs::Segment* Job::add_segments() { + // @@protoc_insertion_point(field_add:Tango.PMR.Jobs.Job.Segments) + return segments_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::Tango::PMR::Jobs::Segment >* +Job::mutable_segments() { + // @@protoc_insertion_point(field_mutable_list:Tango.PMR.Jobs.Job.Segments) + return &segments_; +} +inline const ::google::protobuf::RepeatedPtrField< ::Tango::PMR::Jobs::Segment >& +Job::segments() const { + // @@protoc_insertion_point(field_list:Tango.PMR.Jobs.Job.Segments) + return segments_; +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + + +} // namespace Jobs +} // namespace PMR +} // namespace Tango + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_Job_2eproto__INCLUDED diff --git a/Software/Visual Studio/Native/Tango.ProtoTest/PMR/MessageContainer.pb.cc b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/MessageContainer.pb.cc new file mode 100644 index 000000000..e06fad270 --- /dev/null +++ b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/MessageContainer.pb.cc @@ -0,0 +1,712 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: MessageContainer.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "MessageContainer.pb.h" + +#include <algorithm> + +#include <google/protobuf/stubs/common.h> +#include <google/protobuf/stubs/port.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 Tango { +namespace PMR { +namespace Common { +class MessageContainerDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed<MessageContainer> + _instance; +} _MessageContainer_default_instance_; + +namespace protobuf_MessageContainer_2eproto { + + +namespace { + +::google::protobuf::Metadata file_level_metadata[1]; + +} // namespace + +PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, +}; + +PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + ::google::protobuf::internal::AuxillaryParseTableField(), +}; +PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, +}; + +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageContainer, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageContainer, type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageContainer, token_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageContainer, continuous_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageContainer, completed_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageContainer, data_), +}; +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(MessageContainer)}, +}; + +static ::google::protobuf::Message const * const file_default_instances[] = { + reinterpret_cast<const ::google::protobuf::Message*>(&_MessageContainer_default_instance_), +}; + +namespace { + +void protobuf_AssignDescriptors() { + AddDescriptors(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "MessageContainer.proto", schemas, file_default_instances, TableStruct::offsets, factory, + file_level_metadata, NULL, NULL); +} + +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); +} + +} // namespace +void TableStruct::InitDefaultsImpl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::google::protobuf::internal::InitProtobufDefaults(); + ::Tango::PMR::Common::protobuf_MessageType_2eproto::InitDefaults(); + _MessageContainer_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_MessageContainer_default_instance_);} + +void InitDefaults() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); +} +namespace { +void AddDescriptorsImpl() { + InitDefaults(); + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + "\n\026MessageContainer.proto\022\020Tango.PMR.Comm" + "on\032\021MessageType.proto\"\203\001\n\020MessageContain" + "er\022+\n\004Type\030\001 \001(\0162\035.Tango.PMR.Common.Mess" + "ageType\022\r\n\005Token\030\002 \001(\t\022\022\n\nContinuous\030\003 \001" + "(\010\022\021\n\tCompleted\030\004 \001(\010\022\014\n\004Data\030\005 \001(\014B\034\n\032c" + "om.twine.tango.pmr.commonb\006proto3" + }; + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + descriptor, 233); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "MessageContainer.proto", &protobuf_RegisterTypes); + ::Tango::PMR::Common::protobuf_MessageType_2eproto::AddDescriptors(); +} +} // anonymous namespace + +void AddDescriptors() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); +} +// Force AddDescriptors() to be called at dynamic initialization time. +struct StaticDescriptorInitializer { + StaticDescriptorInitializer() { + AddDescriptors(); + } +} static_descriptor_initializer; + +} // namespace protobuf_MessageContainer_2eproto + + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int MessageContainer::kTypeFieldNumber; +const int MessageContainer::kTokenFieldNumber; +const int MessageContainer::kContinuousFieldNumber; +const int MessageContainer::kCompletedFieldNumber; +const int MessageContainer::kDataFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +MessageContainer::MessageContainer() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_MessageContainer_2eproto::InitDefaults(); + } + SharedCtor(); + // @@protoc_insertion_point(constructor:Tango.PMR.Common.MessageContainer) +} +MessageContainer::MessageContainer(const MessageContainer& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.token().size() > 0) { + token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.token_); + } + data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.data().size() > 0) { + data_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.data_); + } + ::memcpy(&type_, &from.type_, + static_cast<size_t>(reinterpret_cast<char*>(&completed_) - + reinterpret_cast<char*>(&type_)) + sizeof(completed_)); + // @@protoc_insertion_point(copy_constructor:Tango.PMR.Common.MessageContainer) +} + +void MessageContainer::SharedCtor() { + token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(&type_, 0, static_cast<size_t>( + reinterpret_cast<char*>(&completed_) - + reinterpret_cast<char*>(&type_)) + sizeof(completed_)); + _cached_size_ = 0; +} + +MessageContainer::~MessageContainer() { + // @@protoc_insertion_point(destructor:Tango.PMR.Common.MessageContainer) + SharedDtor(); +} + +void MessageContainer::SharedDtor() { + token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + data_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +void MessageContainer::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* MessageContainer::descriptor() { + protobuf_MessageContainer_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_MessageContainer_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const MessageContainer& MessageContainer::default_instance() { + protobuf_MessageContainer_2eproto::InitDefaults(); + return *internal_default_instance(); +} + +MessageContainer* MessageContainer::New(::google::protobuf::Arena* arena) const { + MessageContainer* n = new MessageContainer; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void MessageContainer::Clear() { +// @@protoc_insertion_point(message_clear_start:Tango.PMR.Common.MessageContainer) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + data_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(&type_, 0, static_cast<size_t>( + reinterpret_cast<char*>(&completed_) - + reinterpret_cast<char*>(&type_)) + sizeof(completed_)); + _internal_metadata_.Clear(); +} + +bool MessageContainer::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:Tango.PMR.Common.MessageContainer) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // .Tango.PMR.Common.MessageType Type = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + set_type(static_cast< ::Tango::PMR::Common::MessageType >(value)); + } else { + goto handle_unusual; + } + break; + } + + // string Token = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_token())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->token().data(), static_cast<int>(this->token().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "Tango.PMR.Common.MessageContainer.Token")); + } else { + goto handle_unusual; + } + break; + } + + // bool Continuous = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &continuous_))); + } else { + goto handle_unusual; + } + break; + } + + // bool Completed = 4; + case 4: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &completed_))); + } else { + goto handle_unusual; + } + break; + } + + // bytes Data = 5; + case 5: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_data())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:Tango.PMR.Common.MessageContainer) + return true; +failure: + // @@protoc_insertion_point(parse_failure:Tango.PMR.Common.MessageContainer) + return false; +#undef DO_ +} + +void MessageContainer::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:Tango.PMR.Common.MessageContainer) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .Tango.PMR.Common.MessageType Type = 1; + if (this->type() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 1, this->type(), output); + } + + // string Token = 2; + if (this->token().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->token().data(), static_cast<int>(this->token().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "Tango.PMR.Common.MessageContainer.Token"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->token(), output); + } + + // bool Continuous = 3; + if (this->continuous() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->continuous(), output); + } + + // bool Completed = 4; + if (this->completed() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->completed(), output); + } + + // bytes Data = 5; + if (this->data().size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 5, this->data(), output); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } + // @@protoc_insertion_point(serialize_end:Tango.PMR.Common.MessageContainer) +} + +::google::protobuf::uint8* MessageContainer::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:Tango.PMR.Common.MessageContainer) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .Tango.PMR.Common.MessageType Type = 1; + if (this->type() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 1, this->type(), target); + } + + // string Token = 2; + if (this->token().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->token().data(), static_cast<int>(this->token().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "Tango.PMR.Common.MessageContainer.Token"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->token(), target); + } + + // bool Continuous = 3; + if (this->continuous() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->continuous(), target); + } + + // bool Completed = 4; + if (this->completed() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(4, this->completed(), target); + } + + // bytes Data = 5; + if (this->data().size() > 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 5, this->data(), target); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:Tango.PMR.Common.MessageContainer) + return target; +} + +size_t MessageContainer::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Tango.PMR.Common.MessageContainer) + size_t total_size = 0; + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } + // string Token = 2; + if (this->token().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->token()); + } + + // bytes Data = 5; + if (this->data().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->data()); + } + + // .Tango.PMR.Common.MessageType Type = 1; + if (this->type() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); + } + + // bool Continuous = 3; + if (this->continuous() != 0) { + total_size += 1 + 1; + } + + // bool Completed = 4; + if (this->completed() != 0) { + total_size += 1 + 1; + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void MessageContainer::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Tango.PMR.Common.MessageContainer) + GOOGLE_DCHECK_NE(&from, this); + const MessageContainer* source = + ::google::protobuf::internal::DynamicCastToGenerated<const MessageContainer>( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Tango.PMR.Common.MessageContainer) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Tango.PMR.Common.MessageContainer) + MergeFrom(*source); + } +} + +void MessageContainer::MergeFrom(const MessageContainer& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Tango.PMR.Common.MessageContainer) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.token().size() > 0) { + + token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.token_); + } + if (from.data().size() > 0) { + + data_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.data_); + } + if (from.type() != 0) { + set_type(from.type()); + } + if (from.continuous() != 0) { + set_continuous(from.continuous()); + } + if (from.completed() != 0) { + set_completed(from.completed()); + } +} + +void MessageContainer::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Tango.PMR.Common.MessageContainer) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void MessageContainer::CopyFrom(const MessageContainer& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Tango.PMR.Common.MessageContainer) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool MessageContainer::IsInitialized() const { + return true; +} + +void MessageContainer::Swap(MessageContainer* other) { + if (other == this) return; + InternalSwap(other); +} +void MessageContainer::InternalSwap(MessageContainer* other) { + using std::swap; + token_.Swap(&other->token_); + data_.Swap(&other->data_); + swap(type_, other->type_); + swap(continuous_, other->continuous_); + swap(completed_, other->completed_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata MessageContainer::GetMetadata() const { + protobuf_MessageContainer_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_MessageContainer_2eproto::file_level_metadata[kIndexInFileMessages]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// MessageContainer + +// .Tango.PMR.Common.MessageType Type = 1; +void MessageContainer::clear_type() { + type_ = 0; +} +::Tango::PMR::Common::MessageType MessageContainer::type() const { + // @@protoc_insertion_point(field_get:Tango.PMR.Common.MessageContainer.Type) + return static_cast< ::Tango::PMR::Common::MessageType >(type_); +} +void MessageContainer::set_type(::Tango::PMR::Common::MessageType value) { + + type_ = value; + // @@protoc_insertion_point(field_set:Tango.PMR.Common.MessageContainer.Type) +} + +// string Token = 2; +void MessageContainer::clear_token() { + token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +const ::std::string& MessageContainer::token() const { + // @@protoc_insertion_point(field_get:Tango.PMR.Common.MessageContainer.Token) + return token_.GetNoArena(); +} +void MessageContainer::set_token(const ::std::string& value) { + + token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:Tango.PMR.Common.MessageContainer.Token) +} +#if LANG_CXX11 +void MessageContainer::set_token(::std::string&& value) { + + token_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:Tango.PMR.Common.MessageContainer.Token) +} +#endif +void MessageContainer::set_token(const char* value) { + GOOGLE_DCHECK(value != NULL); + + token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:Tango.PMR.Common.MessageContainer.Token) +} +void MessageContainer::set_token(const char* value, size_t size) { + + token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast<const char*>(value), size)); + // @@protoc_insertion_point(field_set_pointer:Tango.PMR.Common.MessageContainer.Token) +} +::std::string* MessageContainer::mutable_token() { + + // @@protoc_insertion_point(field_mutable:Tango.PMR.Common.MessageContainer.Token) + return token_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +::std::string* MessageContainer::release_token() { + // @@protoc_insertion_point(field_release:Tango.PMR.Common.MessageContainer.Token) + + return token_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void MessageContainer::set_allocated_token(::std::string* token) { + if (token != NULL) { + + } else { + + } + token_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), token); + // @@protoc_insertion_point(field_set_allocated:Tango.PMR.Common.MessageContainer.Token) +} + +// bool Continuous = 3; +void MessageContainer::clear_continuous() { + continuous_ = false; +} +bool MessageContainer::continuous() const { + // @@protoc_insertion_point(field_get:Tango.PMR.Common.MessageContainer.Continuous) + return continuous_; +} +void MessageContainer::set_continuous(bool value) { + + continuous_ = value; + // @@protoc_insertion_point(field_set:Tango.PMR.Common.MessageContainer.Continuous) +} + +// bool Completed = 4; +void MessageContainer::clear_completed() { + completed_ = false; +} +bool MessageContainer::completed() const { + // @@protoc_insertion_point(field_get:Tango.PMR.Common.MessageContainer.Completed) + return completed_; +} +void MessageContainer::set_completed(bool value) { + + completed_ = value; + // @@protoc_insertion_point(field_set:Tango.PMR.Common.MessageContainer.Completed) +} + +// bytes Data = 5; +void MessageContainer::clear_data() { + data_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +const ::std::string& MessageContainer::data() const { + // @@protoc_insertion_point(field_get:Tango.PMR.Common.MessageContainer.Data) + return data_.GetNoArena(); +} +void MessageContainer::set_data(const ::std::string& value) { + + data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:Tango.PMR.Common.MessageContainer.Data) +} +#if LANG_CXX11 +void MessageContainer::set_data(::std::string&& value) { + + data_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:Tango.PMR.Common.MessageContainer.Data) +} +#endif +void MessageContainer::set_data(const char* value) { + GOOGLE_DCHECK(value != NULL); + + data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:Tango.PMR.Common.MessageContainer.Data) +} +void MessageContainer::set_data(const void* value, size_t size) { + + data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast<const char*>(value), size)); + // @@protoc_insertion_point(field_set_pointer:Tango.PMR.Common.MessageContainer.Data) +} +::std::string* MessageContainer::mutable_data() { + + // @@protoc_insertion_point(field_mutable:Tango.PMR.Common.MessageContainer.Data) + return data_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +::std::string* MessageContainer::release_data() { + // @@protoc_insertion_point(field_release:Tango.PMR.Common.MessageContainer.Data) + + return data_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void MessageContainer::set_allocated_data(::std::string* data) { + if (data != NULL) { + + } else { + + } + data_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), data); + // @@protoc_insertion_point(field_set_allocated:Tango.PMR.Common.MessageContainer.Data) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + +} // namespace Common +} // namespace PMR +} // namespace Tango + +// @@protoc_insertion_point(global_scope) diff --git a/Software/Visual Studio/Native/Tango.ProtoTest/PMR/MessageContainer.pb.h b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/MessageContainer.pb.h new file mode 100644 index 000000000..b853ede29 --- /dev/null +++ b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/MessageContainer.pb.h @@ -0,0 +1,378 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: MessageContainer.proto + +#ifndef PROTOBUF_MessageContainer_2eproto__INCLUDED +#define PROTOBUF_MessageContainer_2eproto__INCLUDED + +#include <string> + +#include <google/protobuf/stubs/common.h> + +#if GOOGLE_PROTOBUF_VERSION < 3004000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/arena.h> +#include <google/protobuf/arenastring.h> +#include <google/protobuf/generated_message_table_driven.h> +#include <google/protobuf/generated_message_util.h> +#include <google/protobuf/metadata.h> +#include <google/protobuf/message.h> +#include <google/protobuf/repeated_field.h> // IWYU pragma: export +#include <google/protobuf/extension_set.h> // IWYU pragma: export +#include <google/protobuf/unknown_field_set.h> +#include "MessageType.pb.h" +// @@protoc_insertion_point(includes) +namespace Tango { +namespace PMR { +namespace Common { +class MessageContainer; +class MessageContainerDefaultTypeInternal; +extern MessageContainerDefaultTypeInternal _MessageContainer_default_instance_; +} // namespace Common +} // namespace PMR +} // namespace Tango + +namespace Tango { +namespace PMR { +namespace Common { + +namespace protobuf_MessageContainer_2eproto { +// Internal implementation detail -- do not call these. +struct TableStruct { + static const ::google::protobuf::internal::ParseTableField entries[]; + static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; + static const ::google::protobuf::internal::ParseTable schema[]; + static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; + static void InitDefaultsImpl(); +}; +void AddDescriptors(); +void InitDefaults(); +} // namespace protobuf_MessageContainer_2eproto + +// =================================================================== + +class MessageContainer : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Tango.PMR.Common.MessageContainer) */ { + public: + MessageContainer(); + virtual ~MessageContainer(); + + MessageContainer(const MessageContainer& from); + + inline MessageContainer& operator=(const MessageContainer& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + MessageContainer(MessageContainer&& from) noexcept + : MessageContainer() { + *this = ::std::move(from); + } + + inline MessageContainer& operator=(MessageContainer&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor(); + static const MessageContainer& default_instance(); + + static inline const MessageContainer* internal_default_instance() { + return reinterpret_cast<const MessageContainer*>( + &_MessageContainer_default_instance_); + } + static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = + 0; + + void Swap(MessageContainer* other); + friend void swap(MessageContainer& a, MessageContainer& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline MessageContainer* New() const PROTOBUF_FINAL { return New(NULL); } + + MessageContainer* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void CopyFrom(const MessageContainer& from); + void MergeFrom(const MessageContainer& from); + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; + + size_t ByteSizeLong() const PROTOBUF_FINAL; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(MessageContainer* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // string Token = 2; + void clear_token(); + static const int kTokenFieldNumber = 2; + const ::std::string& token() const; + void set_token(const ::std::string& value); + #if LANG_CXX11 + void set_token(::std::string&& value); + #endif + void set_token(const char* value); + void set_token(const char* value, size_t size); + ::std::string* mutable_token(); + ::std::string* release_token(); + void set_allocated_token(::std::string* token); + + // bytes Data = 5; + void clear_data(); + static const int kDataFieldNumber = 5; + const ::std::string& data() const; + void set_data(const ::std::string& value); + #if LANG_CXX11 + void set_data(::std::string&& value); + #endif + void set_data(const char* value); + void set_data(const void* value, size_t size); + ::std::string* mutable_data(); + ::std::string* release_data(); + void set_allocated_data(::std::string* data); + + // .Tango.PMR.Common.MessageType Type = 1; + void clear_type(); + static const int kTypeFieldNumber = 1; + ::Tango::PMR::Common::MessageType type() const; + void set_type(::Tango::PMR::Common::MessageType value); + + // bool Continuous = 3; + void clear_continuous(); + static const int kContinuousFieldNumber = 3; + bool continuous() const; + void set_continuous(bool value); + + // bool Completed = 4; + void clear_completed(); + static const int kCompletedFieldNumber = 4; + bool completed() const; + void set_completed(bool value); + + // @@protoc_insertion_point(class_scope:Tango.PMR.Common.MessageContainer) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::ArenaStringPtr token_; + ::google::protobuf::internal::ArenaStringPtr data_; + int type_; + bool continuous_; + bool completed_; + mutable int _cached_size_; + friend struct protobuf_MessageContainer_2eproto::TableStruct; +}; +// =================================================================== + + +// =================================================================== + +#if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// MessageContainer + +// .Tango.PMR.Common.MessageType Type = 1; +inline void MessageContainer::clear_type() { + type_ = 0; +} +inline ::Tango::PMR::Common::MessageType MessageContainer::type() const { + // @@protoc_insertion_point(field_get:Tango.PMR.Common.MessageContainer.Type) + return static_cast< ::Tango::PMR::Common::MessageType >(type_); +} +inline void MessageContainer::set_type(::Tango::PMR::Common::MessageType value) { + + type_ = value; + // @@protoc_insertion_point(field_set:Tango.PMR.Common.MessageContainer.Type) +} + +// string Token = 2; +inline void MessageContainer::clear_token() { + token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& MessageContainer::token() const { + // @@protoc_insertion_point(field_get:Tango.PMR.Common.MessageContainer.Token) + return token_.GetNoArena(); +} +inline void MessageContainer::set_token(const ::std::string& value) { + + token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:Tango.PMR.Common.MessageContainer.Token) +} +#if LANG_CXX11 +inline void MessageContainer::set_token(::std::string&& value) { + + token_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:Tango.PMR.Common.MessageContainer.Token) +} +#endif +inline void MessageContainer::set_token(const char* value) { + GOOGLE_DCHECK(value != NULL); + + token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:Tango.PMR.Common.MessageContainer.Token) +} +inline void MessageContainer::set_token(const char* value, size_t size) { + + token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast<const char*>(value), size)); + // @@protoc_insertion_point(field_set_pointer:Tango.PMR.Common.MessageContainer.Token) +} +inline ::std::string* MessageContainer::mutable_token() { + + // @@protoc_insertion_point(field_mutable:Tango.PMR.Common.MessageContainer.Token) + return token_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* MessageContainer::release_token() { + // @@protoc_insertion_point(field_release:Tango.PMR.Common.MessageContainer.Token) + + return token_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void MessageContainer::set_allocated_token(::std::string* token) { + if (token != NULL) { + + } else { + + } + token_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), token); + // @@protoc_insertion_point(field_set_allocated:Tango.PMR.Common.MessageContainer.Token) +} + +// bool Continuous = 3; +inline void MessageContainer::clear_continuous() { + continuous_ = false; +} +inline bool MessageContainer::continuous() const { + // @@protoc_insertion_point(field_get:Tango.PMR.Common.MessageContainer.Continuous) + return continuous_; +} +inline void MessageContainer::set_continuous(bool value) { + + continuous_ = value; + // @@protoc_insertion_point(field_set:Tango.PMR.Common.MessageContainer.Continuous) +} + +// bool Completed = 4; +inline void MessageContainer::clear_completed() { + completed_ = false; +} +inline bool MessageContainer::completed() const { + // @@protoc_insertion_point(field_get:Tango.PMR.Common.MessageContainer.Completed) + return completed_; +} +inline void MessageContainer::set_completed(bool value) { + + completed_ = value; + // @@protoc_insertion_point(field_set:Tango.PMR.Common.MessageContainer.Completed) +} + +// bytes Data = 5; +inline void MessageContainer::clear_data() { + data_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& MessageContainer::data() const { + // @@protoc_insertion_point(field_get:Tango.PMR.Common.MessageContainer.Data) + return data_.GetNoArena(); +} +inline void MessageContainer::set_data(const ::std::string& value) { + + data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:Tango.PMR.Common.MessageContainer.Data) +} +#if LANG_CXX11 +inline void MessageContainer::set_data(::std::string&& value) { + + data_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:Tango.PMR.Common.MessageContainer.Data) +} +#endif +inline void MessageContainer::set_data(const char* value) { + GOOGLE_DCHECK(value != NULL); + + data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:Tango.PMR.Common.MessageContainer.Data) +} +inline void MessageContainer::set_data(const void* value, size_t size) { + + data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast<const char*>(value), size)); + // @@protoc_insertion_point(field_set_pointer:Tango.PMR.Common.MessageContainer.Data) +} +inline ::std::string* MessageContainer::mutable_data() { + + // @@protoc_insertion_point(field_mutable:Tango.PMR.Common.MessageContainer.Data) + return data_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* MessageContainer::release_data() { + // @@protoc_insertion_point(field_release:Tango.PMR.Common.MessageContainer.Data) + + return data_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void MessageContainer::set_allocated_data(::std::string* data) { + if (data != NULL) { + + } else { + + } + data_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), data); + // @@protoc_insertion_point(field_set_allocated:Tango.PMR.Common.MessageContainer.Data) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + + +} // namespace Common +} // namespace PMR +} // namespace Tango + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_MessageContainer_2eproto__INCLUDED diff --git a/Software/Visual Studio/Native/Tango.ProtoTest/PMR/MessageType.pb.cc b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/MessageType.pb.cc new file mode 100644 index 000000000..f1c5e4280 --- /dev/null +++ b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/MessageType.pb.cc @@ -0,0 +1,138 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: MessageType.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "MessageType.pb.h" + +#include <algorithm> + +#include <google/protobuf/stubs/common.h> +#include <google/protobuf/stubs/port.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 Tango { +namespace PMR { +namespace Common { + +namespace protobuf_MessageType_2eproto { + + +namespace { + +const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1]; + +} // namespace + +PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, +}; + +PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + ::google::protobuf::internal::AuxillaryParseTableField(), +}; +PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, +}; + +const ::google::protobuf::uint32 TableStruct::offsets[1] = {}; +static const ::google::protobuf::internal::MigrationSchema* schemas = NULL; +static const ::google::protobuf::Message* const* file_default_instances = NULL; +namespace { + +void protobuf_AssignDescriptors() { + AddDescriptors(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "MessageType.proto", schemas, file_default_instances, TableStruct::offsets, factory, + NULL, file_level_enum_descriptors, NULL); +} + +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); +} + +} // namespace +void TableStruct::InitDefaultsImpl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::google::protobuf::internal::InitProtobufDefaults(); +} + +void InitDefaults() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); +} +namespace { +void AddDescriptorsImpl() { + InitDefaults(); + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + "\n\021MessageType.proto\022\020Tango.PMR.Common*\204\001" + "\n\013MessageType\022\007\n\003RGB\020\000\022\007\n\003Job\020\001\022\013\n\007Segme" + "nt\020\002\022\024\n\020CalculateRequest\020\003\022\025\n\021CalculateR" + "esponse\020\004\022\023\n\017ProgressRequest\020\005\022\024\n\020Progre" + "ssResponse\020\006B\034\n\032com.twine.tango.pmr.comm" + "onb\006proto3" + }; + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + descriptor, 210); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "MessageType.proto", &protobuf_RegisterTypes); +} +} // anonymous namespace + +void AddDescriptors() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); +} +// Force AddDescriptors() to be called at dynamic initialization time. +struct StaticDescriptorInitializer { + StaticDescriptorInitializer() { + AddDescriptors(); + } +} static_descriptor_initializer; + +} // namespace protobuf_MessageType_2eproto + +const ::google::protobuf::EnumDescriptor* MessageType_descriptor() { + protobuf_MessageType_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_MessageType_2eproto::file_level_enum_descriptors[0]; +} +bool MessageType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + return true; + default: + return false; + } +} + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace Common +} // namespace PMR +} // namespace Tango + +// @@protoc_insertion_point(global_scope) diff --git a/Software/Visual Studio/Native/Tango.ProtoTest/PMR/MessageType.pb.h b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/MessageType.pb.h new file mode 100644 index 000000000..45020a960 --- /dev/null +++ b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/MessageType.pb.h @@ -0,0 +1,123 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: MessageType.proto + +#ifndef PROTOBUF_MessageType_2eproto__INCLUDED +#define PROTOBUF_MessageType_2eproto__INCLUDED + +#include <string> + +#include <google/protobuf/stubs/common.h> + +#if GOOGLE_PROTOBUF_VERSION < 3004000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/arena.h> +#include <google/protobuf/arenastring.h> +#include <google/protobuf/generated_message_table_driven.h> +#include <google/protobuf/generated_message_util.h> +#include <google/protobuf/metadata.h> +#include <google/protobuf/repeated_field.h> // IWYU pragma: export +#include <google/protobuf/extension_set.h> // IWYU pragma: export +#include <google/protobuf/generated_enum_reflection.h> +// @@protoc_insertion_point(includes) +namespace Tango { +namespace PMR { +namespace Common { +} // namespace Common +} // namespace PMR +} // namespace Tango + +namespace Tango { +namespace PMR { +namespace Common { + +namespace protobuf_MessageType_2eproto { +// Internal implementation detail -- do not call these. +struct TableStruct { + static const ::google::protobuf::internal::ParseTableField entries[]; + static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; + static const ::google::protobuf::internal::ParseTable schema[]; + static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; + static void InitDefaultsImpl(); +}; +void AddDescriptors(); +void InitDefaults(); +} // namespace protobuf_MessageType_2eproto + +enum MessageType { + RGB = 0, + Job = 1, + Segment = 2, + CalculateRequest = 3, + CalculateResponse = 4, + ProgressRequest = 5, + ProgressResponse = 6, + MessageType_INT_MIN_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32min, + MessageType_INT_MAX_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32max +}; +bool MessageType_IsValid(int value); +const MessageType MessageType_MIN = RGB; +const MessageType MessageType_MAX = ProgressResponse; +const int MessageType_ARRAYSIZE = MessageType_MAX + 1; + +const ::google::protobuf::EnumDescriptor* MessageType_descriptor(); +inline const ::std::string& MessageType_Name(MessageType value) { + return ::google::protobuf::internal::NameOfEnum( + MessageType_descriptor(), value); +} +inline bool MessageType_Parse( + const ::std::string& name, MessageType* value) { + return ::google::protobuf::internal::ParseNamedEnum<MessageType>( + MessageType_descriptor(), name, value); +} +// =================================================================== + + +// =================================================================== + + +// =================================================================== + +#if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + + +} // namespace Common +} // namespace PMR +} // namespace Tango + +namespace google { +namespace protobuf { + +template <> struct is_proto_enum< ::Tango::PMR::Common::MessageType> : ::google::protobuf::internal::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::Tango::PMR::Common::MessageType>() { + return ::Tango::PMR::Common::MessageType_descriptor(); +} + +} // namespace protobuf +} // namespace google + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_MessageType_2eproto__INCLUDED diff --git a/Software/Visual Studio/Native/Tango.ProtoTest/PMR/ProgressRequest.pb.cc b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/ProgressRequest.pb.cc new file mode 100644 index 000000000..39adb6a72 --- /dev/null +++ b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/ProgressRequest.pb.cc @@ -0,0 +1,332 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ProgressRequest.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "ProgressRequest.pb.h" + +#include <algorithm> + +#include <google/protobuf/stubs/common.h> +#include <google/protobuf/stubs/port.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 Tango { +namespace PMR { +namespace Stubs { +class ProgressRequestDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed<ProgressRequest> + _instance; +} _ProgressRequest_default_instance_; + +namespace protobuf_ProgressRequest_2eproto { + + +namespace { + +::google::protobuf::Metadata file_level_metadata[1]; + +} // namespace + +PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, +}; + +PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + ::google::protobuf::internal::AuxillaryParseTableField(), +}; +PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, +}; + +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ProgressRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ +}; +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(ProgressRequest)}, +}; + +static ::google::protobuf::Message const * const file_default_instances[] = { + reinterpret_cast<const ::google::protobuf::Message*>(&_ProgressRequest_default_instance_), +}; + +namespace { + +void protobuf_AssignDescriptors() { + AddDescriptors(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "ProgressRequest.proto", schemas, file_default_instances, TableStruct::offsets, factory, + file_level_metadata, NULL, NULL); +} + +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); +} + +} // namespace +void TableStruct::InitDefaultsImpl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::google::protobuf::internal::InitProtobufDefaults(); + _ProgressRequest_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_ProgressRequest_default_instance_);} + +void InitDefaults() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); +} +namespace { +void AddDescriptorsImpl() { + InitDefaults(); + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + "\n\025ProgressRequest.proto\022\017Tango.PMR.Stubs" + "\"\021\n\017ProgressRequestB\033\n\031com.twine.tango.p" + "mr.stubsb\006proto3" + }; + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + descriptor, 96); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "ProgressRequest.proto", &protobuf_RegisterTypes); +} +} // anonymous namespace + +void AddDescriptors() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); +} +// Force AddDescriptors() to be called at dynamic initialization time. +struct StaticDescriptorInitializer { + StaticDescriptorInitializer() { + AddDescriptors(); + } +} static_descriptor_initializer; + +} // namespace protobuf_ProgressRequest_2eproto + + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +ProgressRequest::ProgressRequest() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_ProgressRequest_2eproto::InitDefaults(); + } + SharedCtor(); + // @@protoc_insertion_point(constructor:Tango.PMR.Stubs.ProgressRequest) +} +ProgressRequest::ProgressRequest(const ProgressRequest& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:Tango.PMR.Stubs.ProgressRequest) +} + +void ProgressRequest::SharedCtor() { + _cached_size_ = 0; +} + +ProgressRequest::~ProgressRequest() { + // @@protoc_insertion_point(destructor:Tango.PMR.Stubs.ProgressRequest) + SharedDtor(); +} + +void ProgressRequest::SharedDtor() { +} + +void ProgressRequest::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ProgressRequest::descriptor() { + protobuf_ProgressRequest_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_ProgressRequest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const ProgressRequest& ProgressRequest::default_instance() { + protobuf_ProgressRequest_2eproto::InitDefaults(); + return *internal_default_instance(); +} + +ProgressRequest* ProgressRequest::New(::google::protobuf::Arena* arena) const { + ProgressRequest* n = new ProgressRequest; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void ProgressRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:Tango.PMR.Stubs.ProgressRequest) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _internal_metadata_.Clear(); +} + +bool ProgressRequest::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:Tango.PMR.Stubs.ProgressRequest) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + } +success: + // @@protoc_insertion_point(parse_success:Tango.PMR.Stubs.ProgressRequest) + return true; +failure: + // @@protoc_insertion_point(parse_failure:Tango.PMR.Stubs.ProgressRequest) + return false; +#undef DO_ +} + +void ProgressRequest::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:Tango.PMR.Stubs.ProgressRequest) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } + // @@protoc_insertion_point(serialize_end:Tango.PMR.Stubs.ProgressRequest) +} + +::google::protobuf::uint8* ProgressRequest::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:Tango.PMR.Stubs.ProgressRequest) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:Tango.PMR.Stubs.ProgressRequest) + return target; +} + +size_t ProgressRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Tango.PMR.Stubs.ProgressRequest) + size_t total_size = 0; + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ProgressRequest::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Tango.PMR.Stubs.ProgressRequest) + GOOGLE_DCHECK_NE(&from, this); + const ProgressRequest* source = + ::google::protobuf::internal::DynamicCastToGenerated<const ProgressRequest>( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Tango.PMR.Stubs.ProgressRequest) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Tango.PMR.Stubs.ProgressRequest) + MergeFrom(*source); + } +} + +void ProgressRequest::MergeFrom(const ProgressRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Tango.PMR.Stubs.ProgressRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + +} + +void ProgressRequest::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Tango.PMR.Stubs.ProgressRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ProgressRequest::CopyFrom(const ProgressRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Tango.PMR.Stubs.ProgressRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ProgressRequest::IsInitialized() const { + return true; +} + +void ProgressRequest::Swap(ProgressRequest* other) { + if (other == this) return; + InternalSwap(other); +} +void ProgressRequest::InternalSwap(ProgressRequest* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata ProgressRequest::GetMetadata() const { + protobuf_ProgressRequest_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_ProgressRequest_2eproto::file_level_metadata[kIndexInFileMessages]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// ProgressRequest + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + +} // namespace Stubs +} // namespace PMR +} // namespace Tango + +// @@protoc_insertion_point(global_scope) diff --git a/Software/Visual Studio/Native/Tango.ProtoTest/PMR/ProgressRequest.pb.h b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/ProgressRequest.pb.h new file mode 100644 index 000000000..a41147953 --- /dev/null +++ b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/ProgressRequest.pb.h @@ -0,0 +1,178 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ProgressRequest.proto + +#ifndef PROTOBUF_ProgressRequest_2eproto__INCLUDED +#define PROTOBUF_ProgressRequest_2eproto__INCLUDED + +#include <string> + +#include <google/protobuf/stubs/common.h> + +#if GOOGLE_PROTOBUF_VERSION < 3004000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/arena.h> +#include <google/protobuf/arenastring.h> +#include <google/protobuf/generated_message_table_driven.h> +#include <google/protobuf/generated_message_util.h> +#include <google/protobuf/metadata.h> +#include <google/protobuf/message.h> +#include <google/protobuf/repeated_field.h> // IWYU pragma: export +#include <google/protobuf/extension_set.h> // IWYU pragma: export +#include <google/protobuf/unknown_field_set.h> +// @@protoc_insertion_point(includes) +namespace Tango { +namespace PMR { +namespace Stubs { +class ProgressRequest; +class ProgressRequestDefaultTypeInternal; +extern ProgressRequestDefaultTypeInternal _ProgressRequest_default_instance_; +} // namespace Stubs +} // namespace PMR +} // namespace Tango + +namespace Tango { +namespace PMR { +namespace Stubs { + +namespace protobuf_ProgressRequest_2eproto { +// Internal implementation detail -- do not call these. +struct TableStruct { + static const ::google::protobuf::internal::ParseTableField entries[]; + static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; + static const ::google::protobuf::internal::ParseTable schema[]; + static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; + static void InitDefaultsImpl(); +}; +void AddDescriptors(); +void InitDefaults(); +} // namespace protobuf_ProgressRequest_2eproto + +// =================================================================== + +class ProgressRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Tango.PMR.Stubs.ProgressRequest) */ { + public: + ProgressRequest(); + virtual ~ProgressRequest(); + + ProgressRequest(const ProgressRequest& from); + + inline ProgressRequest& operator=(const ProgressRequest& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + ProgressRequest(ProgressRequest&& from) noexcept + : ProgressRequest() { + *this = ::std::move(from); + } + + inline ProgressRequest& operator=(ProgressRequest&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor(); + static const ProgressRequest& default_instance(); + + static inline const ProgressRequest* internal_default_instance() { + return reinterpret_cast<const ProgressRequest*>( + &_ProgressRequest_default_instance_); + } + static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = + 0; + + void Swap(ProgressRequest* other); + friend void swap(ProgressRequest& a, ProgressRequest& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline ProgressRequest* New() const PROTOBUF_FINAL { return New(NULL); } + + ProgressRequest* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void CopyFrom(const ProgressRequest& from); + void MergeFrom(const ProgressRequest& from); + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; + + size_t ByteSizeLong() const PROTOBUF_FINAL; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(ProgressRequest* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.ProgressRequest) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + mutable int _cached_size_; + friend struct protobuf_ProgressRequest_2eproto::TableStruct; +}; +// =================================================================== + + +// =================================================================== + +#if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ProgressRequest + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + + +} // namespace Stubs +} // namespace PMR +} // namespace Tango + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_ProgressRequest_2eproto__INCLUDED diff --git a/Software/Visual Studio/Native/Tango.ProtoTest/PMR/ProgressResponse.pb.cc b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/ProgressResponse.pb.cc new file mode 100644 index 000000000..7769c1c0c --- /dev/null +++ b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/ProgressResponse.pb.cc @@ -0,0 +1,389 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ProgressResponse.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "ProgressResponse.pb.h" + +#include <algorithm> + +#include <google/protobuf/stubs/common.h> +#include <google/protobuf/stubs/port.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 Tango { +namespace PMR { +namespace Stubs { +class ProgressResponseDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed<ProgressResponse> + _instance; +} _ProgressResponse_default_instance_; + +namespace protobuf_ProgressResponse_2eproto { + + +namespace { + +::google::protobuf::Metadata file_level_metadata[1]; + +} // namespace + +PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, +}; + +PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + ::google::protobuf::internal::AuxillaryParseTableField(), +}; +PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, +}; + +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ProgressResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ProgressResponse, progress_), +}; +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(ProgressResponse)}, +}; + +static ::google::protobuf::Message const * const file_default_instances[] = { + reinterpret_cast<const ::google::protobuf::Message*>(&_ProgressResponse_default_instance_), +}; + +namespace { + +void protobuf_AssignDescriptors() { + AddDescriptors(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "ProgressResponse.proto", schemas, file_default_instances, TableStruct::offsets, factory, + file_level_metadata, NULL, NULL); +} + +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); +} + +} // namespace +void TableStruct::InitDefaultsImpl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::google::protobuf::internal::InitProtobufDefaults(); + _ProgressResponse_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_ProgressResponse_default_instance_);} + +void InitDefaults() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); +} +namespace { +void AddDescriptorsImpl() { + InitDefaults(); + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + "\n\026ProgressResponse.proto\022\017Tango.PMR.Stub" + "s\"$\n\020ProgressResponse\022\020\n\010Progress\030\001 \001(\001B" + "\033\n\031com.twine.tango.pmr.stubsb\006proto3" + }; + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + descriptor, 116); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "ProgressResponse.proto", &protobuf_RegisterTypes); +} +} // anonymous namespace + +void AddDescriptors() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); +} +// Force AddDescriptors() to be called at dynamic initialization time. +struct StaticDescriptorInitializer { + StaticDescriptorInitializer() { + AddDescriptors(); + } +} static_descriptor_initializer; + +} // namespace protobuf_ProgressResponse_2eproto + + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int ProgressResponse::kProgressFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +ProgressResponse::ProgressResponse() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_ProgressResponse_2eproto::InitDefaults(); + } + SharedCtor(); + // @@protoc_insertion_point(constructor:Tango.PMR.Stubs.ProgressResponse) +} +ProgressResponse::ProgressResponse(const ProgressResponse& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + progress_ = from.progress_; + // @@protoc_insertion_point(copy_constructor:Tango.PMR.Stubs.ProgressResponse) +} + +void ProgressResponse::SharedCtor() { + progress_ = 0; + _cached_size_ = 0; +} + +ProgressResponse::~ProgressResponse() { + // @@protoc_insertion_point(destructor:Tango.PMR.Stubs.ProgressResponse) + SharedDtor(); +} + +void ProgressResponse::SharedDtor() { +} + +void ProgressResponse::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ProgressResponse::descriptor() { + protobuf_ProgressResponse_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_ProgressResponse_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const ProgressResponse& ProgressResponse::default_instance() { + protobuf_ProgressResponse_2eproto::InitDefaults(); + return *internal_default_instance(); +} + +ProgressResponse* ProgressResponse::New(::google::protobuf::Arena* arena) const { + ProgressResponse* n = new ProgressResponse; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void ProgressResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:Tango.PMR.Stubs.ProgressResponse) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + progress_ = 0; + _internal_metadata_.Clear(); +} + +bool ProgressResponse::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:Tango.PMR.Stubs.ProgressResponse) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // double Progress = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(9u /* 9 & 0xFF */)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( + input, &progress_))); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:Tango.PMR.Stubs.ProgressResponse) + return true; +failure: + // @@protoc_insertion_point(parse_failure:Tango.PMR.Stubs.ProgressResponse) + return false; +#undef DO_ +} + +void ProgressResponse::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:Tango.PMR.Stubs.ProgressResponse) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // double Progress = 1; + if (this->progress() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->progress(), output); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } + // @@protoc_insertion_point(serialize_end:Tango.PMR.Stubs.ProgressResponse) +} + +::google::protobuf::uint8* ProgressResponse::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:Tango.PMR.Stubs.ProgressResponse) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // double Progress = 1; + if (this->progress() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->progress(), target); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:Tango.PMR.Stubs.ProgressResponse) + return target; +} + +size_t ProgressResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Tango.PMR.Stubs.ProgressResponse) + size_t total_size = 0; + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } + // double Progress = 1; + if (this->progress() != 0) { + total_size += 1 + 8; + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ProgressResponse::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Tango.PMR.Stubs.ProgressResponse) + GOOGLE_DCHECK_NE(&from, this); + const ProgressResponse* source = + ::google::protobuf::internal::DynamicCastToGenerated<const ProgressResponse>( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Tango.PMR.Stubs.ProgressResponse) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Tango.PMR.Stubs.ProgressResponse) + MergeFrom(*source); + } +} + +void ProgressResponse::MergeFrom(const ProgressResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Tango.PMR.Stubs.ProgressResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.progress() != 0) { + set_progress(from.progress()); + } +} + +void ProgressResponse::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Tango.PMR.Stubs.ProgressResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ProgressResponse::CopyFrom(const ProgressResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Tango.PMR.Stubs.ProgressResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ProgressResponse::IsInitialized() const { + return true; +} + +void ProgressResponse::Swap(ProgressResponse* other) { + if (other == this) return; + InternalSwap(other); +} +void ProgressResponse::InternalSwap(ProgressResponse* other) { + using std::swap; + swap(progress_, other->progress_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata ProgressResponse::GetMetadata() const { + protobuf_ProgressResponse_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_ProgressResponse_2eproto::file_level_metadata[kIndexInFileMessages]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// ProgressResponse + +// double Progress = 1; +void ProgressResponse::clear_progress() { + progress_ = 0; +} +double ProgressResponse::progress() const { + // @@protoc_insertion_point(field_get:Tango.PMR.Stubs.ProgressResponse.Progress) + return progress_; +} +void ProgressResponse::set_progress(double value) { + + progress_ = value; + // @@protoc_insertion_point(field_set:Tango.PMR.Stubs.ProgressResponse.Progress) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + +} // namespace Stubs +} // namespace PMR +} // namespace Tango + +// @@protoc_insertion_point(global_scope) diff --git a/Software/Visual Studio/Native/Tango.ProtoTest/PMR/ProgressResponse.pb.h b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/ProgressResponse.pb.h new file mode 100644 index 000000000..74f5ecc57 --- /dev/null +++ b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/ProgressResponse.pb.h @@ -0,0 +1,199 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ProgressResponse.proto + +#ifndef PROTOBUF_ProgressResponse_2eproto__INCLUDED +#define PROTOBUF_ProgressResponse_2eproto__INCLUDED + +#include <string> + +#include <google/protobuf/stubs/common.h> + +#if GOOGLE_PROTOBUF_VERSION < 3004000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/arena.h> +#include <google/protobuf/arenastring.h> +#include <google/protobuf/generated_message_table_driven.h> +#include <google/protobuf/generated_message_util.h> +#include <google/protobuf/metadata.h> +#include <google/protobuf/message.h> +#include <google/protobuf/repeated_field.h> // IWYU pragma: export +#include <google/protobuf/extension_set.h> // IWYU pragma: export +#include <google/protobuf/unknown_field_set.h> +// @@protoc_insertion_point(includes) +namespace Tango { +namespace PMR { +namespace Stubs { +class ProgressResponse; +class ProgressResponseDefaultTypeInternal; +extern ProgressResponseDefaultTypeInternal _ProgressResponse_default_instance_; +} // namespace Stubs +} // namespace PMR +} // namespace Tango + +namespace Tango { +namespace PMR { +namespace Stubs { + +namespace protobuf_ProgressResponse_2eproto { +// Internal implementation detail -- do not call these. +struct TableStruct { + static const ::google::protobuf::internal::ParseTableField entries[]; + static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; + static const ::google::protobuf::internal::ParseTable schema[]; + static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; + static void InitDefaultsImpl(); +}; +void AddDescriptors(); +void InitDefaults(); +} // namespace protobuf_ProgressResponse_2eproto + +// =================================================================== + +class ProgressResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Tango.PMR.Stubs.ProgressResponse) */ { + public: + ProgressResponse(); + virtual ~ProgressResponse(); + + ProgressResponse(const ProgressResponse& from); + + inline ProgressResponse& operator=(const ProgressResponse& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + ProgressResponse(ProgressResponse&& from) noexcept + : ProgressResponse() { + *this = ::std::move(from); + } + + inline ProgressResponse& operator=(ProgressResponse&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor(); + static const ProgressResponse& default_instance(); + + static inline const ProgressResponse* internal_default_instance() { + return reinterpret_cast<const ProgressResponse*>( + &_ProgressResponse_default_instance_); + } + static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = + 0; + + void Swap(ProgressResponse* other); + friend void swap(ProgressResponse& a, ProgressResponse& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline ProgressResponse* New() const PROTOBUF_FINAL { return New(NULL); } + + ProgressResponse* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void CopyFrom(const ProgressResponse& from); + void MergeFrom(const ProgressResponse& from); + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; + + size_t ByteSizeLong() const PROTOBUF_FINAL; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(ProgressResponse* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // double Progress = 1; + void clear_progress(); + static const int kProgressFieldNumber = 1; + double progress() const; + void set_progress(double value); + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.ProgressResponse) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + double progress_; + mutable int _cached_size_; + friend struct protobuf_ProgressResponse_2eproto::TableStruct; +}; +// =================================================================== + + +// =================================================================== + +#if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ProgressResponse + +// double Progress = 1; +inline void ProgressResponse::clear_progress() { + progress_ = 0; +} +inline double ProgressResponse::progress() const { + // @@protoc_insertion_point(field_get:Tango.PMR.Stubs.ProgressResponse.Progress) + return progress_; +} +inline void ProgressResponse::set_progress(double value) { + + progress_ = value; + // @@protoc_insertion_point(field_set:Tango.PMR.Stubs.ProgressResponse.Progress) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + + +} // namespace Stubs +} // namespace PMR +} // namespace Tango + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_ProgressResponse_2eproto__INCLUDED diff --git a/Software/Visual Studio/Native/Tango.ProtoTest/PMR/RGB.pb.cc b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/RGB.pb.cc new file mode 100644 index 000000000..6e729877b --- /dev/null +++ b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/RGB.pb.cc @@ -0,0 +1,499 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: RGB.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "RGB.pb.h" + +#include <algorithm> + +#include <google/protobuf/stubs/common.h> +#include <google/protobuf/stubs/port.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 Tango { +namespace PMR { +namespace Common { +class RGBDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed<RGB> + _instance; +} _RGB_default_instance_; + +namespace protobuf_RGB_2eproto { + + +namespace { + +::google::protobuf::Metadata file_level_metadata[1]; + +} // namespace + +PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, +}; + +PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + ::google::protobuf::internal::AuxillaryParseTableField(), +}; +PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, +}; + +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RGB, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RGB, r_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RGB, g_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RGB, b_), +}; +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(RGB)}, +}; + +static ::google::protobuf::Message const * const file_default_instances[] = { + reinterpret_cast<const ::google::protobuf::Message*>(&_RGB_default_instance_), +}; + +namespace { + +void protobuf_AssignDescriptors() { + AddDescriptors(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "RGB.proto", schemas, file_default_instances, TableStruct::offsets, factory, + file_level_metadata, NULL, NULL); +} + +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); +} + +} // namespace +void TableStruct::InitDefaultsImpl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::google::protobuf::internal::InitProtobufDefaults(); + _RGB_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_RGB_default_instance_);} + +void InitDefaults() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); +} +namespace { +void AddDescriptorsImpl() { + InitDefaults(); + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + "\n\tRGB.proto\022\020Tango.PMR.Common\"&\n\003RGB\022\t\n\001" + "R\030\001 \001(\005\022\t\n\001G\030\002 \001(\005\022\t\n\001B\030\003 \001(\005B\034\n\032com.twi" + "ne.tango.pmr.commonb\006proto3" + }; + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + descriptor, 107); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "RGB.proto", &protobuf_RegisterTypes); +} +} // anonymous namespace + +void AddDescriptors() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); +} +// Force AddDescriptors() to be called at dynamic initialization time. +struct StaticDescriptorInitializer { + StaticDescriptorInitializer() { + AddDescriptors(); + } +} static_descriptor_initializer; + +} // namespace protobuf_RGB_2eproto + + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int RGB::kRFieldNumber; +const int RGB::kGFieldNumber; +const int RGB::kBFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +RGB::RGB() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_RGB_2eproto::InitDefaults(); + } + SharedCtor(); + // @@protoc_insertion_point(constructor:Tango.PMR.Common.RGB) +} +RGB::RGB(const RGB& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&r_, &from.r_, + static_cast<size_t>(reinterpret_cast<char*>(&b_) - + reinterpret_cast<char*>(&r_)) + sizeof(b_)); + // @@protoc_insertion_point(copy_constructor:Tango.PMR.Common.RGB) +} + +void RGB::SharedCtor() { + ::memset(&r_, 0, static_cast<size_t>( + reinterpret_cast<char*>(&b_) - + reinterpret_cast<char*>(&r_)) + sizeof(b_)); + _cached_size_ = 0; +} + +RGB::~RGB() { + // @@protoc_insertion_point(destructor:Tango.PMR.Common.RGB) + SharedDtor(); +} + +void RGB::SharedDtor() { +} + +void RGB::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* RGB::descriptor() { + protobuf_RGB_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_RGB_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const RGB& RGB::default_instance() { + protobuf_RGB_2eproto::InitDefaults(); + return *internal_default_instance(); +} + +RGB* RGB::New(::google::protobuf::Arena* arena) const { + RGB* n = new RGB; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void RGB::Clear() { +// @@protoc_insertion_point(message_clear_start:Tango.PMR.Common.RGB) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&r_, 0, static_cast<size_t>( + reinterpret_cast<char*>(&b_) - + reinterpret_cast<char*>(&r_)) + sizeof(b_)); + _internal_metadata_.Clear(); +} + +bool RGB::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:Tango.PMR.Common.RGB) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // int32 R = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &r_))); + } else { + goto handle_unusual; + } + break; + } + + // int32 G = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &g_))); + } else { + goto handle_unusual; + } + break; + } + + // int32 B = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &b_))); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:Tango.PMR.Common.RGB) + return true; +failure: + // @@protoc_insertion_point(parse_failure:Tango.PMR.Common.RGB) + return false; +#undef DO_ +} + +void RGB::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:Tango.PMR.Common.RGB) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int32 R = 1; + if (this->r() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->r(), output); + } + + // int32 G = 2; + if (this->g() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->g(), output); + } + + // int32 B = 3; + if (this->b() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->b(), output); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } + // @@protoc_insertion_point(serialize_end:Tango.PMR.Common.RGB) +} + +::google::protobuf::uint8* RGB::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:Tango.PMR.Common.RGB) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int32 R = 1; + if (this->r() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->r(), target); + } + + // int32 G = 2; + if (this->g() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->g(), target); + } + + // int32 B = 3; + if (this->b() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->b(), target); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:Tango.PMR.Common.RGB) + return target; +} + +size_t RGB::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Tango.PMR.Common.RGB) + size_t total_size = 0; + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } + // int32 R = 1; + if (this->r() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->r()); + } + + // int32 G = 2; + if (this->g() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->g()); + } + + // int32 B = 3; + if (this->b() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->b()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void RGB::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Tango.PMR.Common.RGB) + GOOGLE_DCHECK_NE(&from, this); + const RGB* source = + ::google::protobuf::internal::DynamicCastToGenerated<const RGB>( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Tango.PMR.Common.RGB) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Tango.PMR.Common.RGB) + MergeFrom(*source); + } +} + +void RGB::MergeFrom(const RGB& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Tango.PMR.Common.RGB) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.r() != 0) { + set_r(from.r()); + } + if (from.g() != 0) { + set_g(from.g()); + } + if (from.b() != 0) { + set_b(from.b()); + } +} + +void RGB::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Tango.PMR.Common.RGB) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void RGB::CopyFrom(const RGB& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Tango.PMR.Common.RGB) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RGB::IsInitialized() const { + return true; +} + +void RGB::Swap(RGB* other) { + if (other == this) return; + InternalSwap(other); +} +void RGB::InternalSwap(RGB* other) { + using std::swap; + swap(r_, other->r_); + swap(g_, other->g_); + swap(b_, other->b_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata RGB::GetMetadata() const { + protobuf_RGB_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_RGB_2eproto::file_level_metadata[kIndexInFileMessages]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// RGB + +// int32 R = 1; +void RGB::clear_r() { + r_ = 0; +} +::google::protobuf::int32 RGB::r() const { + // @@protoc_insertion_point(field_get:Tango.PMR.Common.RGB.R) + return r_; +} +void RGB::set_r(::google::protobuf::int32 value) { + + r_ = value; + // @@protoc_insertion_point(field_set:Tango.PMR.Common.RGB.R) +} + +// int32 G = 2; +void RGB::clear_g() { + g_ = 0; +} +::google::protobuf::int32 RGB::g() const { + // @@protoc_insertion_point(field_get:Tango.PMR.Common.RGB.G) + return g_; +} +void RGB::set_g(::google::protobuf::int32 value) { + + g_ = value; + // @@protoc_insertion_point(field_set:Tango.PMR.Common.RGB.G) +} + +// int32 B = 3; +void RGB::clear_b() { + b_ = 0; +} +::google::protobuf::int32 RGB::b() const { + // @@protoc_insertion_point(field_get:Tango.PMR.Common.RGB.B) + return b_; +} +void RGB::set_b(::google::protobuf::int32 value) { + + b_ = value; + // @@protoc_insertion_point(field_set:Tango.PMR.Common.RGB.B) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + +} // namespace Common +} // namespace PMR +} // namespace Tango + +// @@protoc_insertion_point(global_scope) diff --git a/Software/Visual Studio/Native/Tango.ProtoTest/PMR/RGB.pb.h b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/RGB.pb.h new file mode 100644 index 000000000..615906e12 --- /dev/null +++ b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/RGB.pb.h @@ -0,0 +1,241 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: RGB.proto + +#ifndef PROTOBUF_RGB_2eproto__INCLUDED +#define PROTOBUF_RGB_2eproto__INCLUDED + +#include <string> + +#include <google/protobuf/stubs/common.h> + +#if GOOGLE_PROTOBUF_VERSION < 3004000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/arena.h> +#include <google/protobuf/arenastring.h> +#include <google/protobuf/generated_message_table_driven.h> +#include <google/protobuf/generated_message_util.h> +#include <google/protobuf/metadata.h> +#include <google/protobuf/message.h> +#include <google/protobuf/repeated_field.h> // IWYU pragma: export +#include <google/protobuf/extension_set.h> // IWYU pragma: export +#include <google/protobuf/unknown_field_set.h> +// @@protoc_insertion_point(includes) +namespace Tango { +namespace PMR { +namespace Common { +class RGB; +class RGBDefaultTypeInternal; +extern RGBDefaultTypeInternal _RGB_default_instance_; +} // namespace Common +} // namespace PMR +} // namespace Tango + +namespace Tango { +namespace PMR { +namespace Common { + +namespace protobuf_RGB_2eproto { +// Internal implementation detail -- do not call these. +struct TableStruct { + static const ::google::protobuf::internal::ParseTableField entries[]; + static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; + static const ::google::protobuf::internal::ParseTable schema[]; + static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; + static void InitDefaultsImpl(); +}; +void AddDescriptors(); +void InitDefaults(); +} // namespace protobuf_RGB_2eproto + +// =================================================================== + +class RGB : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Tango.PMR.Common.RGB) */ { + public: + RGB(); + virtual ~RGB(); + + RGB(const RGB& from); + + inline RGB& operator=(const RGB& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + RGB(RGB&& from) noexcept + : RGB() { + *this = ::std::move(from); + } + + inline RGB& operator=(RGB&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor(); + static const RGB& default_instance(); + + static inline const RGB* internal_default_instance() { + return reinterpret_cast<const RGB*>( + &_RGB_default_instance_); + } + static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = + 0; + + void Swap(RGB* other); + friend void swap(RGB& a, RGB& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline RGB* New() const PROTOBUF_FINAL { return New(NULL); } + + RGB* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void CopyFrom(const RGB& from); + void MergeFrom(const RGB& from); + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; + + size_t ByteSizeLong() const PROTOBUF_FINAL; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(RGB* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // int32 R = 1; + void clear_r(); + static const int kRFieldNumber = 1; + ::google::protobuf::int32 r() const; + void set_r(::google::protobuf::int32 value); + + // int32 G = 2; + void clear_g(); + static const int kGFieldNumber = 2; + ::google::protobuf::int32 g() const; + void set_g(::google::protobuf::int32 value); + + // int32 B = 3; + void clear_b(); + static const int kBFieldNumber = 3; + ::google::protobuf::int32 b() const; + void set_b(::google::protobuf::int32 value); + + // @@protoc_insertion_point(class_scope:Tango.PMR.Common.RGB) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::int32 r_; + ::google::protobuf::int32 g_; + ::google::protobuf::int32 b_; + mutable int _cached_size_; + friend struct protobuf_RGB_2eproto::TableStruct; +}; +// =================================================================== + + +// =================================================================== + +#if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// RGB + +// int32 R = 1; +inline void RGB::clear_r() { + r_ = 0; +} +inline ::google::protobuf::int32 RGB::r() const { + // @@protoc_insertion_point(field_get:Tango.PMR.Common.RGB.R) + return r_; +} +inline void RGB::set_r(::google::protobuf::int32 value) { + + r_ = value; + // @@protoc_insertion_point(field_set:Tango.PMR.Common.RGB.R) +} + +// int32 G = 2; +inline void RGB::clear_g() { + g_ = 0; +} +inline ::google::protobuf::int32 RGB::g() const { + // @@protoc_insertion_point(field_get:Tango.PMR.Common.RGB.G) + return g_; +} +inline void RGB::set_g(::google::protobuf::int32 value) { + + g_ = value; + // @@protoc_insertion_point(field_set:Tango.PMR.Common.RGB.G) +} + +// int32 B = 3; +inline void RGB::clear_b() { + b_ = 0; +} +inline ::google::protobuf::int32 RGB::b() const { + // @@protoc_insertion_point(field_get:Tango.PMR.Common.RGB.B) + return b_; +} +inline void RGB::set_b(::google::protobuf::int32 value) { + + b_ = value; + // @@protoc_insertion_point(field_set:Tango.PMR.Common.RGB.B) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + + +} // namespace Common +} // namespace PMR +} // namespace Tango + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_RGB_2eproto__INCLUDED diff --git a/Software/Visual Studio/Native/Tango.ProtoTest/PMR/Segment.pb.cc b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/Segment.pb.cc new file mode 100644 index 000000000..aaa262f6c --- /dev/null +++ b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/Segment.pb.cc @@ -0,0 +1,597 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Segment.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "Segment.pb.h" + +#include <algorithm> + +#include <google/protobuf/stubs/common.h> +#include <google/protobuf/stubs/port.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 Tango { +namespace PMR { +namespace Jobs { +class SegmentDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed<Segment> + _instance; +} _Segment_default_instance_; + +namespace protobuf_Segment_2eproto { + + +namespace { + +::google::protobuf::Metadata file_level_metadata[1]; + +} // namespace + +PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, +}; + +PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + ::google::protobuf::internal::AuxillaryParseTableField(), +}; +PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, +}; + +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Segment, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Segment, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Segment, length_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Segment, color_), +}; +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(Segment)}, +}; + +static ::google::protobuf::Message const * const file_default_instances[] = { + reinterpret_cast<const ::google::protobuf::Message*>(&_Segment_default_instance_), +}; + +namespace { + +void protobuf_AssignDescriptors() { + AddDescriptors(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "Segment.proto", schemas, file_default_instances, TableStruct::offsets, factory, + file_level_metadata, NULL, NULL); +} + +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); +} + +} // namespace +void TableStruct::InitDefaultsImpl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::google::protobuf::internal::InitProtobufDefaults(); + ::Tango::PMR::Common::protobuf_RGB_2eproto::InitDefaults(); + _Segment_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_Segment_default_instance_);_Segment_default_instance_._instance.get_mutable()->color_ = const_cast< ::Tango::PMR::Common::RGB*>( + ::Tango::PMR::Common::RGB::internal_default_instance()); +} + +void InitDefaults() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); +} +namespace { +void AddDescriptorsImpl() { + InitDefaults(); + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + "\n\rSegment.proto\022\016Tango.PMR.Jobs\032\tRGB.pro" + "to\"M\n\007Segment\022\014\n\004Name\030\001 \001(\t\022\016\n\006Length\030\002 " + "\001(\005\022$\n\005Color\030\003 \001(\0132\025.Tango.PMR.Common.RG" + "BB\032\n\030com.twine.tango.pmr.jobsb\006proto3" + }; + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + descriptor, 157); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "Segment.proto", &protobuf_RegisterTypes); + ::Tango::PMR::Common::protobuf_RGB_2eproto::AddDescriptors(); +} +} // anonymous namespace + +void AddDescriptors() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); +} +// Force AddDescriptors() to be called at dynamic initialization time. +struct StaticDescriptorInitializer { + StaticDescriptorInitializer() { + AddDescriptors(); + } +} static_descriptor_initializer; + +} // namespace protobuf_Segment_2eproto + + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int Segment::kNameFieldNumber; +const int Segment::kLengthFieldNumber; +const int Segment::kColorFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +Segment::Segment() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_Segment_2eproto::InitDefaults(); + } + SharedCtor(); + // @@protoc_insertion_point(constructor:Tango.PMR.Jobs.Segment) +} +Segment::Segment(const Segment& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.name().size() > 0) { + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + if (from.has_color()) { + color_ = new ::Tango::PMR::Common::RGB(*from.color_); + } else { + color_ = NULL; + } + length_ = from.length_; + // @@protoc_insertion_point(copy_constructor:Tango.PMR.Jobs.Segment) +} + +void Segment::SharedCtor() { + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(&color_, 0, static_cast<size_t>( + reinterpret_cast<char*>(&length_) - + reinterpret_cast<char*>(&color_)) + sizeof(length_)); + _cached_size_ = 0; +} + +Segment::~Segment() { + // @@protoc_insertion_point(destructor:Tango.PMR.Jobs.Segment) + SharedDtor(); +} + +void Segment::SharedDtor() { + name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete color_; +} + +void Segment::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* Segment::descriptor() { + protobuf_Segment_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_Segment_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const Segment& Segment::default_instance() { + protobuf_Segment_2eproto::InitDefaults(); + return *internal_default_instance(); +} + +Segment* Segment::New(::google::protobuf::Arena* arena) const { + Segment* n = new Segment; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void Segment::Clear() { +// @@protoc_insertion_point(message_clear_start:Tango.PMR.Jobs.Segment) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (GetArenaNoVirtual() == NULL && color_ != NULL) { + delete color_; + } + color_ = NULL; + length_ = 0; + _internal_metadata_.Clear(); +} + +bool Segment::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:Tango.PMR.Jobs.Segment) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string Name = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast<int>(this->name().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "Tango.PMR.Jobs.Segment.Name")); + } else { + goto handle_unusual; + } + break; + } + + // int32 Length = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &length_))); + } else { + goto handle_unusual; + } + break; + } + + // .Tango.PMR.Common.RGB Color = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_color())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:Tango.PMR.Jobs.Segment) + return true; +failure: + // @@protoc_insertion_point(parse_failure:Tango.PMR.Jobs.Segment) + return false; +#undef DO_ +} + +void Segment::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:Tango.PMR.Jobs.Segment) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string Name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast<int>(this->name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "Tango.PMR.Jobs.Segment.Name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->name(), output); + } + + // int32 Length = 2; + if (this->length() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->length(), output); + } + + // .Tango.PMR.Common.RGB Color = 3; + if (this->has_color()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, *this->color_, output); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } + // @@protoc_insertion_point(serialize_end:Tango.PMR.Jobs.Segment) +} + +::google::protobuf::uint8* Segment::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:Tango.PMR.Jobs.Segment) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string Name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast<int>(this->name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "Tango.PMR.Jobs.Segment.Name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->name(), target); + } + + // int32 Length = 2; + if (this->length() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->length(), target); + } + + // .Tango.PMR.Common.RGB Color = 3; + if (this->has_color()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 3, *this->color_, deterministic, target); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:Tango.PMR.Jobs.Segment) + return target; +} + +size_t Segment::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Tango.PMR.Jobs.Segment) + size_t total_size = 0; + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } + // string Name = 1; + if (this->name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // .Tango.PMR.Common.RGB Color = 3; + if (this->has_color()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->color_); + } + + // int32 Length = 2; + if (this->length() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->length()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void Segment::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Tango.PMR.Jobs.Segment) + GOOGLE_DCHECK_NE(&from, this); + const Segment* source = + ::google::protobuf::internal::DynamicCastToGenerated<const Segment>( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Tango.PMR.Jobs.Segment) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Tango.PMR.Jobs.Segment) + MergeFrom(*source); + } +} + +void Segment::MergeFrom(const Segment& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Tango.PMR.Jobs.Segment) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.name().size() > 0) { + + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + if (from.has_color()) { + mutable_color()->::Tango::PMR::Common::RGB::MergeFrom(from.color()); + } + if (from.length() != 0) { + set_length(from.length()); + } +} + +void Segment::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Tango.PMR.Jobs.Segment) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Segment::CopyFrom(const Segment& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Tango.PMR.Jobs.Segment) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Segment::IsInitialized() const { + return true; +} + +void Segment::Swap(Segment* other) { + if (other == this) return; + InternalSwap(other); +} +void Segment::InternalSwap(Segment* other) { + using std::swap; + name_.Swap(&other->name_); + swap(color_, other->color_); + swap(length_, other->length_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata Segment::GetMetadata() const { + protobuf_Segment_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_Segment_2eproto::file_level_metadata[kIndexInFileMessages]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// Segment + +// string Name = 1; +void Segment::clear_name() { + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +const ::std::string& Segment::name() const { + // @@protoc_insertion_point(field_get:Tango.PMR.Jobs.Segment.Name) + return name_.GetNoArena(); +} +void Segment::set_name(const ::std::string& value) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:Tango.PMR.Jobs.Segment.Name) +} +#if LANG_CXX11 +void Segment::set_name(::std::string&& value) { + + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:Tango.PMR.Jobs.Segment.Name) +} +#endif +void Segment::set_name(const char* value) { + GOOGLE_DCHECK(value != NULL); + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:Tango.PMR.Jobs.Segment.Name) +} +void Segment::set_name(const char* value, size_t size) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast<const char*>(value), size)); + // @@protoc_insertion_point(field_set_pointer:Tango.PMR.Jobs.Segment.Name) +} +::std::string* Segment::mutable_name() { + + // @@protoc_insertion_point(field_mutable:Tango.PMR.Jobs.Segment.Name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +::std::string* Segment::release_name() { + // @@protoc_insertion_point(field_release:Tango.PMR.Jobs.Segment.Name) + + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void Segment::set_allocated_name(::std::string* name) { + if (name != NULL) { + + } else { + + } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:Tango.PMR.Jobs.Segment.Name) +} + +// int32 Length = 2; +void Segment::clear_length() { + length_ = 0; +} +::google::protobuf::int32 Segment::length() const { + // @@protoc_insertion_point(field_get:Tango.PMR.Jobs.Segment.Length) + return length_; +} +void Segment::set_length(::google::protobuf::int32 value) { + + length_ = value; + // @@protoc_insertion_point(field_set:Tango.PMR.Jobs.Segment.Length) +} + +// .Tango.PMR.Common.RGB Color = 3; +bool Segment::has_color() const { + return this != internal_default_instance() && color_ != NULL; +} +void Segment::clear_color() { + if (GetArenaNoVirtual() == NULL && color_ != NULL) delete color_; + color_ = NULL; +} +const ::Tango::PMR::Common::RGB& Segment::color() const { + const ::Tango::PMR::Common::RGB* p = color_; + // @@protoc_insertion_point(field_get:Tango.PMR.Jobs.Segment.Color) + return p != NULL ? *p : *reinterpret_cast<const ::Tango::PMR::Common::RGB*>( + &::Tango::PMR::Common::_RGB_default_instance_); +} +::Tango::PMR::Common::RGB* Segment::mutable_color() { + + if (color_ == NULL) { + color_ = new ::Tango::PMR::Common::RGB; + } + // @@protoc_insertion_point(field_mutable:Tango.PMR.Jobs.Segment.Color) + return color_; +} +::Tango::PMR::Common::RGB* Segment::release_color() { + // @@protoc_insertion_point(field_release:Tango.PMR.Jobs.Segment.Color) + + ::Tango::PMR::Common::RGB* temp = color_; + color_ = NULL; + return temp; +} +void Segment::set_allocated_color(::Tango::PMR::Common::RGB* color) { + delete color_; + color_ = color; + if (color) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:Tango.PMR.Jobs.Segment.Color) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + +} // namespace Jobs +} // namespace PMR +} // namespace Tango + +// @@protoc_insertion_point(global_scope) diff --git a/Software/Visual Studio/Native/Tango.ProtoTest/PMR/Segment.pb.h b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/Segment.pb.h new file mode 100644 index 000000000..11de65191 --- /dev/null +++ b/Software/Visual Studio/Native/Tango.ProtoTest/PMR/Segment.pb.h @@ -0,0 +1,318 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Segment.proto + +#ifndef PROTOBUF_Segment_2eproto__INCLUDED +#define PROTOBUF_Segment_2eproto__INCLUDED + +#include <string> + +#include <google/protobuf/stubs/common.h> + +#if GOOGLE_PROTOBUF_VERSION < 3004000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/arena.h> +#include <google/protobuf/arenastring.h> +#include <google/protobuf/generated_message_table_driven.h> +#include <google/protobuf/generated_message_util.h> +#include <google/protobuf/metadata.h> +#include <google/protobuf/message.h> +#include <google/protobuf/repeated_field.h> // IWYU pragma: export +#include <google/protobuf/extension_set.h> // IWYU pragma: export +#include <google/protobuf/unknown_field_set.h> +#include "RGB.pb.h" +// @@protoc_insertion_point(includes) +namespace Tango { +namespace PMR { +namespace Jobs { +class Segment; +class SegmentDefaultTypeInternal; +extern SegmentDefaultTypeInternal _Segment_default_instance_; +} // namespace Jobs +} // namespace PMR +} // namespace Tango + +namespace Tango { +namespace PMR { +namespace Jobs { + +namespace protobuf_Segment_2eproto { +// Internal implementation detail -- do not call these. +struct TableStruct { + static const ::google::protobuf::internal::ParseTableField entries[]; + static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; + static const ::google::protobuf::internal::ParseTable schema[]; + static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; + static void InitDefaultsImpl(); +}; +void AddDescriptors(); +void InitDefaults(); +} // namespace protobuf_Segment_2eproto + +// =================================================================== + +class Segment : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Tango.PMR.Jobs.Segment) */ { + public: + Segment(); + virtual ~Segment(); + + Segment(const Segment& from); + + inline Segment& operator=(const Segment& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + Segment(Segment&& from) noexcept + : Segment() { + *this = ::std::move(from); + } + + inline Segment& operator=(Segment&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor(); + static const Segment& default_instance(); + + static inline const Segment* internal_default_instance() { + return reinterpret_cast<const Segment*>( + &_Segment_default_instance_); + } + static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = + 0; + + void Swap(Segment* other); + friend void swap(Segment& a, Segment& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline Segment* New() const PROTOBUF_FINAL { return New(NULL); } + + Segment* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void CopyFrom(const Segment& from); + void MergeFrom(const Segment& from); + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; + + size_t ByteSizeLong() const PROTOBUF_FINAL; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(Segment* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // string Name = 1; + void clear_name(); + static const int kNameFieldNumber = 1; + const ::std::string& name() const; + void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif + void set_name(const char* value); + void set_name(const char* value, size_t size); + ::std::string* mutable_name(); + ::std::string* release_name(); + void set_allocated_name(::std::string* name); + + // .Tango.PMR.Common.RGB Color = 3; + bool has_color() const; + void clear_color(); + static const int kColorFieldNumber = 3; + const ::Tango::PMR::Common::RGB& color() const; + ::Tango::PMR::Common::RGB* mutable_color(); + ::Tango::PMR::Common::RGB* release_color(); + void set_allocated_color(::Tango::PMR::Common::RGB* color); + + // int32 Length = 2; + void clear_length(); + static const int kLengthFieldNumber = 2; + ::google::protobuf::int32 length() const; + void set_length(::google::protobuf::int32 value); + + // @@protoc_insertion_point(class_scope:Tango.PMR.Jobs.Segment) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::Tango::PMR::Common::RGB* color_; + ::google::protobuf::int32 length_; + mutable int _cached_size_; + friend struct protobuf_Segment_2eproto::TableStruct; +}; +// =================================================================== + + +// =================================================================== + +#if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// Segment + +// string Name = 1; +inline void Segment::clear_name() { + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& Segment::name() const { + // @@protoc_insertion_point(field_get:Tango.PMR.Jobs.Segment.Name) + return name_.GetNoArena(); +} +inline void Segment::set_name(const ::std::string& value) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:Tango.PMR.Jobs.Segment.Name) +} +#if LANG_CXX11 +inline void Segment::set_name(::std::string&& value) { + + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:Tango.PMR.Jobs.Segment.Name) +} +#endif +inline void Segment::set_name(const char* value) { + GOOGLE_DCHECK(value != NULL); + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:Tango.PMR.Jobs.Segment.Name) +} +inline void Segment::set_name(const char* value, size_t size) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast<const char*>(value), size)); + // @@protoc_insertion_point(field_set_pointer:Tango.PMR.Jobs.Segment.Name) +} +inline ::std::string* Segment::mutable_name() { + + // @@protoc_insertion_point(field_mutable:Tango.PMR.Jobs.Segment.Name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* Segment::release_name() { + // @@protoc_insertion_point(field_release:Tango.PMR.Jobs.Segment.Name) + + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void Segment::set_allocated_name(::std::string* name) { + if (name != NULL) { + + } else { + + } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:Tango.PMR.Jobs.Segment.Name) +} + +// int32 Length = 2; +inline void Segment::clear_length() { + length_ = 0; +} +inline ::google::protobuf::int32 Segment::length() const { + // @@protoc_insertion_point(field_get:Tango.PMR.Jobs.Segment.Length) + return length_; +} +inline void Segment::set_length(::google::protobuf::int32 value) { + + length_ = value; + // @@protoc_insertion_point(field_set:Tango.PMR.Jobs.Segment.Length) +} + +// .Tango.PMR.Common.RGB Color = 3; +inline bool Segment::has_color() const { + return this != internal_default_instance() && color_ != NULL; +} +inline void Segment::clear_color() { + if (GetArenaNoVirtual() == NULL && color_ != NULL) delete color_; + color_ = NULL; +} +inline const ::Tango::PMR::Common::RGB& Segment::color() const { + const ::Tango::PMR::Common::RGB* p = color_; + // @@protoc_insertion_point(field_get:Tango.PMR.Jobs.Segment.Color) + return p != NULL ? *p : *reinterpret_cast<const ::Tango::PMR::Common::RGB*>( + &::Tango::PMR::Common::_RGB_default_instance_); +} +inline ::Tango::PMR::Common::RGB* Segment::mutable_color() { + + if (color_ == NULL) { + color_ = new ::Tango::PMR::Common::RGB; + } + // @@protoc_insertion_point(field_mutable:Tango.PMR.Jobs.Segment.Color) + return color_; +} +inline ::Tango::PMR::Common::RGB* Segment::release_color() { + // @@protoc_insertion_point(field_release:Tango.PMR.Jobs.Segment.Color) + + ::Tango::PMR::Common::RGB* temp = color_; + color_ = NULL; + return temp; +} +inline void Segment::set_allocated_color(::Tango::PMR::Common::RGB* color) { + delete color_; + color_ = color; + if (color) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:Tango.PMR.Jobs.Segment.Color) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + + +} // namespace Jobs +} // namespace PMR +} // namespace Tango + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_Segment_2eproto__INCLUDED diff --git a/Software/Visual Studio/Native/Tango.ProtoTest/ProtoTester.h b/Software/Visual Studio/Native/Tango.ProtoTest/ProtoTester.h index c6cb472b2..7bb7ee4d2 100644 --- a/Software/Visual Studio/Native/Tango.ProtoTest/ProtoTester.h +++ b/Software/Visual Studio/Native/Tango.ProtoTest/ProtoTester.h @@ -1,6 +1,6 @@ #include <cstdlib> -#include "CalculateRequest.pb.h" -#include "CalculateResponse.pb.h" +#include "PMR/CalculateRequest.pb.h" +#include "PMR/CalculateResponse.pb.h" #pragma once diff --git a/Software/Visual Studio/Native/Tango.ProtoTest/Tango.ProtoTest.vcxproj b/Software/Visual Studio/Native/Tango.ProtoTest/Tango.ProtoTest.vcxproj index 125d9837f..4959792e2 100644 --- a/Software/Visual Studio/Native/Tango.ProtoTest/Tango.ProtoTest.vcxproj +++ b/Software/Visual Studio/Native/Tango.ProtoTest/Tango.ProtoTest.vcxproj @@ -72,7 +72,7 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <TargetExt>.dll</TargetExt> <OutDir>$(SolutionDir)Build\Debug</OutDir> - <IncludePath>D:\Development\Tango\Software\External Repositories\Protobuf\protobuf-3.4.1\src;$(IncludePath)</IncludePath> + <IncludePath>..\..\..\External Repositories\Protobuf\protobuf-3.4.1\src;$(IncludePath)</IncludePath> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> @@ -81,6 +81,9 @@ <SDLCheck>true</SDLCheck> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> </ClCompile> + <PreBuildEvent> + <Command>"$(TargetDir)proto-tc.exe" -i "$(SolutionDir)..\PMR\Messages" -o "$(SolutionDir)Native\Tango.ProtoTest\PMR" -l CPP</Command> + </PreBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> @@ -116,13 +119,27 @@ </Link> </ItemDefinitionGroup> <ItemGroup> - <ClInclude Include="CalculateRequest.pb.h" /> - <ClInclude Include="CalculateResponse.pb.h" /> + <ClInclude Include="PMR\CalculateRequest.pb.h" /> + <ClInclude Include="PMR\CalculateResponse.pb.h" /> + <ClInclude Include="PMR\Job.pb.h" /> + <ClInclude Include="PMR\MessageContainer.pb.h" /> + <ClInclude Include="PMR\MessageType.pb.h" /> + <ClInclude Include="PMR\ProgressRequest.pb.h" /> + <ClInclude Include="PMR\ProgressResponse.pb.h" /> + <ClInclude Include="PMR\RGB.pb.h" /> + <ClInclude Include="PMR\Segment.pb.h" /> <ClInclude Include="ProtoTester.h" /> </ItemGroup> <ItemGroup> - <ClCompile Include="CalculateRequest.pb.cc" /> - <ClCompile Include="CalculateResponse.pb.cc" /> + <ClCompile Include="PMR\CalculateRequest.pb.cc" /> + <ClCompile Include="PMR\CalculateResponse.pb.cc" /> + <ClCompile Include="PMR\Job.pb.cc" /> + <ClCompile Include="PMR\MessageContainer.pb.cc" /> + <ClCompile Include="PMR\MessageType.pb.cc" /> + <ClCompile Include="PMR\ProgressRequest.pb.cc" /> + <ClCompile Include="PMR\ProgressResponse.pb.cc" /> + <ClCompile Include="PMR\RGB.pb.cc" /> + <ClCompile Include="PMR\Segment.pb.cc" /> <ClCompile Include="ProtoTester.cpp" /> </ItemGroup> <ItemGroup> diff --git a/Software/Visual Studio/Native/Tango.ProtoTest/Tango.ProtoTest.vcxproj.filters b/Software/Visual Studio/Native/Tango.ProtoTest/Tango.ProtoTest.vcxproj.filters index 4c4065d0c..0b835c2c4 100644 --- a/Software/Visual Studio/Native/Tango.ProtoTest/Tango.ProtoTest.vcxproj.filters +++ b/Software/Visual Studio/Native/Tango.ProtoTest/Tango.ProtoTest.vcxproj.filters @@ -18,10 +18,31 @@ <ClInclude Include="ProtoTester.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="CalculateRequest.pb.h"> + <ClInclude Include="PMR\CalculateRequest.pb.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="CalculateResponse.pb.h"> + <ClInclude Include="PMR\CalculateResponse.pb.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="PMR\Job.pb.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="PMR\MessageContainer.pb.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="PMR\MessageType.pb.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="PMR\ProgressRequest.pb.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="PMR\ProgressResponse.pb.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="PMR\RGB.pb.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="PMR\Segment.pb.h"> <Filter>Header Files</Filter> </ClInclude> </ItemGroup> @@ -29,10 +50,31 @@ <ClCompile Include="ProtoTester.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="CalculateRequest.pb.cc"> + <ClCompile Include="PMR\CalculateRequest.pb.cc"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="PMR\CalculateResponse.pb.cc"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="PMR\Job.pb.cc"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="PMR\MessageContainer.pb.cc"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="PMR\MessageType.pb.cc"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="PMR\ProgressRequest.pb.cc"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="PMR\ProgressResponse.pb.cc"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="PMR\RGB.pb.cc"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="CalculateResponse.pb.cc"> + <ClCompile Include="PMR\Segment.pb.cc"> <Filter>Source Files</Filter> </ClCompile> </ItemGroup> diff --git a/Software/Visual Studio/Tango.Protobuf/Compilers/CppCompiler.cs b/Software/Visual Studio/Tango.Protobuf/Compilers/CppCompiler.cs index 54069d41a..e8ea998d5 100644 --- a/Software/Visual Studio/Tango.Protobuf/Compilers/CppCompiler.cs +++ b/Software/Visual Studio/Tango.Protobuf/Compilers/CppCompiler.cs @@ -25,5 +25,10 @@ namespace Tango.Protobuf.Compilers { return "--cpp_out"; } + + /// <summary> + /// Gets a value indicating whether this compiler uses the default folder structure when generating code. + /// </summary> + public override bool UsesDefaultStructure => true; } } diff --git a/Software/Visual Studio/Utilities/Tango.Protobuf.CLI/Program.cs b/Software/Visual Studio/Utilities/Tango.Protobuf.CLI/Program.cs index 76b91d4da..123de0996 100644 --- a/Software/Visual Studio/Utilities/Tango.Protobuf.CLI/Program.cs +++ b/Software/Visual Studio/Utilities/Tango.Protobuf.CLI/Program.cs @@ -47,7 +47,7 @@ namespace Tango.Protobuf.CLI } } - return ExitSuccess("Protobuf folder compiled to " + Path.GetFullPath(options.SourceFolder)); + return ExitSuccess("Protobuf folder compiled to " + Path.GetFullPath(options.OutputFolder)); } private static int ExitSuccess(String text) |
