Vuo 2.4.2
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
VuoCompilerPublishedOutputNodeClass Class Reference

Description

A node class used when generating code for a composition to handle data storage of and event flow through published output ports.

Definition at line 18 of file VuoCompilerPublishedOutputNodeClass.hh.

Public Member Functions

size_t getInputPortIndexForPublishedOutputPort (size_t publishedOutputPortIndex)
 Returns the index of the input port on this node class that corresponds to the published output port. More...
 
size_t getGatherInputPortIndex (void)
 Returns the index of the input port on this node class that is intended for gathering events. More...
 
- Public Member Functions inherited from VuoCompilerSpecializedNodeClass
void updateBackingNodeClass (VuoNode *nodeToBack, VuoCompiler *compiler)
 Updates the implementation for this VuoCompilerSpecializedNodeClass to be consistent with the backing types of nodeToBack, and updates the VuoCompilerNode of nodeToBack to be consistent with that implementation. More...
 
virtual VuoCompilerNodecreateReplacementBackingNode (VuoNode *nodeToBack, string backingNodeClassName, VuoCompiler *compiler)
 Returns a fully specialized node of class backingNodeClassName that will replace the node class of nodeToBack. More...
 
bool isFullySpecialized (void)
 Returns true if this node class has no unspecialized generic types. More...
 
virtual VuoTypegetOriginalPortType (VuoPortClass *portClass)
 Returns this port's type in the generic node that this specialized node class was derived from. More...
 
virtual string getOriginalGenericNodeClassName (void)
 Returns the original node's class name (without any type suffixes). More...
 
virtual string getOriginalGenericNodeClassDescription (void)
 Returns the original node's description. More...
 
virtual VuoNodeSetgetOriginalGenericNodeSet (void)
 Returns the original node's node set. More...
 
virtual string createUnspecializedNodeClassName (set< VuoPortClass * > portClassesToUnspecialize)
 Returns the name for the node class that would result if the given port were changed back to its original type. More...
 
virtual string createSpecializedNodeClassNameWithReplacement (string genericTypeName, string specializedTypeName)
 Returns the name for the node class that would result if the given (innermost) specialized type were substituted for the given (innermost) generic type in this node class. More...
 
set< string > getDependencies (void)
 Returns the dependencies of the backing node class, if it exists, otherwise this node class. More...
 
string getDependencyName (void)
 If the backing node class exists, this function is performed on the backing node class instead of this node class. More...
 
- Public Member Functions inherited from VuoCompilerNodeClass
VuoNodenewNode (string title="", double x=0, double y=0)
 Creates a substantial base node instance from this node class. More...
 
VuoNodenewNode (VuoNode *nodeToCopyMetadataFrom)
 Creates a substantial base node instance with its metadata copied from the existing nodeToCopyMetadataFrom. More...
 
virtual ~VuoCompilerNodeClass (void)
 Destructor. More...
 
virtual string getClassIdentifier (void)
 The unique class name for this node class, rendered as an identifier in the generated code. More...
 
virtual Function * getEventFunction (void)
 Returns an LLVM Function for this node class's implementation of the nodeEvent or nodeInstanceEvent function. More...
 
virtual Function * getInitFunction (void)
 If this node class is stateful, returns an LLVM Function for this node class's implementation of the nodeInstanceInit function. More...
 
virtual Function * getFiniFunction (void)
 If this node class is stateful, returns an LLVM Function for this node class's implementation of the nodeInstanceFini function. More...
 
virtual Function * getCallbackStartFunction (void)
 If this node class is stateful, returns an LLVM Function for this node class's implementation of the nodeInstanceTriggerStart function. More...
 
virtual Function * getCallbackUpdateFunction (void)
 If this node class is stateful, returns an LLVM Function for this node class's implementation of the nodeInstanceTriggerUpdate function. More...
 
virtual Function * getCallbackStopFunction (void)
 If this node class is stateful, returns an LLVM Function for this node class's implementation of the nodeInstanceTriggerStop function. More...
 
