CHG: changed the base message class to only use sender uuid as id
This commit is contained in:
@@ -181,14 +181,29 @@ class Message final :
|
||||
// accessors -------------------------------------------------------
|
||||
|
||||
enum : int {
|
||||
kPayloadFieldNumber = 6,
|
||||
kSenderUUIDFieldNumber = 4,
|
||||
kPayloadFieldNumber = 7,
|
||||
kTopicFieldNumber = 1,
|
||||
kMsgTypeFieldNumber = 2,
|
||||
kSourceTypeFieldNumber = 3,
|
||||
kSourceIDFieldNumber = 4,
|
||||
kParentIDFieldNumber = 5,
|
||||
kSourceIDFieldNumber = 5,
|
||||
kParentIDFieldNumber = 6,
|
||||
};
|
||||
// .google.protobuf.Any payload = 6;
|
||||
// string senderUUID = 4;
|
||||
void clear_senderuuid();
|
||||
const std::string& senderuuid() const;
|
||||
template <typename ArgT0 = const std::string&, typename... ArgT>
|
||||
void set_senderuuid(ArgT0&& arg0, ArgT... args);
|
||||
std::string* mutable_senderuuid();
|
||||
PROTOBUF_NODISCARD std::string* release_senderuuid();
|
||||
void set_allocated_senderuuid(std::string* senderuuid);
|
||||
private:
|
||||
const std::string& _internal_senderuuid() const;
|
||||
inline PROTOBUF_ALWAYS_INLINE void _internal_set_senderuuid(const std::string& value);
|
||||
std::string* _internal_mutable_senderuuid();
|
||||
public:
|
||||
|
||||
// .google.protobuf.Any payload = 7;
|
||||
bool has_payload() const;
|
||||
private:
|
||||
bool _internal_has_payload() const;
|
||||
@@ -233,7 +248,11 @@ class Message final :
|
||||
void _internal_set_sourcetype(uint32_t value);
|
||||
public:
|
||||
|
||||
// uint32 sourceID = 4;
|
||||
// optional uint32 sourceID = 5;
|
||||
bool has_sourceid() const;
|
||||
private:
|
||||
bool _internal_has_sourceid() const;
|
||||
public:
|
||||
void clear_sourceid();
|
||||
uint32_t sourceid() const;
|
||||
void set_sourceid(uint32_t value);
|
||||
@@ -242,7 +261,11 @@ class Message final :
|
||||
void _internal_set_sourceid(uint32_t value);
|
||||
public:
|
||||
|
||||
// uint32 parentID = 5;
|
||||
// optional uint32 parentID = 6;
|
||||
bool has_parentid() const;
|
||||
private:
|
||||
bool _internal_has_parentid() const;
|
||||
public:
|
||||
void clear_parentid();
|
||||
uint32_t parentid() const;
|
||||
void set_parentid(uint32_t value);
|
||||
@@ -259,13 +282,15 @@ class Message final :
|
||||
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::internal::ArenaStringPtr senderuuid_;
|
||||
::PROTOBUF_NAMESPACE_ID::Any* payload_;
|
||||
uint32_t topic_;
|
||||
uint32_t msgtype_;
|
||||
uint32_t sourcetype_;
|
||||
uint32_t sourceid_;
|
||||
uint32_t parentid_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
};
|
||||
union { Impl_ _impl_; };
|
||||
friend struct ::TableStruct_message_2eproto;
|
||||
@@ -341,9 +366,67 @@ inline void Message::set_sourcetype(uint32_t value) {
|
||||
// @@protoc_insertion_point(field_set:messages.header.Message.sourceType)
|
||||
}
|
||||
|
||||
// uint32 sourceID = 4;
|
||||
// string senderUUID = 4;
|
||||
inline void Message::clear_senderuuid() {
|
||||
_impl_.senderuuid_.ClearToEmpty();
|
||||
}
|
||||
inline const std::string& Message::senderuuid() const {
|
||||
// @@protoc_insertion_point(field_get:messages.header.Message.senderUUID)
|
||||
return _internal_senderuuid();
|
||||
}
|
||||
template <typename ArgT0, typename... ArgT>
|
||||
inline PROTOBUF_ALWAYS_INLINE
|
||||
void Message::set_senderuuid(ArgT0&& arg0, ArgT... args) {
|
||||
|
||||
_impl_.senderuuid_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
|
||||
// @@protoc_insertion_point(field_set:messages.header.Message.senderUUID)
|
||||
}
|
||||
inline std::string* Message::mutable_senderuuid() {
|
||||
std::string* _s = _internal_mutable_senderuuid();
|
||||
// @@protoc_insertion_point(field_mutable:messages.header.Message.senderUUID)
|
||||
return _s;
|
||||
}
|
||||
inline const std::string& Message::_internal_senderuuid() const {
|
||||
return _impl_.senderuuid_.Get();
|
||||
}
|
||||
inline void Message::_internal_set_senderuuid(const std::string& value) {
|
||||
|
||||
_impl_.senderuuid_.Set(value, GetArenaForAllocation());
|
||||
}
|
||||
inline std::string* Message::_internal_mutable_senderuuid() {
|
||||
|
||||
return _impl_.senderuuid_.Mutable(GetArenaForAllocation());
|
||||
}
|
||||
inline std::string* Message::release_senderuuid() {
|
||||
// @@protoc_insertion_point(field_release:messages.header.Message.senderUUID)
|
||||
return _impl_.senderuuid_.Release();
|
||||
}
|
||||
inline void Message::set_allocated_senderuuid(std::string* senderuuid) {
|
||||
if (senderuuid != nullptr) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
_impl_.senderuuid_.SetAllocated(senderuuid, GetArenaForAllocation());
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
if (_impl_.senderuuid_.IsDefault()) {
|
||||
_impl_.senderuuid_.Set("", GetArenaForAllocation());
|
||||
}
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
// @@protoc_insertion_point(field_set_allocated:messages.header.Message.senderUUID)
|
||||
}
|
||||
|
||||
// optional uint32 sourceID = 5;
|
||||
inline bool Message::_internal_has_sourceid() const {
|
||||
bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
|
||||
return value;
|
||||
}
|
||||
inline bool Message::has_sourceid() const {
|
||||
return _internal_has_sourceid();
|
||||
}
|
||||
inline void Message::clear_sourceid() {
|
||||
_impl_.sourceid_ = 0u;
|
||||
_impl_._has_bits_[0] &= ~0x00000001u;
|
||||
}
|
||||
inline uint32_t Message::_internal_sourceid() const {
|
||||
return _impl_.sourceid_;
|
||||
@@ -353,7 +436,7 @@ inline uint32_t Message::sourceid() const {
|
||||
return _internal_sourceid();
|
||||
}
|
||||
inline void Message::_internal_set_sourceid(uint32_t value) {
|
||||
|
||||
_impl_._has_bits_[0] |= 0x00000001u;
|
||||
_impl_.sourceid_ = value;
|
||||
}
|
||||
inline void Message::set_sourceid(uint32_t value) {
|
||||
@@ -361,9 +444,17 @@ inline void Message::set_sourceid(uint32_t value) {
|
||||
// @@protoc_insertion_point(field_set:messages.header.Message.sourceID)
|
||||
}
|
||||
|
||||
// uint32 parentID = 5;
|
||||
// optional uint32 parentID = 6;
|
||||
inline bool Message::_internal_has_parentid() const {
|
||||
bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
|
||||
return value;
|
||||
}
|
||||
inline bool Message::has_parentid() const {
|
||||
return _internal_has_parentid();
|
||||
}
|
||||
inline void Message::clear_parentid() {
|
||||
_impl_.parentid_ = 0u;
|
||||
_impl_._has_bits_[0] &= ~0x00000002u;
|
||||
}
|
||||
inline uint32_t Message::_internal_parentid() const {
|
||||
return _impl_.parentid_;
|
||||
@@ -373,7 +464,7 @@ inline uint32_t Message::parentid() const {
|
||||
return _internal_parentid();
|
||||
}
|
||||
inline void Message::_internal_set_parentid(uint32_t value) {
|
||||
|
||||
_impl_._has_bits_[0] |= 0x00000002u;
|
||||
_impl_.parentid_ = value;
|
||||
}
|
||||
inline void Message::set_parentid(uint32_t value) {
|
||||
@@ -381,7 +472,7 @@ inline void Message::set_parentid(uint32_t value) {
|
||||
// @@protoc_insertion_point(field_set:messages.header.Message.parentID)
|
||||
}
|
||||
|
||||
// .google.protobuf.Any payload = 6;
|
||||
// .google.protobuf.Any payload = 7;
|
||||
inline bool Message::_internal_has_payload() const {
|
||||
return this != internal_default_instance() && _impl_.payload_ != nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user