[remote_base] Fix dumper base class and enable schema extension (#9218)

This commit is contained in:
Gábor Poczkodi
2025-06-30 17:12:44 +12:00
committed by GitHub
parent af0bb634c6
commit 3e553f517b
3 changed files with 34 additions and 5 deletions
@@ -19,6 +19,22 @@ bool RemoteReceiveData::peek_mark(uint32_t length, uint32_t offset) const {
return value >= 0 && lo <= value && value <= hi;
}
bool RemoteReceiveData::peek_mark_at_least(uint32_t length, uint32_t offset) const {
if (!this->is_valid(offset))
return false;
const int32_t value = this->peek(offset);
const int32_t lo = this->lower_bound_(length);
return value >= 0 && lo <= value;
}
bool RemoteReceiveData::peek_mark_at_most(uint32_t length, uint32_t offset) const {
if (!this->is_valid(offset))
return false;
const int32_t value = this->peek(offset);
const int32_t hi = this->upper_bound_(length);
return value >= 0 && value <= hi;
}
bool RemoteReceiveData::peek_space(uint32_t length, uint32_t offset) const {
if (!this->is_valid(offset))
return false;
@@ -36,6 +52,14 @@ bool RemoteReceiveData::peek_space_at_least(uint32_t length, uint32_t offset) co
return value <= 0 && lo <= -value;
}
bool RemoteReceiveData::peek_space_at_most(uint32_t length, uint32_t offset) const {
if (!this->is_valid(offset))
return false;
const int32_t value = this->peek(offset);
const int32_t hi = this->upper_bound_(length);
return value <= 0 && -value <= hi;
}
bool RemoteReceiveData::expect_mark(uint32_t length) {
if (!this->peek_mark(length))
return false;