1 #ifndef GUI_OBJUTILS___OBJECT_FACTORY__HPP
2 #define GUI_OBJUTILS___OBJECT_FACTORY__HPP
74 return T::CreateObject(
object, params);
81 static void RegisterFactory(
const string& interface_name,
IInterfaceFactory* factory);
112 return dynamic_cast<T*
>
118 return dynamic_cast<T*
>
map< string, CRef< IInterfaceFactory > > TIfFactoryMap
map< string, CRef< IObjectInterfaceFactory > > TIfObjectFactoryMap
static CObject * CreateInterface(const string &interface_name, TTypeInfo info, ICreateParams *params)
TTypeIfFactoryMap m_Interfaces
static bool ObjectHasInterface(const string &interface_name, SConstScopedObject &object)
map< TTypeInfo, TIfFactoryMap > TTypeIfFactoryMap
map< TTypeInfo, TIfObjectFactoryMap > TTypeIfObjectFactoryMap
TTypeIfObjectFactoryMap m_ObjectInterfaces
virtual CObject * CreateInterface(SConstScopedObject &object, ICreateParams *params) const
CTypeInfo class contains all information about C++ types (both basic and classes): members and layout...
virtual CObject * CreateInterface(ICreateParams *) const
virtual ~IInterfaceFactory()
virtual CObject * CreateInterface(ICreateParams *params) const =0
virtual ~IObjectInterfaceFactory()
virtual CObject * CreateInterface(SConstScopedObject &object, ICreateParams *params) const =0
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define NCBI_GUIOBJUTILS_EXPORT
Defines to provide correct exporting from DLLs in Windows.
T * CreateInterface(TTypeInfo type_info, ICreateParams *params=NULL)
T * CreateObjectInterface(SConstScopedObject &object, ICreateParams *params)
bool ObjectHasInterface(SConstScopedObject &object)