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

Description

Information about a module or source file that the compiler has seen, though not necessarily loaded.

Definition at line 18 of file VuoModuleInfo.hh.

Public Member Functions

 VuoModuleInfo (VuoCompilerEnvironment *environment, const string &searchPath, const string &relativePath, bool isSourceFile, bool isSubcomposition)
 Constructs a VuoModuleInfo given the module/composition file's path relative to the search path.
 
 VuoModuleInfo (VuoCompilerEnvironment *environment, const string &searchPath, VuoFileUtilities::File *file, bool isSourceFile, bool isSubcomposition)
 Constructs a VuoModuleInfo given a reference to the module/composition file.
 
 ~VuoModuleInfo (void)
 Destructor.
 
VuoCompilerEnvironmentgetEnvironment (void) const
 Returns the environment that owns this module.
 
string getSearchPath (void) const
 Returns the module search path in which the file is located.
 
string getModuleKey (void) const
 Returns the module key derived from the file name or revised by setUnmangledModuleKey().
 
bool isModuleKeyMangled (void) const
 Returns true if the currently stored module key is a mangled form of the actual module key.
 
void setUnmangledModuleKey (const string &moduleKey)
 Replaces the stored mangled module key with its unmangled form.
 
VuoFileUtilities::FilegetFile (void) const
 Returns the module/source file, which may be in either a directory or an archive.
 
string getSourceCode (void) const
 Returns the module's source code (if any).
 
void setSourceCode (const string &sourceCode)
 Sets the module's source code, presumably to something other than the file contents.
 
void revertSourceCode (void)
 Sets the module's source code back to the file contents.
 
bool isSourceCodeOverridden (void) const
 Returns the value set by VuoModuleInfo::setSourceCodeOverridden(), or false by default.
 
void setSourceCodeOverridden (bool overridden)
 Stores whether the source code is overridden.
 
bool isNewerThan (VuoModuleInfo *other) const
 Returns true if this file was last modified more recently than other.
 
bool isNewerThan (double seconds) const
 Returns true if this file was last modified more recently than ageInSeconds.
 
bool isOlderThan (double seconds) const
 Returns true if this file was last modified less recently than ageInSeconds.
 
void setLastModifiedToNow (void)
 Sets the last-modified timestamp associated with this object, overriding (but not modifying) the file's timestamp.
 
set< string > getContainedNodeClasses (void) const
 Returns the class names of all node classes contained at the top level of this subcomposition.
 
int getLongestDownstreamPath (void) const
 Returns the value set by VuoModuleInfo::setLongestDownstreamPath(), or 0 by default.
 
void setLongestDownstreamPath (int pathLength)
 Stores the number of vertices in the longest path downstream of this subcomposition in the composition dependency graph.
 
bool getAttempted (void) const
 Returns the value set by VuoModuleInfo::setAttempted(), or false by default.
 
void setAttempted (bool attempted)
 Stores whether the compiler either has attempted to load this file (if it's a compiled module) or has scheduled (and possibly completed) compilation of this file (if it's a source file).
 
dispatch_group_t getLoadingGroup (void) const
 Returns a dispatch group on which the compiler should schedule the compiling and loading of this source file.
 
void dump () const
 Prints debug info.
 

Constructor & Destructor Documentation

◆ VuoModuleInfo() [1/2]

VuoModuleInfo::VuoModuleInfo ( VuoCompilerEnvironment environment,
const string &  searchPath,
const string &  relativePath,
bool  isSourceFile,
bool  isSubcomposition 
)

Constructs a VuoModuleInfo given the module/composition file's path relative to the search path.

Definition at line 20 of file VuoModuleInfo.cc.

◆ VuoModuleInfo() [2/2]

VuoModuleInfo::VuoModuleInfo ( VuoCompilerEnvironment environment,
const string &  searchPath,
VuoFileUtilities::File file,
bool  isSourceFile,
bool  isSubcomposition 
)

Constructs a VuoModuleInfo given a reference to the module/composition file.

Definition at line 30 of file VuoModuleInfo.cc.

◆ ~VuoModuleInfo()

VuoModuleInfo::~VuoModuleInfo ( void  )

Destructor.

Definition at line 79 of file VuoModuleInfo.cc.

Member Function Documentation

◆ dump()

void VuoModuleInfo::dump ( ) const

Prints debug info.

Definition at line 266 of file VuoModuleInfo.cc.

◆ getAttempted()

bool VuoModuleInfo::getAttempted ( void  ) const

Returns the value set by VuoModuleInfo::setAttempted(), or false by default.

Definition at line 241 of file VuoModuleInfo.cc.

◆ getContainedNodeClasses()

