13 #ifndef BERRYIADAPTERMANAGER_H_
14 #define BERRYIADAPTERMANAGER_H_
124 const char* typeName = qobject_interface_iid<A*>();
125 if (typeName ==
nullptr)
128 <<
"Cannot get the interface id for type '" << Reflection::GetClassName<A>()
129 <<
"'. It is probably missing a Q_DECLARE_INTERFACE macro in its header.";
132 return dynamic_cast<A*
>(this->GetAdapter(adaptable, typeName,
false));
152 virtual Object* GetAdapter(
const Object* adaptable,
const QString& adapterTypeName) = 0;
172 virtual bool HasAdapter(
const Object* adaptableType,
const QString& adapterType) = 0;
177 const char* typeName = qobject_interface_iid<A*>();
178 if (typeName ==
nullptr)
181 <<
"Cannot get the interface id for type '" << Reflection::GetClassName<A>()
182 <<
"'. It is probably missing a Q_DECLARE_INTERFACE macro in its header.";
185 return this->QueryAdapter(adaptable, typeName);
203 virtual int QueryAdapter(
const Object* adaptableType,
const QString& adapterType) = 0;
225 const char* typeName = qobject_interface_iid<A*>();
226 if (typeName ==
nullptr)
229 <<
"Cannot get the interface id for type '" << Reflection::GetClassName<A>()
230 <<
"'. It is probably missing a Q_DECLARE_INTERFACE macro in its header.";
233 return dynamic_cast<A*
>(this->GetAdapter(adaptable, typeName,
true));
245 const QString& adaptableTypeName) = 0;
269 const QString& adaptableTypeName) = 0;
273 virtual Object* GetAdapter(
const Object* adaptable,
const QString& adapterType,
bool force) = 0;