Vuo  1.2.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
VuoCompilerNodeClass Class Reference

Description

The compiler detail class for VuoNodeClass.

Public Member Functions

VuoNodenewNode (string title="", double x=0, double y=0)
 Creates a substantial base node instance from this node class.
 
VuoNodenewNode (VuoNode *nodeToCopyMetadataFrom)
 Creates a substantial base node instance with its metadata copied from the existing nodeToCopyMetadataFrom.
 
virtual ~VuoCompilerNodeClass (void)
 Destructor.
 
virtual string getClassIdentifier (void)
 The unique class name for this node class, rendered as an identifier in the generated code.
 
virtual Function * getEventFunction (void)
 Returns an LLVM Function for this node class's implementation of the nodeEvent or nodeInstanceEvent function.
 
virtual Function * getInitFunction (void)
 If this node class is stateful, returns an LLVM Function for this node class's implementation of the nodeInstanceInit function.
 
virtual Function * getFiniFunction (void)
 If this node class is stateful, returns an LLVM Function for this node class's implementation of the nodeInstanceFini function.
 
virtual Function * getCallbackStartFunction (void)
 If this node class is stateful, returns an LLVM Function for this node class's implementation of the nodeInstanceTriggerStart function.
 
virtual Function * getCallbackUpdateFunction (void)
 If this node class is stateful, returns an LLVM Function for this node class's implementation of the nodeInstanceTriggerUpdate function.
 
virtual Function * getCallbackStopFunction (void)
 If this node class is stateful, returns an LLVM Function for this node class's implementation of the nodeInstanceTriggerStop function.
 
virtual Function * getCompositionContextInitFunction (void)
 If this node class is a subcomposition, returns an LLVM Function for this subcomposition's implementation of the compositionContextInit function.
 
virtual Function * getCompositionContextFiniFunction (void)
 If this node class is a subcomposition, returns an LLVM Function for this subcomposition's implementation of the compositionContextFini function.
 
virtual Function * getTriggerWorkerFunction (string portIdentifier)
 If this node class is a subcomposition, returns this subcomposition's implementation of the trigger worker function for the trigger with identifier portIdentifier.
 
virtual vector
< VuoCompilerTriggerDescription * > 
getTriggerDescriptions (void)
 If this node is a subcomposition, returns information about the triggers internal to the subcomposition, parsed from the subcomposition's metadata.
 
virtual
VuoCompilerInstanceDataClass
getInstanceDataClass (void)
 If this node class is stateful, returns the instance data class.
 
virtual string getDoxygenDocumentation (void)
 Returns a string containing documentation for this node class in Doxygen format.
 
virtual string getDefaultSpecializedTypeName (string genericTypeName)
 If this node class is generic, returns the default specialized types to replace the generic type with when creating an instance.
 
virtual vector< string > getAutomaticKeywords (void)
 Returns a list of keywords automatically associated with this node class, based on attributes such as its port classes and premium status.
 
virtual bool isStateful (void)
 Returns true if this node class is stateful (implements nodeInstance* functions instead of nodeEvent).
 
bool isSubcomposition (void)
 Returns true if this node class is a subcomposition (implemented in Vuo language, as opposed to text code).
 
- Public Member Functions inherited from VuoBaseDetail< VuoNodeClass >
 VuoBaseDetail (string description, VuoNodeClass *base)
 Creates a VuoNodeClass detail class.
 
VuoNodeClassgetBase (void) const
 Returns the VuoNodeClass detail class instance's base class instance.
 
void setBase (VuoNodeClass *base)
 Sets the VuoNodeClass detail class instance's base class instance.
 
- Public Member Functions inherited from VuoCompilerModule
virtual ~VuoCompilerModule (void)
 Destructor.
 
VuoCompilerTargetSet parseTargetSet (json_object *o, string key)
 Parses the target set value for key in the top level of the JSON object.
 
VuoCompilerTargetSet::MacVersion parseMacVersion (string version)
 Parses a Mac OS version from a string.
 
virtual set< string > getDependencies (void)
 Returns a list of this VuoCompilerModule's dependencies.
 
virtual string getDependencyName (void)
 Returns the name that would represent this VuoCompilerModule in another VuoCompilerModule's list of dependencies.
 
VuoCompilerTargetSet getCompatibleTargets (void)
 Returns the set of targets (operating system versions) with which this module is compatible.
 
Module * getModule (void)
 Returns this VuoCompilerModule's LLVM module, which other LLVM modules can link to.
 
VuoModulegetPseudoBase (void)
 Returns the (psuedo) base for this (psuedo) compiler detail class.
 
bool getPremium (void)
 Returns a boolean indicating whether this module contains premium content.
 
void setPremium (bool premium)
 Sets the boolean indicating whether this module contains premium content.
 
bool isBuiltIn (void)
 Returns true if this module is one of the built-in modules distributed with Vuo.
 
void setBuiltIn (bool builtIn)
 Sets whether this module is one of the built-in modules distributed with Vuo.
 
string getModulePath (void)
 Returns the file from which the LLVM module was loaded, or an empty string if the module was contained in an archive or generated by the compiler.
 

