2016-01-04 23:03:57 +01:00
|
|
|
#pragma once
|
|
|
|
|
2016-01-07 12:04:40 +01:00
|
|
|
// std
|
2016-01-04 23:03:57 +01:00
|
|
|
#include <vector>
|
2016-01-07 12:04:40 +01:00
|
|
|
// Qt
|
2016-01-04 23:03:57 +01:00
|
|
|
#include <QtCore/QString>
|
|
|
|
#include <QtCore/QVariant>
|
2016-01-07 12:04:40 +01:00
|
|
|
// DOtherSide
|
|
|
|
#include "DOtherSide/DosQObject.h"
|
2016-01-04 23:03:57 +01:00
|
|
|
#include "DOtherSide/DOtherSideTypesCpp.h"
|
|
|
|
|
|
|
|
namespace DOS
|
|
|
|
{
|
|
|
|
|
2016-01-07 17:06:13 +01:00
|
|
|
/// This class implement the interface IDosQObject
|
|
|
|
/// and it's injected in DosQObject
|
|
|
|
class DosQObjectImpl : public IDosQObject
|
2016-01-04 23:03:57 +01:00
|
|
|
{
|
|
|
|
public:
|
2016-01-07 17:06:13 +01:00
|
|
|
/// Constructor
|
|
|
|
DosQObjectImpl(QObject* parent,
|
|
|
|
OnMetaObject onMetaObject,
|
|
|
|
OnSlotExecuted onSlotExecuted);
|
2016-01-04 23:03:57 +01:00
|
|
|
|
2016-01-07 17:06:13 +01:00
|
|
|
/// @see IDosObject::emitSignal
|
2016-01-04 23:03:57 +01:00
|
|
|
bool emitSignal(const QString& name, const std::vector<QVariant>& arguments) override;
|
2016-01-07 17:06:13 +01:00
|
|
|
|
|
|
|
/// @see IDosObject::metaObject
|
2016-01-04 23:03:57 +01:00
|
|
|
const QMetaObject* metaObject() const override;
|
2016-01-07 17:06:13 +01:00
|
|
|
|
|
|
|
/// @see IDosObject::qt_metacall
|
2016-01-04 23:03:57 +01:00
|
|
|
int qt_metacall(QMetaObject::Call callType, int index, void**args) override;
|
|
|
|
|
|
|
|
private:
|
2016-01-07 16:59:51 +01:00
|
|
|
std::shared_ptr<const DOS::IDosQMetaObject> dosMetaObject() const;
|
|
|
|
bool executeSlot(const QMetaMethod& method, void** args);
|
2016-01-04 23:03:57 +01:00
|
|
|
bool executeSlot(int index, void** args);
|
|
|
|
bool readProperty(int index, void** args);
|
|
|
|
bool writeProperty(int index, void** args);
|
|
|
|
|
|
|
|
QObject* m_parent;
|
|
|
|
const OnMetaObject m_onMetaObject;
|
|
|
|
const OnSlotExecuted m_onSlotExecuted;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace DOS
|