Vuo 2.4.4
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
VuoRunningCompositionLibraries Class Reference

Description

Keeps track of the dynamic libraries referenced by a composition during live coding.

This class encapsulates the information passed between the compiler (when linking the composition) and the runner, so that the caller can just pass the one object around.

Definition at line 18 of file VuoRunningCompositionLibraries.hh.

Public Types

typedef std::function< void(void)> CallbackType
 Type of callbacks to be called after loading/unloading events.
 

Public Member Functions

 VuoRunningCompositionLibraries (void)
 Constructs an object that does not yet have any libraries.
 
 ~VuoRunningCompositionLibraries (void)
 Deletes the loaded resource library files.
 
void enqueueResourceLibraryToLoad (const string &path, const set< string > &dependenciesInLibrary, bool isUnloadable)
 Adds a resource library to the list of those pending to be loaded.
 
void enqueueResourceLibraryToUnload (const string &path)
 Adds the resource library to the list of those pending to be unloaded.
 
set< string > enqueueAllUnloadableResourceLibrariesToUnload (void)
 Adds all currently-loaded unloadable resource libraries to the list of those pending to be unloaded.
 
void enqueueCacheLibraryToLoad (const string &path, const set< string > &dependenciesInLibrary, bool isUnloadable, CallbackType doAfterLoadAttempted)
 Adds a module cache library to the list of those pending to be loaded.
 
set< string > enqueueCacheLibraryToUnload (const string &path)
 Adds the module cache library to the list of those pending to be unloaded.
 
void enqueueLibraryContainingDependencyToUnload (const string &dependency)
 Adds the library containing dependency to the list of those pending to be unloaded.
 
vector< string > dequeueLibrariesToLoad (vector< CallbackType > &doAfterLoadAttempted)
 Marks the libraries pending to be loaded as actually loaded.
 
vector< string > dequeueLibrariesToUnload (void)
 Marks the libraries pending to be unloaded as actually unloaded.
 
vector< string > getNonUnloadableLibrariesLoaded (void)
 Returns the currently-loaded libraries that can't be unloaded.
 
vector< string > getUnloadableLibrariesLoaded (void)
 Returns the currently-loaded libraries that can be unloaded and are not enqueued to be unloaded.
 
vector< string > getUnloadableResourceLibrariesLoaded (void)
 Returns the currently-loaded resource libraries that can be loaded and are not enqueued to be unloaded.
 
vector< string > getUnloadableCacheLibrariesLoaded (void)
 Returns the currently-loaded cache libraries that can be loaded and are not enqueued to be unloaded.
 
map< string, set< string > > getCacheLibrariesEnqueuedToUnload (void)
 Returns the currently-loaded cache libraries that are enqueued to be unloaded.
 
set< string > getDependenciesLoaded (void)
 Returns the node classes, etc.
 
void addExternalLibraries (const set< string > &paths)
 Stores libraries used by node classes, etc.
 
void addExternalFrameworks (const set< string > &paths)
 Stores frameworks used by node classes, etc.
 
set< string > getExternalLibraries (void)
 Returns the libraries accumulated from addExternalLibraries.
 
set< string > getExternalFrameworks (void)
 Returns the frameworks accumulated from addExternalFrameworks.
 
void setDeleteResourceLibraries (bool shouldDeleteResourceLibraries)
 Sets whether resource dylib files should be deleted when the composition is finished using them — when they're marked as unloaded or when this object is destroyed.
 

Member Typedef Documentation

◆ CallbackType

typedef std::function<void(void)> VuoRunningCompositionLibraries::CallbackType

Type of callbacks to be called after loading/unloading events.

Definition at line 21 of file VuoRunningCompositionLibraries.hh.

Constructor & Destructor Documentation

◆ VuoRunningCompositionLibraries()

VuoRunningCompositionLibraries::VuoRunningCompositionLibraries ( void  )

Constructs an object that does not yet have any libraries.

Definition at line 16 of file VuoRunningCompositionLibraries.cc.

◆ ~VuoRunningCompositionLibraries()

VuoRunningCompositionLibraries::~VuoRunningCompositionLibraries ( void  )

Deletes the loaded resource library files.

Definition at line 24 of file VuoRunningCompositionLibraries.cc.

Member Function Documentation

◆ addExternalFrameworks()

void VuoRunningCompositionLibraries::addExternalFrameworks ( const set< string > &  paths)

Stores frameworks used by node classes, etc.

so they don't have to be looked up again each time the composition is re-linked.

Definition at line 377 of file VuoRunningCompositionLibraries.cc.

◆ addExternalLibraries()

void VuoRunningCompositionLibraries::addExternalLibraries ( const set< string > &  paths)

Stores libraries used by node classes, etc.

so they don't have to be looked up again each time the composition is re-linked.

Definition at line 368 of file VuoRunningCompositionLibraries.cc.

◆ dequeueLibrariesToLoad()

vector< string > VuoRunningCompositionLibraries::dequeueLibrariesToLoad ( vector< CallbackType > &  doAfterLoadAttempted)

Marks the libraries pending to be loaded as actually loaded.

Returns those libraries, plus the already-loaded libraries that would have been unloaded by dequeueLibrariesToUnload. The returned libraries are ordered so that a library comes after the libraries it depends on.

Also outputs doAfterLoadAttempted, a list of callbacks that the caller should call after attempting to load the returned libraries.

Definition at line 171 of file VuoRunningCompositionLibraries.cc.

◆ dequeueLibrariesToUnload()