Static Public Member Functions

static VuoNodeClassnewNodeClass (string nodeClassName, Module *module)
 Creates a new substantial VuoNodeClass from the node class definition in the module.
 
static VuoNodeClassnewNodeClassWithoutImplementation (VuoNodeClass *baseNodeClass)
 Creates a new implementation-less compiler node class, using the given node class for its base VuoNodeClass.
 
- Static Public Member Functions inherited from VuoCompilerModule
static VuoCompilerModulenewModule (const string &moduleKey, Module *module, const string &modulePath)
 Instantiates a VuoCompilerModule (or child class) corresponding to the type of VuoCompilerModule defined in the LLVM module.
 
static Function * declareFunctionInModule (Module *module, Function *function)
 Copies the function's header into the LLVM module, if it's not already there.
 

Protected Member Functions

 VuoCompilerNodeClass (string className, Module *module)
 Creates a node class implementation from an LLVM module, and creates its corresponding base VuoNodeClass.
 
 VuoCompilerNodeClass (VuoCompilerNodeClass *compilerNodeClass)
 Creates a new compiler node class and creates a new base VuoNodeClass, both from compilerNodeClass.
 
 VuoCompilerNodeClass (VuoNodeClass *baseNodeClass)
 Creates a new implementation-less compiler node class, using the given node class for its base VuoNodeClass.
 
VuoPortClassgetInputPortClassWithName (string portName)
 Returns the input port class matching the specified portName, if one exists.
 
VuoPortClassgetOutputPortClassWithName (string portName)
 Returns the output port class matching the specified portName, if one exists.
 
- Protected Member Functions inherited from VuoCompilerModule
 VuoCompilerModule (VuoModule *base, Module *module)
 Creates a VuoCompilerModule associated with the given LLVM module, as a pseudo compiler detail class of the given VuoModule.
 
string nameForGlobal (string genericGlobalVarOrFuncName)
 Returns the mangled name for a function or global variable.
 
void renameGlobalVarsAndFuncs (void)
 Renames the global variables and functions within the LLVM module so that they are unique to this VuoCompilerModule.
 

Static Protected Member Functions

static void parseGenericTypes (json_object *moduleDetails, map< string, string > &defaultSpecializedForGenericTypeName, map< std::string, vector< std::string > > &compatibleSpecializedForGenericTypeName)
 Parses the "genericTypes" portion of a node class's metadata.
 
- Static Protected Member Functions inherited from VuoCompilerModule
static string parseString (json_object *o, string key, bool *foundValue=NULL)
 Parses the string value for key in the top level of the JSON object.
 
static int parseInt (json_object *o, string key, bool *foundValue=NULL)
 Parses the integer value for key in the top level of the JSON object.
 
static bool parseBool (json_object *o, string key, bool *foundValue=NULL)
 Parses the boolean value for key in the top level of the JSON object.
 
static vector< string > parseArrayOfStrings (json_object *o, string key)
 Parses the array-of-strings value for key in the top level of the JSON object.
 
static string nameForGlobal (string nameBeforeCompilation, string moduleKey)
 Returns the mangled name for a function or global variable.
 
static bool hasOriginalOrMangledGlobal (string nameBeforeCompilation, Module *module, string moduleKey)
 Returns true if the module contains a function or global variable with name nameBeforeCompilation or with the corresponding mangled name.
 

Protected Attributes

map< string, string > defaultSpecializedForGenericTypeName
 If this node class is generic, use these specialized types when creating an instance.
 
- Protected Attributes inherited from VuoCompilerModule
struct json_objectmoduleDetails
 This module's metadata, found in the argument to VuoModuleMetadata in the module definition.
 
set< string > dependencies
 The dependencies found in this module's metadata.
 
Module * module
 The LLVM module that defines this node class or type.
 
VuoModulebase
 The (pseudo) base for this (pseudo) compiler detail class.
 
VuoCompilerBitcodeParserparser
 The parser of the LLVM module.
 
bool isPremium
 A boolean indicating whether this module contains premium content.
 

Friends

class TestVuoCompilerType
 
class TestVuoCompilerNodeClass
 

Constructor & Destructor Documentation

VuoCompilerNodeClass::VuoCompilerNodeClass ( string  className,
Module *  module 
)
protected

Creates a node class implementation from an LLVM module, and creates its corresponding base VuoNodeClass.

VuoCompilerNodeClass::VuoCompilerNodeClass ( VuoCompilerNodeClass compilerNodeClass)
protected

Creates a new compiler node class and creates a new base VuoNodeClass, both from compilerNodeClass.

Transfers ownership of the port classes and instance data class from compilerNodeClass to the newly constructed node class so that compilerNodeClass can be safely destroyed.

VuoCompilerNodeClass::VuoCompilerNodeClass ( VuoNodeClass baseNodeClass)
protected

Creates a new implementation-less compiler node class, using the given node class for its base VuoNodeClass.

VuoCompilerNodeClass::~VuoCompilerNodeClass ( void  )
virtual

Destructor.

Member Function Documentation

vector< string > VuoCompilerNodeClass::getAutomaticKeywords ( void  )
virtual

