extend user block fields check

This commit is contained in:
MihailRis
2024-10-03 16:08:40 +03:00
parent 0ad588fd33
commit ab53922474
6 changed files with 63 additions and 13 deletions
+20
View File
@@ -81,6 +81,18 @@ namespace data {
/// @brief Byte size of the field
int size;
Field(
FieldType type,
std::string name,
int elements,
FieldConvertStrategy strategy=FieldConvertStrategy::RESET
) : type(type),
name(std::move(name)),
elements(elements),
convertStrategy(strategy),
offset(0),
size(0) {}
bool operator==(const Field& o) const {
return type == o.type &&
name == o.name &&
@@ -233,6 +245,14 @@ namespace data {
return totalSize;
}
[[nodiscard]] const auto begin() const {
return fields.begin();
}
[[nodiscard]] const auto end() const {
return fields.end();
}
/// @brief Convert structure data from srcLayout to this layout.
/// @param srcLayout source structure layout
/// @param src source data