24 #ifndef PXR_BASE_PLUG_PLUGIN_H
25 #define PXR_BASE_PLUG_PLUGIN_H
43 class Plug_RegistrationMetadata;
69 #ifdef PXR_PYTHON_SUPPORT_ENABLED
71 PLUG_API bool IsPythonModule()
const;
72 #endif // PXR_PYTHON_SUPPORT_ENABLED
103 return _resourcePath;
132 static PlugPluginPtr _GetPluginForType(
const TfType & type);
135 static void _RegisterAllPlugins();
139 static PlugPluginPtrVector _GetAllPlugins();
141 template <
class PluginMap>
143 static std::pair<PlugPluginPtr, bool>
144 _NewPlugin(
const Plug_RegistrationMetadata &metadata,
147 PluginMap *allPluginsByNamePtr);
150 static std::pair<PlugPluginPtr, bool>
151 _NewDynamicLibraryPlugin(
const Plug_RegistrationMetadata& metadata);
153 #ifdef PXR_PYTHON_SUPPORT_ENABLED
155 static std::pair<PlugPluginPtr, bool>
156 _NewPythonModulePlugin(
const Plug_RegistrationMetadata& metadata);
157 #endif // PXR_PYTHON_SUPPORT_ENABLED
160 static std::pair<PlugPluginPtr, bool>
161 _NewResourcePlugin(
const Plug_RegistrationMetadata& metadata);
169 void _DeclareTypes();
173 static void _DefineType(
TfType t );
177 bool _LoadWithDependents(_SeenPlugins * seenPlugins);
180 static void _UpdatePluginMaps(
const TfType & baseType );
183 static constexpr
char const *_GetPluginTypeDisplayName(_Type type);
191 std::atomic<bool> _isLoaded;
208 #endif // PXR_BASE_PLUG_PLUGIN_H
PLUG_API JsObject GetMetadataForType(const TfType &type)
Returns the metadata sub-dictionary for a particular type.
std::string const & GetPath() const
Returns the plugin's filesystem path.
GLsizei const GLchar *const * string
GLsizei const GLchar *const * path
std::string const & GetName() const
Returns the plugin's name.
PXR_NAMESPACE_OPEN_SCOPE TF_DECLARE_WEAK_PTRS(PlugPlugin)
PLUG_API bool IsResource() const
Returns true if the plugin is resource-only.
GLuint const GLchar * name
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.