Stars in the SR domain have input and output ports, much like they do in other domains. However, primarly because absent events are different from undefined ones, the interface to these ports are unique.
Because SR domain ports are unbuffered, output ports can be read just like input ports. It is often convenient to do this when checking to see whether the value on an output port is already correct and does not need to be changed.
int SRPortHole::known()
Return TRUE
when the value in the port is is known.
int SRPortHole::present()
Return TRUE
when the value in the port is present.
int SRPortHole::absent()
Return TRUE
when the value in the port is absent.
Particle & InSRPort::get()
Return the particle in the port. This should only be called when present()
returns TRUE
.
Particle & OutSRPort::emit()
Force the value on the output port to be present and return a reference to the output particle.
void OutSRPort::makeAbsent()
Force the value on the output port to be absent.