void connect(Signal& in, int slot = NONE); void connect(Signal* in, int slot = NONE);
Connects an input signal to the object in the assigned slot in
the input array. Derived classes will define how many slots are
used and what sort of signal goes into each input index.
void connect(sampleType aDefault, int slot = NONE);
Sets the default value of inputs[slot] if no signal is
connected at slot.
Signal* disconnect(int slot);
Disconnects any signal connected at slot. Returns a pointer to the signal
that was removed, NULL if no signal.
int disconnect(Signal& toRemove); int disconnect(Signal* toRemove);
Disconnect first occurrence of any signal toRemove in the inputs.
Return true (1) is a signal was removed, false (0) otherwise.
void printConnections(int flag = 0);
Prints to standard error the names of the input signals to the
object. Can recursively print connections, as well as print the
state of the object. Note that an infinite loop will occur if signals
are connected into a loop.
possible values for flag:
0 = print connections only
1 = print connections recursively
2 = print connections only, plus call printState()
3 = print connections recursively, plus call printState()
void tick(int newTickNumber);
If newTickNumber is different than the previous tick number, then
action() will be called after all input signals are ticked. Initial
value of tick is MAX_INT. Note that circularly connected signals
will not be ticked in an infinite loop, but will only be ticked
once for each tick number.