HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PlugPlugin Class Reference

#include <plugin.h>

+ Inheritance diagram for PlugPlugin:

Public Member Functions

virtual PLUG_API ~PlugPlugin ()
 
PLUG_API bool Load ()
 
PLUG_API bool IsLoaded () const
 
PLUG_API bool IsResource () const
 Returns true if the plugin is resource-only. More...
 
PLUG_API JsObject GetMetadata ()
 Returns the dictionary containing meta-data for the plugin. More...
 
PLUG_API JsObject GetMetadataForType (const TfType &type)
 Returns the metadata sub-dictionary for a particular type. More...
 
PLUG_API JsObject GetDependencies ()
 Returns the dictionary containing the dependencies for the plugin. More...
 
PLUG_API bool DeclaresType (const TfType &type, bool includeSubclasses=false) const
 
std::string constGetName () const
 Returns the plugin's name. More...
 
std::string constGetPath () const
 Returns the plugin's filesystem path. More...
 
std::string constGetResourcePath () const
 Returns the plugin's resources filesystem path. More...
 
PLUG_API std::string MakeResourcePath (const std::string &path) const
 
PLUG_API std::string FindPluginResource (const std::string &path, bool verify=true) const
 
- Public Member Functions inherited from TfRefBase
 TfRefBase ()
 
size_t GetCurrentCount () const
 Return the current reference count of this object. More...
 
bool IsUnique () const
 Return true if only one TfRefPtr points to this object. More...
 
const TfRefCountGetRefCount () const
 
void SetShouldInvokeUniqueChangedListener (bool shouldCall)
 
- Public Member Functions inherited from TfWeakBase
 TfWeakBase ()
 
 TfWeakBase (const TfWeakBase &)
 
const TfWeakBase__GetTfWeakBase__ () const
 
const TfWeakBaseoperator= (const TfWeakBase &)
 
void EnableNotification2 () const
 
TF_API void constGetUniqueIdentifier () const
 

Friends

class PlugRegistry
 

Additional Inherited Members

- Public Types inherited from TfRefBase
typedef void(* UniqueChangedFuncPtr )(TfRefBase const *, bool)
 
- Static Public Member Functions inherited from TfRefBase
static TF_API void SetUniqueChangedListener (UniqueChangedListener listener)
 
- Protected Member Functions inherited from TfRefBase
virtual TF_API ~TfRefBase ()
 
- Protected Member Functions inherited from TfWeakBase
 ~TfWeakBase ()
 
TfRefPtr< Tf_Remnant_Register () const
 
template<class T >
TfRefPtr< Tf_Remnant_Register (T *tempRmnt) const
 
bool _HasRemnant () const
 

Detailed Description

Defines an interface to registered plugins.

Plugins are registered using the interfaces in PlugRegistry.

For each registered plugin, there is an instance of PlugPlugin which can be used to load and unload the plugin and to retrieve information about the classes implemented by the plugin.

Definition at line 58 of file plugin.h.

Constructor & Destructor Documentation

virtual PLUG_API PlugPlugin::~PlugPlugin ( )
virtual

Member Function Documentation

PLUG_API bool PlugPlugin::DeclaresType ( const TfType type,
bool  includeSubclasses = false 
) const

Returns true if type is declared by this plugin. If includeSubclasses is specified, also returns true if any subclasses of type have been declared.

PLUG_API std::string PlugPlugin::FindPluginResource ( const std::string path,
bool  verify = true 
) const

Find a plugin resource by absolute or relative path optionally verifying that file exists. If verification fails an empty path is returned. Relative paths are relative to the plugin's resource path.

PLUG_API JsObject PlugPlugin::GetDependencies ( )

Returns the dictionary containing the dependencies for the plugin.

PLUG_API JsObject PlugPlugin::GetMetadata ( )

Returns the dictionary containing meta-data for the plugin.

PLUG_API JsObject PlugPlugin::GetMetadataForType ( const TfType type)

Returns the metadata sub-dictionary for a particular type.

std::string const& PlugPlugin::GetName ( ) const
inline

Returns the plugin's name.

Definition at line 93 of file plugin.h.

std::string const& PlugPlugin::GetPath ( ) const
inline

Returns the plugin's filesystem path.

Definition at line 98 of file plugin.h.

std::string const& PlugPlugin::GetResourcePath ( ) const
inline

Returns the plugin's resources filesystem path.

Definition at line 103 of file plugin.h.

PLUG_API bool PlugPlugin::IsLoaded ( ) const

Returns true if the plugin is currently loaded. Resource plugins always report as loaded.

PLUG_API bool PlugPlugin::IsResource ( ) const

Returns true if the plugin is resource-only.

PLUG_API bool PlugPlugin::Load ( )

Loads the plugin. This is a noop if the plugin is already loaded.

PLUG_API std::string PlugPlugin::MakeResourcePath ( const std::string path) const

Build a plugin resource path by returning a given absolute path or combining the plugin's resource path with a given relative path.

Friends And Related Function Documentation

friend class PlugRegistry
friend

Definition at line 197 of file plugin.h.


The documentation for this class was generated from the following file: