24 #ifndef HF_PLUGIN_ENTRY_H
25 #define HF_PLUGIN_ENTRY_H
28 #include "pxr/base/tf/token.h"
29 #include "pxr/base/tf/type.h"
30 #include "pxr/imaging/hf/perfLog.h"
34 PXR_NAMESPACE_OPEN_SCOPE
44 class Hf_PluginEntry final {
46 HF_MALLOC_TAG_NEW(
"new Hf_PluginEntry");
55 typedef std::function<HfPluginBase *()> _PluginFactoryFn;
61 Hf_PluginEntry(
const TfType &type,
62 const std::string &displayName,
69 Hf_PluginEntry(Hf_PluginEntry &&source);
70 Hf_PluginEntry &operator =(Hf_PluginEntry &&source);
75 const TfType &GetType()
const {
return _type; }
76 const std::string &GetDisplayName()
const {
return _displayName; }
77 int GetPriority()
const {
return _priority; }
102 bool operator <(
const Hf_PluginEntry &other)
const;
107 static void SetFactory(
TfType &type, _PluginFactoryFn &func);
121 _Factory(_PluginFactoryFn &func) : _func(func) {}
126 _PluginFactoryFn _func;
131 std::string _displayName;
139 Hf_PluginEntry() =
delete;
140 Hf_PluginEntry(
const Hf_PluginEntry &) =
delete;
141 Hf_PluginEntry &operator =(
const Hf_PluginEntry &) =
delete;
146 PXR_NAMESPACE_CLOSE_SCOPE
148 #endif // HF_PLUGIN_ENTRY_H
Base class for all hydra plugin classes.
Base class of all factory types.
Token for efficient comparison, assignment, and hashing of known strings.
TfType represents a dynamic runtime type.
Common structure used to report registered plugins in one of the plugin registries.