7 #ifndef PXR_BASE_PLUG_INTERFACE_FACTORY_H
8 #define PXR_BASE_PLUG_INTERFACE_FACTORY_H
22 virtual void*
New() = 0;
25 template <
class Interface,
class Implementation>
31 "Interface type must be abstract.");
33 return static_cast<Interface*
>(&impl);
50 #define PLUG_REGISTER_INTERFACE_SINGLETON_TYPE(Interface, Implementation) \
51 TF_REGISTRY_FUNCTION(TfType) \
53 TfType::Define<Interface>() \
54 .SetFactory<Plug_InterfaceFactory::SingletonFactory< \
55 Interface, Implementation> >(); \
60 #endif // PXR_BASE_PLUG_INTERFACE_FACTORY_H
GLsizei const GLfloat * value
Base class of all factory types.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE