x4Trace Documentation v1.0
Loading...
Searching...
No Matches
FlowLib.Engine.Block Class Reference

Represents a block of flow. The block is a function element of flow. Blocks have connections with each other. More...

Public Member Functions

 Block (int id)
 Constructor.
 
void SetDescriptor (BlockDescriptor blockDescriptor)
 Sets the block by descriptor.
 
void SetByBlock (Block blockOriginal)
 Sets the block by another.
 
Port GetInputPort (int number)
 Returns the input port by number.
 
Port GetOutputPort (int number)
 Returns output port by number.
 
Port GetOutputPortByType (string portKey)
 Returns output port by type.
 
Port AddInputPort ()
 Adds a new input port.
 
Port AddInputPort (object tag)
 Adds a new input port.
 
Port AddOutputPort ()
 Adds a new output port.
 
Port AddOutputPort (object tag)
 Adds a new output port.
 
int GetMaxInputPort ()
 Returns the max ID of all input ports.
 
int GetMaxOutputPort ()
 Returns the max ID of all output ports.
 

Properties

int ID [get]
 ID of the block.
 
string ForeignID [get, set]
 Foreign ID of block. Descriptor ID.
 
string Name [get, set]
 Name of the block.
 
float GuiX [get, set]
 X coordinate of block.
 
float GuiY [get, set]
 Y coordinate of block.
 
List< PortInputList [get]
 Port list of input.
 
List< PortOutputList [get]
 Port list of output.
 
IBlockAgency BlockAgency [get, set]
 Agency of block. Responsible for operations.
 
int OrderIndex [get, set]
 Index of order/sort.
 

Private Attributes

int id = 0
 ID of the block.
 
string name = ""
 Name of the block.
 
string foreignID = ""
 Foreign ID of block. Descriptor ID.
 
float guiX = 0
 X coordinate of block.
 
float guiY = 0
 Y coordinate of block.
 
List< PortinputList
 Port list of input.
 
List< PortoutputList
 Port list of output.
 
IBlockAgency blockAgency
 Agency of block. Responsible for operations.
 
int orderIndex
 Index of order/sort.
 

Detailed Description

Represents a block of flow. The block is a function element of flow. Blocks have connections with each other.

Constructor & Destructor Documentation

◆ Block()

FlowLib.Engine.Block.Block ( int id)

Constructor.

Parameters
idID of block.

Member Function Documentation

◆ AddInputPort() [1/2]

Port FlowLib.Engine.Block.AddInputPort ( )

Adds a new input port.

Returns
The port.

◆ AddInputPort() [2/2]

Port FlowLib.Engine.Block.AddInputPort ( object tag)

Adds a new input port.

Parameters
tagTag of port.
Returns
The port.

◆ AddOutputPort() [1/2]

Port FlowLib.Engine.Block.AddOutputPort ( )

Adds a new output port.

Returns
The port.

◆ AddOutputPort() [2/2]

Port FlowLib.Engine.Block.AddOutputPort ( object tag)

Adds a new output port.

Parameters
tagTag of port.
Returns
The port.

◆ GetInputPort()

Port FlowLib.Engine.Block.GetInputPort ( int number)

Returns the input port by number.

Parameters
numberNumber of port.
Returns
The port.

◆ GetMaxInputPort()

int FlowLib.Engine.Block.GetMaxInputPort ( )

Returns the max ID of all input ports.

Returns
Max ID.

◆ GetMaxOutputPort()

int FlowLib.Engine.Block.GetMaxOutputPort ( )

Returns the max ID of all output ports.

Returns
Max ID.

◆ GetOutputPort()

Port FlowLib.Engine.Block.GetOutputPort ( int number)

Returns output port by number.

Parameters
numberNumber of port.
Returns
The port.

◆ GetOutputPortByType()

Port FlowLib.Engine.Block.GetOutputPortByType ( string portKey)

Returns output port by type.

Parameters
portKeyType key of port.
Returns
The port.

◆ SetByBlock()

void FlowLib.Engine.Block.SetByBlock ( Block blockOriginal)

Sets the block by another.

Parameters
blockOriginalThe original block.

◆ SetDescriptor()

void FlowLib.Engine.Block.SetDescriptor ( BlockDescriptor blockDescriptor)

Sets the block by descriptor.

Parameters
blockDescriptorDescriptor of block.

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