ADD: added orders and implemented order and moveorder and test for moveorder

This commit is contained in:
Henry Winkel
2023-02-17 16:00:41 +01:00
parent 00e28e66bd
commit 9fe27e254d
29 changed files with 5075 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
project (SimCore VERSION 0.1.0 LANGUAGES CXX C)
project (EntityLibrary VERSION 0.1.0 LANGUAGES CXX C)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
include(defaultOptions)
@@ -15,9 +15,38 @@ ENDIF()
# protobuf_generate_cpp(PROTO_PATH include/SimCore/Messages/Protos CPP_PATH include/SimCore/Messages/Protos HPP_PATH include/SimCore/Messages/Protos)
protobuf_generate_cpp(PROTO_PATH include/Orders/protos CPP_PATH include/Orders/protos HPP_PATH include/Orders/protos)
add_library(OrderLibrary STATIC
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
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/libs/SimCore/include/SimCore/Messages/Protos>
$<INSTALL_INTERFACE:include>
src)
add_library(EntityLibrary STATIC
@@ -72,14 +101,18 @@ IF (${TEST_ENTITIY_LIBRARY})
add_executable(test_SensorClass tests/test_SensorClass.cpp)
target_link_libraries(test_SensorClass Catch2::Catch2 Entities loguru)
target_link_libraries(test_SensorClass Catch2::Catch2 EntityLibrary loguru)
catch_discover_tests(test_SensorClass)
add_executable(test_EntityClass tests/test_EntityClass.cpp)
target_link_libraries(test_EntityClass Catch2::Catch2 Entities loguru)
target_link_libraries(test_EntityClass Catch2::Catch2 EntityLibrary loguru)
catch_discover_tests(test_EntityClass)
add_executable(test_EntityImplementation tests/test_EntityImplementation.cpp)
target_link_libraries(test_EntityImplementation Entities loguru)
target_link_libraries(test_EntityImplementation EntityLibrary loguru)
add_executable(test_MoveOrder tests/test_MoveOrder.cpp)
target_link_libraries(test_MoveOrder Catch2::Catch2 OrderLibrary loguru)
catch_discover_tests(test_MoveOrder)
ENDIF()

View File

@@ -29,7 +29,7 @@ function(protobuf_generate_cpp)
add_custom_command(
OUTPUT "${protoDIR}/${protoFILENAME}.pb.cc"
DEPENDS "${protoDIR}/${protoFILENAME}.proto"
COMMAND ${PROTOC} --cpp_out=${protoDIR} --proto_path=${protoDIR} --proto_path="${CMAKE_SOURCE_DIR}/libs/SimCore/libs/whisper-com/libs/protobuf/src" "${protoDIR}/${protoFILENAME}.proto"
COMMAND ${PROTOC} --cpp_out=${protoDIR} --proto_path=${protoDIR} --proto_path="${CMAKE_SOURCE_DIR}/libs/SimCore/include/SimCore/Messages/Protos" --proto_path="${CMAKE_SOURCE_DIR}/libs/SimCore/libs/whisper-com/libs/protobuf/src" "${protoDIR}/${protoFILENAME}.proto"
)

View File

@@ -23,7 +23,7 @@
#include <utility>
namespace SimCore {
namespace Entities {
struct SensorData
{
@@ -66,7 +66,7 @@ namespace SimCore {
virtual void specificPhysicsCalculations(std::chrono::milliseconds::rep duration) = 0;
virtual void specificReloadCharacteristicts() = 0;
std::shared_ptr<Position> ownShipPosition_ = nullptr;
std::shared_ptr<SimCore::Position> ownShipPosition_ = nullptr;
private:
@@ -107,7 +107,7 @@ namespace SimCore {
std::shared_ptr<WHISPER::InternalUDPSender> GroundTruthUDPSender_ = nullptr;
std::shared_ptr<std::list<SimCore::SensorData>> SensorStore_;
std::shared_ptr<std::list<Entities::SensorData>> SensorStore_;
std::shared_ptr<SimCore::SafeMap<SimCore::Identifier, std::shared_ptr<SimCore::Track>>> Trackstore_;

View File

@@ -0,0 +1,43 @@
#pragma once
#include <Orders/Order.hpp>
#include <SimCore/Position.hpp>
#include <memory>
namespace Orders
{
class MoveOrder: public Order
{
public:
MoveOrder(const SimCore::Identifier id,const SimCore::Identifier orderingEntity,const SimCore::Identifier orderedEntity,WHISPER::SourceType srcType);
MoveOrder(const SimCore::Identifier id,const SimCore::Identifier orderingEntity,const SimCore::Identifier orderedEntity,WHISPER::SourceType srcType,SimCore::Position pos,double speed = 0, int startTime = 0);
~MoveOrder();
void addData(SimCore::Position pos,double speed = 0, int startTime = 0);
void setPosition(SimCore::Position pos);
void setSpeed(double speed);
void setStartTime(uint64_t startTime);
SimCore::Position getPosition();
double getSpeed();
uint64_t getStartTime();
virtual WHISPER::Message buildMessage(SimCore::Identifier parentID) override;
static std::shared_ptr<MoveOrder> unpack(WHISPER::Message msg);
private:
SimCore::Position pos_;
double speed_ = 0;
uint64_t startTime_ = 0;
};
}

44
include/Orders/Order.hpp Normal file
View File

@@ -0,0 +1,44 @@
#pragma once
#include <WHISPER/Messages/Message.hpp>
#include <SimCore/Identifier.hpp>
namespace Orders
{
enum OrderType: uint8_t
{
HOLD_ORDER,
MOVE_ORDER,
ENGAGE_ORDER,
SYSTEM_STATE_ORDER
};
class Order
{
public:
Order(const SimCore::Identifier id,const SimCore::Identifier orderingEntity,const SimCore::Identifier orderedEntity,const WHISPER::SourceType srcType, const Orders::OrderType OrderType_);
const SimCore::Identifier getOrderID();
const SimCore::Identifier getOrderingEntity();
const SimCore::Identifier getOrderedEntity();
const WHISPER::SourceType srcType;
const Orders::OrderType getOrderType();
protected:
virtual WHISPER::Message buildMessage(SimCore::Identifier parentID) = 0;
private:
const SimCore::Identifier orderID_;
const SimCore::Identifier orderingEntity_;
const SimCore::Identifier orderedEntity_;
const Orders::OrderType OrderType_;
};
}

View File

@@ -0,0 +1,14 @@
#pragma once
namespace Orders
{
class OrderFactory
{
};
}

View File

@@ -0,0 +1,462 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: EngageOrder.proto
#include "EngageOrder.pb.h"
#include <algorithm>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
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<EngageOrder>()._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<uint8_t>(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<uint8_t>(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<uint8_t>(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<uint8_t>(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<EngageOrder*>(&to_msg);
auto& from = static_cast<const EngageOrder&>(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<char*>(&_impl_.targetid_),
reinterpret_cast<char*>(&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 <google/protobuf/port_undef.inc>

View File

@@ -0,0 +1,586 @@
// 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 <limits>
#include <string>
#include <google/protobuf/port_def.inc>
#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 <google/protobuf/port_undef.inc>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/metadata_lite.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
#include <google/protobuf/extension_set.h> // IWYU pragma: export
#include <google/protobuf/unknown_field_set.h>
#include "Identifier.pb.h"
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
#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<const EngageOrder*>(
&_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<EngageOrder>(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 <typename T> 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<const ::messages::track::Identifier&>(
::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<const ::messages::track::Identifier&>(
::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<const ::messages::track::Identifier&>(
::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 <google/protobuf/port_undef.inc>
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_EngageOrder_2eproto

View File

@@ -0,0 +1,14 @@
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;
}

View File

@@ -0,0 +1,315 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: HoldOrder.proto
#include "HoldOrder.pb.h"
#include <algorithm>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
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<HoldOrder>()._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<uint8_t>(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<HoldOrder*>(&to_msg);
auto& from = static_cast<const HoldOrder&>(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 <google/protobuf/port_undef.inc>

View File

@@ -0,0 +1,333 @@
// 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 <limits>
#include <string>
#include <google/protobuf/port_def.inc>
#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 <google/protobuf/port_undef.inc>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/metadata_lite.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
#include <google/protobuf/extension_set.h> // IWYU pragma: export
#include <google/protobuf/unknown_field_set.h>
#include <google/protobuf/timestamp.pb.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
#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<const HoldOrder*>(
&_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<HoldOrder>(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 <typename T> 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<const ::PROTOBUF_NAMESPACE_ID::Timestamp&>(
::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 <google/protobuf/port_undef.inc>
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_HoldOrder_2eproto

View File

@@ -0,0 +1,13 @@
syntax = "proto3";
package messages.entity.order;
import "google/protobuf/timestamp.proto";
message HoldOrder
{
optional google.protobuf.Timestamp endingTime = 1;
}

View File

@@ -0,0 +1,413 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: MoveOrder.proto
#include "MoveOrder.pb.h"
#include <algorithm>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
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} {}
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_.startingtime_),
~0u,
1,
0,
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, 9, -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\"\267\001\n\tMoveOrder\022D\n\022Geo"
"centricPosition\030\001 \001(\0132(.messages.track.E"
"ntityGeocentricPosition\022\022\n\005speed\030\002 \001(\001H\000"
"\210\001\001\0225\n\014startingTime\030\003 \001(\0132\032.google.proto"
"buf.TimestampH\001\210\001\001B\010\n\006_speedB\017\n\r_startin"
"gTimeb\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, 293, 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<MoveOrder>()._impl_._has_bits_);
static const ::messages::track::EntityGeocentricPosition& geocentricposition(const MoveOrder* msg);
static void set_has_speed(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static const ::PROTOBUF_NAMESPACE_ID::Timestamp& startingtime(const MoveOrder* msg);
static void set_has_startingtime(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
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 (GetArenaForAllocation() == nullptr && _impl_.geocentricposition_ != nullptr) {
delete _impl_.geocentricposition_;
}
_impl_.geocentricposition_ = nullptr;
}
void MoveOrder::clear_startingtime() {
if (_impl_.startingtime_ != nullptr) _impl_.startingtime_->Clear();
_impl_._has_bits_[0] &= ~0x00000001u;
}
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_){}};
_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_);
}
_this->_impl_.speed_ = from._impl_.speed_;
// @@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}
};
}
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;
if (GetArenaForAllocation() == nullptr && _impl_.geocentricposition_ != nullptr) {
delete _impl_.geocentricposition_;
}
_impl_.geocentricposition_ = nullptr;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(_impl_.startingtime_ != nullptr);
_impl_.startingtime_->Clear();
}
_impl_.speed_ = 0;
_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) {
// .messages.track.EntityGeocentricPosition GeocentricPosition = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(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<uint8_t>(tag) == 17)) {
_Internal::set_has_speed(&has_bits);
_impl_.speed_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
ptr += sizeof(double);
} else
goto handle_unusual;
continue;
// optional .google.protobuf.Timestamp startingTime = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
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;
// .messages.track.EntityGeocentricPosition GeocentricPosition = 1;
if (this->_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 .google.protobuf.Timestamp startingTime = 3;
if (_internal_has_startingtime()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(3, _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;
// .messages.track.EntityGeocentricPosition GeocentricPosition = 1;
if (this->_internal_has_geocentricposition()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.geocentricposition_);
}
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional .google.protobuf.Timestamp startingTime = 3;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.startingtime_);
}
// optional double speed = 2;
if (cached_has_bits & 0x00000002u) {
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<MoveOrder*>(&to_msg);
auto& from = static_cast<const MoveOrder&>(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;
if (from._internal_has_geocentricposition()) {
_this->_internal_mutable_geocentricposition()->::messages::track::EntityGeocentricPosition::MergeFrom(
from._internal_geocentricposition());
}
cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
_this->_internal_mutable_startingtime()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
from._internal_startingtime());
}
if (cached_has_bits & 0x00000002u) {
_this->_impl_.speed_ = from._impl_.speed_;
}
_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_.speed_)
+ sizeof(MoveOrder::_impl_.speed_)
- PROTOBUF_FIELD_OFFSET(MoveOrder, _impl_.geocentricposition_)>(
reinterpret_cast<char*>(&_impl_.geocentricposition_),
reinterpret_cast<char*>(&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 <google/protobuf/port_undef.inc>

View File

@@ -0,0 +1,482 @@
// 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 <limits>
#include <string>
#include <google/protobuf/port_def.inc>
#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 <google/protobuf/port_undef.inc>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/metadata_lite.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
#include <google/protobuf/extension_set.h> // IWYU pragma: export
#include <google/protobuf/unknown_field_set.h>
#include "GeocentricPosition.pb.h"
#include <google/protobuf/timestamp.pb.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
#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<const MoveOrder*>(
&_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<MoveOrder>(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 = 3,
kSpeedFieldNumber = 2,
};
// .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 = 3;
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:
// @@protoc_insertion_point(class_scope:messages.entity.order.MoveOrder)
private:
class _Internal;
template <typename T> 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_;
};
union { Impl_ _impl_; };
friend struct ::TableStruct_MoveOrder_2eproto;
};
// ===================================================================
// ===================================================================
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif // __GNUC__
// MoveOrder
// .messages.track.EntityGeocentricPosition GeocentricPosition = 1;
inline bool MoveOrder::_internal_has_geocentricposition() const {
return this != internal_default_instance() && _impl_.geocentricposition_ != nullptr;
}
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<const ::messages::track::EntityGeocentricPosition&>(
::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) {
} else {
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.entity.order.MoveOrder.GeocentricPosition)
}
inline ::messages::track::EntityGeocentricPosition* MoveOrder::release_geocentricposition() {
::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)
::messages::track::EntityGeocentricPosition* temp = _impl_.geocentricposition_;
_impl_.geocentricposition_ = nullptr;
return temp;
}
inline ::messages::track::EntityGeocentricPosition* MoveOrder::_internal_mutable_geocentricposition() {
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);
}
} else {
}
_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] & 0x00000002u) != 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] &= ~0x00000002u;
}
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] |= 0x00000002u;
_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 .google.protobuf.Timestamp startingTime = 3;
inline bool MoveOrder::_internal_has_startingtime() const {
bool value = (_impl_._has_bits_[0] & 0x00000001u) != 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<const ::PROTOBUF_NAMESPACE_ID::Timestamp&>(
::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] |= 0x00000001u;
} else {
_impl_._has_bits_[0] &= ~0x00000001u;
}
// @@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] &= ~0x00000001u;
::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] &= ~0x00000001u;
::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] |= 0x00000001u;
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] |= 0x00000001u;
} else {
_impl_._has_bits_[0] &= ~0x00000001u;
}
_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 <google/protobuf/port_undef.inc>
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_MoveOrder_2eproto

