Vuo  2.3.2
Classes | Public Member Functions | Friends | List of all members
VuoCompilerDelegate Class Referenceabstract

Description

An abstract class to be implemented by a client that will receive notifications from the compiler.

Use VuoCompiler::setDelegate() to connect a VuoCompilerDelegate to a VuoCompiler.

Changed in Vuo 2.0.0:
New.

Definition at line 483 of file VuoCompiler.hh.

Public Member Functions

 VuoCompilerDelegate (void)
 Initializes private data members. More...
 
virtual void loadedModules (const map< string, VuoCompilerModule * > &modulesAdded, const map< string, pair< VuoCompilerModule *, VuoCompilerModule * > > &modulesModified, const map< string, VuoCompilerModule * > &modulesRemoved, VuoCompilerIssues *issues)=0
 This delegate function is invoked each time the compiler loads or unloads modules or encounters issues when trying to do so. More...
 
void loadedModulesCompleted (void)
 Signals that this delegate has finished using the argument values from loadedModules. More...
 

Friends

class VuoCompiler
 

Constructor & Destructor Documentation

◆ VuoCompilerDelegate()

VuoCompilerDelegate::VuoCompilerDelegate ( void  )

Initializes private data members.

Definition at line 6838 of file VuoCompiler.cc.

Member Function Documentation

◆ loadedModules()

virtual void VuoCompilerDelegate::loadedModules ( const map< string, VuoCompilerModule * > &  modulesAdded,
const map< string, pair< VuoCompilerModule *, VuoCompilerModule * > > &  modulesModified,
const map< string, VuoCompilerModule * > &  modulesRemoved,
VuoCompilerIssues issues 
)
pure virtual

This delegate function is invoked each time the compiler loads or unloads modules or encounters issues when trying to do so.

This function may be called as a result of a request for modules (e.g. VuoCompiler::getNodeClass()`) or a change to the files installed in the module search paths.

This function may be called multiple times in rapid succession with different modules passed as arguments, including when the compiler is loading modules for the first time. It is always called sequentially as opposed to concurrently; the next call won't happen until the current call returns.

Your implementation of this function is allowed to continue using the VuoCompilerModule and VuoCompilerIssues values that were passed as arguments after the function returns (for example, if the function schedules work to be done asynchronously).

For each call to this function, you must make a corresponding call to loadedModulesCompleted when you've finished using the argument values. When there are multiple calls to loadedModules, it's assumed that you'll finish using argument values in the same order that you received them.

Parameters
modulesAddedModules that were loaded (e.g. for new files in a module search path).
modulesModifiedModules that were reloaded (e.g. for modified files in a module search path). The first pair item is the old version of the module; the second is the new version.
modulesRemovedModules that were unloaded (e.g. for files deleted from a module search path).
issuesErrors and warnings.

Implemented in VuoModuleManager.

◆ loadedModulesCompleted()

void VuoCompilerDelegate::loadedModulesCompleted ( void  )

Signals that this delegate has finished using the argument values from loadedModules.

For each call to loadedModules, you should make a corresponding call to this function within your loadedModules implementation or sometime after that function returns.

This function is necessary for proper memory management. If you don't call it, the invalidated modules in modulesModified (first item in pairs) and modulesRemoved (all items) and the VuoCompilerIssues instance will never be destroyed.

Definition at line 6843 of file VuoCompiler.cc.


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