Returns a list of keywords automatically associated with this node class, based on attributes such as its port classes and premium status.

Function * VuoCompilerNodeClass::getCallbackStartFunction ( void  )
virtual

If this node class is stateful, returns an LLVM Function for this node class's implementation of the nodeInstanceTriggerStart function.

Otherwise null.

Function * VuoCompilerNodeClass::getCallbackStopFunction ( void  )
virtual

If this node class is stateful, returns an LLVM Function for this node class's implementation of the nodeInstanceTriggerStop function.

Otherwise null.

Function * VuoCompilerNodeClass::getCallbackUpdateFunction ( void  )
virtual

If this node class is stateful, returns an LLVM Function for this node class's implementation of the nodeInstanceTriggerUpdate function.

Otherwise null.

string VuoCompilerNodeClass::getClassIdentifier ( void  )
virtual

The unique class name for this node class, rendered as an identifier in the generated code.

Possible characters: [A-Za-z0-9_]

Example:
vuo_math_lessThan_i64
Function * VuoCompilerNodeClass::getCompositionContextFiniFunction ( void  )
virtual

If this node class is a subcomposition, returns an LLVM Function for this subcomposition's implementation of the compositionContextFini function.

Otherwise null.

Function * VuoCompilerNodeClass::getCompositionContextInitFunction ( void  )
virtual

If this node class is a subcomposition, returns an LLVM Function for this subcomposition's implementation of the compositionContextInit function.

Otherwise null.

string VuoCompilerNodeClass::getDefaultSpecializedTypeName ( string  genericTypeName)
virtual

If this node class is generic, returns the default specialized types to replace the generic type with when creating an instance.

string VuoCompilerNodeClass::getDoxygenDocumentation ( void  )
virtual

Returns a string containing documentation for this node class in Doxygen format.

Function * VuoCompilerNodeClass::getEventFunction ( void  )
virtual

Returns an LLVM Function for this node class's implementation of the nodeEvent or nodeInstanceEvent function.

Function * VuoCompilerNodeClass::getFiniFunction ( void  )
virtual

If this node class is stateful, returns an LLVM Function for this node class's implementation of the nodeInstanceFini function.

Otherwise null.

Function * VuoCompilerNodeClass::getInitFunction ( void  )
virtual

If this node class is stateful, returns an LLVM Function for this node class's implementation of the nodeInstanceInit function.

Otherwise null.

VuoPortClass * VuoCompilerNodeClass::getInputPortClassWithName ( string  portName)
protected

Returns the input port class matching the specified portName, if one exists.

Otherwise null.

VuoCompilerInstanceDataClass * VuoCompilerNodeClass::getInstanceDataClass ( void  )
virtual

If this node class is stateful, returns the instance data class.

Otherwise null.

VuoPortClass * VuoCompilerNodeClass::getOutputPortClassWithName ( string  portName)
protected

Returns the output port class matching the specified portName, if one exists.

Otherwise null.

vector< VuoCompilerTriggerDescription * > VuoCompilerNodeClass::getTriggerDescriptions ( void  )
virtual

If this node is a subcomposition, returns information about the triggers internal to the subcomposition, parsed from the subcomposition's metadata.

Function * VuoCompilerNodeClass::getTriggerWorkerFunction ( string  portIdentifier)
virtual

If this node class is a subcomposition, returns this subcomposition's implementation of the trigger worker function for the trigger with identifier portIdentifier.

bool VuoCompilerNodeClass::isStateful ( void  )
virtual

Returns true if this node class is stateful (implements nodeInstance* functions instead of nodeEvent).

bool VuoCompilerNodeClass::isSubcomposition ( void  )

Returns true if this node class is a subcomposition (implemented in Vuo language, as opposed to text code).

VuoNode * VuoCompilerNodeClass::newNode ( string  title = "",
double  x = 0,
double  y = 0 
)

Creates a substantial base node instance from this node class.

VuoNode * VuoCompilerNodeClass::newNode ( VuoNode nodeToCopyMetadataFrom)

Creates a substantial base node instance with its metadata copied from the existing nodeToCopyMetadataFrom.

VuoNodeClass * VuoCompilerNodeClass::newNodeClass ( string  nodeClassName,
Module *  module 
)
static

Creates a new substantial VuoNodeClass from the node class definition in the module.

If the module does not contain a node class definition, returns NULL.

VuoNodeClass * VuoCompilerNodeClass::newNodeClassWithoutImplementation ( VuoNodeClass baseNodeClass)
static

Creates a new implementation-less compiler node class, using the given node class for its base VuoNodeClass.

void VuoCompilerNodeClass::parseGenericTypes ( json_object moduleDetails,
map< string, string > &  defaultSpecializedForGenericTypeName,
map< std::string, vector< std::string > > &  compatibleSpecializedForGenericTypeName 
)
staticprotected

Parses the "genericTypes" portion of a node class's metadata.

See Also
VuoModuleMetadata

Member Data Documentation

map<string, string> VuoCompilerNodeClass::defaultSpecializedForGenericTypeName
protected

If this node class is generic, use these specialized types when creating an instance.


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