View File

@@ -0,0 +1,16 @@
syntax = "proto3";
package messages.entity.order;
import "GeocentricPosition.proto";
import "google/protobuf/timestamp.proto";
message MoveOrder
{
messages.track.EntityGeocentricPosition GeocentricPosition = 1;
optional double speed = 2;
optional google.protobuf.Timestamp startingTime = 3;
}

View File

@@ -0,0 +1,487 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: Order.proto
#include "Order.pb.h"
#include <algorithm>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
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_.orderingentity_)*/nullptr
, /*decltype(_impl_.orderedentity_)*/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_.orderingentity_),
PROTOBUF_FIELD_OFFSET(::messages::entity::order::Order, _impl_.orderedentity_),
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\"\332\001\n\005Order\022+\n\007OrderID\030\001 \001(\0132\032.messages."
"track.Identifier\0222\n\016orderingEntity\030\002 \001(\013"
"2\032.messages.track.Identifier\0221\n\rorderedE"
"ntity\030\003 \001(\0132\032.messages.track.Identifier\022"
"\021\n\tOrderType\030\004 \001(\r\022*\n\014OrderPayload\030\005 \001(\013"
"2\024.google.protobuf.Anyb\006proto3"
;
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, 310, 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 ::messages::track::Identifier& orderingentity(const Order* msg);
static const ::messages::track::Identifier& orderedentity(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 ::messages::track::Identifier&
Order::_Internal::orderingentity(const Order* msg) {
return *msg->_impl_.orderingentity_;
}
const ::messages::track::Identifier&
Order::_Internal::orderedentity(const Order* msg) {
return *msg->_impl_.orderedentity_;
}
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_orderingentity() {
if (GetArenaForAllocation() == nullptr && _impl_.orderingentity_ != nullptr) {
delete _impl_.orderingentity_;
}
_impl_.orderingentity_ = nullptr;
}
void Order::clear_orderedentity() {
if (GetArenaForAllocation() == nullptr && _impl_.orderedentity_ != nullptr) {
delete _impl_.orderedentity_;
}
_impl_.orderedentity_ = 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_.orderingentity_){nullptr}
, decltype(_impl_.orderedentity_){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_orderingentity()) {
_this->_impl_.orderingentity_ = new ::messages::track::Identifier(*from._impl_.orderingentity_);
}
if (from._internal_has_orderedentity()) {
_this->_impl_.orderedentity_ = new ::messages::track::Identifier(*from._impl_.orderedentity_);
}
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_.orderingentity_){nullptr}
, decltype(_impl_.orderedentity_){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_.orderingentity_;
if (this != internal_default_instance()) delete _impl_.orderedentity_;
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_.orderingentity_ != nullptr) {
delete _impl_.orderingentity_;
}
_impl_.orderingentity_ = nullptr;
if (GetArenaForAllocation() == nullptr && _impl_.orderedentity_ != nullptr) {
delete _impl_.orderedentity_;
}
_impl_.orderedentity_ = 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<uint8_t>(tag) == 10)) {
ptr = ctx->ParseMessage(_internal_mutable_orderid(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// .messages.track.Identifier orderingEntity = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr = ctx->ParseMessage(_internal_mutable_orderingentity(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// .messages.track.Identifier orderedEntity = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr = ctx->ParseMessage(_internal_mutable_orderedentity(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// uint32 OrderType = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
_impl_.ordertype_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// .google.protobuf.Any OrderPayload = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
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);
}
// .messages.track.Identifier orderingEntity = 2;
if (this->_internal_has_orderingentity()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(2, _Internal::orderingentity(this),
_Internal::orderingentity(this).GetCachedSize(), target, stream);
}
// .messages.track.Identifier orderedEntity = 3;
if (this->_internal_has_orderedentity()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(3, _Internal::orderedentity(this),
_Internal::orderedentity(this).GetCachedSize(), target, stream);
}
// uint32 OrderType = 4;
if (this->_internal_ordertype() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_ordertype(), target);
}
// .google.protobuf.Any OrderPayload = 5;
if (this->_internal_has_orderpayload()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(5, _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_);
}
// .messages.track.Identifier orderingEntity = 2;
if (this->_internal_has_orderingentity()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.orderingentity_);
}
// .messages.track.Identifier orderedEntity = 3;
if (this->_internal_has_orderedentity()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.orderedentity_);
}
// .google.protobuf.Any OrderPayload = 5;
if (this->_internal_has_orderpayload()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.orderpayload_);
}
// uint32 OrderType = 4;
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<Order*>(&to_msg);
auto& from = static_cast<const Order&>(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_orderingentity()) {
_this->_internal_mutable_orderingentity()->::messages::track::Identifier::MergeFrom(
from._internal_orderingentity());
}
if (from._internal_has_orderedentity()) {
_this->_internal_mutable_orderedentity()->::messages::track::Identifier::MergeFrom(
from._internal_orderedentity());
}
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<char*>(&_impl_.orderid_),
reinterpret_cast<char*>(&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 <google/protobuf/port_undef.inc>

View File

@@ -0,0 +1,677 @@
// 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 <limits>
#include <string>
#include <google/protobuf/port_def.inc>
#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 <google/protobuf/port_undef.inc>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/metadata_lite.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
#include <google/protobuf/extension_set.h> // IWYU pragma: export
#include <google/protobuf/unknown_field_set.h>
#include "Identifier.pb.h"
#include <google/protobuf/any.pb.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
#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<const Order*>(
&_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<Order>(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,
kOrderingEntityFieldNumber = 2,
kOrderedEntityFieldNumber = 3,
kOrderPayloadFieldNumber = 5,
kOrderTypeFieldNumber = 4,
};
// .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();
// .messages.track.Identifier orderingEntity = 2;
bool has_orderingentity() const;
private:
bool _internal_has_orderingentity() const;
public:
void clear_orderingentity();
const ::messages::track::Identifier& orderingentity() const;
PROTOBUF_NODISCARD ::messages::track::Identifier* release_orderingentity();
::messages::track::Identifier* mutable_orderingentity();
void set_allocated_orderingentity(::messages::track::Identifier* orderingentity);
private:
const ::messages::track::Identifier& _internal_orderingentity() const;
::messages::track::Identifier* _internal_mutable_orderingentity();
public:
void unsafe_arena_set_allocated_orderingentity(
::messages::track::Identifier* orderingentity);
::messages::track::Identifier* unsafe_arena_release_orderingentity();
// .messages.track.Identifier orderedEntity = 3;
bool has_orderedentity() const;
private:
bool _internal_has_orderedentity() const;
public:
void clear_orderedentity();
const ::messages::track::Identifier& orderedentity() const;
PROTOBUF_NODISCARD ::messages::track::Identifier* release_orderedentity();
::messages::track::Identifier* mutable_orderedentity();
void set_allocated_orderedentity(::messages::track::Identifier* orderedentity);
private:
const ::messages::track::Identifier& _internal_orderedentity() const;
::messages::track::Identifier* _internal_mutable_orderedentity();
public:
void unsafe_arena_set_allocated_orderedentity(
::messages::track::Identifier* orderedentity);
::messages::track::Identifier* unsafe_arena_release_orderedentity();
// .google.protobuf.Any OrderPayload = 5;
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 = 4;
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 <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
struct Impl_ {
::messages::track::Identifier* orderid_;
::messages::track::Identifier* orderingentity_;
::messages::track::Identifier* orderedentity_;
::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<const ::messages::track::Identifier&>(
::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)
}
// .messages.track.Identifier orderingEntity = 2;
inline bool Order::_internal_has_orderingentity() const {
return this != internal_default_instance() && _impl_.orderingentity_ != nullptr;
}
inline bool Order::has_orderingentity() const {
return _internal_has_orderingentity();
}
inline const ::messages::track::Identifier& Order::_internal_orderingentity() const {
const ::messages::track::Identifier* p = _impl_.orderingentity_;
return p != nullptr ? *p : reinterpret_cast<const ::messages::track::Identifier&>(
::messages::track::_Identifier_default_instance_);
}
inline const ::messages::track::Identifier& Order::orderingentity() const {
// @@protoc_insertion_point(field_get:messages.entity.order.Order.orderingEntity)
return _internal_orderingentity();
}
inline void Order::unsafe_arena_set_allocated_orderingentity(
::messages::track::Identifier* orderingentity) {
if (GetArenaForAllocation() == nullptr) {
delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.orderingentity_);
}
_impl_.orderingentity_ = orderingentity;
if (orderingentity) {
} else {
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.entity.order.Order.orderingEntity)
}
inline ::messages::track::Identifier* Order::release_orderingentity() {
::messages::track::Identifier* temp = _impl_.orderingentity_;
_impl_.orderingentity_ = 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_orderingentity() {
// @@protoc_insertion_point(field_release:messages.entity.order.Order.orderingEntity)
::messages::track::Identifier* temp = _impl_.orderingentity_;
_impl_.orderingentity_ = nullptr;
return temp;
}
inline ::messages::track::Identifier* Order::_internal_mutable_orderingentity() {
if (_impl_.orderingentity_ == nullptr) {
auto* p = CreateMaybeMessage<::messages::track::Identifier>(GetArenaForAllocation());
_impl_.orderingentity_ = p;
}
return _impl_.orderingentity_;
}
inline ::messages::track::Identifier* Order::mutable_orderingentity() {
::messages::track::Identifier* _msg = _internal_mutable_orderingentity();
// @@protoc_insertion_point(field_mutable:messages.entity.order.Order.orderingEntity)
return _msg;
}
inline void Order::set_allocated_orderingentity(::messages::track::Identifier* orderingentity) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.orderingentity_);
}
if (orderingentity) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(orderingentity));
if (message_arena != submessage_arena) {
orderingentity = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, orderingentity, submessage_arena);
}
} else {
}
_impl_.orderingentity_ = orderingentity;
// @@protoc_insertion_point(field_set_allocated:messages.entity.order.Order.orderingEntity)
}
// .messages.track.Identifier orderedEntity = 3;
inline bool Order::_internal_has_orderedentity() const {
return this != internal_default_instance() && _impl_.orderedentity_ != nullptr;
}
inline bool Order::has_orderedentity() const {
return _internal_has_orderedentity();
}
inline const ::messages::track::Identifier& Order::_internal_orderedentity() const {
const ::messages::track::Identifier* p = _impl_.orderedentity_;
return p != nullptr ? *p : reinterpret_cast<const ::messages::track::Identifier&>(
::messages::track::_Identifier_default_instance_);
}
inline const ::messages::track::Identifier& Order::orderedentity() const {
// @@protoc_insertion_point(field_get:messages.entity.order.Order.orderedEntity)
return _internal_orderedentity();
}
inline void Order::unsafe_arena_set_allocated_orderedentity(
::messages::track::Identifier* orderedentity) {
if (GetArenaForAllocation() == nullptr) {
delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.orderedentity_);
}
_impl_.orderedentity_ = orderedentity;
if (orderedentity) {
} else {
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.entity.order.Order.orderedEntity)
}
inline ::messages::track::Identifier* Order::release_orderedentity() {
::messages::track::Identifier* temp = _impl_.orderedentity_;
_impl_.orderedentity_ = 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_orderedentity() {
// @@protoc_insertion_point(field_release:messages.entity.order.Order.orderedEntity)
::messages::track::Identifier* temp = _impl_.orderedentity_;
_impl_.orderedentity_ = nullptr;
return temp;
}
inline ::messages::track::Identifier* Order::_internal_mutable_orderedentity() {
if (_impl_.orderedentity_ == nullptr) {
auto* p = CreateMaybeMessage<::messages::track::Identifier>(GetArenaForAllocation());
_impl_.orderedentity_ = p;
}
return _impl_.orderedentity_;
}
inline ::messages::track::Identifier* Order::mutable_orderedentity() {
::messages::track::Identifier* _msg = _internal_mutable_orderedentity();
// @@protoc_insertion_point(field_mutable:messages.entity.order.Order.orderedEntity)
return _msg;
}
inline void Order::set_allocated_orderedentity(::messages::track::Identifier* orderedentity) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.orderedentity_);
}
if (orderedentity) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(orderedentity));
if (message_arena != submessage_arena) {
orderedentity = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, orderedentity, submessage_arena);
}
} else {
}
_impl_.orderedentity_ = orderedentity;
// @@protoc_insertion_point(field_set_allocated:messages.entity.order.Order.orderedEntity)
}
// uint32 OrderType = 4;
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 = 5;
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<const ::PROTOBUF_NAMESPACE_ID::Any&>(
::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 <google/protobuf/port_undef.inc>
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_Order_2eproto

View File

@@ -0,0 +1,17 @@
syntax = "proto3";
package messages.entity.order;
import "Identifier.proto";
import "google/protobuf/any.proto";
message Order
{
messages.track.Identifier OrderID = 1;
messages.track.Identifier orderingEntity = 2;
messages.track.Identifier orderedEntity = 3;
uint32 OrderType = 4;
google.protobuf.Any OrderPayload = 5;
}

View File

@@ -0,0 +1,421 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: SystemStateOrder.proto
#include "SystemStateOrder.pb.h"
#include <algorithm>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
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<SystemStateOrder>()._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<size_t>(reinterpret_cast<char*>(&_impl_.sensor_) -
reinterpret_cast<char*>(&_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<size_t>(
reinterpret_cast<char*>(&_impl_.sensor_) -
reinterpret_cast<char*>(&_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<uint8_t>(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<uint8_t>(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<uint8_t>(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<uint8_t>(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<SystemStateOrder*>(&to_msg);
auto& from = static_cast<const SystemStateOrder&>(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<char*>(&_impl_.systemid_),
reinterpret_cast<char*>(&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 <google/protobuf/port_undef.inc>

View File

@@ -0,0 +1,448 @@
// 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 <limits>
#include <string>
#include <google/protobuf/port_def.inc>
#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 <google/protobuf/port_undef.inc>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/metadata_lite.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
#include <google/protobuf/extension_set.h> // IWYU pragma: export
#include <google/protobuf/unknown_field_set.h>
#include "Identifier.pb.h"
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
#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<const SystemStateOrder*>(
&_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<SystemStateOrder>(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 <typename T> 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<const ::messages::track::Identifier&>(
::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 <google/protobuf/port_undef.inc>
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_SystemStateOrder_2eproto

View File

@@ -0,0 +1,14 @@
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;
}

View File

@@ -4,7 +4,8 @@
#include "WHISPER/Messages/stringData.hpp"
#include "WHISPER/threadSafeQueue.hpp"
#include <SimCore/SimCore.hpp>
#include <SimCore/Templates/Entity.hpp>
#include <Entities/Entity.hpp>
#include <chrono>
#include <memory>
@@ -14,7 +15,7 @@
#define calculationPeriode 100
namespace SimCore
namespace Entities
{
Entity::Entity(const SimCore::Identifier OwnID,

116
src/Orders/MoveOrder.cpp Normal file
View File

@@ -0,0 +1,116 @@
#include "SimCore/Position.hpp"
#include <Orders/Order.hpp>
#include <WHISPER/Messages/Message.hpp>
#include <Orders/MoveOrder.hpp>
#include <Orders/protos/MoveOrder.pb.h>
#include <Orders/protos/Order.pb.h>
namespace Orders
{
MoveOrder::MoveOrder(const SimCore::Identifier id,const SimCore::Identifier orderingEntity,const SimCore::Identifier orderedEntity,WHISPER::SourceType srcType):
Order(id, orderingEntity, orderedEntity,srcType,Orders::MOVE_ORDER)
{
}
MoveOrder::MoveOrder(const SimCore::Identifier id,const SimCore::Identifier orderingEntity,const SimCore::Identifier orderedEntity,WHISPER::SourceType srcType,SimCore::Position pos,double speed, int startTime ):
Order(id, orderingEntity, orderedEntity,srcType,Orders::MOVE_ORDER),speed_(speed),startTime_(startTime)
{
}
MoveOrder::~MoveOrder()
{
}
void MoveOrder::addData(SimCore::Position pos,double speed, int startTime )
{
pos_ = pos;
speed_ = speed;
startTime_ = startTime;
}
void MoveOrder::setPosition(SimCore::Position pos)
{
pos_ = pos;
}
void MoveOrder::setSpeed(double speed)
{
speed_ = speed;
}
void MoveOrder::setStartTime(uint64_t startTime)
{
startTime_ = startTime;
}
SimCore::Position MoveOrder::getPosition(){return pos_;}
double MoveOrder::getSpeed(){return speed_;}
uint64_t MoveOrder::getStartTime(){return startTime_;}
WHISPER::Message MoveOrder::buildMessage(SimCore::Identifier parentID)
{
WHISPER::Message msg = WHISPER::Message(getOrderingEntity().getParentNumber(), getOrderingEntity().getNumber(), WHISPER::MsgTopics::COMMANDS , WHISPER::MsgType::COMMAND , srcType);
messages::entity::order::MoveOrder MoveOrder = messages::entity::order::MoveOrder();
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_ != 0) {
MoveOrder.set_speed(speed_);
}
if (startTime_ != 0) {
MoveOrder.mutable_startingtime()->set_seconds(startTime_);
}
return msg;
}
std::shared_ptr<MoveOrder> MoveOrder::unpack(WHISPER::Message msg)
{
if(msg.msgType_ == WHISPER::MsgType::COMMAND)
{
auto protoMsg = msg.getProtoMessage();
if (protoMsg.has_payload() && protoMsg.payload().Is<messages::entity::order::Order>())
{
auto order = messages::entity::order::Order();
protoMsg.payload().UnpackTo(&order);
if (order.has_orderpayload() && order.orderpayload().Is<messages::entity::order::MoveOrder>())
{
auto moveOrder = messages::entity::order::MoveOrder();
order.orderpayload().UnpackTo(&moveOrder);
SimCore::Identifier OrderID(order.orderid().parent(),order.orderid().number(),order.orderid().external());
SimCore::Identifier OrderingID(order.orderingentity().parent(),order.orderingentity().number(),order.orderingentity().external());
SimCore::Identifier OrderedID(order.orderedentity().parent(),order.orderedentity().number(),order.orderedentity().external());
auto pos = SimCore::Position(moveOrder.geocentricposition().x(),moveOrder.geocentricposition().y(),moveOrder.geocentricposition().z());
auto MoveOrderObj = std::make_shared<MoveOrder>(OrderID,OrderingID,OrderedID,(WHISPER::SourceType)msg.sourceType_,pos);
MoveOrderObj->setSpeed(moveOrder.speed());
MoveOrderObj->setStartTime(moveOrder.mutable_startingtime()->seconds());
return MoveOrderObj;
}
}
}
return nullptr;
}
}

25
src/Orders/Order.cpp Normal file
View File

@@ -0,0 +1,25 @@
#include <Orders/Order.hpp>
namespace Orders
{
Order::Order(const SimCore::Identifier id,const SimCore::Identifier orderingEntity,const SimCore::Identifier orderedEntity,const WHISPER::SourceType srcType, const Orders::OrderType OrderType_):
orderID_(id),
orderingEntity_(orderingEntity),
orderedEntity_(orderedEntity),
srcType(srcType),
OrderType_(OrderType_)
{
}
const SimCore::Identifier Order::getOrderID(){ return orderID_;}
const SimCore::Identifier Order::getOrderingEntity(){ return orderingEntity_;}
const SimCore::Identifier Order::getOrderedEntity(){ return orderedEntity_;}
const Orders::OrderType Order::getOrderType(){return OrderType_;}
}

View File

@@ -7,10 +7,10 @@
#include <thread>
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <SimCore/Templates/Entity.hpp>
#include <Entities/Entity.hpp>
// SimCore::Identifier OwnID, SimCore::Identifier ParentID, SimCore::SensorKinds SensorKind,std::uint32_t GroundTruthPort, std::uint32_t ParentPort,std::string ParentIPAddress
class Ship : public SimCore::Entity
class Ship : public Entities::Entity
{
public:
Ship(SimCore::Identifier OwnID,

View File

@@ -0,0 +1,12 @@
#include <iostream>
#include <loguru.hpp>
int main()
{
LOG_S(INFO)<< "hello world";
return 0;
}

71
tests/test_MoveOrder.cpp Normal file
View File

@@ -0,0 +1,71 @@
#include "Orders/Order.hpp"
#include "SimCore/Identifier.hpp"
#include "WHISPER/Messages/Message.hpp"
#include <chrono>
#include <memory>
#include <thread>
#include <vector>
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <Orders/MoveOrder.hpp>
#include <SimCore/IdentifierMaker.hpp>
SCENARIO("Testing the SimCore Sensor")
{
GIVEN("different Attributes for a Track in different forms")
{
auto OrderID = SimCore::Identifier(0,1);
auto IDMaker = SimCore::IdentifierMaker();
auto ID1 = IDMaker.getNewIdentifier(0, SimCore::ObjectSource::INTERNAL);
auto ID2 = IDMaker.getNewIdentifier(1, SimCore::ObjectSource::INTERNAL);
std::shared_ptr<Orders::MoveOrder> movOrd = std::make_shared<Orders::MoveOrder>(OrderID,*ID1.get(),*ID2.get(),WHISPER::SourceType::GATEWAY);
auto list = std::vector<std::shared_ptr<Orders::Order>>();
list.push_back(movOrd);
auto rev = list[0];
std::shared_ptr<Orders::MoveOrder> mvOrder2 = nullptr;
if (rev->getOrderType() == Orders::MOVE_ORDER) {
mvOrder2 = std::dynamic_pointer_cast<Orders::MoveOrder>(rev);
}
WHEN("constructing Track Object with data")
{
movOrd->setPosition(SimCore::Position(100,200,500));
auto pos = SimCore::Position(100,200,500);
bool res = false;
if (movOrd->getPosition() == pos) {
res = true;
}
movOrd->setSpeed(100);
movOrd->setStartTime(duration_cast<std::chrono::seconds>(std::chrono::system_clock::now().time_since_epoch()).count()+3);
THEN("check if Track attributes are correct")
{
REQUIRE(movOrd->getOrderID() == OrderID);
REQUIRE(movOrd->getOrderingEntity() == *ID1.get());
REQUIRE(movOrd->getOrderedEntity() == *ID2.get());
REQUIRE(res == true);
REQUIRE(movOrd->getSpeed() == 100);
REQUIRE(movOrd->getStartTime() > duration_cast<std::chrono::seconds>(std::chrono::system_clock::now().time_since_epoch()).count());
std::this_thread::sleep_for(std::chrono::seconds(5));
REQUIRE(movOrd->getStartTime() < duration_cast<std::chrono::seconds>(std::chrono::system_clock::now().time_since_epoch()).count());
REQUIRE(mvOrder2->getSpeed() == movOrd->getSpeed());
} //THEN
} // WHEN
} // GIVEN
} //SCENARIO

View File

@@ -1,14 +1,14 @@
#include "SimCore/Identifier.hpp"
#include <SimCore/Identifier.hpp>
#include <SimCore/SimCore.hpp>
#include <memory>
#include <thread>
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <SimCore/Templates/Sensor.hpp>
#include <Entities/Sensor.hpp>
// SimCore::Identifier OwnID, SimCore::Identifier ParentID, SimCore::SensorKinds SensorKind,std::uint32_t GroundTruthPort, std::uint32_t ParentPort,std::string ParentIPAddress
class Radar : public SimCore::Sensor
class Radar : public Entities::Sensor
{
public:
Radar(SimCore::Identifier OwnID,
@@ -17,7 +17,7 @@ class Radar : public SimCore::Sensor
std::uint32_t GroundTruthPort,
std::uint32_t ParentPort,
std::string ParentIPAddress,
std::string radarType):SimCore::Sensor(OwnID, ParentID, SensorKind, GroundTruthPort, ParentPort, ParentIPAddress),radarType_(radarType)
std::string radarType):Sensor(OwnID, ParentID, SensorKind, GroundTruthPort, ParentPort, ParentIPAddress),radarType_(radarType)
{
}