Vuo  2.0.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
VuoCompilerPort Class Referenceabstract

Description

A port.

Definition at line 21 of file VuoCompilerPort.hh.

Public Member Functions

bool hasConnectedCable (void) const
 Returns a boolean indicating whether this port has any attached cables. More...
 
bool hasConnectedDataCable (void) const
 Returns a boolean indicating whether this port has any attached data+event cables. More...
 
VuoTypegetDataVuoType (void)
 Returns this port's data type, or null if this port is event-only. More...
 
void setDataVuoType (VuoType *dataType)
 Sets the data type for this port, overriding the type from the port class. More...
 
void setNodeIdentifier (string nodeIdentifier)
 Sets an identifier that will be part of the string returned by getIdentifier(). More...
 
virtual string getIdentifier (void)
 Returns a unique, consistent identifier for this port. More...
 
void setIndexInPortContexts (int indexInPortContexts)
 Sets the index of this node within the array of port contexts within the node context. More...
 
int getIndexInPortContexts (void)
 Returns the index of this node within the array of port contexts within the node context. More...
 
void setConstantStringCache (VuoCompilerConstantStringCache *constantStrings)
 Sets the cache used to generate constant string values. More...
 
Value * getDataVariable (Module *module, BasicBlock *block, Value *nodeContextValue)
 Returns the address of the data field within this port's context. More...
 
Value * generateGetPortContext (Module *module, BasicBlock *block, Value *nodeContextValue)
 Returns this port's context. More...
 
virtual Value * generateCreatePortContext (Module *module, BasicBlock *block)=0
 Generates code that creates a PortContext * and initializes it for this port. More...
 
- Public Member Functions inherited from VuoCompilerNodeArgument
virtual ~VuoCompilerNodeArgument (void)
 Destructor. More...
 
- Public Member Functions inherited from VuoBaseDetail< VuoPort >
 VuoBaseDetail (string description, VuoPort *base)
 Creates a detail class. More...
 
VuoPortgetBase (void) const
 Returns the detail class instance's base class instance. More...
 
void setBase (VuoPort *base)
 Sets the detail class instance's base class instance. More...
 

Protected Member Functions

 VuoCompilerPort (VuoPort *basePort)
 Creates a compiler detail from a given basePort. More...
 
- Protected Member Functions inherited from VuoCompilerNodeArgument
 VuoCompilerNodeArgument (VuoPort *basePort)
 Creates an argument instance based on the specified argumentClass. More...
 

Protected Attributes

VuoCompilerConstantStringCacheconstantStrings
 Cache used to generate constant string values. More...
 

Constructor & Destructor Documentation

◆ VuoCompilerPort()

VuoCompilerPort::VuoCompilerPort ( VuoPort basePort)
protected

Creates a compiler detail from a given basePort.

Definition at line 24 of file VuoCompilerPort.cc.

Member Function Documentation

◆ generateCreatePortContext()

virtual Value* VuoCompilerPort::generateCreatePortContext ( Module *  module,
BasicBlock *  block 
)
pure virtual

Generates code that creates a PortContext * and initializes it for this port.

Implemented in VuoCompilerPublishedPort, VuoCompilerTriggerPort, and VuoCompilerEventPort.

◆ generateGetPortContext()

Value * VuoCompilerPort::generateGetPortContext ( Module *  module,
BasicBlock *  block,
Value *  nodeContextValue 
)

Returns this port's context.

Definition at line 134 of file VuoCompilerPort.cc.

◆ getDataVariable()

Value * VuoCompilerPort::getDataVariable ( Module *  module,
BasicBlock *  block,
Value *  nodeContextValue 
)

Returns the address of the data field within this port's context.

Definition at line 125 of file VuoCompilerPort.cc.

◆ getDataVuoType()

VuoType * VuoCompilerPort::getDataVuoType ( void  )

Returns this port's data type, or null if this port is event-only.

If setDataVuoType() has been called, returns that type. Otherwise returns the type from the port class.

Definition at line 57 of file VuoCompilerPort.cc.

◆ getIdentifier()

string VuoCompilerPort::getIdentifier ( void  )
virtual

Returns a unique, consistent identifier for this port.

This needs to be kept consistent with runtime function vuoReplacePortData().

Reimplemented in VuoCompilerPublishedPort.

Definition at line 90 of file VuoCompilerPort.cc.

◆ getIndexInPortContexts()

int VuoCompilerPort::getIndexInPortContexts ( void  )

Returns the index of this node within the array of port contexts within the node context.

Definition at line 109 of file VuoCompilerPort.cc.

◆ hasConnectedCable()

bool VuoCompilerPort::hasConnectedCable ( void  ) const

Returns a boolean indicating whether this port has any attached cables.

Definition at line 35 of file VuoCompilerPort.cc.

◆ hasConnectedDataCable()

bool VuoCompilerPort::hasConnectedDataCable ( void  ) const

Returns a boolean indicating whether this port has any attached data+event cables.

Definition at line 43 of file VuoCompilerPort.cc.

◆ setConstantStringCache()

void VuoCompilerPort::setConstantStringCache ( VuoCompilerConstantStringCache constantStrings)

Sets the cache used to generate constant string values.

This must be called before generating bitcode.

Definition at line 117 of file VuoCompilerPort.cc.

◆ setDataVuoType()

void VuoCompilerPort::setDataVuoType ( VuoType dataType)

Sets the data type for this port, overriding the type from the port class.

Definition at line 72 of file VuoCompilerPort.cc.

◆ setIndexInPortContexts()

void VuoCompilerPort::setIndexInPortContexts ( int  indexInPortContexts)

Sets the index of this node within the array of port contexts within the node context.

Definition at line 101 of file VuoCompilerPort.cc.

◆ setNodeIdentifier()

void VuoCompilerPort::setNodeIdentifier ( string  nodeIdentifier)

Sets an identifier that will be part of the string returned by getIdentifier().

Definition at line 80 of file VuoCompilerPort.cc.

Member Data Documentation

◆ constantStrings

VuoCompilerConstantStringCache* VuoCompilerPort::constantStrings
protected

Cache used to generate constant string values.

Definition at line 44 of file VuoCompilerPort.hh.


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