Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 19082efe

Von Christian Ehringfeld vor etwa 9 Jahren hinzugefügt

  • ID 19082efecba561175c5b0f172a63f0c180c5325c
  • Vorgänger d27d606d
  • Nachfolger 95a2ba7e

Started integration of attribute resolver

Unterschiede anzeigen:

src/attributeresolver.h
const Relation &r, const QSharedPointer<Entity> &target);
Attribute* resolveNonRelatedAttribute(const QSharedPointer<Entity> &e,
const QString &attr);
const QMetaObject *resolveInheritance(const QSharedPointer<Entity> &e,Attribute *&attribute);
const QMetaObject *resolveInheritance(const QSharedPointer<Entity> &e,
Attribute *&attribute);
void addAttribute(const QString &className, Attribute *&attr);
Attribute* resolveExplicitAttribute(const QSharedPointer<Entity> &classObj,
const QString &attribute, QSharedPointer<Entity> related = QSharedPointer<Entity>());
src/entitymanager.cpp
#include "entitymanager.h"
#include "enums/databasetype.h"
#include "databasemigration.h"
#include "attributeresolver.h"
#include "validators/validatorfactory.h"
#include "validators/validator.h"
#include "validators/validatorrule.h"
......
this->schema->setTables(this->schema->getTableSchemas());
this->queryInterpreter = QSharedPointer<QueryInterpreter>(new QueryInterpreter(
this->schema->getQueryBuilder().data()));
this->ar = QSharedPointer<AttributeResolver>(new AttributeResolver(
this->schema->getQueryBuilder()));
this->appendToInstanceList();
if (inspect) {
EntityInspector inspector = EntityInspector(msgType);
......
EntityManager::~EntityManager() {
EntityManager::removeConnectionName(this->db->getConnectionName());
EntityManager::instances.remove(this->objectName());
this->ar = QSharedPointer<AttributeResolver>(nullptr);
}
src/entitymanager.h
#define INSPECTENTITIES false
#endif
class AttributeResolver;
class Logger;
class QueryInterpreter;
class EntityManager : public QObject {
......
static QStringList connectionNames;
static QHash<QString, EntityManager *> instances;
QSharedPointer<Logger> logger;
QSharedPointer<AttributeResolver> ar;
QString id;
QSharedPointer<Schema> schema;
static void setConnectionNames(QStringList list);

Auch abrufbar als: Unified diff