virtual Function * getCompositionAddNodeMetadataFunction (void)
 If this node class is a subcomposition, returns an LLVM Function for this subcomposition's implementation of the compositionAddNodeMetadata function. More...
 
virtual Function * getCompositionPerformDataOnlyTransmissionsFunction (void)
 If this node class is a subcomposition, returns an LLVM Function for this subcomposition's implementation of the compositionAddNodeMetadata function. More...
 
virtual Function * getCompositionSetPublishedInputPortValueFunction (void)
 If this node class is a subcomposition, returns an LLVM Function for this subcomposition's implementation of the compositionSetPublishedInputPortValue function. More...
 
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. More...
 
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. More...
 
virtual VuoCompilerInstanceDataClassgetInstanceDataClass (void)
 If this node class is stateful, returns the instance data class. More...
 
virtual string getDoxygenDocumentation (void)
 Returns a string containing documentation for this node class in Doxygen format. More...
 
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. More...
 
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 pro status. More...
 
bool isLikelyImageFilter (void)
 Returns true if this node class is likely an image filter, based on its image-type input and output port counts. More...
 
bool isLikelyImageGenerator (void)
 Returns true if this node class is likely an image generator, based on its image-type input and output port counts. More...
 
bool isLikelyImageTransition (void)
 Returns true if this node class is likely an image transition, based on its image-type input and output port counts. More...
 
int getImagePortCount (bool isInput)
 Returns the number of image-type input or output ports belonging to this node class. More...
 
virtual bool isStateful (void)
 Returns true if this node class is stateful (implements nodeInstance* functions instead of nodeEvent). More...
 
bool isSubcomposition (void)
 Returns true if this node class is a subcomposition (implemented in Vuo language, as opposed to text code). More...
 
bool isIsf (void)
 Returns true if this node class is implemented in ISF text code. More...
 
void setSourcePath (const string &sourcePath)
 Stores the path of the source file for this node class. More...
 
string getSourcePath (void)
 Returns the stored path of the source file for this node class. More...
 
void setSourceCode (const string &sourceCode)
 Stores the source code for this node class. More...
 
string getSourceCode (void)
 Returns the stored source code for this node class. More...
 
set< pair< string, string > > getContainedNodes (void)
 Returns the nodes (node identifier and node class name) contained within this subcomposition. More...
 
- Public Member Functions inherited from VuoBaseDetail< VuoNodeClass >
 VuoBaseDetail (string description, VuoNodeClass *base)
 Creates a detail class. More...
 
VuoNodeClassgetBase (void) const
 Returns the detail class instance's base class instance. More...
 
void setBase (VuoNodeClass *base)
 Sets the detail class instance's base class instance. More...
 
- Public Member Functions inherited from VuoCompilerModule
virtual ~VuoCompilerModule (void)
 Destructor. More...
 
VuoCompilerCompatibility parseCompatibility (json_object *o, string key)
 Parses the target set value for key in the top level of the JSON object. More...
 
virtual set< string > getDependencies (void)
 Returns a list of this VuoCompilerModule's dependencies. More...
 
virtual string getDependencyName (void)
 Returns the name that would represent this VuoCompilerModule in another VuoCompilerModule's list of dependencies. More...
 
VuoCompilerCompatibility getCompatibleTargets (void)
 Returns the set of targets (operating system versions) with which this module is compatible. More...
 
Module * getModule (void)
 Returns this VuoCompilerModule's LLVM module, which other LLVM modules can link to. More...
 
VuoModulegetPseudoBase (void)
 Returns the (pseudo) base for this (pseudo) compiler detail class. More...
 
bool isBuiltIn (void)
 Returns true if this module is one of the built-in modules distributed with Vuo. More...
 
void setBuiltIn (bool builtIn)
 Sets whether this module is one of the built-in modules distributed with Vuo. More...
 
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. More...
 

Static Public Member Functions

static VuoNodeClassnewNodeClass (string nodeClassName, VuoCompiler *compiler, dispatch_queue_t llvmQueue)
 Returns a new node class with port names and types as specified by nodeClassName, or null if nodeClassName is not a valid published output node class name. More...
 
