24 #ifndef PXR_BASE_PLUG_PLUGIN_H
25 #define PXR_BASE_PLUG_PLUGIN_H
44 class Plug_RegistrationMetadata;
70 #ifdef PXR_PYTHON_SUPPORT_ENABLED
72 PLUG_API bool IsPythonModule()
const;
73 #endif // PXR_PYTHON_SUPPORT_ENABLED
104 return _resourcePath;
133 static PlugPluginPtr _GetPluginForType(
const TfType & type);
136 static void _RegisterAllPlugins();
140 static PlugPluginPtrVector _GetAllPlugins();
142 template <
class PluginMap>
144 static std::pair<PlugPluginPtr, bool>
145 _NewPlugin(
const Plug_RegistrationMetadata &metadata,
148 PluginMap *allPluginsByNamePtr);
151 static std::pair<PlugPluginPtr, bool>
152 _NewDynamicLibraryPlugin(
const Plug_RegistrationMetadata& metadata);
154 #ifdef PXR_PYTHON_SUPPORT_ENABLED
156 static std::pair<PlugPluginPtr, bool>
157 _NewPythonModulePlugin(
const Plug_RegistrationMetadata& metadata);
158 #endif // PXR_PYTHON_SUPPORT_ENABLED
161 static std::pair<PlugPluginPtr, bool>
162 _NewResourcePlugin(
const Plug_RegistrationMetadata& metadata);
170 void _DeclareTypes();
174 static void _DefineType(
TfType t );
178 bool _LoadWithDependents(_SeenPlugins * seenPlugins);
181 static void _UpdatePluginMaps(
const TfType & baseType );
184 static constexpr
char const *_GetPluginTypeDisplayName(_Type type);
192 std::atomic<bool> _isLoaded;
209 #endif // PXR_BASE_PLUG_PLUGIN_H
PLUG_API JsObject GetMetadataForType(const TfType &type)
Returns the metadata sub-dictionary for a particular type.
PXR_NAMESPACE_OPEN_SCOPE TF_DECLARE_WEAK_AND_REF_PTRS(PlugPlugin)
std::string const & GetPath() const
Returns the plugin's filesystem path.
GLsizei const GLchar *const * path
std::string const & GetName() const
Returns the plugin's name.
GLuint const GLchar * name
PLUG_API bool IsResource() const
Returns true if the plugin is resource-only.
GLsizei const GLchar *const * string
virtual PLUG_API ~PlugPlugin()
std::map< std::string, JsValue > JsObject
PLUG_API JsObject GetDependencies()
Returns the dictionary containing the dependencies for the plugin.
PLUG_API std::string FindPluginResource(const std::string &path, bool verify=true) const
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
PLUG_API std::string PlugFindPluginResource(const PlugPluginPtr &plugin, const std::string &path, bool verify=true)
#define PXR_NAMESPACE_CLOSE_SCOPE
PLUG_API JsObject GetMetadata()
Returns the dictionary containing meta-data for the plugin.
PLUG_API bool IsLoaded() const
PLUG_API std::string MakeResourcePath(const std::string &path) const
PLUG_API bool DeclaresType(const TfType &type, bool includeSubclasses=false) const
std::string const & GetResourcePath() const
Returns the plugin's resources filesystem path.