public class OdgGBlock
extends java.lang.Object
fbw refers a FBlock and fbtw refers a FBtype_FBcl.
fbw is instanceof OdgXref
fbw is instanceof ConnPoint
fbw is instanceof ConnPoint
fbw is instanceof ConnPoint
| Modifier and Type | Field and Description |
|---|---|
(package private) boolean |
bCreatedFBlockPins |
FBkind_FBcl |
eKindBlock
The style designation of the graphic rectangle.
|
OdgGPin |
fbPinDst
It is a pin class for connections from this FB to other FBs or Pins.
|
OdgGPin |
fbPinSrc
It is a pin class for connections from this FB to other FBs or Pins.
|
OdgGPin |
fbPinThis
It is a pin class for connections from this FB to other FBs or Pins.
|
protected FBtype_FBcl |
fbt
The type used here.
|
Write_FBtype_FBwr |
fbtw
The wrapper to write to a
FBtype_FBcl, same instance for all occurrences of the FBlock type (class) in all diagrams. |
java.util.List<Write_FBlock_FBwr> |
fbw
The
FBlock_FBcl representation for the real used data. |
int |
gSequence
Sequence of this GBlock in graphic.
|
java.lang.String |
idGroup |
java.lang.String |
idRectangle |
private java.util.TreeMap<java.lang.Integer,OdgGPin> |
idxPin
List of all pins excl.
|
private java.util.TreeMap<java.lang.String,OdgGPin> |
idxPinByName
List of all pins excl.
|
(package private) int[] |
ixArray
Remain null if it is not an array GBlock, value set from
OdgNameTypeArray.descr. |
int |
ixGraphicOrder
Current index of this instance in
OdgModule.idxAllGBlockByGpos
only for report. |
(package private) java.util.List<java.lang.String> |
listSlices
Set if this describes a sliced FBlock presentation, value set from
OdgNameTypeArray.descr. |
OdgNameTypeArray |
nameTypeArray
Should be always given, final or set with
OdgReader.assignFBlockNameTypeIdCreateFBlock(OdgShape, OdgGBlock, OdgModule) |
OdgModule |
odgMdl
The module where this block is member of.
|
(package private) int |
page
Position of the main shape of the graphic block in mm,
page, left, right, top, bottom, used to find the main frame for other ones.
|
(package private) int |
pcol
column association.
|
java.lang.String |
sClassTypeName
The original given Strings with style ofnClassTypeName and ofnClassObjName
to determine the FBlock_Type_FBcl or FBlock.
|
java.lang.String |
sFrameText
The text to the graphic rectangle, the frame of the element.
|
(package private) java.lang.String |
sName
It is the base name if sliced.
|
java.lang.String |
sPosxy
Info about position manual readable
|
XY_FBcl |
xy
Helper class to sort
OdgGBlock to xy-positions
and to build a position instance (with #fbg ==null) to search pins of the graphic instance |
| Modifier | Constructor and Description |
|---|---|
protected |
OdgGBlock(FBkind_FBcl style,
XY_FBcl pos,
OdgNameTypeArray nameTypeArray,
int page,
OdgModule odgMdl,
LogMessage log)
Constructs.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) FBtype_FBcl |
fbt()
Returns the FBtype_FBcl either from given fbtw for a class block or from the given fbw
|
(package private) OdgGPin |
getCreatePin(OdgGPin src,
PinKind_FBcl kind,
java.lang.String name,
java.lang.String text,
OdgModule odgMdl,
LogMessage log) |
(package private) OdgGPin |
getCreatePin(PinKind_FBcl kind,
DoutTargetCodeAccess accTargetCode,
java.lang.String name,
java.lang.String text,
XY_FBcl xy,
OdgModule odgMdl,
LogMessage log)
Gets or creates a pin on odg level.
|
(package private) OdgGPin |
getCreatePin(java.lang.String id,
XY_FBcl odgxy,
PinKind_FBcl kind,
java.lang.String name,
java.lang.String text,
OdgGBlock fbg,
OdgModule odgMdl,
LogMessage log) |
(package private) OdgGPin |
getCreatePinThis(LogMessage log)
Gets or created the pin port THIS both for use as FBtype GBlock reference as also for FBlock.
|
OdgGPin |
getFbPinDst(OdgModule odgMdl)
|
OdgGPin |
getFbPinSrc(OdgModule odgMdl)
|
OdgGPin |
getFirstPin()
Returns the pin left top to help check the type of the GBlock
|
(package private) OdgGPin |
getPin(java.lang.String name) |
java.lang.Iterable<OdgGPin> |
iterPin() |
java.lang.String |
name() |
static OdgGBlock |
new_OdgGBlock(FBkind_FBcl style,
XY_FBcl pos,
OdgNameTypeArray nameTypeArray,
int page,
OdgModule gMdl)
Constructs a new OdgGBlock and registers it in
OdgModule.idxAllGBlockByGpos. |
boolean |
putPin(OdgGPin pin,
XY_FBcl xyPin,
LogMessage log)
Stores the pin with a proper order built by position.
|
java.lang.String |
toString() |
public java.lang.String idRectangle
public java.lang.String idGroup
public java.lang.String sPosxy
public final XY_FBcl xy
OdgGBlock to xy-positions
and to build a position instance (with #fbg ==null) to search pins of the graphic instance.-public final int gSequence
public int ixGraphicOrder
OdgModule.idxAllGBlockByGpos
only for report.int page
int pcol
public Write_FBtype_FBwr fbtw
FBtype_FBcl, same instance for all occurrences of the FBlock type (class) in all diagrams.
This aggregation is null if the type is given as library or standard FBlock. Then use fbt() to access the type.
fbt set with the FBoper_FBcl type instance.protected FBtype_FBcl fbt
fbtw is set.public final OdgModule odgMdl
public java.util.List<Write_FBlock_FBwr> fbw
FBlock_FBcl representation for the real used data.
For array FBlock handling it is a list of FBlocks. For non array GBlocks only the fbw.get(0) is used.
It is the same instance for all occurrences of the FBlock object in all diagrams.
Also for given FBtype_FBcl in Prj_FBcl.idxAllFBlockType or for standard FBlocks
the adding of Pins may need to be supported, for FBlocks with flexible number of inputs.
Hence generally the FBlock_FBcl are presented by the write_.. wrapper.
Also possible: Adding connections only done in the Write... version (change in future).public FBkind_FBcl eKindBlock
public java.lang.String sFrameText
public java.lang.String sClassTypeName
public OdgNameTypeArray nameTypeArray
OdgReader.assignFBlockNameTypeIdCreateFBlock(OdgShape, OdgGBlock, OdgModule)final int[] ixArray
OdgNameTypeArray.descr.
More as one dimension written with 'NAME[2][3]' for a 2 x 3 array.final java.util.List<java.lang.String> listSlices
OdgNameTypeArray.descr.
Slices are written as 'NAME[a, b, c]' or also 'NAME[1..16]' for 16 Slices NAME1, NAME2 etc.java.lang.String sName
OdgNameTypeArray.descr.private final java.util.TreeMap<java.lang.Integer,OdgGPin> idxPin
private final java.util.TreeMap<java.lang.String,OdgGPin> idxPinByName
idxPin
later in the FBexpr_FBclpublic OdgGPin fbPinSrc
public OdgGPin fbPinDst
public OdgGPin fbPinThis
boolean bCreatedFBlockPins
protected OdgGBlock(FBkind_FBcl style, XY_FBcl pos, OdgNameTypeArray nameTypeArray, int page, OdgModule odgMdl, LogMessage log)
new_OdgGBlock(FBkind_FBcl, XY_FBcl, OdgNameTypeArray, int, OdgModule).
It is only used by the derived OdgXrefGraphic.style - The semantic of the GBlock from the style in LOffcDrawpos - position in graphic should be givennameTypeArray - additional info to the GBlockpage - the page number (also contained in pos ?)gMdl - the module where this GBlock is member off, to register,
to access OdgModule.prj and Prj_FBcl.log for logging.public static OdgGBlock new_OdgGBlock(FBkind_FBcl style, XY_FBcl pos, OdgNameTypeArray nameTypeArray, int page, OdgModule gMdl)
OdgModule.idxAllGBlockByGpos.
This index contains then ALL existing GBlocks, used for report and debug.style - The semantic of the GBlock from the style in LOffcDrawpos - position in graphic should be givennameTypeArray - additional info to the GBlockpage - the page number (also contained in pos ?)gMdl - the module where this GBlock is member off, to register,
to access OdgModule.prj and Prj_FBcl.log for logging.OdgNameTypeArray.nrGpos.FBtype_FBcl fbt()
OdgGPin getCreatePin(OdgGPin src, PinKind_FBcl kind, java.lang.String name, java.lang.String text, OdgModule odgMdl, LogMessage log)
OdgGPin getCreatePin(PinKind_FBcl kind, DoutTargetCodeAccess accTargetCode, java.lang.String name, java.lang.String text, XY_FBcl xy, OdgModule odgMdl, LogMessage log)
Write_FBtype_FBwr to assure
that the pin is unique and admissible. It is not registered in the Write_FBlock_FBwr.kind - To create the correct pin kind, or to compare with the found one.name - Name in typetext - null or possible additional information, for example the data type as given in graphic.xy - graphic positionodgMdl - log - idxPin, idxPinByName if name is given
and also in fbtw if given, or found in fbt()OdgGPin getCreatePin(java.lang.String id, XY_FBcl odgxy, PinKind_FBcl kind, java.lang.String name, java.lang.String text, OdgGBlock fbg, OdgModule odgMdl, LogMessage log)
OdgGPin getPin(java.lang.String name)
public boolean putPin(OdgGPin pin, XY_FBcl xyPin, LogMessage log)
idxPin and idxPinByName:
idxPin
and store behind the found pin in this order. Up to 10 pins are possible on the same position, if the next pin has a distance of 1 mm.
idxPin
idxPinByName.
'idxPinByName' does not contain nameless pins, it is especially expression inputs.
They are unnecessary their (never searched by name).
pin - xyPin - absolute pin position. It is compared with xy to build the relative pin position in the odg block frame.public java.lang.Iterable<OdgGPin> iterPin()
public OdgGPin getFirstPin()
public OdgGPin getFbPinSrc(OdgModule odgMdl)
fbPinSrc : OdgGPin for a connection from the FBlock itself, not from a dedicated pin.
This connections from this pin may be later create dedicated pins in the FBcl data, but not immediately yet.
Because they depends from the kind of connection. For example OdgConnection.ECkind.dataflow creates an expression output
on an ofbExpr FBlock, but later in the operation OdgModule.createFBexprPins_duetoGBlockPins(OdgGBlock).
Also in the later called OdgModule.createFBlockPins(OdgGBlock) connections are evaluated and creates specific pins.public OdgGPin getFbPinDst(OdgModule odgMdl)
fbPinDst : OdgGPin for a connection to the FBlock itself, not to a dedicated pin.
This connections to this pin may be later create dedicated pins in the FBcl data, but not immediately yet.
Because they depends from the kind of connection. For example OdgConnection.ECkind.dataflow creates an expression input
on an ofbExpr FBlock, but later in the operation OdgModule.createFBexprPins_duetoGBlockPins(OdgGBlock).
Also in the later called OdgModule.createFBlockPins(OdgGBlock) connections are evaluated and creates specific pins.
OdgGPin getCreatePinThis(LogMessage log)
fbPinDst to build the FBcl data.
if is called first in OdgModule.buildFBclData() and there in OdgModule#processGraphicPinConnections(OdgGPin, OdgGBlock, org.vishia.fbcl.readOdg.OdgConnection.ECkind)
for the OdgConnection.piDst as here found fbPinDst
if a connection of kind OdgConnection.ECkind.aggr or also assoc and comp is connected to a whole odgGBlock.
It is necessary to create then the necessary Pins in the FBcl data.
This OdgGPin instance has only the task that a one time found connection can be used more as one time more simple.
It changes the odgGBlock instance in a later state (after finish OdgReader.gatherGraphic(org.vishia.fbcl.readOdg.xml.XmlForOdg, String)).
Hence it may be removed later in a cleanup phase, use the immediately necessary THIS pins in the FBcl data. (TODO)
fbPinThis is returned, or created and returned.
fbw is set, for all FBlock_FBcl referenced via fbw: Write_FBlock_FBwr
all OdgGPin.pinObj in fbPinThis are set.
Also OdgGPin.pinType is set.
fbw is not set, but either fbtw is set or only fbt is set (a pre defined FBtype),
then only OdgGPin.pinType is set.
fbw fbtw needs to be clarify before.
This is ok if the graphic connection resolving to FBcl connection is done after all instances of FBlock, FBtype are created for the module.log - only for message on problems / errors.public java.lang.String name()
public java.lang.String toString()
toString in class java.lang.Object