添加CustomRule基础架构

This commit is contained in:
codeboss 2025-08-02 18:26:13 +08:00
parent ae67325332
commit 22b308d215
2 changed files with 10 additions and 1 deletions

View File

@ -535,9 +535,14 @@ bool BytesAsUnion::setOffsetSpan(int value)
return true;
}
void extract::BytesAsSubRule::setActualName(const QString& name)
{
this->_rules._actual_name = name;
}
QString BytesAsSubRule::name() const
{
return NAME(BytesAsSubRule);
return this->_rules._actual_name;
}
DataType BytesAsSubRule::outType() const

View File

@ -270,9 +270,13 @@ namespace extract {
struct __Private {
int _byte_offset = 0, _byte_count = 1;
QList<std::shared_ptr<ExtractUnit>> _sub_rules;
QString _actual_name;
}_rules;
void setActualName(const QString &name);
public:
QString name() const override;
DataType outType() const override;
bool setOffsetSpan(int bytes) override;