Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision cbfd2b95

Von Christian Ehringfeld vor mehr als 6 Jahren hinzugefügt

  • ID cbfd2b95e5d51453eaec2f7a211595d6d1f58da4
  • Vorgänger 9a55008f
  • Nachfolger b503a9ac

...

Unterschiede anzeigen:

src/entity.h
#include "relation.h"
#include "validators/validatorrule.h"
#include "validators/errormsg.h"
#include <QDebug>
namespace CuteEntityManager {
/**
......
virtual void setListProperty(const QSharedPointer<Entity> &e,QList<QSharedPointer<Entity>> &entList, const QMetaProperty &property) override { \
QList<QSharedPointer<type>> list = *reinterpret_cast<QList<QSharedPointer<type>>*>(&entList); \
property.write(e.data(), QVariant::fromValue(list)); \
} \
virtual void setFoundProperty(const QSharedPointer<Entity> &e,QSharedPointer<Entity> &value, const QMetaProperty &property) override { \
QSharedPointer<type> en = *reinterpret_cast<QSharedPointer<type>*>(&value); \
QVariant var; \
var.setValue<QSharedPointer<type>>(en); \
property.write(e.data(), var); \
}
public:
......
void setErrors(const QList<ErrorMsg> &value);
virtual void setListProperty(const QSharedPointer<Entity> &e, QList<QSharedPointer<Entity>> &entList,
const QMetaProperty &property) = 0;
virtual void setProperty(const QSharedPointer<Entity> &e, const QSharedPointer<Entity> &value, const QMetaProperty &property);
virtual void setProperty(const QSharedPointer<Entity> &e, QSharedPointer<Entity> &value, const QMetaProperty &property);
virtual void setFoundProperty(const QSharedPointer<Entity> &e, QSharedPointer<Entity> &value, const QMetaProperty &property) = 0;
protected:
explicit Entity (QObject *parent = 0);

Auch abrufbar als: Unified diff