// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: EleFence.proto

#include "EleFence.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>
// This is a temporary google only hack
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
#include "third_party/protobuf/version.h"
#endif
// @@protoc_insertion_point(includes)
namespace EleFence {
class RegionDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<Region>
      _instance;
} _Region_default_instance_;
class Transform2dDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<Transform2d>
      _instance;
} _Transform2d_default_instance_;
class lidarParamDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<lidarParam>
      _instance;
} _lidarParam_default_instance_;
class globalParamDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<globalParam>
      _instance;
} _globalParam_default_instance_;
}  // namespace EleFence
namespace protobuf_EleFence_2eproto {
void InitDefaultsRegionImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  {
    void* ptr = &::EleFence::_Region_default_instance_;
    new (ptr) ::EleFence::Region();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::EleFence::Region::InitAsDefaultInstance();
}

void InitDefaultsRegion() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsRegionImpl);
}

void InitDefaultsTransform2dImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  {
    void* ptr = &::EleFence::_Transform2d_default_instance_;
    new (ptr) ::EleFence::Transform2d();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::EleFence::Transform2d::InitAsDefaultInstance();
}

void InitDefaultsTransform2d() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTransform2dImpl);
}

void InitDefaultslidarParamImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_EleFence_2eproto::InitDefaultsTransform2d();
  {
    void* ptr = &::EleFence::_lidarParam_default_instance_;
    new (ptr) ::EleFence::lidarParam();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::EleFence::lidarParam::InitAsDefaultInstance();
}

void InitDefaultslidarParam() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultslidarParamImpl);
}

void InitDefaultsglobalParamImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_EleFence_2eproto::InitDefaultslidarParam();
  protobuf_EleFence_2eproto::InitDefaultsRegion();
  {
    void* ptr = &::EleFence::_globalParam_default_instance_;
    new (ptr) ::EleFence::globalParam();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::EleFence::globalParam::InitAsDefaultInstance();
}

void InitDefaultsglobalParam() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsglobalParamImpl);
}

::google::protobuf::Metadata file_level_metadata[4];

const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::EleFence::Region, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::EleFence::Region, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::EleFence::Region, minx_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::EleFence::Region, maxx_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::EleFence::Region, miny_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::EleFence::Region, maxy_),
  0,
  1,
  2,
  3,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::EleFence::Transform2d, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::EleFence::Transform2d, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::EleFence::Transform2d, m00_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::EleFence::Transform2d, m01_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::EleFence::Transform2d, m02_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::EleFence::Transform2d, m10_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::EleFence::Transform2d, m11_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::EleFence::Transform2d, m12_),
  4,
  0,
  1,
  2,
  5,
  3,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::EleFence::lidarParam, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::EleFence::lidarParam, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::EleFence::lidarParam, topic_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::EleFence::lidarParam, transform_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::EleFence::lidarParam, dist_limit_),
  0,
  1,
  2,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::EleFence::globalParam, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::EleFence::globalParam, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::EleFence::globalParam, lidar_params_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::EleFence::globalParam, regions_),
  ~0u,
  ~0u,
};
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  { 0, 9, sizeof(::EleFence::Region)},
  { 13, 24, sizeof(::EleFence::Transform2d)},
  { 30, 38, sizeof(::EleFence::lidarParam)},
  { 41, 48, sizeof(::EleFence::globalParam)},
};

static ::google::protobuf::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::google::protobuf::Message*>(&::EleFence::_Region_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::EleFence::_Transform2d_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::EleFence::_lidarParam_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::EleFence::_globalParam_default_instance_),
};

