update
This commit is contained in:
parent
6602641bcc
commit
c0b2fc7709
|
@ -40,17 +40,17 @@ void ComponentsInfoPull::execute(std::shared_ptr<Immediate> map,
|
||||||
out << rst;
|
out << rst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ComponentsInfoPull::execute(std::shared_ptr<Immediate> map,
|
||||||
|
std::shared_ptr<const ProcedureSignatureQuery> in, QList<std::shared_ptr<ProcedureSignatureQueryResult>>& out)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
std::shared_ptr<WsComponent> ComponentsInfoPull::defaultNew() const
|
std::shared_ptr<WsComponent> ComponentsInfoPull::defaultNew() const
|
||||||
{
|
{
|
||||||
return std::make_shared<ComponentsInfoPull>();
|
return std::make_shared<ComponentsInfoPull>();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ComponentsInfoPull::recoveryFrom(const QJsonObject& obj)
|
void ComponentsInfoPull::recoveryFrom(const QJsonObject& obj) {}
|
||||||
{
|
|
||||||
|
|
||||||
}
|
void ComponentsInfoPull::saveTo(QJsonObject& obj) const {}
|
||||||
|
|
||||||
void ComponentsInfoPull::saveTo(QJsonObject& obj) const
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
/// 组件信息提取
|
/// 组件信息提取
|
||||||
/// </summary>
|
/// </summary>
|
||||||
class COMPONENTBASIC_EXPORT ComponentsInfoPull : public ProcList<
|
class COMPONENTBASIC_EXPORT ComponentsInfoPull : public ProcList<
|
||||||
WsRespond<ComponentDatasQuery, ComponentDatasQueryResult>
|
WsRespond<ComponentDatasQuery, ComponentDatasQueryResult>,
|
||||||
|
WsRespond<ProcedureSignatureQuery, ProcedureSignatureQueryResult>
|
||||||
> {
|
> {
|
||||||
private:
|
private:
|
||||||
std::weak_ptr<WsEntity> _bind_entity;
|
std::weak_ptr<WsEntity> _bind_entity;
|
||||||
|
@ -19,6 +20,7 @@ public:
|
||||||
QString name() const override;
|
QString name() const override;
|
||||||
|
|
||||||
void execute(std::shared_ptr<Immediate> map, std::shared_ptr<const ComponentDatasQuery> in, QList<std::shared_ptr<ComponentDatasQueryResult>>& out) override;
|
void execute(std::shared_ptr<Immediate> map, std::shared_ptr<const ComponentDatasQuery> in, QList<std::shared_ptr<ComponentDatasQueryResult>>& out) override;
|
||||||
|
void execute(std::shared_ptr<Immediate> map, std::shared_ptr<const ProcedureSignatureQuery> in, QList<std::shared_ptr<ProcedureSignatureQueryResult>>& out) override;
|
||||||
|
|
||||||
std::shared_ptr<WsComponent> defaultNew() const override;
|
std::shared_ptr<WsComponent> defaultNew() const override;
|
||||||
void recoveryFrom(const QJsonObject& obj) override;
|
void recoveryFrom(const QJsonObject& obj) override;
|
||||||
|
|
|
@ -238,18 +238,6 @@ ComponentDatasQuery::ComponentDatasQuery()
|
||||||
:AbstractMessage(NAME(ComponentDatasQuery)) {
|
:AbstractMessage(NAME(ComponentDatasQuery)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ComponentDatasQuery::recoveryFrom(const QJsonObject& obj)
|
|
||||||
{
|
|
||||||
AbstractMessage::recoveryFrom(obj);
|
|
||||||
UINT64_PEAK(_bind_entity_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ComponentDatasQuery::saveTo(QJsonObject& obj) const
|
|
||||||
{
|
|
||||||
AbstractMessage::saveTo(obj);
|
|
||||||
UINT64_SAVE(_bind_entity_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
ComponentDatasQueryResult::ComponentDatasQueryResult()
|
ComponentDatasQueryResult::ComponentDatasQueryResult()
|
||||||
:AbstractMessage(NAME(ComponentDatasQueryResult)) {
|
:AbstractMessage(NAME(ComponentDatasQueryResult)) {
|
||||||
}
|
}
|
||||||
|
@ -303,3 +291,38 @@ void ComponentOperate::saveTo(QJsonObject& obj) const
|
||||||
UINT64_SAVE(_entity_id_within_0x2ff_0xffffffffffffffff);
|
UINT64_SAVE(_entity_id_within_0x2ff_0xffffffffffffffff);
|
||||||
STRLIST_SAVE(_component_types);
|
STRLIST_SAVE(_component_types);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ProcedureSignatureQuery::ProcedureSignatureQuery()
|
||||||
|
: AbstractMessage(NAME(ProcedureSignatureQuery)) {
|
||||||
|
}
|
||||||
|
|
||||||
|
ProcedureSignatureQueryResult::ProcedureSignatureQueryResult()
|
||||||
|
:AbstractMessage(NAME(ProcedureSignatureQueryResult)) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void ProcedureSignatureQueryResult::recoveryFrom(const QJsonObject& obj)
|
||||||
|
{
|
||||||
|
AbstractMessage::recoveryFrom(obj);
|
||||||
|
|
||||||
|
QStringList input, output;
|
||||||
|
STRLIST_PEAK(input);
|
||||||
|
STRLIST_PEAK(output);
|
||||||
|
|
||||||
|
for(auto idx=0; idx<input.size(); ++idx)
|
||||||
|
this->_signature_list << std::make_pair(input[idx], output[idx]);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ProcedureSignatureQueryResult::saveTo(QJsonObject& obj) const
|
||||||
|
{
|
||||||
|
AbstractMessage::saveTo(obj);
|
||||||
|
|
||||||
|
QStringList input, output;
|
||||||
|
for (auto sig : this->_signature_list)
|
||||||
|
{
|
||||||
|
input << sig.first;
|
||||||
|
output << sig.second;
|
||||||
|
}
|
||||||
|
|
||||||
|
STRLIST_SAVE(input);
|
||||||
|
STRLIST_SAVE(output);
|
||||||
|
}
|
||||||
|
|
|
@ -210,13 +210,7 @@ struct MESSAGEBASIC_EXPORT EntityTotalList : public AbstractMessage {
|
||||||
/// 获取指定实体的所有组件数据
|
/// 获取指定实体的所有组件数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
struct MESSAGEBASIC_EXPORT ComponentDatasQuery : public AbstractMessage {
|
struct MESSAGEBASIC_EXPORT ComponentDatasQuery : public AbstractMessage {
|
||||||
uint64_t _bind_entity_id = 0;
|
|
||||||
|
|
||||||
ComponentDatasQuery();
|
ComponentDatasQuery();
|
||||||
|
|
||||||
// 通过 WsMessage 继承
|
|
||||||
void recoveryFrom(const QJsonObject& obj) override;
|
|
||||||
void saveTo(QJsonObject& obj) const override;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MESSAGEBASIC_EXPORT ComponentDatasQueryResult : public AbstractMessage {
|
struct MESSAGEBASIC_EXPORT ComponentDatasQueryResult : public AbstractMessage {
|
||||||
|
@ -224,6 +218,21 @@ struct MESSAGEBASIC_EXPORT ComponentDatasQueryResult : public AbstractMessage {
|
||||||
|
|
||||||
ComponentDatasQueryResult();
|
ComponentDatasQueryResult();
|
||||||
|
|
||||||
|
// ͨ¹ý WsMessage ¼Ì³Ð
|
||||||
|
void recoveryFrom(const QJsonObject& obj) override;
|
||||||
|
void saveTo(QJsonObject& obj) const override;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct MESSAGEBASIC_EXPORT ProcedureSignatureQuery : public AbstractMessage {
|
||||||
|
ProcedureSignatureQuery();
|
||||||
|
};
|
||||||
|
|
||||||
|
struct MESSAGEBASIC_EXPORT ProcedureSignatureQueryResult : public AbstractMessage
|
||||||
|
{
|
||||||
|
QList<WsRespondSignatureType> _signature_list;
|
||||||
|
|
||||||
|
ProcedureSignatureQueryResult();
|
||||||
|
|
||||||
// 通过 WsMessage 继承
|
// 通过 WsMessage 继承
|
||||||
void recoveryFrom(const QJsonObject& obj) override;
|
void recoveryFrom(const QJsonObject& obj) override;
|
||||||
void saveTo(QJsonObject& obj) const override;
|
void saveTo(QJsonObject& obj) const override;
|
||||||
|
|
Loading…
Reference in New Issue