Skip to main content

SetSelectPortCount

SelectPortChangeAction

Overview needed


Constructor

public SelectPortChangeAction

new SelectPortChangeAction(obj, target)

Sets the number of select ports on the object.

Parameters

  •  obj: Mux – The object being changed.

  •  target: number – Number of ports.


Properties

No publicly accessible properties on SelectPortChangeAction

protected obj: Mux

Description needed


Methods

protected getPorts

getPorts() => Port[]

Gets selected ports from obj.

Returns

  •   Port[] – Selected ports from obj.

public execute

execute() => Action

This code executes the action by changing the size of the obj based on the target count and then changes the number of input/output Ports based on whether the obj is a Mux or Demux.

Returns

  •   Action – The new obj with the new size and number of ports.

public undo

undo() => Action

This code does the same as execute except it changes the size and number of ports back to the initial number.

Returns

  •   Action – The new object with the initial size and number of ports.

public getName

getName() => string

Description needed

Returns

  •   stringDescription needed

Static Methods

No static methods for SelectPortChangeAction


Functions

SetSelectPortCount

SetSelectPortCount(obj, target) => SelectPortChangeAction

Description needed

Parameters

  •  obj: MuxDescription needed

  •  target: numberDescription needed

Returns

  •   SelectPortChangeActionDescription needed