Revision e8d1537c
Von Christian Ehringfeld vor fast 9 Jahren hinzugefügt
src/entityinstancefactory.cpp | ||
---|---|---|
*/
|
||
#include "entityinstancefactory.h"
|
||
#include "entity.h"
|
||
#include "entityhelper.h"
|
||
#include <QMetaType>
|
||
using namespace CuteEntityManager;
|
||
EntityInstanceFactory::EntityInstanceFactory() {
|
||
... | ... | |
prop.write(e, iterator.value());
|
||
}
|
||
} else {
|
||
qDebug() << prop.name() << "on Entity" << e->getClassname() << "not writeable!";
|
||
qDebug() << prop.name() << "on Entity" << EntityHelper::getClassname(e) << "not writeable!";
|
||
}
|
||
}
|
||
++iterator;
|
||
... | ... | |
Entity *EntityInstanceFactory::setAttributes(Entity *&e,
|
||
const QHash<QString, QVariant> &attributes) {
|
||
if (!attributes.isEmpty()) {
|
||
auto metaprops = e->getMetaProperties();
|
||
auto metaprops = EntityHelper::getMetaProperties(e);
|
||
return EntityInstanceFactory::setAttributes(e, attributes, metaprops);
|
||
} else {
|
||
return e;
|
Auch abrufbar als: Unified diff
entityhelper class