41 lines
910 B
C++
41 lines
910 B
C++
|
#include "BehaviorPerform.h"
|
|||
|
|
|||
|
|
|||
|
void BehaviorPerformPlugin::recoveryFrom(const QJsonObject& obj)
|
|||
|
{
|
|||
|
}
|
|||
|
|
|||
|
void BehaviorPerformPlugin::saveTo(QJsonObject& obj) const
|
|||
|
{
|
|||
|
}
|
|||
|
|
|||
|
std::shared_ptr<WsComponent> BehaviorPerformPlugin::defaultNew() const
|
|||
|
{
|
|||
|
return std::make_shared<BehaviorPerformPlugin>();
|
|||
|
}
|
|||
|
|
|||
|
void BehaviorPerformPlugin::bindEntity(std::weak_ptr<WsEntity> host)
|
|||
|
{
|
|||
|
this->_bind_entity = host;
|
|||
|
}
|
|||
|
|
|||
|
QString BehaviorPerformPlugin::name() const
|
|||
|
{
|
|||
|
return NAME(BehaviorPerformPlugin);
|
|||
|
}
|
|||
|
|
|||
|
void MapHost::setVariable(const QString& key, std::shared_ptr<TopicData> ins)
|
|||
|
{
|
|||
|
if (_variable_map.contains(key) && _variable_map[key]->topicString() != ins->typeName())
|
|||
|
throw new UniException("<EFBFBD><EFBFBD>ͬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݰ<EFBFBD><EFBFBD><EFBFBD>ͬһ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>");
|
|||
|
_variable_map[key] = ins;
|
|||
|
}
|
|||
|
|
|||
|
std::shared_ptr<TopicData> MapHost::getVariable(const QString& key) const
|
|||
|
{
|
|||
|
if(!_variable_map.contains(key))
|
|||
|
return nullptr;
|
|||
|
|
|||
|
return _variable_map[key];
|
|||
|
}
|