24 #ifndef PXR_BASE_PLUG_INTERFACE_FACTORY_H
25 #define PXR_BASE_PLUG_INTERFACE_FACTORY_H
39 virtual void*
New() = 0;
42 template <
class Interface,
class Implementation>
48 "Interface type must be abstract.");
50 return static_cast<Interface*
>(&impl);
67 #define PLUG_REGISTER_INTERFACE_SINGLETON_TYPE(Interface, Implementation) \
68 TF_REGISTRY_FUNCTION(TfType) \
70 TfType::Define<Interface>() \
71 .SetFactory<Plug_InterfaceFactory::SingletonFactory< \
72 Interface, Implementation> >(); \
77 #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