A "Make List" node class.
Definition at line 19 of file VuoCompilerMakeListNodeClass.hh.
Public Member Functions | |
unsigned long | getItemCount (void) |
Returns the number of item input ports for this "Make List" node class. More... | |
VuoCompilerType * | getListType (void) |
Returns the type of the list output port for this "Make List" node class. More... | |
VuoType * | getOriginalPortType (VuoPortClass *portClass) |
Returns this port's type in the (hypothetical) unspecialized Make List 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. More... | |
VuoNodeSet * | getOriginalGenericNodeSet (void) |
Returns the original node's node set. More... | |
string | createUnspecializedNodeClassName (set< VuoPortClass * > portClassesToUnspecialize) |
Returns the name for the Make List node class that would result if the given port were changed back to its original type. More... | |
string | createSpecializedNodeClassNameWithReplacement (string genericTypeName, string specializedTypeName) |
Returns the name for the Make List node class that would result if the given specialized type were substituted for the generic item type. 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 VuoCompilerNode * | createReplacementBackingNode (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... | |
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 | |
VuoNode * | newNode (string title="", double x=0, double y=0) |
Creates a substantial base node instance from this node class. More... | |
VuoNode * | newNode (VuoNode *nodeToCopyMetadataFrom) |
Creates a substantial base node instance with its metadata copied from the existing nodeToCopyMetadataFrom . More... | |
virtual | ~VuoCompilerNodeClass (void) |
Destructor. 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... | |
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... | |
VuoNodeClass * | getBase (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... | |
VuoCompilerTargetSet | parseTargetSet (json_object *o, string key) |
Parses the target set value for key in the top level of the JSON object. More... | |
VuoCompilerTargetSet::MacVersion | parseMacVersion (string version) |
Parses a Mac OS version from a string. More... | |
VuoCompilerTargetSet | 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... | |
VuoModule * | getPseudoBase (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 VuoNodeClass * | newNodeClass (string nodeClassName, VuoCompiler *compiler, dispatch_queue_t llvmQueue) |
Generates a node class for a "Make List" node. More... | |
static bool | isMakeListNodeClassName (string nodeClassName) |
Returns true if the name has the format of a "Make List" node class name. More... | |
static string | getNodeClassName (unsigned long itemCount, VuoCompilerType *listType) |
Returns the name that a "Make List" node class would have if it were to input the given number of items and output the given type of list. More... | |
static string | buildNodeClassName (unsigned long itemCount, string itemTypeName) |
Creates a "Make List" node class name from the item count and type. 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 VuoNodeClass * | newNodeClass (const string &nodeClassName, VuoCompiler *compiler, dispatch_queue_t llvmQueue) |
Generates a specalized node class from a generic node class. More... | |
static VuoCompilerNodeClass * | getNodeClassForNode (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 VuoNodeClass * | newNodeClass (string nodeClassName, Module *module) |
Creates a new substantial VuoNodeClass from the node class definition in the module. More... | |
static VuoNodeClass * | newNodeClassWithoutImplementation (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 VuoCompilerModule * | newModule (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. 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 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... | |
VuoPortClass * | getInputPortClassWithName (string portName) |
Returns the input port class matching the specified portName , if one exists. More... | |
VuoPortClass * | getOutputPortClassWithName (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... | |
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 VuoCompilerSpecializedNodeClass | |
static VuoPortClass * | copyPortClassFromModel (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_object * | moduleDetails |
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... | |
Module * | module |
The LLVM module that defines this node class or type. More... | |
VuoCompilerBitcodeParser * | parser |
The parser of the LLVM module. More... | |
|
static |
Creates a "Make List" node class name from the item count and type.
Definition at line 335 of file VuoCompilerMakeListNodeClass.cc.
|
virtual |
Returns the name for the Make List node class that would result if the given specialized type were substituted for the generic item type.
Reimplemented from VuoCompilerSpecializedNodeClass.
Definition at line 417 of file VuoCompilerMakeListNodeClass.cc.
|
virtual |
Returns the name for the Make List node class that would result if the given port were changed back to its original type.
Reimplemented from VuoCompilerSpecializedNodeClass.
Definition at line 400 of file VuoCompilerMakeListNodeClass.cc.
unsigned long VuoCompilerMakeListNodeClass::getItemCount | ( | void | ) |
Returns the number of item input ports for this "Make List" node class.
Definition at line 347 of file VuoCompilerMakeListNodeClass.cc.
VuoCompilerType * VuoCompilerMakeListNodeClass::getListType | ( | void | ) |
Returns the type of the list output port for this "Make List" node class.
Definition at line 355 of file VuoCompilerMakeListNodeClass.cc.
|
static |
Returns the name that a "Make List" node class would have if it were to input the given number of items and output the given type of list.
Definition at line 308 of file VuoCompilerMakeListNodeClass.cc.
|
virtual |
Returns the original node's class description.
Reimplemented from VuoCompilerSpecializedNodeClass.
Definition at line 383 of file VuoCompilerMakeListNodeClass.cc.
|
virtual |
Returns the original node's class name (without any type suffixes).
Reimplemented from VuoCompilerSpecializedNodeClass.
Definition at line 375 of file VuoCompilerMakeListNodeClass.cc.
|
virtual |
Returns the original node's node set.
Reimplemented from VuoCompilerSpecializedNodeClass.
Definition at line 391 of file VuoCompilerMakeListNodeClass.cc.
|
virtual |
Returns this port's type in the (hypothetical) unspecialized Make List node class.
Reimplemented from VuoCompilerSpecializedNodeClass.
Definition at line 363 of file VuoCompilerMakeListNodeClass.cc.
|
static |
Returns true if the name has the format of a "Make List" node class name.
(A "Make List" node class by that name may or may not exist.)
Definition at line 299 of file VuoCompilerMakeListNodeClass.cc.
|
static |
Generates a node class for a "Make List" node.
The node class's event function inputs zero or more items and outputs a list of those items.
nodeClassName | The name of the node class to generate. It should have the format "vuo.list.make.<item count>.<item type>" (e.g. "vuo.list.make.3.VuoInteger"). |
compiler | The compiler to use for looking up types. |
llvmQueue | Synchronizes access to LLVM's global context. |
Definition at line 81 of file VuoCompilerMakeListNodeClass.cc.