HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
interfaceFactory.h File Reference
#include "pxr/pxr.h"
#include "pxr/base/tf/type.h"
+ Include dependency graph for interfaceFactory.h:

Go to the source code of this file.

Classes

class  Plug_InterfaceFactory
 
struct  Plug_InterfaceFactory::Base
 
struct  Plug_InterfaceFactory::SingletonFactory< Interface, Implementation >
 

Macros

#define PLUG_REGISTER_INTERFACE_SINGLETON_TYPE(Interface, Implementation)
 

Macro Definition Documentation

#define PLUG_REGISTER_INTERFACE_SINGLETON_TYPE (   Interface,
  Implementation 
)
Value:
{ \
TfType::Define<Interface>() \
Interface, Implementation> >(); \
}
Definition: type.h:64
#define TF_REGISTRY_FUNCTION(KEY_TYPE)

Defines the Interface TfType with a factory to return a Implementation singleton. This is suitable for use with PlugStaticInterface. Interface must be abstract and Implementation a concrete subclass of Interface. Note that this is a factory on Interface not Implementation.

The result of the factory is a singleton instance of Implementation and the client of TfType::GetFactory() must not destroy it.

Clients that want to create instances of types defined in a plugin but not added to the TfType system should create a singleton with factory methods to create those objects.

Definition at line 67 of file interfaceFactory.h.