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

Description

A passive (non-trigger) port, optionally with data.

Definition at line 20 of file VuoCompilerEventPort.hh.

Public Member Functions

Value * generateCreatePortContext (Module *module, BasicBlock *block)
 Generates code to create a heap-allocated PortContext. More...
 
Value * generateLoadEvent (Module *module, BasicBlock *block, Value *nodeContextValue, Value *portContextValue=NULL)
 Generates code to get the current event value for this port. More...
 
void generateStoreEvent (Module *module, BasicBlock *block, Value *nodeContextValue, Value *eventValue, Value *portContextValue=NULL)
 Generates code to update the event value for this port. More...
 
void generateStoreEvent (Module *module, BasicBlock *block, Value *nodeContextValue, bool event, Value *portContextValue=NULL)
 Generates code to update the event value for this port. More...
 
Value * generateLoadData (Module *module, BasicBlock *block, Value *nodeContextValue, Value *portContextValue=NULL)
 Generates code to get the current data value for this port. More...
 
void generateStoreData (Module *module, BasicBlock *block, Value *nodeContextValue, Value *dataValue)
 Generates code to update the data value for this port. More...
 
void generateReplaceData (Module *module, BasicBlock *block, Value *nodeContextValue, Value *dataValue, Value *portContextValue=NULL)
 Generates code to update the data value for this port, handling the memory management for replacing the old data value. More...
 
virtual VuoCompilerDatagetData (void)=0
 Returns this port's data, or NULL if none. More...
 
VuoCompilerTypegetDataType (void)
 Returns the type of this port's data, or NULL if none. More...
 
- Public Member Functions inherited from VuoCompilerPort
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...
 
- 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

 VuoCompilerEventPort (VuoPort *basePort)
 Creates a passive (non-trigger) port from the specified portClass. More...
 
- Protected Member Functions inherited from VuoCompilerPort
 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

VuoCompilerDatadata
 Optional data stored in this port. More...
 
- Protected Attributes inherited from VuoCompilerPort
VuoCompilerConstantStringCacheconstantStrings
 Cache used to generate constant string values. More...
 

Constructor & Destructor Documentation

◆ VuoCompilerEventPort()

VuoCompilerEventPort::VuoCompilerEventPort ( VuoPort basePort)
protected

Creates a passive (non-trigger) port from the specified portClass.

Definition at line 22 of file VuoCompilerEventPort.cc.

Member Function Documentation

◆ generateCreatePortContext()

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

Generates code to create a heap-allocated PortContext.

Returns
A value of type PortContext *.

Implements VuoCompilerPort.

Definition at line 36 of file VuoCompilerEventPort.cc.

◆ generateLoadData()

Value * VuoCompilerEventPort::generateLoadData ( Module *  module,
BasicBlock *  block,
Value *  nodeContextValue,
Value *  portContextValue = NULL 
)

Generates code to get the current data value for this port.

Definition at line 85 of file VuoCompilerEventPort.cc.

◆ generateLoadEvent()

Value * VuoCompilerEventPort::generateLoadEvent ( Module *  module,
BasicBlock *  block,
Value *  nodeContextValue,
Value *  portContextValue = NULL 
)

Generates code to get the current event value for this port.

Returns
A value of type i1 (1-bit integer).

Definition at line 48 of file VuoCompilerEventPort.cc.

◆ generateReplaceData()

void VuoCompilerEventPort::generateReplaceData ( Module *  module,
BasicBlock *  block,
Value *  nodeContextValue,
Value *  dataValue,
Value *  portContextValue = NULL 
)

Generates code to update the data value for this port, handling the memory management for replacing the old data value.

Definition at line 104 of file VuoCompilerEventPort.cc.

◆ generateStoreData()

void VuoCompilerEventPort::generateStoreData ( Module *  module,
BasicBlock *  block,
Value *  nodeContextValue,
Value *  dataValue 
)

Generates code to update the data value for this port.

Definition at line 95 of file VuoCompilerEventPort.cc.

◆ generateStoreEvent() [1/2]

void VuoCompilerEventPort::generateStoreEvent ( Module *  module,
BasicBlock *  block,
Value *  nodeContextValue,
bool  event,
Value *  portContextValue = NULL 
)

Generates code to update the event value for this port.

Definition at line 74 of file VuoCompilerEventPort.cc.

◆ generateStoreEvent() [2/2]

void VuoCompilerEventPort::generateStoreEvent ( Module *  module,
BasicBlock *  block,
Value *  nodeContextValue,
Value *  eventValue,
Value *  portContextValue = NULL 
)

Generates code to update the event value for this port.

Definition at line 59 of file VuoCompilerEventPort.cc.

◆ getData()

virtual VuoCompilerData* VuoCompilerEventPort::getData ( void  )
pure virtual

Returns this port's data, or NULL if none.

Implemented in VuoCompilerOutputEventPort, and VuoCompilerInputEventPort.

◆ getDataType()

VuoCompilerType * VuoCompilerEventPort::getDataType ( void  )

Returns the type of this port's data, or NULL if none.

Definition at line 120 of file VuoCompilerEventPort.cc.

Member Data Documentation

◆ data

VuoCompilerData* VuoCompilerEventPort::data
protected

Optional data stored in this port.

Definition at line 39 of file VuoCompilerEventPort.hh.


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