set< string > VuoModuleInfo::getContainedNodeClasses ( void  ) const

Returns the class names of all node classes contained at the top level of this subcomposition.

Definition at line 217 of file VuoModuleInfo.cc.

◆ getEnvironment()

VuoCompilerEnvironment * VuoModuleInfo::getEnvironment ( void  ) const

Returns the environment that owns this module.

Definition at line 94 of file VuoModuleInfo.cc.

◆ getFile()

VuoFileUtilities::File * VuoModuleInfo::getFile ( void  ) const

Returns the module/source file, which may be in either a directory or an archive.

Definition at line 135 of file VuoModuleInfo.cc.

◆ getLoadingGroup()

dispatch_group_t VuoModuleInfo::getLoadingGroup ( void  ) const

Returns a dispatch group on which the compiler should schedule the compiling and loading of this source file.

Definition at line 258 of file VuoModuleInfo.cc.

◆ getLongestDownstreamPath()

int VuoModuleInfo::getLongestDownstreamPath ( void  ) const

Returns the value set by VuoModuleInfo::setLongestDownstreamPath(), or 0 by default.

Definition at line 225 of file VuoModuleInfo.cc.

◆ getModuleKey()

string VuoModuleInfo::getModuleKey ( void  ) const

Returns the module key derived from the file name or revised by setUnmangledModuleKey().

Definition at line 110 of file VuoModuleInfo.cc.

◆ getSearchPath()

string VuoModuleInfo::getSearchPath ( void  ) const

Returns the module search path in which the file is located.

Definition at line 102 of file VuoModuleInfo.cc.

◆ getSourceCode()

string VuoModuleInfo::getSourceCode ( void  ) const

Returns the module's source code (if any).

This may be the file contents, or may differ if there are unsaved changes.

Definition at line 143 of file VuoModuleInfo.cc.

◆ isModuleKeyMangled()

bool VuoModuleInfo::isModuleKeyMangled ( void  ) const

Returns true if the currently stored module key is a mangled form of the actual module key.

Definition at line 118 of file VuoModuleInfo.cc.

◆ isNewerThan() [1/2]

bool VuoModuleInfo::isNewerThan ( double  seconds) const

Returns true if this file was last modified more recently than ageInSeconds.

Definition at line 191 of file VuoModuleInfo.cc.

◆ isNewerThan() [2/2]

bool VuoModuleInfo::isNewerThan ( VuoModuleInfo other) const

Returns true if this file was last modified more recently than other.

Definition at line 183 of file VuoModuleInfo.cc.

◆ isOlderThan()

bool VuoModuleInfo::isOlderThan ( double  seconds) const

Returns true if this file was last modified less recently than ageInSeconds.

Definition at line 199 of file VuoModuleInfo.cc.

◆ isSourceCodeOverridden()

bool VuoModuleInfo::isSourceCodeOverridden ( void  ) const

Returns the value set by VuoModuleInfo::setSourceCodeOverridden(), or false by default.

Definition at line 167 of file VuoModuleInfo.cc.

◆ revertSourceCode()

void VuoModuleInfo::revertSourceCode ( void  )

Sets the module's source code back to the file contents.

Definition at line 159 of file VuoModuleInfo.cc.

◆ setAttempted()

void VuoModuleInfo::setAttempted ( bool  attempted)

Stores whether the compiler either has attempted to load this file (if it's a compiled module) or has scheduled (and possibly completed) compilation of this file (if it's a source file).

Definition at line 250 of file VuoModuleInfo.cc.

◆ setLastModifiedToNow()

void VuoModuleInfo::setLastModifiedToNow ( void  )

Sets the last-modified timestamp associated with this object, overriding (but not modifying) the file's timestamp.

Definition at line 207 of file VuoModuleInfo.cc.

◆ setLongestDownstreamPath()

void VuoModuleInfo::setLongestDownstreamPath ( int  pathLength)

Stores the number of vertices in the longest path downstream of this subcomposition in the composition dependency graph.

Definition at line 233 of file VuoModuleInfo.cc.

◆ setSourceCode()

void VuoModuleInfo::setSourceCode ( const string &  sourceCode)

Sets the module's source code, presumably to something other than the file contents.

Definition at line 151 of file VuoModuleInfo.cc.

◆ setSourceCodeOverridden()

void VuoModuleInfo::setSourceCodeOverridden ( bool  overridden)

Stores whether the source code is overridden.

Definition at line 175 of file VuoModuleInfo.cc.

◆ setUnmangledModuleKey()

void VuoModuleInfo::setUnmangledModuleKey ( const string &  moduleKey)

Replaces the stored mangled module key with its unmangled form.

Definition at line 126 of file VuoModuleInfo.cc.


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