KnownBlock::makeNew("Fork"),
which works only for domains that have a fork star.
setSource
and setDest.
PortHole* setSource(GenericPort& port, int delay = 0);If there is already an originating port for the geodesic, this method returns an error. Otherwise it connects it to the node.
PortHole* setDest(GenericPort& port, int alwaysFork = 0);This function may be used to add any number of destinations to the port. Normally, when there is more than one output, a Fork star is created and inserted to support the multi-way connection, but if there is only one output, a direct connection is used. However, if
alwaysFork
is true, a Fork is inserted even for the first output. When the fork star is created, it is inserted in the block list for the parent galaxy (the parent of the geodesic).
isItPersistent
to return TRUE
, and redefines the setSourcePort
and setDestPort
functions to call the setSource
and setDest
functions of AutoFork. The exact same form could be used to generate other types of auto-forking nodes (that is, this class could have been done with a template).