static VuoNodeClassnewNodeClass (vector< VuoPublishedPort * > publishedOutputPorts, dispatch_queue_t llvmQueue=nullptr)
 Returns a new node class with port names and types corresponding to publishedOutputPorts. More...
 
static string buildNodeClassName (const vector< VuoPublishedPort * > &publishedOutputPorts)
 Creates a class name for a published output node with the given published output ports. More...
 
- Static Public Member Functions inherited from VuoCompilerSpecializedNodeClass
static bool hasGenericPortTypes (VuoCompilerNodeClass *nodeClass)
 Returns true if the node class has at least one unspecialized generic type. More...
 
static VuoNodeClassnewNodeClass (const string &nodeClassName, VuoCompiler *compiler, dispatch_queue_t llvmQueue)
 Generates a specalized node class from a generic node class. More...
 
static VuoCompilerNodeClassgetNodeClassForNode (VuoCompilerNodeClass *origNodeClass, VuoCompiler *compiler)
 Returns the node class to use for instantiating a node within a composition. More...
 
static bool isSpecializationOfNodeClass (const string &potentialSpecializedNodeClassName, VuoCompilerNodeClass *potentialGenericNodeClass)
 Returns true if potentialSpecializedNodeClassName is one of the possible specializations of potentialGenericNodeClass. More...
 
static void replaceGenericTypesWithBacking (string &nodeClassSource)
 Replaces all occurrences of generic type names in the node class source code with a default actual type name. More...
 
- Static Public Member Functions inherited from VuoCompilerNodeClass
static VuoNodeClassnewNodeClass (string nodeClassName, Module *module)
 Creates a new substantial VuoNodeClass from the node class definition in the module. More...
 
static VuoNodeClassnewNodeClassWithoutImplementation (VuoNodeClass *baseNodeClass)
 Creates a new implementation-less compiler node class, using the given node class for its base VuoNodeClass. More...
 
- Static Public Member Functions inherited from VuoCompilerModule
static VuoCompilerModulenewModule (const string &moduleKey, Module *module, const string &modulePath, const VuoCompilerCompatibility &moduleCompatibility)
 Instantiates a VuoCompilerModule (or child class) corresponding to the type of VuoCompilerModule defined in the LLVM module. More...
 
static Function * declareFunctionInModule (Module *module, Function *function)
 Copies the function's header into the LLVM module, if it's not already there. More...
 

Additional Inherited Members

- Protected Member Functions inherited from VuoCompilerPublishedNodeClass
 VuoCompilerPublishedNodeClass (string nodeClassName, Module *module)
 Creates a node class implementation from an LLVM module, and creates its corresponding base VuoNodeClass. More...
 
 VuoCompilerPublishedNodeClass (VuoCompilerPublishedNodeClass *compilerNodeClass)
 Creates a new compiler node class and a new base VuoNodeClass, both from compilerNodeClass. More...
 
 VuoCompilerPublishedNodeClass (VuoNodeClass *baseNodeClass)
 Creates a new implementation-less compiler node class, using the given node class for its base VuoNodeClass. More...
 
virtual VuoNodeClassnewNodeClassWithImplementation (const string &nodeClassName, const vector< string > &portNames, const vector< VuoType * > &types)=0
 Returns a node class with generated code in an LLVM module. More...
 
virtual VuoNodeClassnewNodeClassWithoutImplementation (const string &nodeClassName, const vector< string > &portNames, const vector< VuoType * > &types)=0
 Returns a node class without generated code. More...
 
virtual string getNodeClassNamePrefix (void)=0
 Returns the prefix that appears in any generic or specialized node class name for the node class. More...
 
virtual set< string > getReservedPortNames (void)=0
 Returns the names of input port classes that are added automatically to all published input/output node classes. More...
 
bool parseNodeClassName (string nodeClassName, vector< string > &portNames, vector< string > &typeNames) VuoWarnUnusedResult
 If nodeClassName is a valid published input/output node class name, copies the port names and types from the node class name into portNames and typeNames and returns true. More...
 