void protobuf_AssignDescriptors() {
  AddDescriptors();
  ::google::protobuf::MessageFactory* factory = NULL;
  AssignDescriptors(
      "EleFence.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_PROTOBUF_ATTRIBUTE_COLD;
void protobuf_RegisterTypes(const ::std::string&) {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 4);
}

void AddDescriptorsImpl() {
  InitDefaults();
  static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
      "\n\016EleFence.proto\022\010EleFence\"@\n\006Region\022\014\n\004"
      "minx\030\001 \002(\002\022\014\n\004maxx\030\002 \002(\002\022\014\n\004miny\030\003 \002(\002\022\014"
      "\n\004maxy\030\004 \002(\002\"m\n\013Transform2d\022\016\n\003m00\030\001 \001(\002"
      ":\0011\022\016\n\003m01\030\002 \001(\002:\0010\022\016\n\003m02\030\003 \001(\002:\0010\022\016\n\003m"
      "10\030\004 \001(\002:\0010\022\016\n\003m11\030\005 \001(\002:\0011\022\016\n\003m12\030\006 \001(\002"
      ":\0010\"\\\n\nlidarParam\022\r\n\005topic\030\001 \001(\t\022(\n\ttran"
      "sform\030\002 \001(\0132\025.EleFence.Transform2d\022\025\n\ndi"
      "st_limit\030\003 \001(\002:\0018\"\\\n\013globalParam\022*\n\014lida"
      "r_params\030\001 \003(\0132\024.EleFence.lidarParam\022!\n\007"
      "regions\030\002 \003(\0132\020.EleFence.Region"
  };
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
      descriptor, 391);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "EleFence.proto", &protobuf_RegisterTypes);
}

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_EleFence_2eproto
namespace EleFence {

// ===================================================================

void Region::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Region::kMinxFieldNumber;
const int Region::kMaxxFieldNumber;
const int Region::kMinyFieldNumber;
const int Region::kMaxyFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

Region::Region()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_EleFence_2eproto::InitDefaultsRegion();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:EleFence.Region)
}
Region::Region(const Region& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::memcpy(&minx_, &from.minx_,
    static_cast<size_t>(reinterpret_cast<char*>(&maxy_) -
    reinterpret_cast<char*>(&minx_)) + sizeof(maxy_));
  // @@protoc_insertion_point(copy_constructor:EleFence.Region)
}

void Region::SharedCtor() {
  _cached_size_ = 0;
  ::memset(&minx_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&maxy_) -
      reinterpret_cast<char*>(&minx_)) + sizeof(maxy_));
}

Region::~Region() {
  // @@protoc_insertion_point(destructor:EleFence.Region)
  SharedDtor();
}

void Region::SharedDtor() {
}

void Region::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Region::descriptor() {
  ::protobuf_EleFence_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_EleFence_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const Region& Region::default_instance() {
  ::protobuf_EleFence_2eproto::InitDefaultsRegion();
  return *internal_default_instance();
}

Region* Region::New(::google::protobuf::Arena* arena) const {
  Region* n = new Region;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void Region::Clear() {
// @@protoc_insertion_point(message_clear_start:EleFence.Region)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 15u) {
    ::memset(&minx_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&maxy_) -
        reinterpret_cast<char*>(&minx_)) + sizeof(maxy_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool Region::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:EleFence.Region)
  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)) {
      // required float minx = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(13u /* 13 & 0xFF */)) {
          set_has_minx();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &minx_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // required float maxx = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(21u /* 21 & 0xFF */)) {
          set_has_maxx();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &maxx_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // required float miny = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(29u /* 29 & 0xFF */)) {
          set_has_miny();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &miny_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // required float maxy = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(37u /* 37 & 0xFF */)) {
          set_has_maxy();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &maxy_)));
        } 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:EleFence.Region)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:EleFence.Region)
  return false;
#undef DO_
}

void Region::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:EleFence.Region)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // required float minx = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->minx(), output);
  }

  // required float maxx = 2;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->maxx(), output);
  }

  // required float miny = 3;
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(3, this->miny(), output);
  }

  // required float maxy = 4;
  if (cached_has_bits & 0x00000008u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(4, this->maxy(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:EleFence.Region)
}

::google::protobuf::uint8* Region::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:EleFence.Region)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // required float minx = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->minx(), target);
  }

  // required float maxx = 2;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->maxx(), target);
  }

  // required float miny = 3;
  if (cached_has_bits & 0x00000004u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(3, this->miny(), target);
  }

  // required float maxy = 4;
  if (cached_has_bits & 0x00000008u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(4, this->maxy(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:EleFence.Region)
  return target;
}

size_t Region::RequiredFieldsByteSizeFallback() const {
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:EleFence.Region)
  size_t total_size = 0;

  if (has_minx()) {
    // required float minx = 1;
    total_size += 1 + 4;
  }

  if (has_maxx()) {
    // required float maxx = 2;
    total_size += 1 + 4;
  }

  if (has_miny()) {
    // required float miny = 3;
    total_size += 1 + 4;
  }

  if (has_maxy()) {
    // required float maxy = 4;
    total_size += 1 + 4;
  }

  return total_size;
}
size_t Region::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:EleFence.Region)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if (((_has_bits_[0] & 0x0000000f) ^ 0x0000000f) == 0) {  // All required fields are present.
    // required float minx = 1;
    total_size += 1 + 4;

    // required float maxx = 2;
    total_size += 1 + 4;

    // required float miny = 3;
    total_size += 1 + 4;

    // required float maxy = 4;
    total_size += 1 + 4;

  } else {
    total_size += RequiredFieldsByteSizeFallback();
  }
  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 Region::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:EleFence.Region)
  GOOGLE_DCHECK_NE(&from, this);
  const Region* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const Region>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:EleFence.Region)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:EleFence.Region)
    MergeFrom(*source);
  }
}

void Region::MergeFrom(const Region& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:EleFence.Region)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 15u) {
    if (cached_has_bits & 0x00000001u) {
      minx_ = from.minx_;
    }
    if (cached_has_bits & 0x00000002u) {
      maxx_ = from.maxx_;
    }
    if (cached_has_bits & 0x00000004u) {
      miny_ = from.miny_;
    }
    if (cached_has_bits & 0x00000008u) {
      maxy_ = from.maxy_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void Region::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:EleFence.Region)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void Region::CopyFrom(const Region& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:EleFence.Region)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Region::IsInitialized() const {
  if ((_has_bits_[0] & 0x0000000f) != 0x0000000f) return false;
  return true;
}

void Region::Swap(Region* other) {
  if (other == this) return;
  InternalSwap(other);
}
void Region::InternalSwap(Region* other) {
  using std::swap;
  swap(minx_, other->minx_);
  swap(maxx_, other->maxx_);
  swap(miny_, other->miny_);
  swap(maxy_, other->maxy_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata Region::GetMetadata() const {
  protobuf_EleFence_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_EleFence_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void Transform2d::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Transform2d::kM00FieldNumber;
const int Transform2d::kM01FieldNumber;
const int Transform2d::kM02FieldNumber;
const int Transform2d::kM10FieldNumber;
const int Transform2d::kM11FieldNumber;
const int Transform2d::kM12FieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

Transform2d::Transform2d()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_EleFence_2eproto::InitDefaultsTransform2d();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:EleFence.Transform2d)
}
Transform2d::Transform2d(const Transform2d& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::memcpy(&m01_, &from.m01_,
    static_cast<size_t>(reinterpret_cast<char*>(&m11_) -
    reinterpret_cast<char*>(&m01_)) + sizeof(m11_));
  // @@protoc_insertion_point(copy_constructor:EleFence.Transform2d)
}

void Transform2d::SharedCtor() {
  _cached_size_ = 0;
  ::memset(&m01_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&m12_) -
      reinterpret_cast<char*>(&m01_)) + sizeof(m12_));
  m00_ = 1;
  m11_ = 1;
}

Transform2d::~Transform2d() {
  // @@protoc_insertion_point(destructor:EleFence.Transform2d)
  SharedDtor();
}

void Transform2d::SharedDtor() {
}

void Transform2d::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Transform2d::descriptor() {
  ::protobuf_EleFence_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_EleFence_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const Transform2d& Transform2d::default_instance() {
  ::protobuf_EleFence_2eproto::InitDefaultsTransform2d();
  return *internal_default_instance();
}

Transform2d* Transform2d::New(::google::protobuf::Arena* arena) const {
  Transform2d* n = new Transform2d;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void Transform2d::Clear() {
// @@protoc_insertion_point(message_clear_start:EleFence.Transform2d)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 63u) {
    ::memset(&m01_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&m12_) -
        reinterpret_cast<char*>(&m01_)) + sizeof(m12_));
    m00_ = 1;
    m11_ = 1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool Transform2d::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:EleFence.Transform2d)
  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)) {
      // optional float m00 = 1 [default = 1];
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(13u /* 13 & 0xFF */)) {
          set_has_m00();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &m00_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional float m01 = 2 [default = 0];
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(21u /* 21 & 0xFF */)) {
          set_has_m01();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &m01_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional float m02 = 3 [default = 0];
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(29u /* 29 & 0xFF */)) {
          set_has_m02();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &m02_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional float m10 = 4 [default = 0];
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(37u /* 37 & 0xFF */)) {
          set_has_m10();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &m10_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional float m11 = 5 [default = 1];
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(45u /* 45 & 0xFF */)) {
          set_has_m11();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &m11_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional float m12 = 6 [default = 0];
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(53u /* 53 & 0xFF */)) {
          set_has_m12();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &m12_)));
        } 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:EleFence.Transform2d)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:EleFence.Transform2d)
  return false;
