From d9d0e0d97955277b539bd7beeb0fc499077d7dd7 Mon Sep 17 00:00:00 2001 From: Henry Winkel Date: Wed, 16 Aug 2023 16:00:07 +0200 Subject: [PATCH] ADD: addded Orderlibryry and removed the orderlibrary from the entity library --- .gitmodules | 3 + CMakeLists.txt | 62 +- include/Orders/MoveOrder.hpp | 45 -- include/Orders/Order.hpp | 42 -- include/Orders/OrderFactory.hpp | 14 - include/Orders/protos/EngageOrder.pb.cc | 462 --------------- include/Orders/protos/EngageOrder.pb.h | 586 ------------------- include/Orders/protos/EngageOrder.proto | 14 - include/Orders/protos/HoldOrder.pb.cc | 315 ---------- include/Orders/protos/HoldOrder.pb.h | 333 ----------- include/Orders/protos/HoldOrder.proto | 13 - include/Orders/protos/MoveOrder.pb.cc | 454 -------------- include/Orders/protos/MoveOrder.pb.h | 527 ----------------- include/Orders/protos/MoveOrder.proto | 16 - include/Orders/protos/Order.pb.cc | 387 ------------ include/Orders/protos/Order.pb.h | 467 --------------- include/Orders/protos/Order.proto | 15 - include/Orders/protos/SystemStateOrder.pb.cc | 421 ------------- include/Orders/protos/SystemStateOrder.pb.h | 448 -------------- include/Orders/protos/SystemStateOrder.proto | 14 - libs/OrderLibrary | 1 + src/Orders/MoveOrder.cpp | 146 ----- src/Orders/Order.cpp | 23 - tests/test_EntityClass.cpp | 21 +- tests/test_SensorClass.cpp | 4 +- tests/test_Tracklist.cpp | 8 +- 26 files changed, 20 insertions(+), 4821 deletions(-) delete mode 100644 include/Orders/MoveOrder.hpp delete mode 100644 include/Orders/Order.hpp delete mode 100644 include/Orders/OrderFactory.hpp delete mode 100644 include/Orders/protos/EngageOrder.pb.cc delete mode 100644 include/Orders/protos/EngageOrder.pb.h delete mode 100644 include/Orders/protos/EngageOrder.proto delete mode 100644 include/Orders/protos/HoldOrder.pb.cc delete mode 100644 include/Orders/protos/HoldOrder.pb.h delete mode 100644 include/Orders/protos/HoldOrder.proto delete mode 100644 include/Orders/protos/MoveOrder.pb.cc delete mode 100644 include/Orders/protos/MoveOrder.pb.h delete mode 100644 include/Orders/protos/MoveOrder.proto delete mode 100644 include/Orders/protos/Order.pb.cc delete mode 100644 include/Orders/protos/Order.pb.h delete mode 100644 include/Orders/protos/Order.proto delete mode 100644 include/Orders/protos/SystemStateOrder.pb.cc delete mode 100644 include/Orders/protos/SystemStateOrder.pb.h delete mode 100644 include/Orders/protos/SystemStateOrder.proto create mode 160000 libs/OrderLibrary delete mode 100644 src/Orders/MoveOrder.cpp delete mode 100644 src/Orders/Order.cpp diff --git a/.gitmodules b/.gitmodules index 6a15a4c..e687aae 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,6 @@ [submodule "libs/KubeControl"] path = libs/KubeControl url = ssh://git@dev-gitea.ftewa.ti.unibw-hamburg.de:12000/hwinkel/KubeControl.git +[submodule "libs/OrderLibrary"] + path = libs/OrderLibrary + url = ssh://git@dev-gitea.ftewa.ti.unibw-hamburg.de:12000/hwinkel/OrderLibrary.git diff --git a/CMakeLists.txt b/CMakeLists.txt index b2020d3..aa75c24 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,38 +23,12 @@ set(TEST_KUBECONTROL_LIBRARY OFF CACHE INTERNAL "") add_subdirectory(libs/KubeControl EXCLUDE_FROM_ALL) ENDIF() - protobuf_generate_cpp(PROTO_PATH include/Orders/protos CPP_PATH include/Orders/protos HPP_PATH include/Orders/protos) - - add_library(OrderLibrary STATIC +IF(NOT TARGET OrderLibrary) +# set(TEST_KUBECONTROL_LIBRARY OFF CACHE INTERNAL "") + add_subdirectory(libs/OrderLibrary EXCLUDE_FROM_ALL) +ENDIF() - include/Orders/Order.hpp - src/Orders/Order.cpp - - include/Orders/MoveOrder.hpp - src/Orders/MoveOrder.cpp - - include/Orders/protos/Order.pb.cc - include/Orders/protos/EngageOrder.pb.cc - include/Orders/protos/HoldOrder.pb.cc - include/Orders/protos/MoveOrder.pb.cc - include/Orders/protos/SystemStateOrder.pb.cc - - ) - - -target_link_libraries(OrderLibrary -SimCore -loguru -) - add_dependencies(OrderLibrary protoc) - -target_include_directories(OrderLibrary PUBLIC - $ - $ - - $ - src) add_library(EntityLibrary STATIC @@ -93,24 +67,7 @@ target_include_directories(EntityLibrary PUBLIC src) -# add_executable(main - -# src/main.cpp - -# ) - - -# target_link_libraries(main -# Gateway -# CLI11 -# loguru -# ) -# target_include_directories(main PUBLIC -# $ -# $ -# src) - # # Everything TEST related @@ -129,21 +86,10 @@ IF (${TEST_ENTITIY_LIBRARY}) target_link_libraries(test_EntityClass Catch2::Catch2 EntityLibrary loguru) catch_discover_tests(test_EntityClass) - # add_executable(test_MovementClass tests/test_MovementClass.cpp) - # target_link_libraries(test_MovementClass Catch2::Catch2 EntityLibrary SimCore loguru) - # catch_discover_tests(test_MovementClass) - - # add_executable(test_EntityImplementation tests/test_EntityImplementation.cpp) - # target_link_libraries(test_EntityImplementation EntityLibrary loguru) add_executable(test_Tracklist tests/test_Tracklist.cpp) target_link_libraries(test_Tracklist Catch2::Catch2 EntityLibrary loguru) catch_discover_tests(test_Tracklist) - add_executable(test_MoveOrder tests/test_MoveOrder.cpp) - target_link_libraries(test_MoveOrder Catch2::Catch2 OrderLibrary loguru) - catch_discover_tests(test_MoveOrder) - - ENDIF() diff --git a/include/Orders/MoveOrder.hpp b/include/Orders/MoveOrder.hpp deleted file mode 100644 index c011fd3..0000000 --- a/include/Orders/MoveOrder.hpp +++ /dev/null @@ -1,45 +0,0 @@ -#pragma once - -#include "SimCore/data.hpp" -#include -#include -#include -#include - -namespace Orders -{ - class MoveOrder: public Order - { - public: - MoveOrder(const SimCore::Identifier OwnID); - - MoveOrder(const SimCore::Identifier OwnID,SimCore::Position pos,double speed = 0,double course = 0, int startTime = 0); - - ~MoveOrder(); - - - void setPosition(SimCore::Position pos); - - - SimCore::Position getPosition(); - - virtual WHISPER::Message buildMessage() override; - - - static std::unique_ptr unpack(WHISPER::Message msg); - static std::unique_ptr unpack(std::string msg); - - - SimCore::Data Course; - SimCore::Data Speed; - SimCore::Data StartTime; - - - private: - SimCore::Position pos_; - - - - }; - -} \ No newline at end of file diff --git a/include/Orders/Order.hpp b/include/Orders/Order.hpp deleted file mode 100644 index 7e96de4..0000000 --- a/include/Orders/Order.hpp +++ /dev/null @@ -1,42 +0,0 @@ -#pragma once - -#include -#include - -namespace Orders -{ - enum OrderType: uint8_t - { - HOLD_ORDER, - MOVE_ORDER, - ENGAGE_ORDER, - SYSTEM_STATE_ORDER - }; - - class Order - { - public: - Order(const SimCore::Identifier OwnID, const Orders::OrderType OrderType_); - - - const SimCore::Identifier getOrderID(); - const SimCore::Identifier getOwnID(); - - - const Orders::OrderType getOrderType(); - - - protected: - virtual WHISPER::Message buildMessage() = 0; - - - - private: - const SimCore::Identifier orderID_; - const SimCore::Identifier OwnID_; - const Orders::OrderType OrderType_; - - - }; - -} diff --git a/include/Orders/OrderFactory.hpp b/include/Orders/OrderFactory.hpp deleted file mode 100644 index f1ef5ca..0000000 --- a/include/Orders/OrderFactory.hpp +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once - - - -namespace Orders -{ - - class OrderFactory - { - - - }; - -} \ No newline at end of file diff --git a/include/Orders/protos/EngageOrder.pb.cc b/include/Orders/protos/EngageOrder.pb.cc deleted file mode 100644 index 0c2df22..0000000 --- a/include/Orders/protos/EngageOrder.pb.cc +++ /dev/null @@ -1,462 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: EngageOrder.proto - -#include "EngageOrder.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include - -PROTOBUF_PRAGMA_INIT_SEG - -namespace _pb = ::PROTOBUF_NAMESPACE_ID; -namespace _pbi = _pb::internal; - -namespace messages { -namespace entity { -namespace order { -PROTOBUF_CONSTEXPR EngageOrder::EngageOrder( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.targetid_)*/nullptr - , /*decltype(_impl_.effectorid_)*/nullptr - , /*decltype(_impl_.amunitionid_)*/nullptr - , /*decltype(_impl_.salvosize_)*/0u} {} -struct EngageOrderDefaultTypeInternal { - PROTOBUF_CONSTEXPR EngageOrderDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~EngageOrderDefaultTypeInternal() {} - union { - EngageOrder _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EngageOrderDefaultTypeInternal _EngageOrder_default_instance_; -} // namespace order -} // namespace entity -} // namespace messages -static ::_pb::Metadata file_level_metadata_EngageOrder_2eproto[1]; -static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_EngageOrder_2eproto = nullptr; -static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_EngageOrder_2eproto = nullptr; - -const uint32_t TableStruct_EngageOrder_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - PROTOBUF_FIELD_OFFSET(::messages::entity::order::EngageOrder, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::messages::entity::order::EngageOrder, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::messages::entity::order::EngageOrder, _impl_.targetid_), - PROTOBUF_FIELD_OFFSET(::messages::entity::order::EngageOrder, _impl_.effectorid_), - PROTOBUF_FIELD_OFFSET(::messages::entity::order::EngageOrder, _impl_.amunitionid_), - PROTOBUF_FIELD_OFFSET(::messages::entity::order::EngageOrder, _impl_.salvosize_), - ~0u, - ~0u, - 0, - 1, -}; -static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, 10, -1, sizeof(::messages::entity::order::EngageOrder)}, -}; - -static const ::_pb::Message* const file_default_instances[] = { - &::messages::entity::order::_EngageOrder_default_instance_._instance, -}; - -const char descriptor_table_protodef_EngageOrder_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\021EngageOrder.proto\022\025messages.entity.ord" - "er\032\020Identifier.proto\"\327\001\n\013EngageOrder\022,\n\010" - "TargetID\030\001 \001(\0132\032.messages.track.Identifi" - "er\022.\n\nEffectorID\030\002 \001(\0132\032.messages.track." - "Identifier\0224\n\013AmunitionID\030\003 \001(\0132\032.messag" - "es.track.IdentifierH\000\210\001\001\022\026\n\tsalvoSize\030\004 " - "\001(\rH\001\210\001\001B\016\n\014_AmunitionIDB\014\n\n_salvoSizeb\006" - "proto3" - ; -static const ::_pbi::DescriptorTable* const descriptor_table_EngageOrder_2eproto_deps[1] = { - &::descriptor_table_Identifier_2eproto, -}; -static ::_pbi::once_flag descriptor_table_EngageOrder_2eproto_once; -const ::_pbi::DescriptorTable descriptor_table_EngageOrder_2eproto = { - false, false, 286, descriptor_table_protodef_EngageOrder_2eproto, - "EngageOrder.proto", - &descriptor_table_EngageOrder_2eproto_once, descriptor_table_EngageOrder_2eproto_deps, 1, 1, - schemas, file_default_instances, TableStruct_EngageOrder_2eproto::offsets, - file_level_metadata_EngageOrder_2eproto, file_level_enum_descriptors_EngageOrder_2eproto, - file_level_service_descriptors_EngageOrder_2eproto, -}; -PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_EngageOrder_2eproto_getter() { - return &descriptor_table_EngageOrder_2eproto; -} - -// Force running AddDescriptors() at dynamic initialization time. -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_EngageOrder_2eproto(&descriptor_table_EngageOrder_2eproto); -namespace messages { -namespace entity { -namespace order { - -// =================================================================== - -class EngageOrder::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static const ::messages::track::Identifier& targetid(const EngageOrder* msg); - static const ::messages::track::Identifier& effectorid(const EngageOrder* msg); - static const ::messages::track::Identifier& amunitionid(const EngageOrder* msg); - static void set_has_amunitionid(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static void set_has_salvosize(HasBits* has_bits) { - (*has_bits)[0] |= 2u; - } -}; - -const ::messages::track::Identifier& -EngageOrder::_Internal::targetid(const EngageOrder* msg) { - return *msg->_impl_.targetid_; -} -const ::messages::track::Identifier& -EngageOrder::_Internal::effectorid(const EngageOrder* msg) { - return *msg->_impl_.effectorid_; -} -const ::messages::track::Identifier& -EngageOrder::_Internal::amunitionid(const EngageOrder* msg) { - return *msg->_impl_.amunitionid_; -} -void EngageOrder::clear_targetid() { - if (GetArenaForAllocation() == nullptr && _impl_.targetid_ != nullptr) { - delete _impl_.targetid_; - } - _impl_.targetid_ = nullptr; -} -void EngageOrder::clear_effectorid() { - if (GetArenaForAllocation() == nullptr && _impl_.effectorid_ != nullptr) { - delete _impl_.effectorid_; - } - _impl_.effectorid_ = nullptr; -} -void EngageOrder::clear_amunitionid() { - if (_impl_.amunitionid_ != nullptr) _impl_.amunitionid_->Clear(); - _impl_._has_bits_[0] &= ~0x00000001u; -} -EngageOrder::EngageOrder(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:messages.entity.order.EngageOrder) -} -EngageOrder::EngageOrder(const EngageOrder& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - EngageOrder* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.targetid_){nullptr} - , decltype(_impl_.effectorid_){nullptr} - , decltype(_impl_.amunitionid_){nullptr} - , decltype(_impl_.salvosize_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_targetid()) { - _this->_impl_.targetid_ = new ::messages::track::Identifier(*from._impl_.targetid_); - } - if (from._internal_has_effectorid()) { - _this->_impl_.effectorid_ = new ::messages::track::Identifier(*from._impl_.effectorid_); - } - if (from._internal_has_amunitionid()) { - _this->_impl_.amunitionid_ = new ::messages::track::Identifier(*from._impl_.amunitionid_); - } - _this->_impl_.salvosize_ = from._impl_.salvosize_; - // @@protoc_insertion_point(copy_constructor:messages.entity.order.EngageOrder) -} - -inline void EngageOrder::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.targetid_){nullptr} - , decltype(_impl_.effectorid_){nullptr} - , decltype(_impl_.amunitionid_){nullptr} - , decltype(_impl_.salvosize_){0u} - }; -} - -EngageOrder::~EngageOrder() { - // @@protoc_insertion_point(destructor:messages.entity.order.EngageOrder) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void EngageOrder::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - if (this != internal_default_instance()) delete _impl_.targetid_; - if (this != internal_default_instance()) delete _impl_.effectorid_; - if (this != internal_default_instance()) delete _impl_.amunitionid_; -} - -void EngageOrder::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void EngageOrder::Clear() { -// @@protoc_insertion_point(message_clear_start:messages.entity.order.EngageOrder) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - if (GetArenaForAllocation() == nullptr && _impl_.targetid_ != nullptr) { - delete _impl_.targetid_; - } - _impl_.targetid_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.effectorid_ != nullptr) { - delete _impl_.effectorid_; - } - _impl_.effectorid_ = nullptr; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - GOOGLE_DCHECK(_impl_.amunitionid_ != nullptr); - _impl_.amunitionid_->Clear(); - } - _impl_.salvosize_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* EngageOrder::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .messages.track.Identifier TargetID = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_targetid(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .messages.track.Identifier EffectorID = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr = ctx->ParseMessage(_internal_mutable_effectorid(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional .messages.track.Identifier AmunitionID = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - ptr = ctx->ParseMessage(_internal_mutable_amunitionid(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional uint32 salvoSize = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _Internal::set_has_salvosize(&has_bits); - _impl_.salvosize_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* EngageOrder::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:messages.entity.order.EngageOrder) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // .messages.track.Identifier TargetID = 1; - if (this->_internal_has_targetid()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::targetid(this), - _Internal::targetid(this).GetCachedSize(), target, stream); - } - - // .messages.track.Identifier EffectorID = 2; - if (this->_internal_has_effectorid()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(2, _Internal::effectorid(this), - _Internal::effectorid(this).GetCachedSize(), target, stream); - } - - // optional .messages.track.Identifier AmunitionID = 3; - if (_internal_has_amunitionid()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(3, _Internal::amunitionid(this), - _Internal::amunitionid(this).GetCachedSize(), target, stream); - } - - // optional uint32 salvoSize = 4; - if (_internal_has_salvosize()) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_salvosize(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:messages.entity.order.EngageOrder) - return target; -} - -size_t EngageOrder::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:messages.entity.order.EngageOrder) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // .messages.track.Identifier TargetID = 1; - if (this->_internal_has_targetid()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.targetid_); - } - - // .messages.track.Identifier EffectorID = 2; - if (this->_internal_has_effectorid()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.effectorid_); - } - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - // optional .messages.track.Identifier AmunitionID = 3; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.amunitionid_); - } - - // optional uint32 salvoSize = 4; - if (cached_has_bits & 0x00000002u) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_salvosize()); - } - - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EngageOrder::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - EngageOrder::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EngageOrder::GetClassData() const { return &_class_data_; } - - -void EngageOrder::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:messages.entity.order.EngageOrder) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (from._internal_has_targetid()) { - _this->_internal_mutable_targetid()->::messages::track::Identifier::MergeFrom( - from._internal_targetid()); - } - if (from._internal_has_effectorid()) { - _this->_internal_mutable_effectorid()->::messages::track::Identifier::MergeFrom( - from._internal_effectorid()); - } - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - if (cached_has_bits & 0x00000001u) { - _this->_internal_mutable_amunitionid()->::messages::track::Identifier::MergeFrom( - from._internal_amunitionid()); - } - if (cached_has_bits & 0x00000002u) { - _this->_impl_.salvosize_ = from._impl_.salvosize_; - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void EngageOrder::CopyFrom(const EngageOrder& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:messages.entity.order.EngageOrder) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool EngageOrder::IsInitialized() const { - return true; -} - -void EngageOrder::InternalSwap(EngageOrder* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(EngageOrder, _impl_.salvosize_) - + sizeof(EngageOrder::_impl_.salvosize_) - - PROTOBUF_FIELD_OFFSET(EngageOrder, _impl_.targetid_)>( - reinterpret_cast(&_impl_.targetid_), - reinterpret_cast(&other->_impl_.targetid_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata EngageOrder::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_EngageOrder_2eproto_getter, &descriptor_table_EngageOrder_2eproto_once, - file_level_metadata_EngageOrder_2eproto[0]); -} - -// @@protoc_insertion_point(namespace_scope) -} // namespace order -} // namespace entity -} // namespace messages -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::messages::entity::order::EngageOrder* -Arena::CreateMaybeMessage< ::messages::entity::order::EngageOrder >(Arena* arena) { - return Arena::CreateMessageInternal< ::messages::entity::order::EngageOrder >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include diff --git a/include/Orders/protos/EngageOrder.pb.h b/include/Orders/protos/EngageOrder.pb.h deleted file mode 100644 index ea8bdd1..0000000 --- a/include/Orders/protos/EngageOrder.pb.h +++ /dev/null @@ -1,586 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: EngageOrder.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_EngageOrder_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_EngageOrder_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3021000 -#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 3021012 < 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 -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -#include "Identifier.pb.h" -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_EngageOrder_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_EngageOrder_2eproto { - static const uint32_t offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_EngageOrder_2eproto; -namespace messages { -namespace entity { -namespace order { -class EngageOrder; -struct EngageOrderDefaultTypeInternal; -extern EngageOrderDefaultTypeInternal _EngageOrder_default_instance_; -} // namespace order -} // namespace entity -} // namespace messages -PROTOBUF_NAMESPACE_OPEN -template<> ::messages::entity::order::EngageOrder* Arena::CreateMaybeMessage<::messages::entity::order::EngageOrder>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace messages { -namespace entity { -namespace order { - -// =================================================================== - -class EngageOrder final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:messages.entity.order.EngageOrder) */ { - public: - inline EngageOrder() : EngageOrder(nullptr) {} - ~EngageOrder() override; - explicit PROTOBUF_CONSTEXPR EngageOrder(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - EngageOrder(const EngageOrder& from); - EngageOrder(EngageOrder&& from) noexcept - : EngageOrder() { - *this = ::std::move(from); - } - - inline EngageOrder& operator=(const EngageOrder& from) { - CopyFrom(from); - return *this; - } - inline EngageOrder& operator=(EngageOrder&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const EngageOrder& default_instance() { - return *internal_default_instance(); - } - static inline const EngageOrder* internal_default_instance() { - return reinterpret_cast( - &_EngageOrder_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(EngageOrder& a, EngageOrder& b) { - a.Swap(&b); - } - inline void Swap(EngageOrder* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(EngageOrder* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - EngageOrder* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const EngageOrder& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const EngageOrder& from) { - EngageOrder::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(EngageOrder* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "messages.entity.order.EngageOrder"; - } - protected: - explicit EngageOrder(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kTargetIDFieldNumber = 1, - kEffectorIDFieldNumber = 2, - kAmunitionIDFieldNumber = 3, - kSalvoSizeFieldNumber = 4, - }; - // .messages.track.Identifier TargetID = 1; - bool has_targetid() const; - private: - bool _internal_has_targetid() const; - public: - void clear_targetid(); - const ::messages::track::Identifier& targetid() const; - PROTOBUF_NODISCARD ::messages::track::Identifier* release_targetid(); - ::messages::track::Identifier* mutable_targetid(); - void set_allocated_targetid(::messages::track::Identifier* targetid); - private: - const ::messages::track::Identifier& _internal_targetid() const; - ::messages::track::Identifier* _internal_mutable_targetid(); - public: - void unsafe_arena_set_allocated_targetid( - ::messages::track::Identifier* targetid); - ::messages::track::Identifier* unsafe_arena_release_targetid(); - - // .messages.track.Identifier EffectorID = 2; - bool has_effectorid() const; - private: - bool _internal_has_effectorid() const; - public: - void clear_effectorid(); - const ::messages::track::Identifier& effectorid() const; - PROTOBUF_NODISCARD ::messages::track::Identifier* release_effectorid(); - ::messages::track::Identifier* mutable_effectorid(); - void set_allocated_effectorid(::messages::track::Identifier* effectorid); - private: - const ::messages::track::Identifier& _internal_effectorid() const; - ::messages::track::Identifier* _internal_mutable_effectorid(); - public: - void unsafe_arena_set_allocated_effectorid( - ::messages::track::Identifier* effectorid); - ::messages::track::Identifier* unsafe_arena_release_effectorid(); - - // optional .messages.track.Identifier AmunitionID = 3; - bool has_amunitionid() const; - private: - bool _internal_has_amunitionid() const; - public: - void clear_amunitionid(); - const ::messages::track::Identifier& amunitionid() const; - PROTOBUF_NODISCARD ::messages::track::Identifier* release_amunitionid(); - ::messages::track::Identifier* mutable_amunitionid(); - void set_allocated_amunitionid(::messages::track::Identifier* amunitionid); - private: - const ::messages::track::Identifier& _internal_amunitionid() const; - ::messages::track::Identifier* _internal_mutable_amunitionid(); - public: - void unsafe_arena_set_allocated_amunitionid( - ::messages::track::Identifier* amunitionid); - ::messages::track::Identifier* unsafe_arena_release_amunitionid(); - - // optional uint32 salvoSize = 4; - bool has_salvosize() const; - private: - bool _internal_has_salvosize() const; - public: - void clear_salvosize(); - uint32_t salvosize() const; - void set_salvosize(uint32_t value); - private: - uint32_t _internal_salvosize() const; - void _internal_set_salvosize(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:messages.entity.order.EngageOrder) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::messages::track::Identifier* targetid_; - ::messages::track::Identifier* effectorid_; - ::messages::track::Identifier* amunitionid_; - uint32_t salvosize_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_EngageOrder_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// EngageOrder - -// .messages.track.Identifier TargetID = 1; -inline bool EngageOrder::_internal_has_targetid() const { - return this != internal_default_instance() && _impl_.targetid_ != nullptr; -} -inline bool EngageOrder::has_targetid() const { - return _internal_has_targetid(); -} -inline const ::messages::track::Identifier& EngageOrder::_internal_targetid() const { - const ::messages::track::Identifier* p = _impl_.targetid_; - return p != nullptr ? *p : reinterpret_cast( - ::messages::track::_Identifier_default_instance_); -} -inline const ::messages::track::Identifier& EngageOrder::targetid() const { - // @@protoc_insertion_point(field_get:messages.entity.order.EngageOrder.TargetID) - return _internal_targetid(); -} -inline void EngageOrder::unsafe_arena_set_allocated_targetid( - ::messages::track::Identifier* targetid) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.targetid_); - } - _impl_.targetid_ = targetid; - if (targetid) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.entity.order.EngageOrder.TargetID) -} -inline ::messages::track::Identifier* EngageOrder::release_targetid() { - - ::messages::track::Identifier* temp = _impl_.targetid_; - _impl_.targetid_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::messages::track::Identifier* EngageOrder::unsafe_arena_release_targetid() { - // @@protoc_insertion_point(field_release:messages.entity.order.EngageOrder.TargetID) - - ::messages::track::Identifier* temp = _impl_.targetid_; - _impl_.targetid_ = nullptr; - return temp; -} -inline ::messages::track::Identifier* EngageOrder::_internal_mutable_targetid() { - - if (_impl_.targetid_ == nullptr) { - auto* p = CreateMaybeMessage<::messages::track::Identifier>(GetArenaForAllocation()); - _impl_.targetid_ = p; - } - return _impl_.targetid_; -} -inline ::messages::track::Identifier* EngageOrder::mutable_targetid() { - ::messages::track::Identifier* _msg = _internal_mutable_targetid(); - // @@protoc_insertion_point(field_mutable:messages.entity.order.EngageOrder.TargetID) - return _msg; -} -inline void EngageOrder::set_allocated_targetid(::messages::track::Identifier* targetid) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.targetid_); - } - if (targetid) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(targetid)); - if (message_arena != submessage_arena) { - targetid = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, targetid, submessage_arena); - } - - } else { - - } - _impl_.targetid_ = targetid; - // @@protoc_insertion_point(field_set_allocated:messages.entity.order.EngageOrder.TargetID) -} - -// .messages.track.Identifier EffectorID = 2; -inline bool EngageOrder::_internal_has_effectorid() const { - return this != internal_default_instance() && _impl_.effectorid_ != nullptr; -} -inline bool EngageOrder::has_effectorid() const { - return _internal_has_effectorid(); -} -inline const ::messages::track::Identifier& EngageOrder::_internal_effectorid() const { - const ::messages::track::Identifier* p = _impl_.effectorid_; - return p != nullptr ? *p : reinterpret_cast( - ::messages::track::_Identifier_default_instance_); -} -inline const ::messages::track::Identifier& EngageOrder::effectorid() const { - // @@protoc_insertion_point(field_get:messages.entity.order.EngageOrder.EffectorID) - return _internal_effectorid(); -} -inline void EngageOrder::unsafe_arena_set_allocated_effectorid( - ::messages::track::Identifier* effectorid) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.effectorid_); - } - _impl_.effectorid_ = effectorid; - if (effectorid) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.entity.order.EngageOrder.EffectorID) -} -inline ::messages::track::Identifier* EngageOrder::release_effectorid() { - - ::messages::track::Identifier* temp = _impl_.effectorid_; - _impl_.effectorid_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::messages::track::Identifier* EngageOrder::unsafe_arena_release_effectorid() { - // @@protoc_insertion_point(field_release:messages.entity.order.EngageOrder.EffectorID) - - ::messages::track::Identifier* temp = _impl_.effectorid_; - _impl_.effectorid_ = nullptr; - return temp; -} -inline ::messages::track::Identifier* EngageOrder::_internal_mutable_effectorid() { - - if (_impl_.effectorid_ == nullptr) { - auto* p = CreateMaybeMessage<::messages::track::Identifier>(GetArenaForAllocation()); - _impl_.effectorid_ = p; - } - return _impl_.effectorid_; -} -inline ::messages::track::Identifier* EngageOrder::mutable_effectorid() { - ::messages::track::Identifier* _msg = _internal_mutable_effectorid(); - // @@protoc_insertion_point(field_mutable:messages.entity.order.EngageOrder.EffectorID) - return _msg; -} -inline void EngageOrder::set_allocated_effectorid(::messages::track::Identifier* effectorid) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.effectorid_); - } - if (effectorid) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(effectorid)); - if (message_arena != submessage_arena) { - effectorid = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, effectorid, submessage_arena); - } - - } else { - - } - _impl_.effectorid_ = effectorid; - // @@protoc_insertion_point(field_set_allocated:messages.entity.order.EngageOrder.EffectorID) -} - -// optional .messages.track.Identifier AmunitionID = 3; -inline bool EngageOrder::_internal_has_amunitionid() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - PROTOBUF_ASSUME(!value || _impl_.amunitionid_ != nullptr); - return value; -} -inline bool EngageOrder::has_amunitionid() const { - return _internal_has_amunitionid(); -} -inline const ::messages::track::Identifier& EngageOrder::_internal_amunitionid() const { - const ::messages::track::Identifier* p = _impl_.amunitionid_; - return p != nullptr ? *p : reinterpret_cast( - ::messages::track::_Identifier_default_instance_); -} -inline const ::messages::track::Identifier& EngageOrder::amunitionid() const { - // @@protoc_insertion_point(field_get:messages.entity.order.EngageOrder.AmunitionID) - return _internal_amunitionid(); -} -inline void EngageOrder::unsafe_arena_set_allocated_amunitionid( - ::messages::track::Identifier* amunitionid) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.amunitionid_); - } - _impl_.amunitionid_ = amunitionid; - if (amunitionid) { - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.entity.order.EngageOrder.AmunitionID) -} -inline ::messages::track::Identifier* EngageOrder::release_amunitionid() { - _impl_._has_bits_[0] &= ~0x00000001u; - ::messages::track::Identifier* temp = _impl_.amunitionid_; - _impl_.amunitionid_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::messages::track::Identifier* EngageOrder::unsafe_arena_release_amunitionid() { - // @@protoc_insertion_point(field_release:messages.entity.order.EngageOrder.AmunitionID) - _impl_._has_bits_[0] &= ~0x00000001u; - ::messages::track::Identifier* temp = _impl_.amunitionid_; - _impl_.amunitionid_ = nullptr; - return temp; -} -inline ::messages::track::Identifier* EngageOrder::_internal_mutable_amunitionid() { - _impl_._has_bits_[0] |= 0x00000001u; - if (_impl_.amunitionid_ == nullptr) { - auto* p = CreateMaybeMessage<::messages::track::Identifier>(GetArenaForAllocation()); - _impl_.amunitionid_ = p; - } - return _impl_.amunitionid_; -} -inline ::messages::track::Identifier* EngageOrder::mutable_amunitionid() { - ::messages::track::Identifier* _msg = _internal_mutable_amunitionid(); - // @@protoc_insertion_point(field_mutable:messages.entity.order.EngageOrder.AmunitionID) - return _msg; -} -inline void EngageOrder::set_allocated_amunitionid(::messages::track::Identifier* amunitionid) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.amunitionid_); - } - if (amunitionid) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(amunitionid)); - if (message_arena != submessage_arena) { - amunitionid = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, amunitionid, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - _impl_.amunitionid_ = amunitionid; - // @@protoc_insertion_point(field_set_allocated:messages.entity.order.EngageOrder.AmunitionID) -} - -// optional uint32 salvoSize = 4; -inline bool EngageOrder::_internal_has_salvosize() const { - bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; - return value; -} -inline bool EngageOrder::has_salvosize() const { - return _internal_has_salvosize(); -} -inline void EngageOrder::clear_salvosize() { - _impl_.salvosize_ = 0u; - _impl_._has_bits_[0] &= ~0x00000002u; -} -inline uint32_t EngageOrder::_internal_salvosize() const { - return _impl_.salvosize_; -} -inline uint32_t EngageOrder::salvosize() const { - // @@protoc_insertion_point(field_get:messages.entity.order.EngageOrder.salvoSize) - return _internal_salvosize(); -} -inline void EngageOrder::_internal_set_salvosize(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000002u; - _impl_.salvosize_ = value; -} -inline void EngageOrder::set_salvosize(uint32_t value) { - _internal_set_salvosize(value); - // @@protoc_insertion_point(field_set:messages.entity.order.EngageOrder.salvoSize) -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ - -// @@protoc_insertion_point(namespace_scope) - -} // namespace order -} // namespace entity -} // namespace messages - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_EngageOrder_2eproto diff --git a/include/Orders/protos/EngageOrder.proto b/include/Orders/protos/EngageOrder.proto deleted file mode 100644 index 41e8be3..0000000 --- a/include/Orders/protos/EngageOrder.proto +++ /dev/null @@ -1,14 +0,0 @@ -syntax = "proto3"; -package messages.entity.order; - -import "Identifier.proto"; - -message EngageOrder -{ -messages.track.Identifier TargetID = 1; -messages.track.Identifier EffectorID = 2; -optional messages.track.Identifier AmunitionID = 3; -optional uint32 salvoSize = 4; - - -} \ No newline at end of file diff --git a/include/Orders/protos/HoldOrder.pb.cc b/include/Orders/protos/HoldOrder.pb.cc deleted file mode 100644 index e90ec03..0000000 --- a/include/Orders/protos/HoldOrder.pb.cc +++ /dev/null @@ -1,315 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: HoldOrder.proto - -#include "HoldOrder.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include - -PROTOBUF_PRAGMA_INIT_SEG - -namespace _pb = ::PROTOBUF_NAMESPACE_ID; -namespace _pbi = _pb::internal; - -namespace messages { -namespace entity { -namespace order { -PROTOBUF_CONSTEXPR HoldOrder::HoldOrder( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.endingtime_)*/nullptr} {} -struct HoldOrderDefaultTypeInternal { - PROTOBUF_CONSTEXPR HoldOrderDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~HoldOrderDefaultTypeInternal() {} - union { - HoldOrder _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HoldOrderDefaultTypeInternal _HoldOrder_default_instance_; -} // namespace order -} // namespace entity -} // namespace messages -static ::_pb::Metadata file_level_metadata_HoldOrder_2eproto[1]; -static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_HoldOrder_2eproto = nullptr; -static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_HoldOrder_2eproto = nullptr; - -const uint32_t TableStruct_HoldOrder_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - PROTOBUF_FIELD_OFFSET(::messages::entity::order::HoldOrder, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::messages::entity::order::HoldOrder, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::messages::entity::order::HoldOrder, _impl_.endingtime_), - 0, -}; -static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, 7, -1, sizeof(::messages::entity::order::HoldOrder)}, -}; - -static const ::_pb::Message* const file_default_instances[] = { - &::messages::entity::order::_HoldOrder_default_instance_._instance, -}; - -const char descriptor_table_protodef_HoldOrder_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\017HoldOrder.proto\022\025messages.entity.order" - "\032\037google/protobuf/timestamp.proto\"O\n\tHol" - "dOrder\0223\n\nendingTime\030\001 \001(\0132\032.google.prot" - "obuf.TimestampH\000\210\001\001B\r\n\013_endingTimeb\006prot" - "o3" - ; -static const ::_pbi::DescriptorTable* const descriptor_table_HoldOrder_2eproto_deps[1] = { - &::descriptor_table_google_2fprotobuf_2ftimestamp_2eproto, -}; -static ::_pbi::once_flag descriptor_table_HoldOrder_2eproto_once; -const ::_pbi::DescriptorTable descriptor_table_HoldOrder_2eproto = { - false, false, 162, descriptor_table_protodef_HoldOrder_2eproto, - "HoldOrder.proto", - &descriptor_table_HoldOrder_2eproto_once, descriptor_table_HoldOrder_2eproto_deps, 1, 1, - schemas, file_default_instances, TableStruct_HoldOrder_2eproto::offsets, - file_level_metadata_HoldOrder_2eproto, file_level_enum_descriptors_HoldOrder_2eproto, - file_level_service_descriptors_HoldOrder_2eproto, -}; -PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_HoldOrder_2eproto_getter() { - return &descriptor_table_HoldOrder_2eproto; -} - -// Force running AddDescriptors() at dynamic initialization time. -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_HoldOrder_2eproto(&descriptor_table_HoldOrder_2eproto); -namespace messages { -namespace entity { -namespace order { - -// =================================================================== - -class HoldOrder::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static const ::PROTOBUF_NAMESPACE_ID::Timestamp& endingtime(const HoldOrder* msg); - static void set_has_endingtime(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } -}; - -const ::PROTOBUF_NAMESPACE_ID::Timestamp& -HoldOrder::_Internal::endingtime(const HoldOrder* msg) { - return *msg->_impl_.endingtime_; -} -void HoldOrder::clear_endingtime() { - if (_impl_.endingtime_ != nullptr) _impl_.endingtime_->Clear(); - _impl_._has_bits_[0] &= ~0x00000001u; -} -HoldOrder::HoldOrder(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:messages.entity.order.HoldOrder) -} -HoldOrder::HoldOrder(const HoldOrder& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - HoldOrder* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.endingtime_){nullptr}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_endingtime()) { - _this->_impl_.endingtime_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.endingtime_); - } - // @@protoc_insertion_point(copy_constructor:messages.entity.order.HoldOrder) -} - -inline void HoldOrder::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.endingtime_){nullptr} - }; -} - -HoldOrder::~HoldOrder() { - // @@protoc_insertion_point(destructor:messages.entity.order.HoldOrder) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void HoldOrder::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - if (this != internal_default_instance()) delete _impl_.endingtime_; -} - -void HoldOrder::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void HoldOrder::Clear() { -// @@protoc_insertion_point(message_clear_start:messages.entity.order.HoldOrder) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - GOOGLE_DCHECK(_impl_.endingtime_ != nullptr); - _impl_.endingtime_->Clear(); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* HoldOrder::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional .google.protobuf.Timestamp endingTime = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_endingtime(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* HoldOrder::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:messages.entity.order.HoldOrder) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // optional .google.protobuf.Timestamp endingTime = 1; - if (_internal_has_endingtime()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::endingtime(this), - _Internal::endingtime(this).GetCachedSize(), target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:messages.entity.order.HoldOrder) - return target; -} - -size_t HoldOrder::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:messages.entity.order.HoldOrder) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // optional .google.protobuf.Timestamp endingTime = 1; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.endingtime_); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData HoldOrder::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - HoldOrder::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*HoldOrder::GetClassData() const { return &_class_data_; } - - -void HoldOrder::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:messages.entity.order.HoldOrder) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (from._internal_has_endingtime()) { - _this->_internal_mutable_endingtime()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom( - from._internal_endingtime()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void HoldOrder::CopyFrom(const HoldOrder& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:messages.entity.order.HoldOrder) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool HoldOrder::IsInitialized() const { - return true; -} - -void HoldOrder::InternalSwap(HoldOrder* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.endingtime_, other->_impl_.endingtime_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata HoldOrder::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_HoldOrder_2eproto_getter, &descriptor_table_HoldOrder_2eproto_once, - file_level_metadata_HoldOrder_2eproto[0]); -} - -// @@protoc_insertion_point(namespace_scope) -} // namespace order -} // namespace entity -} // namespace messages -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::messages::entity::order::HoldOrder* -Arena::CreateMaybeMessage< ::messages::entity::order::HoldOrder >(Arena* arena) { - return Arena::CreateMessageInternal< ::messages::entity::order::HoldOrder >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include diff --git a/include/Orders/protos/HoldOrder.pb.h b/include/Orders/protos/HoldOrder.pb.h deleted file mode 100644 index a7c0e4c..0000000 --- a/include/Orders/protos/HoldOrder.pb.h +++ /dev/null @@ -1,333 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: HoldOrder.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_HoldOrder_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_HoldOrder_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3021000 -#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 3021012 < 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 -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -#include -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_HoldOrder_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_HoldOrder_2eproto { - static const uint32_t offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_HoldOrder_2eproto; -namespace messages { -namespace entity { -namespace order { -class HoldOrder; -struct HoldOrderDefaultTypeInternal; -extern HoldOrderDefaultTypeInternal _HoldOrder_default_instance_; -} // namespace order -} // namespace entity -} // namespace messages -PROTOBUF_NAMESPACE_OPEN -template<> ::messages::entity::order::HoldOrder* Arena::CreateMaybeMessage<::messages::entity::order::HoldOrder>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace messages { -namespace entity { -namespace order { - -// =================================================================== - -class HoldOrder final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:messages.entity.order.HoldOrder) */ { - public: - inline HoldOrder() : HoldOrder(nullptr) {} - ~HoldOrder() override; - explicit PROTOBUF_CONSTEXPR HoldOrder(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - HoldOrder(const HoldOrder& from); - HoldOrder(HoldOrder&& from) noexcept - : HoldOrder() { - *this = ::std::move(from); - } - - inline HoldOrder& operator=(const HoldOrder& from) { - CopyFrom(from); - return *this; - } - inline HoldOrder& operator=(HoldOrder&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const HoldOrder& default_instance() { - return *internal_default_instance(); - } - static inline const HoldOrder* internal_default_instance() { - return reinterpret_cast( - &_HoldOrder_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(HoldOrder& a, HoldOrder& b) { - a.Swap(&b); - } - inline void Swap(HoldOrder* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(HoldOrder* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - HoldOrder* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const HoldOrder& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const HoldOrder& from) { - HoldOrder::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(HoldOrder* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "messages.entity.order.HoldOrder"; - } - protected: - explicit HoldOrder(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kEndingTimeFieldNumber = 1, - }; - // optional .google.protobuf.Timestamp endingTime = 1; - bool has_endingtime() const; - private: - bool _internal_has_endingtime() const; - public: - void clear_endingtime(); - const ::PROTOBUF_NAMESPACE_ID::Timestamp& endingtime() const; - PROTOBUF_NODISCARD ::PROTOBUF_NAMESPACE_ID::Timestamp* release_endingtime(); - ::PROTOBUF_NAMESPACE_ID::Timestamp* mutable_endingtime(); - void set_allocated_endingtime(::PROTOBUF_NAMESPACE_ID::Timestamp* endingtime); - private: - const ::PROTOBUF_NAMESPACE_ID::Timestamp& _internal_endingtime() const; - ::PROTOBUF_NAMESPACE_ID::Timestamp* _internal_mutable_endingtime(); - public: - void unsafe_arena_set_allocated_endingtime( - ::PROTOBUF_NAMESPACE_ID::Timestamp* endingtime); - ::PROTOBUF_NAMESPACE_ID::Timestamp* unsafe_arena_release_endingtime(); - - // @@protoc_insertion_point(class_scope:messages.entity.order.HoldOrder) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::Timestamp* endingtime_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_HoldOrder_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// HoldOrder - -// optional .google.protobuf.Timestamp endingTime = 1; -inline bool HoldOrder::_internal_has_endingtime() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - PROTOBUF_ASSUME(!value || _impl_.endingtime_ != nullptr); - return value; -} -inline bool HoldOrder::has_endingtime() const { - return _internal_has_endingtime(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Timestamp& HoldOrder::_internal_endingtime() const { - const ::PROTOBUF_NAMESPACE_ID::Timestamp* p = _impl_.endingtime_; - return p != nullptr ? *p : reinterpret_cast( - ::PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_); -} -inline const ::PROTOBUF_NAMESPACE_ID::Timestamp& HoldOrder::endingtime() const { - // @@protoc_insertion_point(field_get:messages.entity.order.HoldOrder.endingTime) - return _internal_endingtime(); -} -inline void HoldOrder::unsafe_arena_set_allocated_endingtime( - ::PROTOBUF_NAMESPACE_ID::Timestamp* endingtime) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.endingtime_); - } - _impl_.endingtime_ = endingtime; - if (endingtime) { - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.entity.order.HoldOrder.endingTime) -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* HoldOrder::release_endingtime() { - _impl_._has_bits_[0] &= ~0x00000001u; - ::PROTOBUF_NAMESPACE_ID::Timestamp* temp = _impl_.endingtime_; - _impl_.endingtime_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* HoldOrder::unsafe_arena_release_endingtime() { - // @@protoc_insertion_point(field_release:messages.entity.order.HoldOrder.endingTime) - _impl_._has_bits_[0] &= ~0x00000001u; - ::PROTOBUF_NAMESPACE_ID::Timestamp* temp = _impl_.endingtime_; - _impl_.endingtime_ = nullptr; - return temp; -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* HoldOrder::_internal_mutable_endingtime() { - _impl_._has_bits_[0] |= 0x00000001u; - if (_impl_.endingtime_ == nullptr) { - auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Timestamp>(GetArenaForAllocation()); - _impl_.endingtime_ = p; - } - return _impl_.endingtime_; -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* HoldOrder::mutable_endingtime() { - ::PROTOBUF_NAMESPACE_ID::Timestamp* _msg = _internal_mutable_endingtime(); - // @@protoc_insertion_point(field_mutable:messages.entity.order.HoldOrder.endingTime) - return _msg; -} -inline void HoldOrder::set_allocated_endingtime(::PROTOBUF_NAMESPACE_ID::Timestamp* endingtime) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.endingtime_); - } - if (endingtime) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(endingtime)); - if (message_arena != submessage_arena) { - endingtime = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, endingtime, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - _impl_.endingtime_ = endingtime; - // @@protoc_insertion_point(field_set_allocated:messages.entity.order.HoldOrder.endingTime) -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ - -// @@protoc_insertion_point(namespace_scope) - -} // namespace order -} // namespace entity -} // namespace messages - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_HoldOrder_2eproto diff --git a/include/Orders/protos/HoldOrder.proto b/include/Orders/protos/HoldOrder.proto deleted file mode 100644 index 6137eaf..0000000 --- a/include/Orders/protos/HoldOrder.proto +++ /dev/null @@ -1,13 +0,0 @@ -syntax = "proto3"; -package messages.entity.order; - -import "google/protobuf/timestamp.proto"; - - -message HoldOrder -{ - -optional google.protobuf.Timestamp endingTime = 1; - - -} \ No newline at end of file diff --git a/include/Orders/protos/MoveOrder.pb.cc b/include/Orders/protos/MoveOrder.pb.cc deleted file mode 100644 index 794096f..0000000 --- a/include/Orders/protos/MoveOrder.pb.cc +++ /dev/null @@ -1,454 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: MoveOrder.proto - -#include "MoveOrder.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include - -PROTOBUF_PRAGMA_INIT_SEG - -namespace _pb = ::PROTOBUF_NAMESPACE_ID; -namespace _pbi = _pb::internal; - -namespace messages { -namespace entity { -namespace order { -PROTOBUF_CONSTEXPR MoveOrder::MoveOrder( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.geocentricposition_)*/nullptr - , /*decltype(_impl_.startingtime_)*/nullptr - , /*decltype(_impl_.speed_)*/0 - , /*decltype(_impl_.course_)*/0} {} -struct MoveOrderDefaultTypeInternal { - PROTOBUF_CONSTEXPR MoveOrderDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~MoveOrderDefaultTypeInternal() {} - union { - MoveOrder _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MoveOrderDefaultTypeInternal _MoveOrder_default_instance_; -} // namespace order -} // namespace entity -} // namespace messages -static ::_pb::Metadata file_level_metadata_MoveOrder_2eproto[1]; -static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_MoveOrder_2eproto = nullptr; -static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_MoveOrder_2eproto = nullptr; - -const uint32_t TableStruct_MoveOrder_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - PROTOBUF_FIELD_OFFSET(::messages::entity::order::MoveOrder, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::messages::entity::order::MoveOrder, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::messages::entity::order::MoveOrder, _impl_.geocentricposition_), - PROTOBUF_FIELD_OFFSET(::messages::entity::order::MoveOrder, _impl_.speed_), - PROTOBUF_FIELD_OFFSET(::messages::entity::order::MoveOrder, _impl_.course_), - PROTOBUF_FIELD_OFFSET(::messages::entity::order::MoveOrder, _impl_.startingtime_), - 0, - 2, - 3, - 1, -}; -static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, 10, -1, sizeof(::messages::entity::order::MoveOrder)}, -}; - -static const ::_pb::Message* const file_default_instances[] = { - &::messages::entity::order::_MoveOrder_default_instance_._instance, -}; - -const char descriptor_table_protodef_MoveOrder_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\017MoveOrder.proto\022\025messages.entity.order" - "\032\030GeocentricPosition.proto\032\037google/proto" - "buf/timestamp.proto\"\363\001\n\tMoveOrder\022I\n\022Geo" - "centricPosition\030\001 \001(\0132(.messages.track.E" - "ntityGeocentricPositionH\000\210\001\001\022\022\n\005speed\030\002 " - "\001(\001H\001\210\001\001\022\023\n\006course\030\003 \001(\001H\002\210\001\001\0225\n\014startin" - "gTime\030\004 \001(\0132\032.google.protobuf.TimestampH" - "\003\210\001\001B\025\n\023_GeocentricPositionB\010\n\006_speedB\t\n" - "\007_courseB\017\n\r_startingTimeb\006proto3" - ; -static const ::_pbi::DescriptorTable* const descriptor_table_MoveOrder_2eproto_deps[2] = { - &::descriptor_table_GeocentricPosition_2eproto, - &::descriptor_table_google_2fprotobuf_2ftimestamp_2eproto, -}; -static ::_pbi::once_flag descriptor_table_MoveOrder_2eproto_once; -const ::_pbi::DescriptorTable descriptor_table_MoveOrder_2eproto = { - false, false, 353, descriptor_table_protodef_MoveOrder_2eproto, - "MoveOrder.proto", - &descriptor_table_MoveOrder_2eproto_once, descriptor_table_MoveOrder_2eproto_deps, 2, 1, - schemas, file_default_instances, TableStruct_MoveOrder_2eproto::offsets, - file_level_metadata_MoveOrder_2eproto, file_level_enum_descriptors_MoveOrder_2eproto, - file_level_service_descriptors_MoveOrder_2eproto, -}; -PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_MoveOrder_2eproto_getter() { - return &descriptor_table_MoveOrder_2eproto; -} - -// Force running AddDescriptors() at dynamic initialization time. -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_MoveOrder_2eproto(&descriptor_table_MoveOrder_2eproto); -namespace messages { -namespace entity { -namespace order { - -// =================================================================== - -class MoveOrder::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static const ::messages::track::EntityGeocentricPosition& geocentricposition(const MoveOrder* msg); - static void set_has_geocentricposition(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static void set_has_speed(HasBits* has_bits) { - (*has_bits)[0] |= 4u; - } - static void set_has_course(HasBits* has_bits) { - (*has_bits)[0] |= 8u; - } - static const ::PROTOBUF_NAMESPACE_ID::Timestamp& startingtime(const MoveOrder* msg); - static void set_has_startingtime(HasBits* has_bits) { - (*has_bits)[0] |= 2u; - } -}; - -const ::messages::track::EntityGeocentricPosition& -MoveOrder::_Internal::geocentricposition(const MoveOrder* msg) { - return *msg->_impl_.geocentricposition_; -} -const ::PROTOBUF_NAMESPACE_ID::Timestamp& -MoveOrder::_Internal::startingtime(const MoveOrder* msg) { - return *msg->_impl_.startingtime_; -} -void MoveOrder::clear_geocentricposition() { - if (_impl_.geocentricposition_ != nullptr) _impl_.geocentricposition_->Clear(); - _impl_._has_bits_[0] &= ~0x00000001u; -} -void MoveOrder::clear_startingtime() { - if (_impl_.startingtime_ != nullptr) _impl_.startingtime_->Clear(); - _impl_._has_bits_[0] &= ~0x00000002u; -} -MoveOrder::MoveOrder(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:messages.entity.order.MoveOrder) -} -MoveOrder::MoveOrder(const MoveOrder& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - MoveOrder* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.geocentricposition_){nullptr} - , decltype(_impl_.startingtime_){nullptr} - , decltype(_impl_.speed_){} - , decltype(_impl_.course_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_geocentricposition()) { - _this->_impl_.geocentricposition_ = new ::messages::track::EntityGeocentricPosition(*from._impl_.geocentricposition_); - } - if (from._internal_has_startingtime()) { - _this->_impl_.startingtime_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.startingtime_); - } - ::memcpy(&_impl_.speed_, &from._impl_.speed_, - static_cast(reinterpret_cast(&_impl_.course_) - - reinterpret_cast(&_impl_.speed_)) + sizeof(_impl_.course_)); - // @@protoc_insertion_point(copy_constructor:messages.entity.order.MoveOrder) -} - -inline void MoveOrder::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.geocentricposition_){nullptr} - , decltype(_impl_.startingtime_){nullptr} - , decltype(_impl_.speed_){0} - , decltype(_impl_.course_){0} - }; -} - -MoveOrder::~MoveOrder() { - // @@protoc_insertion_point(destructor:messages.entity.order.MoveOrder) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void MoveOrder::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - if (this != internal_default_instance()) delete _impl_.geocentricposition_; - if (this != internal_default_instance()) delete _impl_.startingtime_; -} - -void MoveOrder::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void MoveOrder::Clear() { -// @@protoc_insertion_point(message_clear_start:messages.entity.order.MoveOrder) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - if (cached_has_bits & 0x00000001u) { - GOOGLE_DCHECK(_impl_.geocentricposition_ != nullptr); - _impl_.geocentricposition_->Clear(); - } - if (cached_has_bits & 0x00000002u) { - GOOGLE_DCHECK(_impl_.startingtime_ != nullptr); - _impl_.startingtime_->Clear(); - } - } - if (cached_has_bits & 0x0000000cu) { - ::memset(&_impl_.speed_, 0, static_cast( - reinterpret_cast(&_impl_.course_) - - reinterpret_cast(&_impl_.speed_)) + sizeof(_impl_.course_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* MoveOrder::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // optional .messages.track.EntityGeocentricPosition GeocentricPosition = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_geocentricposition(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional double speed = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 17)) { - _Internal::set_has_speed(&has_bits); - _impl_.speed_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(double); - } else - goto handle_unusual; - continue; - // optional double course = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 25)) { - _Internal::set_has_course(&has_bits); - _impl_.course_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(double); - } else - goto handle_unusual; - continue; - // optional .google.protobuf.Timestamp startingTime = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - ptr = ctx->ParseMessage(_internal_mutable_startingtime(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* MoveOrder::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:messages.entity.order.MoveOrder) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // optional .messages.track.EntityGeocentricPosition GeocentricPosition = 1; - if (_internal_has_geocentricposition()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::geocentricposition(this), - _Internal::geocentricposition(this).GetCachedSize(), target, stream); - } - - // optional double speed = 2; - if (_internal_has_speed()) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray(2, this->_internal_speed(), target); - } - - // optional double course = 3; - if (_internal_has_course()) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray(3, this->_internal_course(), target); - } - - // optional .google.protobuf.Timestamp startingTime = 4; - if (_internal_has_startingtime()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(4, _Internal::startingtime(this), - _Internal::startingtime(this).GetCachedSize(), target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:messages.entity.order.MoveOrder) - return target; -} - -size_t MoveOrder::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:messages.entity.order.MoveOrder) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { - // optional .messages.track.EntityGeocentricPosition GeocentricPosition = 1; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.geocentricposition_); - } - - // optional .google.protobuf.Timestamp startingTime = 4; - if (cached_has_bits & 0x00000002u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.startingtime_); - } - - // optional double speed = 2; - if (cached_has_bits & 0x00000004u) { - total_size += 1 + 8; - } - - // optional double course = 3; - if (cached_has_bits & 0x00000008u) { - total_size += 1 + 8; - } - - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData MoveOrder::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - MoveOrder::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*MoveOrder::GetClassData() const { return &_class_data_; } - - -void MoveOrder::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:messages.entity.order.MoveOrder) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { - if (cached_has_bits & 0x00000001u) { - _this->_internal_mutable_geocentricposition()->::messages::track::EntityGeocentricPosition::MergeFrom( - from._internal_geocentricposition()); - } - if (cached_has_bits & 0x00000002u) { - _this->_internal_mutable_startingtime()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom( - from._internal_startingtime()); - } - if (cached_has_bits & 0x00000004u) { - _this->_impl_.speed_ = from._impl_.speed_; - } - if (cached_has_bits & 0x00000008u) { - _this->_impl_.course_ = from._impl_.course_; - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void MoveOrder::CopyFrom(const MoveOrder& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:messages.entity.order.MoveOrder) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool MoveOrder::IsInitialized() const { - return true; -} - -void MoveOrder::InternalSwap(MoveOrder* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(MoveOrder, _impl_.course_) - + sizeof(MoveOrder::_impl_.course_) - - PROTOBUF_FIELD_OFFSET(MoveOrder, _impl_.geocentricposition_)>( - reinterpret_cast(&_impl_.geocentricposition_), - reinterpret_cast(&other->_impl_.geocentricposition_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata MoveOrder::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_MoveOrder_2eproto_getter, &descriptor_table_MoveOrder_2eproto_once, - file_level_metadata_MoveOrder_2eproto[0]); -} - -// @@protoc_insertion_point(namespace_scope) -} // namespace order -} // namespace entity -} // namespace messages -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::messages::entity::order::MoveOrder* -Arena::CreateMaybeMessage< ::messages::entity::order::MoveOrder >(Arena* arena) { - return Arena::CreateMessageInternal< ::messages::entity::order::MoveOrder >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include diff --git a/include/Orders/protos/MoveOrder.pb.h b/include/Orders/protos/MoveOrder.pb.h deleted file mode 100644 index 8cdf0da..0000000 --- a/include/Orders/protos/MoveOrder.pb.h +++ /dev/null @@ -1,527 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: MoveOrder.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_MoveOrder_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_MoveOrder_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3021000 -#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 3021012 < 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 -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -#include "GeocentricPosition.pb.h" -#include -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_MoveOrder_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_MoveOrder_2eproto { - static const uint32_t offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_MoveOrder_2eproto; -namespace messages { -namespace entity { -namespace order { -class MoveOrder; -struct MoveOrderDefaultTypeInternal; -extern MoveOrderDefaultTypeInternal _MoveOrder_default_instance_; -} // namespace order -} // namespace entity -} // namespace messages -PROTOBUF_NAMESPACE_OPEN -template<> ::messages::entity::order::MoveOrder* Arena::CreateMaybeMessage<::messages::entity::order::MoveOrder>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace messages { -namespace entity { -namespace order { - -// =================================================================== - -class MoveOrder final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:messages.entity.order.MoveOrder) */ { - public: - inline MoveOrder() : MoveOrder(nullptr) {} - ~MoveOrder() override; - explicit PROTOBUF_CONSTEXPR MoveOrder(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - MoveOrder(const MoveOrder& from); - MoveOrder(MoveOrder&& from) noexcept - : MoveOrder() { - *this = ::std::move(from); - } - - inline MoveOrder& operator=(const MoveOrder& from) { - CopyFrom(from); - return *this; - } - inline MoveOrder& operator=(MoveOrder&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const MoveOrder& default_instance() { - return *internal_default_instance(); - } - static inline const MoveOrder* internal_default_instance() { - return reinterpret_cast( - &_MoveOrder_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(MoveOrder& a, MoveOrder& b) { - a.Swap(&b); - } - inline void Swap(MoveOrder* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(MoveOrder* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - MoveOrder* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const MoveOrder& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const MoveOrder& from) { - MoveOrder::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(MoveOrder* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "messages.entity.order.MoveOrder"; - } - protected: - explicit MoveOrder(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kGeocentricPositionFieldNumber = 1, - kStartingTimeFieldNumber = 4, - kSpeedFieldNumber = 2, - kCourseFieldNumber = 3, - }; - // optional .messages.track.EntityGeocentricPosition GeocentricPosition = 1; - bool has_geocentricposition() const; - private: - bool _internal_has_geocentricposition() const; - public: - void clear_geocentricposition(); - const ::messages::track::EntityGeocentricPosition& geocentricposition() const; - PROTOBUF_NODISCARD ::messages::track::EntityGeocentricPosition* release_geocentricposition(); - ::messages::track::EntityGeocentricPosition* mutable_geocentricposition(); - void set_allocated_geocentricposition(::messages::track::EntityGeocentricPosition* geocentricposition); - private: - const ::messages::track::EntityGeocentricPosition& _internal_geocentricposition() const; - ::messages::track::EntityGeocentricPosition* _internal_mutable_geocentricposition(); - public: - void unsafe_arena_set_allocated_geocentricposition( - ::messages::track::EntityGeocentricPosition* geocentricposition); - ::messages::track::EntityGeocentricPosition* unsafe_arena_release_geocentricposition(); - - // optional .google.protobuf.Timestamp startingTime = 4; - bool has_startingtime() const; - private: - bool _internal_has_startingtime() const; - public: - void clear_startingtime(); - const ::PROTOBUF_NAMESPACE_ID::Timestamp& startingtime() const; - PROTOBUF_NODISCARD ::PROTOBUF_NAMESPACE_ID::Timestamp* release_startingtime(); - ::PROTOBUF_NAMESPACE_ID::Timestamp* mutable_startingtime(); - void set_allocated_startingtime(::PROTOBUF_NAMESPACE_ID::Timestamp* startingtime); - private: - const ::PROTOBUF_NAMESPACE_ID::Timestamp& _internal_startingtime() const; - ::PROTOBUF_NAMESPACE_ID::Timestamp* _internal_mutable_startingtime(); - public: - void unsafe_arena_set_allocated_startingtime( - ::PROTOBUF_NAMESPACE_ID::Timestamp* startingtime); - ::PROTOBUF_NAMESPACE_ID::Timestamp* unsafe_arena_release_startingtime(); - - // optional double speed = 2; - bool has_speed() const; - private: - bool _internal_has_speed() const; - public: - void clear_speed(); - double speed() const; - void set_speed(double value); - private: - double _internal_speed() const; - void _internal_set_speed(double value); - public: - - // optional double course = 3; - bool has_course() const; - private: - bool _internal_has_course() const; - public: - void clear_course(); - double course() const; - void set_course(double value); - private: - double _internal_course() const; - void _internal_set_course(double value); - public: - - // @@protoc_insertion_point(class_scope:messages.entity.order.MoveOrder) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::messages::track::EntityGeocentricPosition* geocentricposition_; - ::PROTOBUF_NAMESPACE_ID::Timestamp* startingtime_; - double speed_; - double course_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_MoveOrder_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// MoveOrder - -// optional .messages.track.EntityGeocentricPosition GeocentricPosition = 1; -inline bool MoveOrder::_internal_has_geocentricposition() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - PROTOBUF_ASSUME(!value || _impl_.geocentricposition_ != nullptr); - return value; -} -inline bool MoveOrder::has_geocentricposition() const { - return _internal_has_geocentricposition(); -} -inline const ::messages::track::EntityGeocentricPosition& MoveOrder::_internal_geocentricposition() const { - const ::messages::track::EntityGeocentricPosition* p = _impl_.geocentricposition_; - return p != nullptr ? *p : reinterpret_cast( - ::messages::track::_EntityGeocentricPosition_default_instance_); -} -inline const ::messages::track::EntityGeocentricPosition& MoveOrder::geocentricposition() const { - // @@protoc_insertion_point(field_get:messages.entity.order.MoveOrder.GeocentricPosition) - return _internal_geocentricposition(); -} -inline void MoveOrder::unsafe_arena_set_allocated_geocentricposition( - ::messages::track::EntityGeocentricPosition* geocentricposition) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.geocentricposition_); - } - _impl_.geocentricposition_ = geocentricposition; - if (geocentricposition) { - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.entity.order.MoveOrder.GeocentricPosition) -} -inline ::messages::track::EntityGeocentricPosition* MoveOrder::release_geocentricposition() { - _impl_._has_bits_[0] &= ~0x00000001u; - ::messages::track::EntityGeocentricPosition* temp = _impl_.geocentricposition_; - _impl_.geocentricposition_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::messages::track::EntityGeocentricPosition* MoveOrder::unsafe_arena_release_geocentricposition() { - // @@protoc_insertion_point(field_release:messages.entity.order.MoveOrder.GeocentricPosition) - _impl_._has_bits_[0] &= ~0x00000001u; - ::messages::track::EntityGeocentricPosition* temp = _impl_.geocentricposition_; - _impl_.geocentricposition_ = nullptr; - return temp; -} -inline ::messages::track::EntityGeocentricPosition* MoveOrder::_internal_mutable_geocentricposition() { - _impl_._has_bits_[0] |= 0x00000001u; - if (_impl_.geocentricposition_ == nullptr) { - auto* p = CreateMaybeMessage<::messages::track::EntityGeocentricPosition>(GetArenaForAllocation()); - _impl_.geocentricposition_ = p; - } - return _impl_.geocentricposition_; -} -inline ::messages::track::EntityGeocentricPosition* MoveOrder::mutable_geocentricposition() { - ::messages::track::EntityGeocentricPosition* _msg = _internal_mutable_geocentricposition(); - // @@protoc_insertion_point(field_mutable:messages.entity.order.MoveOrder.GeocentricPosition) - return _msg; -} -inline void MoveOrder::set_allocated_geocentricposition(::messages::track::EntityGeocentricPosition* geocentricposition) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.geocentricposition_); - } - if (geocentricposition) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(geocentricposition)); - if (message_arena != submessage_arena) { - geocentricposition = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, geocentricposition, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - _impl_.geocentricposition_ = geocentricposition; - // @@protoc_insertion_point(field_set_allocated:messages.entity.order.MoveOrder.GeocentricPosition) -} - -// optional double speed = 2; -inline bool MoveOrder::_internal_has_speed() const { - bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; - return value; -} -inline bool MoveOrder::has_speed() const { - return _internal_has_speed(); -} -inline void MoveOrder::clear_speed() { - _impl_.speed_ = 0; - _impl_._has_bits_[0] &= ~0x00000004u; -} -inline double MoveOrder::_internal_speed() const { - return _impl_.speed_; -} -inline double MoveOrder::speed() const { - // @@protoc_insertion_point(field_get:messages.entity.order.MoveOrder.speed) - return _internal_speed(); -} -inline void MoveOrder::_internal_set_speed(double value) { - _impl_._has_bits_[0] |= 0x00000004u; - _impl_.speed_ = value; -} -inline void MoveOrder::set_speed(double value) { - _internal_set_speed(value); - // @@protoc_insertion_point(field_set:messages.entity.order.MoveOrder.speed) -} - -// optional double course = 3; -inline bool MoveOrder::_internal_has_course() const { - bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; - return value; -} -inline bool MoveOrder::has_course() const { - return _internal_has_course(); -} -inline void MoveOrder::clear_course() { - _impl_.course_ = 0; - _impl_._has_bits_[0] &= ~0x00000008u; -} -inline double MoveOrder::_internal_course() const { - return _impl_.course_; -} -inline double MoveOrder::course() const { - // @@protoc_insertion_point(field_get:messages.entity.order.MoveOrder.course) - return _internal_course(); -} -inline void MoveOrder::_internal_set_course(double value) { - _impl_._has_bits_[0] |= 0x00000008u; - _impl_.course_ = value; -} -inline void MoveOrder::set_course(double value) { - _internal_set_course(value); - // @@protoc_insertion_point(field_set:messages.entity.order.MoveOrder.course) -} - -// optional .google.protobuf.Timestamp startingTime = 4; -inline bool MoveOrder::_internal_has_startingtime() const { - bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; - PROTOBUF_ASSUME(!value || _impl_.startingtime_ != nullptr); - return value; -} -inline bool MoveOrder::has_startingtime() const { - return _internal_has_startingtime(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Timestamp& MoveOrder::_internal_startingtime() const { - const ::PROTOBUF_NAMESPACE_ID::Timestamp* p = _impl_.startingtime_; - return p != nullptr ? *p : reinterpret_cast( - ::PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_); -} -inline const ::PROTOBUF_NAMESPACE_ID::Timestamp& MoveOrder::startingtime() const { - // @@protoc_insertion_point(field_get:messages.entity.order.MoveOrder.startingTime) - return _internal_startingtime(); -} -inline void MoveOrder::unsafe_arena_set_allocated_startingtime( - ::PROTOBUF_NAMESPACE_ID::Timestamp* startingtime) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.startingtime_); - } - _impl_.startingtime_ = startingtime; - if (startingtime) { - _impl_._has_bits_[0] |= 0x00000002u; - } else { - _impl_._has_bits_[0] &= ~0x00000002u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.entity.order.MoveOrder.startingTime) -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* MoveOrder::release_startingtime() { - _impl_._has_bits_[0] &= ~0x00000002u; - ::PROTOBUF_NAMESPACE_ID::Timestamp* temp = _impl_.startingtime_; - _impl_.startingtime_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* MoveOrder::unsafe_arena_release_startingtime() { - // @@protoc_insertion_point(field_release:messages.entity.order.MoveOrder.startingTime) - _impl_._has_bits_[0] &= ~0x00000002u; - ::PROTOBUF_NAMESPACE_ID::Timestamp* temp = _impl_.startingtime_; - _impl_.startingtime_ = nullptr; - return temp; -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* MoveOrder::_internal_mutable_startingtime() { - _impl_._has_bits_[0] |= 0x00000002u; - if (_impl_.startingtime_ == nullptr) { - auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Timestamp>(GetArenaForAllocation()); - _impl_.startingtime_ = p; - } - return _impl_.startingtime_; -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* MoveOrder::mutable_startingtime() { - ::PROTOBUF_NAMESPACE_ID::Timestamp* _msg = _internal_mutable_startingtime(); - // @@protoc_insertion_point(field_mutable:messages.entity.order.MoveOrder.startingTime) - return _msg; -} -inline void MoveOrder::set_allocated_startingtime(::PROTOBUF_NAMESPACE_ID::Timestamp* startingtime) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.startingtime_); - } - if (startingtime) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(startingtime)); - if (message_arena != submessage_arena) { - startingtime = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, startingtime, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000002u; - } else { - _impl_._has_bits_[0] &= ~0x00000002u; - } - _impl_.startingtime_ = startingtime; - // @@protoc_insertion_point(field_set_allocated:messages.entity.order.MoveOrder.startingTime) -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ - -// @@protoc_insertion_point(namespace_scope) - -} // namespace order -} // namespace entity -} // namespace messages - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_MoveOrder_2eproto diff --git a/include/Orders/protos/MoveOrder.proto b/include/Orders/protos/MoveOrder.proto deleted file mode 100644 index dab54a6..0000000 --- a/include/Orders/protos/MoveOrder.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; -package messages.entity.order; - -import "GeocentricPosition.proto"; -import "google/protobuf/timestamp.proto"; - - -message MoveOrder -{ - -optional messages.track.EntityGeocentricPosition GeocentricPosition = 1; -optional double speed = 2; -optional double course = 3; -optional google.protobuf.Timestamp startingTime = 4; - -} \ No newline at end of file diff --git a/include/Orders/protos/Order.pb.cc b/include/Orders/protos/Order.pb.cc deleted file mode 100644 index 1e3b5cd..0000000 --- a/include/Orders/protos/Order.pb.cc +++ /dev/null @@ -1,387 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: Order.proto - -#include "Order.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include - -PROTOBUF_PRAGMA_INIT_SEG - -namespace _pb = ::PROTOBUF_NAMESPACE_ID; -namespace _pbi = _pb::internal; - -namespace messages { -namespace entity { -namespace order { -PROTOBUF_CONSTEXPR Order::Order( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.orderid_)*/nullptr - , /*decltype(_impl_.orderpayload_)*/nullptr - , /*decltype(_impl_.ordertype_)*/0u - , /*decltype(_impl_._cached_size_)*/{}} {} -struct OrderDefaultTypeInternal { - PROTOBUF_CONSTEXPR OrderDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~OrderDefaultTypeInternal() {} - union { - Order _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OrderDefaultTypeInternal _Order_default_instance_; -} // namespace order -} // namespace entity -} // namespace messages -static ::_pb::Metadata file_level_metadata_Order_2eproto[1]; -static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_Order_2eproto = nullptr; -static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_Order_2eproto = nullptr; - -const uint32_t TableStruct_Order_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::messages::entity::order::Order, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::messages::entity::order::Order, _impl_.orderid_), - PROTOBUF_FIELD_OFFSET(::messages::entity::order::Order, _impl_.ordertype_), - PROTOBUF_FIELD_OFFSET(::messages::entity::order::Order, _impl_.orderpayload_), -}; -static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, -1, sizeof(::messages::entity::order::Order)}, -}; - -static const ::_pb::Message* const file_default_instances[] = { - &::messages::entity::order::_Order_default_instance_._instance, -}; - -const char descriptor_table_protodef_Order_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\013Order.proto\022\025messages.entity.order\032\020Id" - "entifier.proto\032\031google/protobuf/any.prot" - "o\"s\n\005Order\022+\n\007OrderID\030\001 \001(\0132\032.messages.t" - "rack.Identifier\022\021\n\tOrderType\030\002 \001(\r\022*\n\014Or" - "derPayload\030\003 \001(\0132\024.google.protobuf.Anyb\006" - "proto3" - ; -static const ::_pbi::DescriptorTable* const descriptor_table_Order_2eproto_deps[2] = { - &::descriptor_table_Identifier_2eproto, - &::descriptor_table_google_2fprotobuf_2fany_2eproto, -}; -static ::_pbi::once_flag descriptor_table_Order_2eproto_once; -const ::_pbi::DescriptorTable descriptor_table_Order_2eproto = { - false, false, 206, descriptor_table_protodef_Order_2eproto, - "Order.proto", - &descriptor_table_Order_2eproto_once, descriptor_table_Order_2eproto_deps, 2, 1, - schemas, file_default_instances, TableStruct_Order_2eproto::offsets, - file_level_metadata_Order_2eproto, file_level_enum_descriptors_Order_2eproto, - file_level_service_descriptors_Order_2eproto, -}; -PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_Order_2eproto_getter() { - return &descriptor_table_Order_2eproto; -} - -// Force running AddDescriptors() at dynamic initialization time. -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_Order_2eproto(&descriptor_table_Order_2eproto); -namespace messages { -namespace entity { -namespace order { - -// =================================================================== - -class Order::_Internal { - public: - static const ::messages::track::Identifier& orderid(const Order* msg); - static const ::PROTOBUF_NAMESPACE_ID::Any& orderpayload(const Order* msg); -}; - -const ::messages::track::Identifier& -Order::_Internal::orderid(const Order* msg) { - return *msg->_impl_.orderid_; -} -const ::PROTOBUF_NAMESPACE_ID::Any& -Order::_Internal::orderpayload(const Order* msg) { - return *msg->_impl_.orderpayload_; -} -void Order::clear_orderid() { - if (GetArenaForAllocation() == nullptr && _impl_.orderid_ != nullptr) { - delete _impl_.orderid_; - } - _impl_.orderid_ = nullptr; -} -void Order::clear_orderpayload() { - if (GetArenaForAllocation() == nullptr && _impl_.orderpayload_ != nullptr) { - delete _impl_.orderpayload_; - } - _impl_.orderpayload_ = nullptr; -} -Order::Order(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:messages.entity.order.Order) -} -Order::Order(const Order& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - Order* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.orderid_){nullptr} - , decltype(_impl_.orderpayload_){nullptr} - , decltype(_impl_.ordertype_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_orderid()) { - _this->_impl_.orderid_ = new ::messages::track::Identifier(*from._impl_.orderid_); - } - if (from._internal_has_orderpayload()) { - _this->_impl_.orderpayload_ = new ::PROTOBUF_NAMESPACE_ID::Any(*from._impl_.orderpayload_); - } - _this->_impl_.ordertype_ = from._impl_.ordertype_; - // @@protoc_insertion_point(copy_constructor:messages.entity.order.Order) -} - -inline void Order::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.orderid_){nullptr} - , decltype(_impl_.orderpayload_){nullptr} - , decltype(_impl_.ordertype_){0u} - , /*decltype(_impl_._cached_size_)*/{} - }; -} - -Order::~Order() { - // @@protoc_insertion_point(destructor:messages.entity.order.Order) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void Order::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - if (this != internal_default_instance()) delete _impl_.orderid_; - if (this != internal_default_instance()) delete _impl_.orderpayload_; -} - -void Order::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void Order::Clear() { -// @@protoc_insertion_point(message_clear_start:messages.entity.order.Order) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - if (GetArenaForAllocation() == nullptr && _impl_.orderid_ != nullptr) { - delete _impl_.orderid_; - } - _impl_.orderid_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.orderpayload_ != nullptr) { - delete _impl_.orderpayload_; - } - _impl_.orderpayload_ = nullptr; - _impl_.ordertype_ = 0u; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Order::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .messages.track.Identifier OrderID = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_orderid(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // uint32 OrderType = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _impl_.ordertype_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .google.protobuf.Any OrderPayload = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - ptr = ctx->ParseMessage(_internal_mutable_orderpayload(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* Order::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:messages.entity.order.Order) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // .messages.track.Identifier OrderID = 1; - if (this->_internal_has_orderid()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::orderid(this), - _Internal::orderid(this).GetCachedSize(), target, stream); - } - - // uint32 OrderType = 2; - if (this->_internal_ordertype() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_ordertype(), target); - } - - // .google.protobuf.Any OrderPayload = 3; - if (this->_internal_has_orderpayload()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(3, _Internal::orderpayload(this), - _Internal::orderpayload(this).GetCachedSize(), target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:messages.entity.order.Order) - return target; -} - -size_t Order::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:messages.entity.order.Order) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // .messages.track.Identifier OrderID = 1; - if (this->_internal_has_orderid()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.orderid_); - } - - // .google.protobuf.Any OrderPayload = 3; - if (this->_internal_has_orderpayload()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.orderpayload_); - } - - // uint32 OrderType = 2; - if (this->_internal_ordertype() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_ordertype()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Order::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - Order::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Order::GetClassData() const { return &_class_data_; } - - -void Order::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:messages.entity.order.Order) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (from._internal_has_orderid()) { - _this->_internal_mutable_orderid()->::messages::track::Identifier::MergeFrom( - from._internal_orderid()); - } - if (from._internal_has_orderpayload()) { - _this->_internal_mutable_orderpayload()->::PROTOBUF_NAMESPACE_ID::Any::MergeFrom( - from._internal_orderpayload()); - } - if (from._internal_ordertype() != 0) { - _this->_internal_set_ordertype(from._internal_ordertype()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void Order::CopyFrom(const Order& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:messages.entity.order.Order) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Order::IsInitialized() const { - return true; -} - -void Order::InternalSwap(Order* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Order, _impl_.ordertype_) - + sizeof(Order::_impl_.ordertype_) - - PROTOBUF_FIELD_OFFSET(Order, _impl_.orderid_)>( - reinterpret_cast(&_impl_.orderid_), - reinterpret_cast(&other->_impl_.orderid_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Order::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_Order_2eproto_getter, &descriptor_table_Order_2eproto_once, - file_level_metadata_Order_2eproto[0]); -} - -// @@protoc_insertion_point(namespace_scope) -} // namespace order -} // namespace entity -} // namespace messages -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::messages::entity::order::Order* -Arena::CreateMaybeMessage< ::messages::entity::order::Order >(Arena* arena) { - return Arena::CreateMessageInternal< ::messages::entity::order::Order >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include diff --git a/include/Orders/protos/Order.pb.h b/include/Orders/protos/Order.pb.h deleted file mode 100644 index e47be51..0000000 --- a/include/Orders/protos/Order.pb.h +++ /dev/null @@ -1,467 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: Order.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_Order_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_Order_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3021000 -#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 3021012 < 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 -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -#include "Identifier.pb.h" -#include -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_Order_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_Order_2eproto { - static const uint32_t offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_Order_2eproto; -namespace messages { -namespace entity { -namespace order { -class Order; -struct OrderDefaultTypeInternal; -extern OrderDefaultTypeInternal _Order_default_instance_; -} // namespace order -} // namespace entity -} // namespace messages -PROTOBUF_NAMESPACE_OPEN -template<> ::messages::entity::order::Order* Arena::CreateMaybeMessage<::messages::entity::order::Order>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace messages { -namespace entity { -namespace order { - -// =================================================================== - -class Order final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:messages.entity.order.Order) */ { - public: - inline Order() : Order(nullptr) {} - ~Order() override; - explicit PROTOBUF_CONSTEXPR Order(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - Order(const Order& from); - Order(Order&& from) noexcept - : Order() { - *this = ::std::move(from); - } - - inline Order& operator=(const Order& from) { - CopyFrom(from); - return *this; - } - inline Order& operator=(Order&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const Order& default_instance() { - return *internal_default_instance(); - } - static inline const Order* internal_default_instance() { - return reinterpret_cast( - &_Order_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(Order& a, Order& b) { - a.Swap(&b); - } - inline void Swap(Order* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Order* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - Order* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const Order& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const Order& from) { - Order::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Order* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "messages.entity.order.Order"; - } - protected: - explicit Order(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kOrderIDFieldNumber = 1, - kOrderPayloadFieldNumber = 3, - kOrderTypeFieldNumber = 2, - }; - // .messages.track.Identifier OrderID = 1; - bool has_orderid() const; - private: - bool _internal_has_orderid() const; - public: - void clear_orderid(); - const ::messages::track::Identifier& orderid() const; - PROTOBUF_NODISCARD ::messages::track::Identifier* release_orderid(); - ::messages::track::Identifier* mutable_orderid(); - void set_allocated_orderid(::messages::track::Identifier* orderid); - private: - const ::messages::track::Identifier& _internal_orderid() const; - ::messages::track::Identifier* _internal_mutable_orderid(); - public: - void unsafe_arena_set_allocated_orderid( - ::messages::track::Identifier* orderid); - ::messages::track::Identifier* unsafe_arena_release_orderid(); - - // .google.protobuf.Any OrderPayload = 3; - bool has_orderpayload() const; - private: - bool _internal_has_orderpayload() const; - public: - void clear_orderpayload(); - const ::PROTOBUF_NAMESPACE_ID::Any& orderpayload() const; - PROTOBUF_NODISCARD ::PROTOBUF_NAMESPACE_ID::Any* release_orderpayload(); - ::PROTOBUF_NAMESPACE_ID::Any* mutable_orderpayload(); - void set_allocated_orderpayload(::PROTOBUF_NAMESPACE_ID::Any* orderpayload); - private: - const ::PROTOBUF_NAMESPACE_ID::Any& _internal_orderpayload() const; - ::PROTOBUF_NAMESPACE_ID::Any* _internal_mutable_orderpayload(); - public: - void unsafe_arena_set_allocated_orderpayload( - ::PROTOBUF_NAMESPACE_ID::Any* orderpayload); - ::PROTOBUF_NAMESPACE_ID::Any* unsafe_arena_release_orderpayload(); - - // uint32 OrderType = 2; - void clear_ordertype(); - uint32_t ordertype() const; - void set_ordertype(uint32_t value); - private: - uint32_t _internal_ordertype() const; - void _internal_set_ordertype(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:messages.entity.order.Order) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::messages::track::Identifier* orderid_; - ::PROTOBUF_NAMESPACE_ID::Any* orderpayload_; - uint32_t ordertype_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_Order_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// Order - -// .messages.track.Identifier OrderID = 1; -inline bool Order::_internal_has_orderid() const { - return this != internal_default_instance() && _impl_.orderid_ != nullptr; -} -inline bool Order::has_orderid() const { - return _internal_has_orderid(); -} -inline const ::messages::track::Identifier& Order::_internal_orderid() const { - const ::messages::track::Identifier* p = _impl_.orderid_; - return p != nullptr ? *p : reinterpret_cast( - ::messages::track::_Identifier_default_instance_); -} -inline const ::messages::track::Identifier& Order::orderid() const { - // @@protoc_insertion_point(field_get:messages.entity.order.Order.OrderID) - return _internal_orderid(); -} -inline void Order::unsafe_arena_set_allocated_orderid( - ::messages::track::Identifier* orderid) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.orderid_); - } - _impl_.orderid_ = orderid; - if (orderid) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.entity.order.Order.OrderID) -} -inline ::messages::track::Identifier* Order::release_orderid() { - - ::messages::track::Identifier* temp = _impl_.orderid_; - _impl_.orderid_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::messages::track::Identifier* Order::unsafe_arena_release_orderid() { - // @@protoc_insertion_point(field_release:messages.entity.order.Order.OrderID) - - ::messages::track::Identifier* temp = _impl_.orderid_; - _impl_.orderid_ = nullptr; - return temp; -} -inline ::messages::track::Identifier* Order::_internal_mutable_orderid() { - - if (_impl_.orderid_ == nullptr) { - auto* p = CreateMaybeMessage<::messages::track::Identifier>(GetArenaForAllocation()); - _impl_.orderid_ = p; - } - return _impl_.orderid_; -} -inline ::messages::track::Identifier* Order::mutable_orderid() { - ::messages::track::Identifier* _msg = _internal_mutable_orderid(); - // @@protoc_insertion_point(field_mutable:messages.entity.order.Order.OrderID) - return _msg; -} -inline void Order::set_allocated_orderid(::messages::track::Identifier* orderid) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.orderid_); - } - if (orderid) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(orderid)); - if (message_arena != submessage_arena) { - orderid = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, orderid, submessage_arena); - } - - } else { - - } - _impl_.orderid_ = orderid; - // @@protoc_insertion_point(field_set_allocated:messages.entity.order.Order.OrderID) -} - -// uint32 OrderType = 2; -inline void Order::clear_ordertype() { - _impl_.ordertype_ = 0u; -} -inline uint32_t Order::_internal_ordertype() const { - return _impl_.ordertype_; -} -inline uint32_t Order::ordertype() const { - // @@protoc_insertion_point(field_get:messages.entity.order.Order.OrderType) - return _internal_ordertype(); -} -inline void Order::_internal_set_ordertype(uint32_t value) { - - _impl_.ordertype_ = value; -} -inline void Order::set_ordertype(uint32_t value) { - _internal_set_ordertype(value); - // @@protoc_insertion_point(field_set:messages.entity.order.Order.OrderType) -} - -// .google.protobuf.Any OrderPayload = 3; -inline bool Order::_internal_has_orderpayload() const { - return this != internal_default_instance() && _impl_.orderpayload_ != nullptr; -} -inline bool Order::has_orderpayload() const { - return _internal_has_orderpayload(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Any& Order::_internal_orderpayload() const { - const ::PROTOBUF_NAMESPACE_ID::Any* p = _impl_.orderpayload_; - return p != nullptr ? *p : reinterpret_cast( - ::PROTOBUF_NAMESPACE_ID::_Any_default_instance_); -} -inline const ::PROTOBUF_NAMESPACE_ID::Any& Order::orderpayload() const { - // @@protoc_insertion_point(field_get:messages.entity.order.Order.OrderPayload) - return _internal_orderpayload(); -} -inline void Order::unsafe_arena_set_allocated_orderpayload( - ::PROTOBUF_NAMESPACE_ID::Any* orderpayload) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.orderpayload_); - } - _impl_.orderpayload_ = orderpayload; - if (orderpayload) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.entity.order.Order.OrderPayload) -} -inline ::PROTOBUF_NAMESPACE_ID::Any* Order::release_orderpayload() { - - ::PROTOBUF_NAMESPACE_ID::Any* temp = _impl_.orderpayload_; - _impl_.orderpayload_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::PROTOBUF_NAMESPACE_ID::Any* Order::unsafe_arena_release_orderpayload() { - // @@protoc_insertion_point(field_release:messages.entity.order.Order.OrderPayload) - - ::PROTOBUF_NAMESPACE_ID::Any* temp = _impl_.orderpayload_; - _impl_.orderpayload_ = nullptr; - return temp; -} -inline ::PROTOBUF_NAMESPACE_ID::Any* Order::_internal_mutable_orderpayload() { - - if (_impl_.orderpayload_ == nullptr) { - auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Any>(GetArenaForAllocation()); - _impl_.orderpayload_ = p; - } - return _impl_.orderpayload_; -} -inline ::PROTOBUF_NAMESPACE_ID::Any* Order::mutable_orderpayload() { - ::PROTOBUF_NAMESPACE_ID::Any* _msg = _internal_mutable_orderpayload(); - // @@protoc_insertion_point(field_mutable:messages.entity.order.Order.OrderPayload) - return _msg; -} -inline void Order::set_allocated_orderpayload(::PROTOBUF_NAMESPACE_ID::Any* orderpayload) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.orderpayload_); - } - if (orderpayload) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(orderpayload)); - if (message_arena != submessage_arena) { - orderpayload = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, orderpayload, submessage_arena); - } - - } else { - - } - _impl_.orderpayload_ = orderpayload; - // @@protoc_insertion_point(field_set_allocated:messages.entity.order.Order.OrderPayload) -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ - -// @@protoc_insertion_point(namespace_scope) - -} // namespace order -} // namespace entity -} // namespace messages - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_Order_2eproto diff --git a/include/Orders/protos/Order.proto b/include/Orders/protos/Order.proto deleted file mode 100644 index d7f09a0..0000000 --- a/include/Orders/protos/Order.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; -package messages.entity.order; - -import "Identifier.proto"; -import "google/protobuf/any.proto"; - -message Order -{ -messages.track.Identifier OrderID = 1; - -uint32 OrderType = 2; - -google.protobuf.Any OrderPayload = 3; - -} \ No newline at end of file diff --git a/include/Orders/protos/SystemStateOrder.pb.cc b/include/Orders/protos/SystemStateOrder.pb.cc deleted file mode 100644 index 2bf0f16..0000000 --- a/include/Orders/protos/SystemStateOrder.pb.cc +++ /dev/null @@ -1,421 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: SystemStateOrder.proto - -#include "SystemStateOrder.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include - -PROTOBUF_PRAGMA_INIT_SEG - -namespace _pb = ::PROTOBUF_NAMESPACE_ID; -namespace _pbi = _pb::internal; - -namespace messages { -namespace entity { -namespace order { -PROTOBUF_CONSTEXPR SystemStateOrder::SystemStateOrder( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.systemid_)*/nullptr - , /*decltype(_impl_.statur_)*/false - , /*decltype(_impl_.effector_)*/false - , /*decltype(_impl_.sensor_)*/false} {} -struct SystemStateOrderDefaultTypeInternal { - PROTOBUF_CONSTEXPR SystemStateOrderDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~SystemStateOrderDefaultTypeInternal() {} - union { - SystemStateOrder _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SystemStateOrderDefaultTypeInternal _SystemStateOrder_default_instance_; -} // namespace order -} // namespace entity -} // namespace messages -static ::_pb::Metadata file_level_metadata_SystemStateOrder_2eproto[1]; -static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_SystemStateOrder_2eproto = nullptr; -static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_SystemStateOrder_2eproto = nullptr; - -const uint32_t TableStruct_SystemStateOrder_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - PROTOBUF_FIELD_OFFSET(::messages::entity::order::SystemStateOrder, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::messages::entity::order::SystemStateOrder, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::messages::entity::order::SystemStateOrder, _impl_.systemid_), - PROTOBUF_FIELD_OFFSET(::messages::entity::order::SystemStateOrder, _impl_.statur_), - PROTOBUF_FIELD_OFFSET(::messages::entity::order::SystemStateOrder, _impl_.effector_), - PROTOBUF_FIELD_OFFSET(::messages::entity::order::SystemStateOrder, _impl_.sensor_), - ~0u, - ~0u, - 0, - 1, -}; -static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, 10, -1, sizeof(::messages::entity::order::SystemStateOrder)}, -}; - -static const ::_pb::Message* const file_default_instances[] = { - &::messages::entity::order::_SystemStateOrder_default_instance_._instance, -}; - -const char descriptor_table_protodef_SystemStateOrder_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\026SystemStateOrder.proto\022\025messages.entit" - "y.order\032\020Identifier.proto\"\224\001\n\020SystemStat" - "eOrder\022,\n\010SystemID\030\001 \001(\0132\032.messages.trac" - "k.Identifier\022\016\n\006Statur\030\002 \001(\010\022\025\n\010Effector" - "\030\003 \001(\010H\000\210\001\001\022\023\n\006Sensor\030\004 \001(\010H\001\210\001\001B\013\n\t_Eff" - "ectorB\t\n\007_Sensorb\006proto3" - ; -static const ::_pbi::DescriptorTable* const descriptor_table_SystemStateOrder_2eproto_deps[1] = { - &::descriptor_table_Identifier_2eproto, -}; -static ::_pbi::once_flag descriptor_table_SystemStateOrder_2eproto_once; -const ::_pbi::DescriptorTable descriptor_table_SystemStateOrder_2eproto = { - false, false, 224, descriptor_table_protodef_SystemStateOrder_2eproto, - "SystemStateOrder.proto", - &descriptor_table_SystemStateOrder_2eproto_once, descriptor_table_SystemStateOrder_2eproto_deps, 1, 1, - schemas, file_default_instances, TableStruct_SystemStateOrder_2eproto::offsets, - file_level_metadata_SystemStateOrder_2eproto, file_level_enum_descriptors_SystemStateOrder_2eproto, - file_level_service_descriptors_SystemStateOrder_2eproto, -}; -PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_SystemStateOrder_2eproto_getter() { - return &descriptor_table_SystemStateOrder_2eproto; -} - -// Force running AddDescriptors() at dynamic initialization time. -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_SystemStateOrder_2eproto(&descriptor_table_SystemStateOrder_2eproto); -namespace messages { -namespace entity { -namespace order { - -// =================================================================== - -class SystemStateOrder::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static const ::messages::track::Identifier& systemid(const SystemStateOrder* msg); - static void set_has_effector(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static void set_has_sensor(HasBits* has_bits) { - (*has_bits)[0] |= 2u; - } -}; - -const ::messages::track::Identifier& -SystemStateOrder::_Internal::systemid(const SystemStateOrder* msg) { - return *msg->_impl_.systemid_; -} -void SystemStateOrder::clear_systemid() { - if (GetArenaForAllocation() == nullptr && _impl_.systemid_ != nullptr) { - delete _impl_.systemid_; - } - _impl_.systemid_ = nullptr; -} -SystemStateOrder::SystemStateOrder(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:messages.entity.order.SystemStateOrder) -} -SystemStateOrder::SystemStateOrder(const SystemStateOrder& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - SystemStateOrder* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.systemid_){nullptr} - , decltype(_impl_.statur_){} - , decltype(_impl_.effector_){} - , decltype(_impl_.sensor_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_systemid()) { - _this->_impl_.systemid_ = new ::messages::track::Identifier(*from._impl_.systemid_); - } - ::memcpy(&_impl_.statur_, &from._impl_.statur_, - static_cast(reinterpret_cast(&_impl_.sensor_) - - reinterpret_cast(&_impl_.statur_)) + sizeof(_impl_.sensor_)); - // @@protoc_insertion_point(copy_constructor:messages.entity.order.SystemStateOrder) -} - -inline void SystemStateOrder::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.systemid_){nullptr} - , decltype(_impl_.statur_){false} - , decltype(_impl_.effector_){false} - , decltype(_impl_.sensor_){false} - }; -} - -SystemStateOrder::~SystemStateOrder() { - // @@protoc_insertion_point(destructor:messages.entity.order.SystemStateOrder) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void SystemStateOrder::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - if (this != internal_default_instance()) delete _impl_.systemid_; -} - -void SystemStateOrder::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void SystemStateOrder::Clear() { -// @@protoc_insertion_point(message_clear_start:messages.entity.order.SystemStateOrder) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - if (GetArenaForAllocation() == nullptr && _impl_.systemid_ != nullptr) { - delete _impl_.systemid_; - } - _impl_.systemid_ = nullptr; - _impl_.statur_ = false; - ::memset(&_impl_.effector_, 0, static_cast( - reinterpret_cast(&_impl_.sensor_) - - reinterpret_cast(&_impl_.effector_)) + sizeof(_impl_.sensor_)); - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* SystemStateOrder::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .messages.track.Identifier SystemID = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_systemid(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool Statur = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _impl_.statur_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool Effector = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _Internal::set_has_effector(&has_bits); - _impl_.effector_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional bool Sensor = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _Internal::set_has_sensor(&has_bits); - _impl_.sensor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* SystemStateOrder::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:messages.entity.order.SystemStateOrder) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // .messages.track.Identifier SystemID = 1; - if (this->_internal_has_systemid()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::systemid(this), - _Internal::systemid(this).GetCachedSize(), target, stream); - } - - // bool Statur = 2; - if (this->_internal_statur() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_statur(), target); - } - - // optional bool Effector = 3; - if (_internal_has_effector()) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_effector(), target); - } - - // optional bool Sensor = 4; - if (_internal_has_sensor()) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_sensor(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:messages.entity.order.SystemStateOrder) - return target; -} - -size_t SystemStateOrder::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:messages.entity.order.SystemStateOrder) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // .messages.track.Identifier SystemID = 1; - if (this->_internal_has_systemid()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.systemid_); - } - - // bool Statur = 2; - if (this->_internal_statur() != 0) { - total_size += 1 + 1; - } - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - // optional bool Effector = 3; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + 1; - } - - // optional bool Sensor = 4; - if (cached_has_bits & 0x00000002u) { - total_size += 1 + 1; - } - - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SystemStateOrder::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - SystemStateOrder::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SystemStateOrder::GetClassData() const { return &_class_data_; } - - -void SystemStateOrder::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:messages.entity.order.SystemStateOrder) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (from._internal_has_systemid()) { - _this->_internal_mutable_systemid()->::messages::track::Identifier::MergeFrom( - from._internal_systemid()); - } - if (from._internal_statur() != 0) { - _this->_internal_set_statur(from._internal_statur()); - } - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - if (cached_has_bits & 0x00000001u) { - _this->_impl_.effector_ = from._impl_.effector_; - } - if (cached_has_bits & 0x00000002u) { - _this->_impl_.sensor_ = from._impl_.sensor_; - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void SystemStateOrder::CopyFrom(const SystemStateOrder& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:messages.entity.order.SystemStateOrder) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool SystemStateOrder::IsInitialized() const { - return true; -} - -void SystemStateOrder::InternalSwap(SystemStateOrder* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(SystemStateOrder, _impl_.sensor_) - + sizeof(SystemStateOrder::_impl_.sensor_) - - PROTOBUF_FIELD_OFFSET(SystemStateOrder, _impl_.systemid_)>( - reinterpret_cast(&_impl_.systemid_), - reinterpret_cast(&other->_impl_.systemid_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata SystemStateOrder::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_SystemStateOrder_2eproto_getter, &descriptor_table_SystemStateOrder_2eproto_once, - file_level_metadata_SystemStateOrder_2eproto[0]); -} - -// @@protoc_insertion_point(namespace_scope) -} // namespace order -} // namespace entity -} // namespace messages -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::messages::entity::order::SystemStateOrder* -Arena::CreateMaybeMessage< ::messages::entity::order::SystemStateOrder >(Arena* arena) { - return Arena::CreateMessageInternal< ::messages::entity::order::SystemStateOrder >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include diff --git a/include/Orders/protos/SystemStateOrder.pb.h b/include/Orders/protos/SystemStateOrder.pb.h deleted file mode 100644 index 21a0862..0000000 --- a/include/Orders/protos/SystemStateOrder.pb.h +++ /dev/null @@ -1,448 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: SystemStateOrder.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_SystemStateOrder_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_SystemStateOrder_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3021000 -#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 3021012 < 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 -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -#include "Identifier.pb.h" -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_SystemStateOrder_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_SystemStateOrder_2eproto { - static const uint32_t offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_SystemStateOrder_2eproto; -namespace messages { -namespace entity { -namespace order { -class SystemStateOrder; -struct SystemStateOrderDefaultTypeInternal; -extern SystemStateOrderDefaultTypeInternal _SystemStateOrder_default_instance_; -} // namespace order -} // namespace entity -} // namespace messages -PROTOBUF_NAMESPACE_OPEN -template<> ::messages::entity::order::SystemStateOrder* Arena::CreateMaybeMessage<::messages::entity::order::SystemStateOrder>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace messages { -namespace entity { -namespace order { - -// =================================================================== - -class SystemStateOrder final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:messages.entity.order.SystemStateOrder) */ { - public: - inline SystemStateOrder() : SystemStateOrder(nullptr) {} - ~SystemStateOrder() override; - explicit PROTOBUF_CONSTEXPR SystemStateOrder(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - SystemStateOrder(const SystemStateOrder& from); - SystemStateOrder(SystemStateOrder&& from) noexcept - : SystemStateOrder() { - *this = ::std::move(from); - } - - inline SystemStateOrder& operator=(const SystemStateOrder& from) { - CopyFrom(from); - return *this; - } - inline SystemStateOrder& operator=(SystemStateOrder&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const SystemStateOrder& default_instance() { - return *internal_default_instance(); - } - static inline const SystemStateOrder* internal_default_instance() { - return reinterpret_cast( - &_SystemStateOrder_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(SystemStateOrder& a, SystemStateOrder& b) { - a.Swap(&b); - } - inline void Swap(SystemStateOrder* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(SystemStateOrder* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - SystemStateOrder* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const SystemStateOrder& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const SystemStateOrder& from) { - SystemStateOrder::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(SystemStateOrder* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "messages.entity.order.SystemStateOrder"; - } - protected: - explicit SystemStateOrder(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kSystemIDFieldNumber = 1, - kStaturFieldNumber = 2, - kEffectorFieldNumber = 3, - kSensorFieldNumber = 4, - }; - // .messages.track.Identifier SystemID = 1; - bool has_systemid() const; - private: - bool _internal_has_systemid() const; - public: - void clear_systemid(); - const ::messages::track::Identifier& systemid() const; - PROTOBUF_NODISCARD ::messages::track::Identifier* release_systemid(); - ::messages::track::Identifier* mutable_systemid(); - void set_allocated_systemid(::messages::track::Identifier* systemid); - private: - const ::messages::track::Identifier& _internal_systemid() const; - ::messages::track::Identifier* _internal_mutable_systemid(); - public: - void unsafe_arena_set_allocated_systemid( - ::messages::track::Identifier* systemid); - ::messages::track::Identifier* unsafe_arena_release_systemid(); - - // bool Statur = 2; - void clear_statur(); - bool statur() const; - void set_statur(bool value); - private: - bool _internal_statur() const; - void _internal_set_statur(bool value); - public: - - // optional bool Effector = 3; - bool has_effector() const; - private: - bool _internal_has_effector() const; - public: - void clear_effector(); - bool effector() const; - void set_effector(bool value); - private: - bool _internal_effector() const; - void _internal_set_effector(bool value); - public: - - // optional bool Sensor = 4; - bool has_sensor() const; - private: - bool _internal_has_sensor() const; - public: - void clear_sensor(); - bool sensor() const; - void set_sensor(bool value); - private: - bool _internal_sensor() const; - void _internal_set_sensor(bool value); - public: - - // @@protoc_insertion_point(class_scope:messages.entity.order.SystemStateOrder) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::messages::track::Identifier* systemid_; - bool statur_; - bool effector_; - bool sensor_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_SystemStateOrder_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// SystemStateOrder - -// .messages.track.Identifier SystemID = 1; -inline bool SystemStateOrder::_internal_has_systemid() const { - return this != internal_default_instance() && _impl_.systemid_ != nullptr; -} -inline bool SystemStateOrder::has_systemid() const { - return _internal_has_systemid(); -} -inline const ::messages::track::Identifier& SystemStateOrder::_internal_systemid() const { - const ::messages::track::Identifier* p = _impl_.systemid_; - return p != nullptr ? *p : reinterpret_cast( - ::messages::track::_Identifier_default_instance_); -} -inline const ::messages::track::Identifier& SystemStateOrder::systemid() const { - // @@protoc_insertion_point(field_get:messages.entity.order.SystemStateOrder.SystemID) - return _internal_systemid(); -} -inline void SystemStateOrder::unsafe_arena_set_allocated_systemid( - ::messages::track::Identifier* systemid) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.systemid_); - } - _impl_.systemid_ = systemid; - if (systemid) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.entity.order.SystemStateOrder.SystemID) -} -inline ::messages::track::Identifier* SystemStateOrder::release_systemid() { - - ::messages::track::Identifier* temp = _impl_.systemid_; - _impl_.systemid_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::messages::track::Identifier* SystemStateOrder::unsafe_arena_release_systemid() { - // @@protoc_insertion_point(field_release:messages.entity.order.SystemStateOrder.SystemID) - - ::messages::track::Identifier* temp = _impl_.systemid_; - _impl_.systemid_ = nullptr; - return temp; -} -inline ::messages::track::Identifier* SystemStateOrder::_internal_mutable_systemid() { - - if (_impl_.systemid_ == nullptr) { - auto* p = CreateMaybeMessage<::messages::track::Identifier>(GetArenaForAllocation()); - _impl_.systemid_ = p; - } - return _impl_.systemid_; -} -inline ::messages::track::Identifier* SystemStateOrder::mutable_systemid() { - ::messages::track::Identifier* _msg = _internal_mutable_systemid(); - // @@protoc_insertion_point(field_mutable:messages.entity.order.SystemStateOrder.SystemID) - return _msg; -} -inline void SystemStateOrder::set_allocated_systemid(::messages::track::Identifier* systemid) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.systemid_); - } - if (systemid) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(systemid)); - if (message_arena != submessage_arena) { - systemid = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, systemid, submessage_arena); - } - - } else { - - } - _impl_.systemid_ = systemid; - // @@protoc_insertion_point(field_set_allocated:messages.entity.order.SystemStateOrder.SystemID) -} - -// bool Statur = 2; -inline void SystemStateOrder::clear_statur() { - _impl_.statur_ = false; -} -inline bool SystemStateOrder::_internal_statur() const { - return _impl_.statur_; -} -inline bool SystemStateOrder::statur() const { - // @@protoc_insertion_point(field_get:messages.entity.order.SystemStateOrder.Statur) - return _internal_statur(); -} -inline void SystemStateOrder::_internal_set_statur(bool value) { - - _impl_.statur_ = value; -} -inline void SystemStateOrder::set_statur(bool value) { - _internal_set_statur(value); - // @@protoc_insertion_point(field_set:messages.entity.order.SystemStateOrder.Statur) -} - -// optional bool Effector = 3; -inline bool SystemStateOrder::_internal_has_effector() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool SystemStateOrder::has_effector() const { - return _internal_has_effector(); -} -inline void SystemStateOrder::clear_effector() { - _impl_.effector_ = false; - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline bool SystemStateOrder::_internal_effector() const { - return _impl_.effector_; -} -inline bool SystemStateOrder::effector() const { - // @@protoc_insertion_point(field_get:messages.entity.order.SystemStateOrder.Effector) - return _internal_effector(); -} -inline void SystemStateOrder::_internal_set_effector(bool value) { - _impl_._has_bits_[0] |= 0x00000001u; - _impl_.effector_ = value; -} -inline void SystemStateOrder::set_effector(bool value) { - _internal_set_effector(value); - // @@protoc_insertion_point(field_set:messages.entity.order.SystemStateOrder.Effector) -} - -// optional bool Sensor = 4; -inline bool SystemStateOrder::_internal_has_sensor() const { - bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; - return value; -} -inline bool SystemStateOrder::has_sensor() const { - return _internal_has_sensor(); -} -inline void SystemStateOrder::clear_sensor() { - _impl_.sensor_ = false; - _impl_._has_bits_[0] &= ~0x00000002u; -} -inline bool SystemStateOrder::_internal_sensor() const { - return _impl_.sensor_; -} -inline bool SystemStateOrder::sensor() const { - // @@protoc_insertion_point(field_get:messages.entity.order.SystemStateOrder.Sensor) - return _internal_sensor(); -} -inline void SystemStateOrder::_internal_set_sensor(bool value) { - _impl_._has_bits_[0] |= 0x00000002u; - _impl_.sensor_ = value; -} -inline void SystemStateOrder::set_sensor(bool value) { - _internal_set_sensor(value); - // @@protoc_insertion_point(field_set:messages.entity.order.SystemStateOrder.Sensor) -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ - -// @@protoc_insertion_point(namespace_scope) - -} // namespace order -} // namespace entity -} // namespace messages - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_SystemStateOrder_2eproto diff --git a/include/Orders/protos/SystemStateOrder.proto b/include/Orders/protos/SystemStateOrder.proto deleted file mode 100644 index f5110b1..0000000 --- a/include/Orders/protos/SystemStateOrder.proto +++ /dev/null @@ -1,14 +0,0 @@ -syntax = "proto3"; -package messages.entity.order; - -import "Identifier.proto"; - - -message SystemStateOrder -{ -messages.track.Identifier SystemID = 1; -bool Statur = 2; -optional bool Effector = 3; -optional bool Sensor = 4; - -} \ No newline at end of file diff --git a/libs/OrderLibrary b/libs/OrderLibrary new file mode 160000 index 0000000..88aa0d0 --- /dev/null +++ b/libs/OrderLibrary @@ -0,0 +1 @@ +Subproject commit 88aa0d0eff299aca8919945b25610e4e956b0a40 diff --git a/src/Orders/MoveOrder.cpp b/src/Orders/MoveOrder.cpp deleted file mode 100644 index e802272..0000000 --- a/src/Orders/MoveOrder.cpp +++ /dev/null @@ -1,146 +0,0 @@ -#include "SimCore/Position.hpp" -#include "SimCore/data.hpp" -#include -#include -#include -#include -#include -#include - -namespace Orders -{ - - MoveOrder::MoveOrder(const SimCore::Identifier OwnID): - Order(OwnID,Orders::MOVE_ORDER) - { - Speed = SimCore::Data(); - Course = SimCore::Data(); - StartTime = SimCore::Data(); - pos_ = SimCore::Position(); - - } - - MoveOrder::MoveOrder(const SimCore::Identifier OwnID,SimCore::Position pos,double speed,double course , int startTime ): - Order(OwnID, Orders::MOVE_ORDER) - { - Speed = SimCore::Data(); - Course = SimCore::Data(); - StartTime = SimCore::Data(); - pos_ = pos; - - - } - MoveOrder::~MoveOrder() - { - - } - - - void MoveOrder::setPosition(SimCore::Position pos) - { - pos_ = pos; - } - - - SimCore::Position MoveOrder::getPosition() - { - return pos_; - } - - - WHISPER::Message MoveOrder::buildMessage() - { - WHISPER::Message msg = WHISPER::Message(getOwnID().getUUID(), WHISPER::MsgTopics::COMMANDS , WHISPER::MsgType::ORDER); - - messages::entity::order::MoveOrder MoveOrder = messages::entity::order::MoveOrder(); - - if (pos_.isValid()) - { - LOG_S(INFO)<<"position is valid"; - MoveOrder.mutable_geocentricposition()->set_x(pos_.getGeocentricPos().x()); - MoveOrder.mutable_geocentricposition()->set_y(pos_.getGeocentricPos().y()); - MoveOrder.mutable_geocentricposition()->set_z(pos_.getGeocentricPos().z()); - } - - if (Speed.isValid() == true) { - MoveOrder.set_speed(Speed.getValue()); - } - if (Course.isValid() == true) { - MoveOrder.set_course(Course.getValue()); - } - if (Speed.isValid() == true) { - MoveOrder.set_speed(Speed.getValue()); - } - if (Course.isValid() == true) { - MoveOrder.set_course(Course.getValue()); - } - - if (StartTime.isValid() == true) { - MoveOrder.mutable_startingtime()->set_seconds(StartTime.getValue()); - } - - auto anyOrder = google::protobuf::Any(); - anyOrder.PackFrom(MoveOrder); - - auto order = messages::entity::order::Order(); - - order.mutable_orderid()->set_uuid(SimCore::Identifier().getUUID()); - order.set_ordertype(Orders::MOVE_ORDER); - order.clear_orderpayload(); - order.mutable_orderpayload()->CopyFrom(anyOrder); - - auto any = std::make_shared(); - any->PackFrom(order); - - msg.addPayLoad(any); - - - return msg; - } - - - std::unique_ptr MoveOrder::unpack(WHISPER::Message msg) - { - - if(msg.msgType_ == WHISPER::MsgType::COMMAND) - { - auto protoMsg = msg.getProtoMessage(); - if (protoMsg.has_payload() && protoMsg.payload().Is()) - { - auto order = messages::entity::order::Order(); - protoMsg.payload().UnpackTo(&order); - - if (order.has_orderpayload() && order.orderpayload().Is()) - { - auto moveOrder = messages::entity::order::MoveOrder(); - order.orderpayload().UnpackTo(&moveOrder); - - SimCore::Identifier OrderID(order.orderid()); - - auto MoveOrderObj = std::make_unique(OrderID); - - if (moveOrder.has_geocentricposition()) MoveOrderObj->setPosition(SimCore::Position(moveOrder.geocentricposition().x(),moveOrder.geocentricposition().y(),moveOrder.geocentricposition().z())); - - if (moveOrder.has_speed()) MoveOrderObj->Speed.setValue(moveOrder.speed()); - if (moveOrder.has_course()) MoveOrderObj->Course.setValue(moveOrder.course()); - if (moveOrder.has_startingtime()) MoveOrderObj->Course.setValue(moveOrder.mutable_startingtime()->seconds()); - - return MoveOrderObj; - } - } - } - return nullptr; - } - - std::unique_ptr MoveOrder::unpack(std::string msg) - { - if (std::empty(msg) == false && msg != "NULL") - { - WHISPER::Message whisperMessage(msg); - return unpack(whisperMessage); - } - - return nullptr; - } - -} \ No newline at end of file diff --git a/src/Orders/Order.cpp b/src/Orders/Order.cpp deleted file mode 100644 index 661994d..0000000 --- a/src/Orders/Order.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include "SimCore/Identifier.hpp" -#include - - - -namespace Orders -{ - Order::Order(const SimCore::Identifier OwnID,const Orders::OrderType OrderType_): - orderID_(SimCore::Identifier()), - OwnID_(OwnID), - OrderType_(OrderType_) - { - - } - - - - - const SimCore::Identifier Order::getOrderID(){ return orderID_;} - const Orders::OrderType Order::getOrderType(){return OrderType_;} - const SimCore::Identifier Order::getOwnID(){return OwnID_;} - -} \ No newline at end of file diff --git a/tests/test_EntityClass.cpp b/tests/test_EntityClass.cpp index 2429ab8..60f0b91 100644 --- a/tests/test_EntityClass.cpp +++ b/tests/test_EntityClass.cpp @@ -19,12 +19,11 @@ class Ship : public Entities::Entity Ship(SimCore::Identifier OwnID, std::string EntityName, WHISPER::SourceType ownType, - SimCore::Identifier ParentID, SimCore::EntityKind EntityKind, std::uint32_t GroundTruthPort, std::uint32_t CommandPort ): - Entity( OwnID,EntityName,ownType, ParentID, EntityKind, GroundTruthPort, CommandPort) + Entity( OwnID,EntityName,ownType, EntityKind, GroundTruthPort, CommandPort,false) { SimCore::Position pos1; pos1.setGeodesicPos(55, 6, 0); @@ -38,25 +37,18 @@ class Ship : public Entities::Entity private: - void specificPhysicsCalculations(std::chrono::milliseconds::rep duration) override + void childWorker() override { - SimCore::Position pos1; - pos1.setGeodesicPos(55, 6, 0); + // LOG_S(INFO)< @@ -25,7 +25,7 @@ SCENARIO("Testing the SimCore Sensor") - SimCore::Identifier OwnID(0,1,false); + SimCore::Identifier OwnID; SimCore::IdentifierMaker IDMaker; auto RadarID = IDMaker.getNewIdentifier(1,SimCore::INTERNAL); auto TrackID1 = IDMaker.getNewIdentifier(1,SimCore::INTERNAL); @@ -37,7 +37,7 @@ SCENARIO("Testing the SimCore Sensor") sensor1.Sensorname = "TRS-3D"; LOG_S(INFO)<<"making radar track"; - auto Track1 = std::make_shared(WHISPER::SourceType::SENSOR,*TrackID1.get()); + auto Track1 = std::make_shared(*TrackID1.get(),"test",SimCore::EntityKind::SURFACE); SimCore::Position pos1 ; pos1.setGeodesicPos(55, 6, 0); @@ -65,7 +65,7 @@ SCENARIO("Testing the SimCore Sensor") LOG_S(INFO)<<"add same track again"; - Track1->setSpeed(10); + Track1->Speed.setValue(10); InternalTracklist.addTrack(Track1, sensor1); REQUIRE(InternalTracklist.getTrack(Track1->getIdentifier())->getSpeed() == 10);