string buildNodeClassName (const vector< string > &portNames, const vector< VuoType * > &types)
 Creates a class name for a published input/output node with the given published input/output port names and types. More...
 
string buildNodeClassNameFromPorts (const vector< VuoPublishedPort * > &publishedPorts)
 Creates a class name for a published input/output node with the given published input/output ports. More...
 
vector< string > formUniquePortNames (const vector< VuoPublishedPort * > &publishedPorts)
 Returns the list of input port names that a published input/output node would have corresponding to publishedPorts. More...
 
VuoCompilerNodecreateReplacementBackingNode (VuoNode *nodeToBack, string backingNodeClassName, VuoCompiler *compiler)
 Returns a fully specialized node of class backingNodeClassName that will replace the node class of nodeToBack. More...
 
VuoTypegetOriginalPortType (VuoPortClass *portClass)
 Returns this port's type in the (hypothetical) unspecialized published input node class. More...
 
string getOriginalGenericNodeClassName (void)
 Returns the original node's class name (without any type suffixes). More...
 
string getOriginalGenericNodeClassDescription (void)
 Returns the original node's class description (i.e., nothing). More...
 
VuoNodeSetgetOriginalGenericNodeSet (void)
 Returns the original node's node set (i.e., none). More...
 
string createUnspecializedNodeClassName (set< VuoPortClass * > portClassesToUnspecialize)
 Returns the name for the published input node class that would result if the given ports were changed back to their original types. More...
 
string createSpecializedNodeClassNameWithReplacement (string genericTypeName, string specializedTypeName)
 Returns the name for the published input node class that would result if the given specialized type were substituted for the generic item type. More...
 
- Protected Member Functions inherited from VuoCompilerSpecializedNodeClass
 VuoCompilerSpecializedNodeClass (string nodeClassName, Module *module)
 Creates a specialized node class implementation from an LLVM module, and creates its corresponding base VuoNodeClass. More...
 
 VuoCompilerSpecializedNodeClass (VuoCompilerSpecializedNodeClass *compilerNodeClass)
 Creates a new compiler node class and creates a new base VuoNodeClass, both from compilerNodeClass. More...
 
 VuoCompilerSpecializedNodeClass (VuoNodeClass *baseNodeClass)
 Creates a new implementation-less compiler node class, using the given node class for its base VuoNodeClass. More...
 
- Protected Member Functions inherited from VuoCompilerNodeClass
 VuoCompilerNodeClass (string className, Module *module)
 Creates a node class implementation from an LLVM module, and creates its corresponding base VuoNodeClass. More...
 
 VuoCompilerNodeClass (VuoCompilerNodeClass *compilerNodeClass)
 Creates a new compiler node class and creates a new base VuoNodeClass, both from compilerNodeClass. More...
 
 VuoCompilerNodeClass (VuoNodeClass *baseNodeClass)
 Creates a new implementation-less compiler node class, using the given node class for its base VuoNodeClass. More...
 
VuoPortClassgetInputPortClassWithName (string portName)
 Returns the input port class matching the specified portName, if one exists. More...
 
VuoPortClassgetOutputPortClassWithName (string portName)
 Returns the output port class matching the specified portName, if one exists. More...
 
- 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. More...
 
virtual void parse (void)
 Renames globals in the LLVM module that might conflict with other VuoCompilerModules, and parses those globals. More...
 
virtual void parseMetadata (void)
 Parses the metadata of this VuoCompilerModule (name, description, ...) from the LLVM module. More...
 
virtual set< string > globalsToRename (void)
 Returns a list of global variables and functions that may be defined in multiple modules, and thus need to be renamed. More...
 
string nameForGlobal (string genericGlobalVarOrFuncName)
 Returns the mangled name for a function or global variable. More...
 
void renameGlobalVarsAndFuncs (void)
 Renames the global variables and functions within the LLVM module so that they are unique to this VuoCompilerModule. More...
 
