TfScriptModuleLoader Class Reference

Provides low-level facilities for shared libraries with script bindings to register themselves with their dependences, and provides a mechanism whereby those script modules will be loaded when necessary. More...

+ Inheritance diagram for TfScriptModuleLoader:

Public Types

typedef TfScriptModuleLoader This
 

Public Member Functions

TF_API void RegisterLibrary (TfToken const &name, TfToken const &moduleName, std::vector< TfToken > const &predecessors)
 Register a library named name and with script module moduleName and libraries which must be loaded first predecessors. More...
 
TF_API void LoadModules ()
 Load all the script modules for any libraries registered using RegisterLibrary if necessary. More...
 
TF_API void LoadModulesForLibrary (TfToken const &name)
 Load all the script modules for any libraries registered using RegisterLibrary that depend on library name. More...
 
TF_API std::vector< std::string > GetModuleNames () const
 Return a list of all currently known modules in a valid dependency order. More...
 
TF_API boost::python::dict GetModulesDict () const
 Return a python dict containing all currently known modules under their canonical names. More...
 
TF_API void WriteDotFile (std::string const &file) const
 Write a graphviz dot-file for the dependency graph of all. More...
 
- Public Member Functions inherited from TfWeakBase
 TfWeakBase (const TfWeakBase &)
 
const TfWeakBase__GetTfWeakBase__ () const
 
const TfWeakBaseoperator= (const TfWeakBase &)
 
void EnableNotification2 () const
 
TF_API void const * GetUniqueIdentifier () const
 

Static Public Member Functions

static TF_API ThisGetInstance ()
 Return the singleton instance. More...
 

Friends

class TfSingleton< This >
 

Additional Inherited Members

- Protected Member Functions inherited from TfWeakBase
TfRefPtr< Tf_Remnant > _Register () const
 
template<class T >
TfRefPtr< Tf_Remnant > _Register (T *tempRmnt) const
 
bool _HasRemnant () const
 

Detailed Description

Provides low-level facilities for shared libraries with script bindings to register themselves with their dependences, and provides a mechanism whereby those script modules will be loaded when necessary.

Currently, this is when one of our script modules is loaded, when TfPyInitialize is called, and when Plug opens shared libraries.

Generally, user code will not make use of this.

Definition at line 58 of file scriptModuleLoader.h.

Member Function Documentation

◆ GetInstance()

static TF_API This& GetInstance ( )
inlinestatic

Return the singleton instance.

Definition at line 65 of file scriptModuleLoader.h.

◆ GetModuleNames()

TF_API std::vector<std::string> GetModuleNames ( ) const

Return a list of all currently known modules in a valid dependency order.

◆ GetModulesDict()

TF_API boost::python::dict GetModulesDict ( ) const

Return a python dict containing all currently known modules under their canonical names.

◆ LoadModules()

TF_API void LoadModules ( )

Load all the script modules for any libraries registered using RegisterLibrary if necessary.

Loads the modules in dependency order as defined in RegisterLibrary.

◆ LoadModulesForLibrary()

TF_API void LoadModulesForLibrary ( TfToken const &  name)

Load all the script modules for any libraries registered using RegisterLibrary that depend on library name.

◆ RegisterLibrary()

TF_API void RegisterLibrary ( TfToken const &  name,
TfToken const &  moduleName,
std::vector< TfToken > const &  predecessors 
)

Register a library named name and with script module moduleName and libraries which must be loaded first predecessors.

The script module will be loaded when necessary. This should generally not be called by user code.

◆ WriteDotFile()

TF_API void WriteDotFile ( std::string const &  file) const

Write a graphviz dot-file for the dependency graph of all.

currently known libraries/modules to file.


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