vector< string > VuoRunningCompositionLibraries::dequeueLibrariesToUnload ( void  )

Marks the libraries pending to be unloaded as actually unloaded.

Returns those libraries, plus the still-loaded libraries that may depend on them and thus need to be unloaded for these libraries to be unloaded successfully. The returned libraries are ordered so that a library comes after the libraries that depend on it.

Definition at line 219 of file VuoRunningCompositionLibraries.cc.

◆ enqueueAllUnloadableResourceLibrariesToUnload()

set< string > VuoRunningCompositionLibraries::enqueueAllUnloadableResourceLibrariesToUnload ( void  )

Adds all currently-loaded unloadable resource libraries to the list of those pending to be unloaded.

Returns the dependencies contained in those libraries.

Definition at line 74 of file VuoRunningCompositionLibraries.cc.

◆ enqueueCacheLibraryToLoad()

void VuoRunningCompositionLibraries::enqueueCacheLibraryToLoad ( const string &  path,
const set< string > &  dependenciesInLibrary,
bool  isUnloadable,
CallbackType  doAfterLoadAttempted 
)

Adds a module cache library to the list of those pending to be loaded.

If isUnloadable is true, the library can be unloaded during live coding. If false, it can't be unloaded, e.g. because it contains Objective-C code.

Definition at line 96 of file VuoRunningCompositionLibraries.cc.

◆ enqueueCacheLibraryToUnload()

set< string > VuoRunningCompositionLibraries::enqueueCacheLibraryToUnload ( const string &  path)

Adds the module cache library to the list of those pending to be unloaded.

If the cache library either is enqueued to be unloaded by this function or was already enqueued, this function returns the dependencies contained in the cache library.

Definition at line 115 of file VuoRunningCompositionLibraries.cc.

◆ enqueueLibraryContainingDependencyToUnload()

void VuoRunningCompositionLibraries::enqueueLibraryContainingDependencyToUnload ( const string &  dependency)

Adds the library containing dependency to the list of those pending to be unloaded.

Definition at line 138 of file VuoRunningCompositionLibraries.cc.

◆ enqueueResourceLibraryToLoad()

void VuoRunningCompositionLibraries::enqueueResourceLibraryToLoad ( const string &  path,
const set< string > &  dependenciesInLibrary,
bool  isUnloadable 
)

Adds a resource library to the list of those pending to be loaded.

If isUnloadable is true, the library can be unloaded during live coding. If false, it can't be unloaded, e.g. because it contains Objective-C code.

Definition at line 40 of file VuoRunningCompositionLibraries.cc.

◆ enqueueResourceLibraryToUnload()

void VuoRunningCompositionLibraries::enqueueResourceLibraryToUnload ( const string &  path)

Adds the resource library to the list of those pending to be unloaded.

Definition at line 55 of file VuoRunningCompositionLibraries.cc.

◆ getCacheLibrariesEnqueuedToUnload()

map< string, set< string > > VuoRunningCompositionLibraries::getCacheLibrariesEnqueuedToUnload ( void  )

Returns the currently-loaded cache libraries that are enqueued to be unloaded.

Definition at line 331 of file VuoRunningCompositionLibraries.cc.

◆ getDependenciesLoaded()

set< string > VuoRunningCompositionLibraries::getDependenciesLoaded ( void  )

Returns the node classes, etc.

contained within all currently-loaded libraries that are not enqueued to be unloaded.

Definition at line 344 of file VuoRunningCompositionLibraries.cc.

◆ getExternalFrameworks()

set< string > VuoRunningCompositionLibraries::getExternalFrameworks ( void  )

Returns the frameworks accumulated from addExternalFrameworks.

Definition at line 393 of file VuoRunningCompositionLibraries.cc.

◆ getExternalLibraries()

set< string > VuoRunningCompositionLibraries::getExternalLibraries ( void  )

Returns the libraries accumulated from addExternalLibraries.

Definition at line 385 of file VuoRunningCompositionLibraries.cc.

◆ getNonUnloadableLibrariesLoaded()

vector< string > VuoRunningCompositionLibraries::getNonUnloadableLibrariesLoaded ( void  )

Returns the currently-loaded libraries that can't be unloaded.

Definition at line 267 of file VuoRunningCompositionLibraries.cc.

◆ getUnloadableCacheLibrariesLoaded()

vector< string > VuoRunningCompositionLibraries::getUnloadableCacheLibrariesLoaded ( void  )

Returns the currently-loaded cache libraries that can be loaded and are not enqueued to be unloaded.

Definition at line 317 of file VuoRunningCompositionLibraries.cc.

◆ getUnloadableLibrariesLoaded()

vector< string > VuoRunningCompositionLibraries::getUnloadableLibrariesLoaded ( void  )

Returns the currently-loaded libraries that can be unloaded and are not enqueued to be unloaded.

Definition at line 285 of file VuoRunningCompositionLibraries.cc.

◆ getUnloadableResourceLibrariesLoaded()

vector< string > VuoRunningCompositionLibraries::getUnloadableResourceLibrariesLoaded ( void  )

Returns the currently-loaded resource libraries that can be loaded and are not enqueued to be unloaded.

Definition at line 303 of file VuoRunningCompositionLibraries.cc.

◆ setDeleteResourceLibraries()

void VuoRunningCompositionLibraries::setDeleteResourceLibraries ( bool  shouldDeleteResourceLibraries)

Sets whether resource dylib files should be deleted when the composition is finished using them — when they're marked as unloaded or when this object is destroyed.

Definition at line 402 of file VuoRunningCompositionLibraries.cc.


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