- Static Protected Member Functions inherited from VuoCompilerPublishedNodeClass
static VuoNodeClassnewNodeClass (const string &nodeClassName, VuoCompiler *compiler, dispatch_queue_t llvmQueue, VuoCompilerPublishedNodeClass *singleton)
 Returns a new node class with port names and types as specified by nodeClassName, or null if nodeClassName is not a valid published input/output node class name. More...
 
static VuoNodeClassnewNodeClass (const vector< VuoPublishedPort * > &publishedPorts, dispatch_queue_t llvmQueue, VuoCompilerPublishedNodeClass *singleton)
 Returns a new node class with port names and types corresponding to publishedPorts. More...
 
- Static Protected Member Functions inherited from VuoCompilerSpecializedNodeClass
static VuoPortClasscopyPortClassFromModel (VuoPortClass *modelPortClass, bool isInput)
 Creates a new port class (base + compiler detail) with properties copied from modelPortClass (base + compiler detail). More...
 
- Static Protected Member Functions inherited from VuoCompilerNodeClass
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. More...
 
- Static Protected Member Functions inherited from VuoCompilerModule
static string nameForGlobal (string nameBeforeCompilation, string moduleKey)
 Returns the mangled name for a function or global variable. More...
 
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. More...
 
- Protected Attributes inherited from VuoCompilerSpecializedNodeClass
map< string, string > specializedForGenericTypeName
 The type name that replaces each generic type name in the original generic node class. More...
 
- Protected Attributes inherited from VuoCompilerNodeClass
map< string, string > defaultSpecializedForGenericTypeName
 If this node class is generic, use these specialized types when creating an instance. More...
 
- Protected Attributes inherited from VuoCompilerModule
struct json_objectmoduleDetails
 This module's metadata, found in the argument to VuoModuleMetadata in the module definition. More...
 
set< string > dependencies
 The dependencies found in this module's metadata. More...
 
VuoCompilerCompatibility compatibleTargets
 The set of targets with which this module is compatible. More...
 
Module * module
 The LLVM module that defines this node class or type. More...
 
VuoCompilerBitcodeParserparser
 The parser of the LLVM module. More...
 

Member Function Documentation

◆ buildNodeClassName()

string VuoCompilerPublishedOutputNodeClass::buildNodeClassName ( const vector< VuoPublishedPort * > &  publishedOutputPorts)
static

Creates a class name for a published output node with the given published output ports.

Definition at line 195 of file VuoCompilerPublishedOutputNodeClass.cc.

◆ getGatherInputPortIndex()

size_t VuoCompilerPublishedOutputNodeClass::getGatherInputPortIndex ( void  )

Returns the index of the input port on this node class that is intended for gathering events.

Definition at line 187 of file VuoCompilerPublishedOutputNodeClass.cc.

◆ getInputPortIndexForPublishedOutputPort()

size_t VuoCompilerPublishedOutputNodeClass::getInputPortIndexForPublishedOutputPort ( size_t  publishedOutputPortIndex)

Returns the index of the input port on this node class that corresponds to the published output port.

Definition at line 179 of file VuoCompilerPublishedOutputNodeClass.cc.

◆ newNodeClass() [1/2]

VuoNodeClass * VuoCompilerPublishedOutputNodeClass::newNodeClass ( string  nodeClassName,
VuoCompiler compiler,
dispatch_queue_t  llvmQueue 
)
static

Returns a new node class with port names and types as specified by nodeClassName, or null if nodeClassName is not a valid published output node class name.

Definition at line 67 of file VuoCompilerPublishedOutputNodeClass.cc.

◆ newNodeClass() [2/2]

VuoNodeClass * VuoCompilerPublishedOutputNodeClass::newNodeClass ( vector< VuoPublishedPort * >  publishedOutputPorts,
dispatch_queue_t  llvmQueue = nullptr 
)
static

Returns a new node class with port names and types corresponding to publishedOutputPorts.

Definition at line 75 of file VuoCompilerPublishedOutputNodeClass.cc.


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