#undef DO_
}

void Transform2d::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:EleFence.Transform2d)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional float m00 = 1 [default = 1];
  if (cached_has_bits & 0x00000010u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->m00(), output);
  }

  // optional float m01 = 2 [default = 0];
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->m01(), output);
  }

  // optional float m02 = 3 [default = 0];
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(3, this->m02(), output);
  }

  // optional float m10 = 4 [default = 0];
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(4, this->m10(), output);
  }

  // optional float m11 = 5 [default = 1];
  if (cached_has_bits & 0x00000020u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(5, this->m11(), output);
  }

  // optional float m12 = 6 [default = 0];
  if (cached_has_bits & 0x00000008u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(6, this->m12(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:EleFence.Transform2d)
}

::google::protobuf::uint8* Transform2d::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:EleFence.Transform2d)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional float m00 = 1 [default = 1];
  if (cached_has_bits & 0x00000010u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->m00(), target);
  }

  // optional float m01 = 2 [default = 0];
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->m01(), target);
  }

  // optional float m02 = 3 [default = 0];
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(3, this->m02(), target);
  }

  // optional float m10 = 4 [default = 0];
  if (cached_has_bits & 0x00000004u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(4, this->m10(), target);
  }

  // optional float m11 = 5 [default = 1];
  if (cached_has_bits & 0x00000020u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(5, this->m11(), target);
  }

  // optional float m12 = 6 [default = 0];
  if (cached_has_bits & 0x00000008u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(6, this->m12(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:EleFence.Transform2d)
  return target;
}

size_t Transform2d::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:EleFence.Transform2d)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if (_has_bits_[0 / 32] & 63u) {
    // optional float m01 = 2 [default = 0];
    if (has_m01()) {
      total_size += 1 + 4;
    }

    // optional float m02 = 3 [default = 0];
    if (has_m02()) {
      total_size += 1 + 4;
    }

    // optional float m10 = 4 [default = 0];
    if (has_m10()) {
      total_size += 1 + 4;
    }

    // optional float m12 = 6 [default = 0];
    if (has_m12()) {
      total_size += 1 + 4;
    }

    // optional float m00 = 1 [default = 1];
    if (has_m00()) {
      total_size += 1 + 4;
    }

    // optional float m11 = 5 [default = 1];
    if (has_m11()) {
      total_size += 1 + 4;
    }

  }
  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 Transform2d::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:EleFence.Transform2d)
  GOOGLE_DCHECK_NE(&from, this);
  const Transform2d* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const Transform2d>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:EleFence.Transform2d)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:EleFence.Transform2d)
    MergeFrom(*source);
  }
}

