13 #ifndef BERRYIADAPTERMANAGER_H_ 14 #define BERRYIADAPTERMANAGER_H_ 90 static const int NONE;
125 const char* typeName = qobject_interface_iid<A*>();
126 if (typeName ==
nullptr)
129 <<
"Cannot get the interface id for type '" << Reflection::GetClassName<A>()
130 <<
"'. It is probably missing a Q_DECLARE_INTERFACE macro in its header.";
133 return dynamic_cast<A*
>(this->GetAdapter(adaptable, typeName,
false));
153 virtual Object* GetAdapter(
const Object* adaptable,
const QString& adapterTypeName) = 0;
173 virtual bool HasAdapter(
const Object* adaptableType,
const QString& adapterType) = 0;
178 const char* typeName = qobject_interface_iid<A*>();
179 if (typeName ==
nullptr)
182 <<
"Cannot get the interface id for type '" << Reflection::GetClassName<A>()
183 <<
"'. It is probably missing a Q_DECLARE_INTERFACE macro in its header.";
186 return this->QueryAdapter(adaptable, typeName);
204 virtual int QueryAdapter(
const Object* adaptableType,
const QString& adapterType) = 0;
227 const char* typeName = qobject_interface_iid<A*>();
228 if (typeName ==
nullptr)
231 <<
"Cannot get the interface id for type '" << Reflection::GetClassName<A>()
232 <<
"'. It is probably missing a Q_DECLARE_INTERFACE macro in its header.";
235 return dynamic_cast<A*
>(this->GetAdapter(adaptable, typeName,
true));
248 const QString& adaptableTypeName) = 0;
272 const QString& adaptableTypeName) = 0;
276 virtual Object* GetAdapter(
const Object* adaptable,
const QString& adapterType,
bool force) = 0;
QString GetClassName(const Object *obj)
Light weight base class for most BlueBerry classes.
A * GetAdapter(const Object *adaptable)
int QueryAdapter(const Object *adaptable)
static const int NOT_LOADED
#define org_blueberry_core_runtime_EXPORT
#define berryObjectMacro(...)
A * LoadAdapter(const Object *adaptable)