update
This commit is contained in:
parent
baab21fd3e
commit
b11f556b9a
|
@ -713,33 +713,33 @@ QString AsRuleSet::topic()
|
|||
return NAME(AsRuleSet);
|
||||
}
|
||||
|
||||
QString ExtractDelegate::name() const
|
||||
QString ExtractProcess::name() const
|
||||
{
|
||||
return _inst._field_name;
|
||||
}
|
||||
|
||||
bool ExtractDelegate::setOffsetSpan(int bytes)
|
||||
bool ExtractProcess::setOffsetSpan(int bytes)
|
||||
{
|
||||
_inst._bytes_offset = bytes;
|
||||
return true;
|
||||
}
|
||||
|
||||
int ExtractDelegate::offsetSpan() const
|
||||
int ExtractProcess::offsetSpan() const
|
||||
{
|
||||
return _inst._bytes_offset;
|
||||
}
|
||||
|
||||
std::shared_ptr<ExtractImpl> ExtractDelegate::delegateInst() const
|
||||
std::shared_ptr<ExtractImpl> ExtractProcess::delegateInst() const
|
||||
{
|
||||
return _inst._delegate_inst;
|
||||
}
|
||||
|
||||
void ExtractDelegate::setDelegate(std::shared_ptr<ExtractImpl> inst)
|
||||
void ExtractProcess::setDelegate(std::shared_ptr<ExtractImpl> inst)
|
||||
{
|
||||
_inst._delegate_inst = inst;
|
||||
}
|
||||
|
||||
void ExtractDelegate::registSubField(std::shared_ptr<ScopeFieldsSetter> inst)
|
||||
void ExtractProcess::registSubField(std::shared_ptr<ScopeFieldsSetter> inst)
|
||||
{
|
||||
inst->setField(name(), _inst._delegate_inst->outType());
|
||||
|
||||
|
@ -747,7 +747,7 @@ void ExtractDelegate::registSubField(std::shared_ptr<ScopeFieldsSetter> inst)
|
|||
_inst._delegate_inst->registSubField(nlayer);
|
||||
}
|
||||
|
||||
void ExtractDelegate::parse(const QByteArray& bytes, std::shared_ptr<DataContext> out) const
|
||||
void ExtractProcess::parse(const QByteArray& bytes, std::shared_ptr<DataContext> out) const
|
||||
{
|
||||
auto context = std::make_shared<ValueAccessContext>();
|
||||
context->init(name(), out);
|
||||
|
@ -756,7 +756,7 @@ void ExtractDelegate::parse(const QByteArray& bytes, std::shared_ptr<DataContext
|
|||
_inst._delegate_inst->parse(bytes_sec, context);
|
||||
}
|
||||
|
||||
void ExtractDelegate::loadFrom(std::shared_ptr<TranslateBasic> core, const QJsonObject& obj)
|
||||
void ExtractProcess::loadFrom(std::shared_ptr<TranslateBasic> core, const QJsonObject& obj)
|
||||
{
|
||||
QJsonObject field_obj;
|
||||
OBJECT_PEAK(field_obj, obj);
|
||||
|
@ -773,7 +773,7 @@ void ExtractDelegate::loadFrom(std::shared_ptr<TranslateBasic> core, const QJson
|
|||
_inst._delegate_inst->loadFrom(core, data_obj);
|
||||
}
|
||||
|
||||
void ExtractDelegate::saveTo(QJsonObject& obj) const
|
||||
void ExtractProcess::saveTo(QJsonObject& obj) const
|
||||
{
|
||||
QJsonObject field_obj;
|
||||
STRING_SAVE(_inst._field_name, field_obj);
|
||||
|
@ -788,17 +788,17 @@ void ExtractDelegate::saveTo(QJsonObject& obj) const
|
|||
OBJECT_SAVE(field_obj, obj);
|
||||
}
|
||||
|
||||
std::shared_ptr<Serializable> ExtractDelegate::newDefault() const
|
||||
std::shared_ptr<Serializable> ExtractProcess::newDefault() const
|
||||
{
|
||||
return std::make_shared<ExtractDelegate>();
|
||||
return std::make_shared<ExtractProcess>();
|
||||
}
|
||||
|
||||
void ExtractDelegate::setName(const QString& name)
|
||||
void ExtractProcess::setName(const QString& name)
|
||||
{
|
||||
_inst._field_name = name;
|
||||
}
|
||||
|
||||
int ExtractDelegate::countWithin() const
|
||||
int ExtractProcess::countWithin() const
|
||||
{
|
||||
return _inst._delegate_inst->countWithin() + offsetSpan();
|
||||
}
|
||||
|
|
|
@ -345,7 +345,7 @@ namespace extract {
|
|||
};
|
||||
|
||||
|
||||
class ExtractDelegate : public ExtractWrap {
|
||||
class ExtractProcess : public ExtractWrap {
|
||||
private:
|
||||
struct __Private {
|
||||
QString _field_name = "";
|
||||
|
|
Loading…
Reference in New Issue