void Transform2d::MergeFrom(const Transform2d& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:EleFence.Transform2d)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 63u) {
    if (cached_has_bits & 0x00000001u) {
      m01_ = from.m01_;
    }
    if (cached_has_bits & 0x00000002u) {
      m02_ = from.m02_;
    }
    if (cached_has_bits & 0x00000004u) {
      m10_ = from.m10_;
    }
    if (cached_has_bits & 0x00000008u) {
      m12_ = from.m12_;
    }
    if (cached_has_bits & 0x00000010u) {
      m00_ = from.m00_;
    }
    if (cached_has_bits & 0x00000020u) {
      m11_ = from.m11_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void Transform2d::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:EleFence.Transform2d)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void Transform2d::CopyFrom(const Transform2d& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:EleFence.Transform2d)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Transform2d::IsInitialized() const {
  return true;
}

void Transform2d::Swap(Transform2d* other) {
  if (other == this) return;
  InternalSwap(other);
}
void Transform2d::InternalSwap(Transform2d* other) {
  using std::swap;
  swap(m01_, other->m01_);
  swap(m02_, other->m02_);
  swap(m10_, other->m10_);
  swap(m12_, other->m12_);
  swap(m00_, other->m00_);
  swap(m11_, other->m11_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata Transform2d::GetMetadata() const {
  protobuf_EleFence_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_EleFence_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void lidarParam::InitAsDefaultInstance() {
  ::EleFence::_lidarParam_default_instance_._instance.get_mutable()->transform_ = const_cast< ::EleFence::Transform2d*>(
      ::EleFence::Transform2d::internal_default_instance());
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int lidarParam::kTopicFieldNumber;
const int lidarParam::kTransformFieldNumber;
const int lidarParam::kDistLimitFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

lidarParam::lidarParam()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_EleFence_2eproto::InitDefaultslidarParam();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:EleFence.lidarParam)
}
lidarParam::lidarParam(const lidarParam& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  topic_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_topic()) {
    topic_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.topic_);
  }
  if (from.has_transform()) {
    transform_ = new ::EleFence::Transform2d(*from.transform_);
  } else {
    transform_ = NULL;
  }
  dist_limit_ = from.dist_limit_;
  // @@protoc_insertion_point(copy_constructor:EleFence.lidarParam)
}

void lidarParam::SharedCtor() {
  _cached_size_ = 0;
  topic_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  transform_ = NULL;
  dist_limit_ = 8;
}

lidarParam::~lidarParam() {
  // @@protoc_insertion_point(destructor:EleFence.lidarParam)
  SharedDtor();
}

void lidarParam::SharedDtor() {
  topic_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete transform_;
}

void lidarParam::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* lidarParam::descriptor() {
  ::protobuf_EleFence_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_EleFence_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const lidarParam& lidarParam::default_instance() {
  ::protobuf_EleFence_2eproto::InitDefaultslidarParam();
  return *internal_default_instance();
}

lidarParam* lidarParam::New(::google::protobuf::Arena* arena) const {
  lidarParam* n = new lidarParam;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void lidarParam::Clear() {
// @@protoc_insertion_point(message_clear_start:EleFence.lidarParam)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 7u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(!topic_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
      (*topic_.UnsafeRawStringPointer())->clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(transform_ != NULL);
      transform_->Clear();
    }
    dist_limit_ = 8;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool lidarParam::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:EleFence.lidarParam)
  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)) {
      // optional string topic = 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_topic()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->topic().data(), static_cast<int>(this->topic().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "EleFence.lidarParam.topic");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .EleFence.Transform2d transform = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_transform()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional float dist_limit = 3 [default = 8];
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(29u /* 29 & 0xFF */)) {
          set_has_dist_limit();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &dist_limit_)));
        } 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:EleFence.lidarParam)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:EleFence.lidarParam)
  return false;
#undef DO_
}

void lidarParam::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:EleFence.lidarParam)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional string topic = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->topic().data(), static_cast<int>(this->topic().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "EleFence.lidarParam.topic");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->topic(), output);
  }

  // optional .EleFence.Transform2d transform = 2;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, *this->transform_, output);
  }

  // optional float dist_limit = 3 [default = 8];
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(3, this->dist_limit(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:EleFence.lidarParam)
}

::google::protobuf::uint8* lidarParam::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:EleFence.lidarParam)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional string topic = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->topic().data(), static_cast<int>(this->topic().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "EleFence.lidarParam.topic");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->topic(), target);
  }

  // optional .EleFence.Transform2d transform = 2;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, *this->transform_, deterministic, target);
  }

  // optional float dist_limit = 3 [default = 8];
  if (cached_has_bits & 0x00000004u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(3, this->dist_limit(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:EleFence.lidarParam)
  return target;
}

size_t lidarParam::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:EleFence.lidarParam)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if (_has_bits_[0 / 32] & 7u) {
    // optional string topic = 1;
    if (has_topic()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->topic());
    }

    // optional .EleFence.Transform2d transform = 2;
    if (has_transform()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *this->transform_);
    }

    // optional float dist_limit = 3 [default = 8];
    if (has_dist_limit()) {
      total_size += 1 + 4;
    }

  }
  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 lidarParam::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:EleFence.lidarParam)
  GOOGLE_DCHECK_NE(&from, this);
  const lidarParam* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const lidarParam>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:EleFence.lidarParam)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:EleFence.lidarParam)
    MergeFrom(*source);
  }
}

void lidarParam::MergeFrom(const lidarParam& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:EleFence.lidarParam)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 7u) {
    if (cached_has_bits & 0x00000001u) {
      set_has_topic();
      topic_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.topic_);
    }
    if (cached_has_bits & 0x00000002u) {
      mutable_transform()->::EleFence::Transform2d::MergeFrom(from.transform());
    }
    if (cached_has_bits & 0x00000004u) {
      dist_limit_ = from.dist_limit_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void lidarParam::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:EleFence.lidarParam)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void lidarParam::CopyFrom(const lidarParam& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:EleFence.lidarParam)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool lidarParam::IsInitialized() const {
  return true;
}

