Skip to content
Snippets Groups Projects
Select Git revision
  • e2311567c6bf69700cc433eab92d11c8184bcb5b
  • master default protected
2 results

IMDBDatabase.ecore

Blame
  • robotconfig.pb.cc 11.57 KiB
    // Generated by the protocol buffer compiler.  DO NOT EDIT!
    // source: robotconfig.proto
    
    #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
    #include "robotconfig.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 config {
    
    namespace {
    
    const ::google::protobuf::Descriptor* RobotConfig_descriptor_ = NULL;
    const ::google::protobuf::internal::GeneratedMessageReflection*
      RobotConfig_reflection_ = NULL;
    
    }  // namespace
    
    
    void protobuf_AssignDesc_robotconfig_2eproto() GOOGLE_ATTRIBUTE_COLD;
    void protobuf_AssignDesc_robotconfig_2eproto() {
      protobuf_AddDesc_robotconfig_2eproto();
      const ::google::protobuf::FileDescriptor* file =
        ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
          "robotconfig.proto");
      GOOGLE_CHECK(file != NULL);
      RobotConfig_descriptor_ = file->message_type(0);
      static const int RobotConfig_offsets_[1] = {
        GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RobotConfig, speed_),
      };
      RobotConfig_reflection_ =
        ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
          RobotConfig_descriptor_,
          RobotConfig::default_instance_,
          RobotConfig_offsets_,
          GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RobotConfig, _has_bits_[0]),
          -1,
          -1,
          sizeof(RobotConfig),
          GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RobotConfig, _internal_metadata_),
          -1);
    }
    
    namespace {
    
    GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
    inline void protobuf_AssignDescriptorsOnce() {
      ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
                     &protobuf_AssignDesc_robotconfig_2eproto);
    }
    
    void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD;
    void protobuf_RegisterTypes(const ::std::string&) {
      protobuf_AssignDescriptorsOnce();
      ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
          RobotConfig_descriptor_, &RobotConfig::default_instance());
    }
    
    }  // namespace
    
    void protobuf_ShutdownFile_robotconfig_2eproto() {
      delete RobotConfig::default_instance_;
      delete RobotConfig_reflection_;
    }
    
    void protobuf_AddDesc_robotconfig_2eproto() GOOGLE_ATTRIBUTE_COLD;
    void protobuf_AddDesc_robotconfig_2eproto() {
      static bool already_here = false;
      if (already_here) return;
      already_here = true;
      GOOGLE_PROTOBUF_VERIFY_VERSION;
    
      ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
        "\n\021robotconfig.proto\022\006config\"\034\n\013RobotConf"
        "ig\022\r\n\005speed\030\001 \002(\001", 57);
      ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
        "robotconfig.proto", &protobuf_RegisterTypes);
      RobotConfig::default_instance_ = new RobotConfig();
      RobotConfig::default_instance_->InitAsDefaultInstance();
      ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_robotconfig_2eproto);
    }
    
    // Force AddDescriptors() to be called at static initialization time.
    struct StaticDescriptorInitializer_robotconfig_2eproto {
      StaticDescriptorInitializer_robotconfig_2eproto() {
        protobuf_AddDesc_robotconfig_2eproto();
      }
    } static_descriptor_initializer_robotconfig_2eproto_;
    
    // ===================================================================
    
    #if !defined(_MSC_VER) || _MSC_VER >= 1900
    const int RobotConfig::kSpeedFieldNumber;
    #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
    
    RobotConfig::RobotConfig()
      : ::google::protobuf::Message(), _internal_metadata_(NULL) {
      SharedCtor();
      // @@protoc_insertion_point(constructor:config.RobotConfig)
    }
    
    void RobotConfig::InitAsDefaultInstance() {
    }
    
    RobotConfig::RobotConfig(const RobotConfig& from)
      : ::google::protobuf::Message(),
        _internal_metadata_(NULL) {
      SharedCtor();
      MergeFrom(from);
      // @@protoc_insertion_point(copy_constructor:config.RobotConfig)
    }
    
    void RobotConfig::SharedCtor() {
      _cached_size_ = 0;
      speed_ = 0;
      ::memset(_has_bits_, 0, sizeof(_has_bits_));
    }
    
    RobotConfig::~RobotConfig() {
      // @@protoc_insertion_point(destructor:config.RobotConfig)
      SharedDtor();
    }
    
    void RobotConfig::SharedDtor() {
      if (this != default_instance_) {
      }
    }
    
    void RobotConfig::SetCachedSize(int size) const {
      GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
      _cached_size_ = size;
      GOOGLE_SAFE_CONCURRENT_WRITES_END();
    }
    const ::google::protobuf::Descriptor* RobotConfig::descriptor() {
      protobuf_AssignDescriptorsOnce();
      return RobotConfig_descriptor_;
    }
    
    const RobotConfig& RobotConfig::default_instance() {
      if (default_instance_ == NULL) protobuf_AddDesc_robotconfig_2eproto();
      return *default_instance_;
    }
    
    RobotConfig* RobotConfig::default_instance_ = NULL;
    
    RobotConfig* RobotConfig::New(::google::protobuf::Arena* arena) const {
      RobotConfig* n = new RobotConfig;
      if (arena != NULL) {
        arena->Own(n);
      }
      return n;
    }
    
    void RobotConfig::Clear() {
    // @@protoc_insertion_point(message_clear_start:config.RobotConfig)
      speed_ = 0;
      ::memset(_has_bits_, 0, sizeof(_has_bits_));
      if (_internal_metadata_.have_unknown_fields()) {
        mutable_unknown_fields()->Clear();
      }
    }
    
    bool RobotConfig::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:config.RobotConfig)
      for (;;) {
        ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
        tag = p.first;
        if (!p.second) goto handle_unusual;
        switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
          // required double speed = 1;
          case 1: {
            if (tag == 9) {
              DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                       double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                     input, &speed_)));
              set_has_speed();
            } else {
              goto handle_unusual;
            }
            if (input->ExpectAtEnd()) goto success;
            break;
          }
    
          default: {
          handle_unusual:
            if (tag == 0 ||
                ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
                ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
              goto success;
            }
            DO_(::google::protobuf::internal::WireFormat::SkipField(
                  input, tag, mutable_unknown_fields()));
            break;
          }
        }
      }
    success:
      // @@protoc_insertion_point(parse_success:config.RobotConfig)
      return true;
    failure:
      // @@protoc_insertion_point(parse_failure:config.RobotConfig)
      return false;
    #undef DO_
    }
    
    void RobotConfig::SerializeWithCachedSizes(
        ::google::protobuf::io::CodedOutputStream* output) const {
      // @@protoc_insertion_point(serialize_start:config.RobotConfig)
      // required double speed = 1;
      if (has_speed()) {
        ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->speed(), output);
      }
    
      if (_internal_metadata_.have_unknown_fields()) {
        ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
            unknown_fields(), output);
      }
      // @@protoc_insertion_point(serialize_end:config.RobotConfig)
    }
    
    ::google::protobuf::uint8* RobotConfig::InternalSerializeWithCachedSizesToArray(
        bool deterministic, ::google::protobuf::uint8* target) const {
      // @@protoc_insertion_point(serialize_to_array_start:config.RobotConfig)
      // required double speed = 1;
      if (has_speed()) {
        target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->speed(), target);
      }
    
      if (_internal_metadata_.have_unknown_fields()) {
        target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
            unknown_fields(), target);
      }
      // @@protoc_insertion_point(serialize_to_array_end:config.RobotConfig)
      return target;
    }
    
    int RobotConfig::ByteSize() const {
    // @@protoc_insertion_point(message_byte_size_start:config.RobotConfig)
      int total_size = 0;
    
      // required double speed = 1;
      if (has_speed()) {
        total_size += 1 + 8;
      }
      if (_internal_metadata_.have_unknown_fields()) {
        total_size +=
          ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
            unknown_fields());
      }
      GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
      _cached_size_ = total_size;
      GOOGLE_SAFE_CONCURRENT_WRITES_END();
      return total_size;
    }
    
    void RobotConfig::MergeFrom(const ::google::protobuf::Message& from) {
    // @@protoc_insertion_point(generalized_merge_from_start:config.RobotConfig)
      if (GOOGLE_PREDICT_FALSE(&from == this)) {
        ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
      }
      const RobotConfig* source = 
          ::google::protobuf::internal::DynamicCastToGenerated<const RobotConfig>(
              &from);
      if (source == NULL) {
      // @@protoc_insertion_point(generalized_merge_from_cast_fail:config.RobotConfig)
        ::google::protobuf::internal::ReflectionOps::Merge(from, this);
      } else {
      // @@protoc_insertion_point(generalized_merge_from_cast_success:config.RobotConfig)
        MergeFrom(*source);
      }
    }
    
    void RobotConfig::MergeFrom(const RobotConfig& from) {
    // @@protoc_insertion_point(class_specific_merge_from_start:config.RobotConfig)
      if (GOOGLE_PREDICT_FALSE(&from == this)) {
        ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
      }
      if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
        if (from.has_speed()) {
          set_speed(from.speed());
        }
      }
      if (from._internal_metadata_.have_unknown_fields()) {
        mutable_unknown_fields()->MergeFrom(from.unknown_fields());
      }
    }
    
    void RobotConfig::CopyFrom(const ::google::protobuf::Message& from) {
    // @@protoc_insertion_point(generalized_copy_from_start:config.RobotConfig)
      if (&from == this) return;
      Clear();
      MergeFrom(from);
    }
    
    void RobotConfig::CopyFrom(const RobotConfig& from) {
    // @@protoc_insertion_point(class_specific_copy_from_start:config.RobotConfig)
      if (&from == this) return;
      Clear();
      MergeFrom(from);
    }
    
    bool RobotConfig::IsInitialized() const {
      if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
    
      return true;
    }
    
    void RobotConfig::Swap(RobotConfig* other) {
      if (other == this) return;
      InternalSwap(other);
    }
    void RobotConfig::InternalSwap(RobotConfig* other) {
      std::swap(speed_, other->speed_);
      std::swap(_has_bits_[0], other->_has_bits_[0]);
      _internal_metadata_.Swap(&other->_internal_metadata_);
      std::swap(_cached_size_, other->_cached_size_);
    }
    
    ::google::protobuf::Metadata RobotConfig::GetMetadata() const {
      protobuf_AssignDescriptorsOnce();
      ::google::protobuf::Metadata metadata;
      metadata.descriptor = RobotConfig_descriptor_;
      metadata.reflection = RobotConfig_reflection_;
      return metadata;
    }
    
    #if PROTOBUF_INLINE_NOT_IN_HEADERS
    // RobotConfig
    
    // required double speed = 1;
    bool RobotConfig::has_speed() const {
      return (_has_bits_[0] & 0x00000001u) != 0;
    }
    void RobotConfig::set_has_speed() {
      _has_bits_[0] |= 0x00000001u;
    }
    void RobotConfig::clear_has_speed() {
      _has_bits_[0] &= ~0x00000001u;
    }
    void RobotConfig::clear_speed() {
      speed_ = 0;
      clear_has_speed();
    }
     double RobotConfig::speed() const {
      // @@protoc_insertion_point(field_get:config.RobotConfig.speed)
      return speed_;
    }
     void RobotConfig::set_speed(double value) {
      set_has_speed();
      speed_ = value;
      // @@protoc_insertion_point(field_set:config.RobotConfig.speed)
    }
    
    #endif  // PROTOBUF_INLINE_NOT_IN_HEADERS
    
    // @@protoc_insertion_point(namespace_scope)
    
    }  // namespace config
    
    // @@protoc_insertion_point(global_scope)