All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
interfaceFactory.h File Reference
+ Include dependency graph for interfaceFactory.h:

Go to the source code of this file.

Macros

#define PLUG_REGISTER_INTERFACE_SINGLETON_TYPE(Interface, Implementation)
 Defines the Interface TfType with a factory to return a Implementation singleton. More...
 

Macro Definition Documentation

#define PLUG_REGISTER_INTERFACE_SINGLETON_TYPE (   Interface,
  Implementation 
)
Value:
{ \
TfType::Define<Interface>() \
.SetFactory<Plug_InterfaceFactory::SingletonFactory< \
Interface, Implementation> >(); \
}
TfType represents a dynamic runtime type.
Definition: type.h:64
#define TF_REGISTRY_FUNCTION(KEY_TYPE)
Define a function that is called on demand by TfRegistryManager.

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.