void lidarParam::Swap(lidarParam* other) {
  if (other == this) return;
  InternalSwap(other);
}
void lidarParam::InternalSwap(lidarParam* other) {
  using std::swap;
  topic_.Swap(&other->topic_);
  swap(transform_, other->transform_);
  swap(dist_limit_, other->dist_limit_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata lidarParam::GetMetadata() const {
  protobuf_EleFence_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_EleFence_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void globalParam::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int globalParam::kLidarParamsFieldNumber;
const int globalParam::kRegionsFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

globalParam::globalParam()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_EleFence_2eproto::InitDefaultsglobalParam();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:EleFence.globalParam)
}
globalParam::globalParam(const globalParam& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0),
      lidar_params_(from.lidar_params_),
      regions_(from.regions_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:EleFence.globalParam)
}

void globalParam::SharedCtor() {
  _cached_size_ = 0;
}

globalParam::~globalParam() {
  // @@protoc_insertion_point(destructor:EleFence.globalParam)
  SharedDtor();
}

void globalParam::SharedDtor() {
}

void globalParam::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* globalParam::descriptor() {
  ::protobuf_EleFence_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_EleFence_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const globalParam& globalParam::default_instance() {
  ::protobuf_EleFence_2eproto::InitDefaultsglobalParam();
  return *internal_default_instance();
}

globalParam* globalParam::New(::google::protobuf::Arena* arena) const {
  globalParam* n = new globalParam;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void globalParam::Clear() {
// @@protoc_insertion_point(message_clear_start:EleFence.globalParam)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  lidar_params_.Clear();
  regions_.Clear();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool globalParam::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:EleFence.globalParam)
  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)) {
      // repeated .EleFence.lidarParam lidar_params = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_lidar_params()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .EleFence.Region regions = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_regions()));
        } 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:EleFence.globalParam)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:EleFence.globalParam)
  return false;
#undef DO_
}

void globalParam::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:EleFence.globalParam)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .EleFence.lidarParam lidar_params = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->lidar_params_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->lidar_params(static_cast<int>(i)), output);
  }

  // repeated .EleFence.Region regions = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->regions_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, this->regions(static_cast<int>(i)), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:EleFence.globalParam)
}

::google::protobuf::uint8* globalParam::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:EleFence.globalParam)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .EleFence.lidarParam lidar_params = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->lidar_params_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->lidar_params(static_cast<int>(i)), deterministic, target);
  }

  // repeated .EleFence.Region regions = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->regions_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, this->regions(static_cast<int>(i)), deterministic, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:EleFence.globalParam)
  return target;
}

size_t globalParam::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:EleFence.globalParam)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // repeated .EleFence.lidarParam lidar_params = 1;
  {
    unsigned int count = static_cast<unsigned int>(this->lidar_params_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->lidar_params(static_cast<int>(i)));
    }
  }

  // repeated .EleFence.Region regions = 2;
  {
    unsigned int count = static_cast<unsigned int>(this->regions_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->regions(static_cast<int>(i)));
    }
  }

  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 globalParam::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:EleFence.globalParam)
  GOOGLE_DCHECK_NE(&from, this);
  const globalParam* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const globalParam>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:EleFence.globalParam)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:EleFence.globalParam)
    MergeFrom(*source);
  }
}

void globalParam::MergeFrom(const globalParam& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:EleFence.globalParam)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  lidar_params_.MergeFrom(from.lidar_params_);
  regions_.MergeFrom(from.regions_);
}

void globalParam::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:EleFence.globalParam)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void globalParam::CopyFrom(const globalParam& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:EleFence.globalParam)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool globalParam::IsInitialized() const {
  if (!::google::protobuf::internal::AllAreInitialized(this->regions())) return false;
  return true;
}

void globalParam::Swap(globalParam* other) {
  if (other == this) return;
  InternalSwap(other);
}
void globalParam::InternalSwap(globalParam* other) {
  using std::swap;
  lidar_params_.InternalSwap(&other->lidar_params_);
  regions_.InternalSwap(&other->regions_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata globalParam::GetMetadata() const {
  protobuf_EleFence_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_EleFence_2eproto::file_level_metadata[kIndexInFileMessages];
}


// @@protoc_insertion_point(namespace_scope)
}  // namespace EleFence

// @@protoc_insertion_point(global_scope)
