public class Write_FBlock_FBwr extends FBlock_FBcl.WriteFB
FBlock_FBcl.din
etc are createt not until the FBlock is finished in its construction.
Before finishing instead the idxDin
etc. holds exact the same information, also the order is proper to the PinBase_FBcl#ixPin
.
Modifier and Type | Field and Description |
---|---|
protected Write_FBtype_FBwr |
fbtw
The appropriate type of this. null if the type is not given as created on demand, instead fix given via
FBlock_FBcl.fbt . |
protected Write_FBlock_FBwr |
fbwRef
A possible Reference to a FBlock from a
FBoper_FBcl , null for ordinary usage. |
java.util.Map<java.lang.String,Din_FBcl> |
idxDin
Used for expression inputs.
|
java.util.Map<java.lang.String,Dout_FBcl> |
idxDout
Used for expression outputs.
|
java.util.List<Write_FBlock_FBwr> |
listDepCtor
Stores FBlocks which should be constructed (ctor) before this, because delivers data for the ctor event.
|
java.util.List<Write_FBlock_FBwr> |
listDepInit
Stores FBlocks which should be initialized (init) before this, because delivers data for the init event.
|
private java.util.List<Evin_FBcl> |
listEvin
List to gather some event inputs before creating
FBlock_FBcl.evin . |
private java.util.List<Evout_FBcl> |
listEvout |
private java.util.List<PinPort_FBcl> |
listPort
This is for port inputs of a FBlock (UML-like).
|
private java.util.List<PinRef_FBcl> |
listRef
This is for aggregations, associations.
|
private int |
nrAnyInputs
If inputs or outputs with any number of are possible in the type, this is the used number of this kind of inputs resp. outputs.
|
private int |
nrAnyOutputs
If inputs or outputs with any number of are possible in the type, this is the used number of this kind of inputs resp. outputs.
|
protected DtypeMapping_FBwr |
XXXdtypeMapping
null if no variants of data types are used.
|
private java.util.List<EvinType_FBcl> |
XXXevinOperList
List to gather some event inputs before creating
FBlock_FBcl.evin . |
fb
Constructor and Description |
---|
Write_FBlock_FBwr(FBlock_FBcl fb)
Hint yet only used for FBjoin
|
Write_FBlock_FBwr(FBlock_FBcl fb,
Write_FBtype_FBwr fbtw,
Write_FBlock_FBwr fbwRef) |
Write_FBlock_FBwr(FBtype_FBcl fbt,
java.lang.String name,
Module_FBcl parentModule,
XY_FBcl graphicPos)
Create a
FBlock_FBcl writer with a given type. |
Write_FBlock_FBwr(Write_FBtype_FBwr fbtw,
java.lang.String name,
Module_FBcl parentModule,
XY_FBcl graphicPos) |
Modifier and Type | Method and Description |
---|---|
void |
addDin(Din_FBcl pin)
Adds a specific din pin, used for expression parts.
|
void |
addDout(Dout_FBcl pin)
Adds a specific din pin, used for expression parts.
|
void |
changeFBtype(FBtype_FBcl fbt)
Change the type of the FBlock.
|
void |
createFBlockPinsFromLists()
Establish all pins which are created by
#getCreatePinDtype(String, String, org.vishia.fbcl.fblock.PinKind_FBcl)
or #getCreatePin(org.vishia.fbcl.fblock.PinKind_FBcl, String, String) . |
Write_FBtype_FBwr |
fbtw()
Access to
fbtw() |
Write_FBlock_FBwr |
fbwRef()
See #fbwRef.
|
EvoutType_FBcl |
getCreateEvoutTypeFromEvin(EvinType_FBcl evin)
Gets the associated EvoutType_FBcl from a given Evout_Type_FBcl and
PinType_FBcl.mAssocInOut . |
EvinType_FBcl |
getCreateEvPrepFromPrepout(EvoutType_FBcl evout)
Gets the associated EvinType_FBcl from a given Evout_Type_FBcl using and
PinType_FBcl.mAssocInOut . |
Evin_FBcl |
getCreateEvPrepUpdin(Evin_FBcl evin)
Gets the associated update evin from prep evin or vice versa.
|
Evout_FBcl |
getCreateEvPrepUpdout(Evout_FBcl evout)
Gets the associated update evin from prep evin or vice versa.
|
Pin_FBcl |
getCreatePin(PinKind_FBcl kind,
java.lang.String name)
This operation creates a pin in the post processing, usual event pins without type and without a specific graphic pos.
|
Pin_FBcl |
getCreatePin(PinKind_FBcl kind,
java.lang.String name,
java.lang.String sDType,
int[] sizeArray,
XY_FBcl xy)
While gathering graphic: gets an existing pin (from another Graphic instance) or creates it first time.
|
private Pin_FBcl |
getCreatePin2(PinType_FBcl pint,
XY_FBcl xy)
Gets or creates the given pin in the
FBtype_FBcl also for the FBlock_FBcl instance. |
Pin_FBcl |
getCreatePinDtype(PinKind_FBcl kind,
java.lang.String name,
DType_FBcl dtype,
XY_FBcl xy)
While gathering graphic: gets an existing pin (from another Graphic instance) or creates it first time.
|
Pin_FBcl |
getCreatePinFromType(PinType_FBcl pintw,
XY_FBcl xy)
Gets or creates the given pin in the
FBtype_FBcl also for the FBlock_FBcl instance. |
Pin_FBcl |
getCreatePinFromType(java.lang.String name,
PinType_FBcl pint,
XY_FBcl xy)
Gets or creates the given pin in the
FBtype_FBcl also for the FBlock_FBcl instance. |
PinType_FBcl |
getCreatePinType(PinKind_FBcl kind,
java.lang.String name,
DType_FBcl dtype) |
PinPort_FBcl |
getCreatePortThis()
Creates the THIS port for any FBlock.
|
Evin_FBcl |
getEvinPrep(Evout_FBcl evUpdout)
Returns null or the only one prepare input event due to the update event.
|
EvinType_FBcl |
getEvinType(int ix) |
Evin_FBcl |
getEvPrepUpdin(Evin_FBcl evin)
Gets the associated update evin from prep evin or vice versa.
|
Evout_FBcl |
getEvPrepUpdout(Evout_FBcl evout)
Gets the associated update evout from prep evout or vice versa.
|
Pin_FBcl |
getPinFromType(PinType_FBcl pint)
Gets the FBlock pin from the given pin in the
FBtype_FBcl . |
org.vishia.util.IterableIterator<Din_FBcl> |
iterDin()
Iterator over all Din of this FBlock
|
org.vishia.util.IterableIterator<Din_FBcl> |
iterDin(Dout_FBcl dout,
boolean bCreate)
Iterator over all associated din to an evin using the
#listDin and PinType_FBcl.mAssocInOut . |
org.vishia.util.IterableIterator<Din_FBcl> |
iterDin(Evin_FBcl evin,
boolean bCreate)
Iterator over all associated din to an evin using the
#listDin . |
org.vishia.util.IterableIterator<Dout_FBcl> |
iterDout()
Iterator over all Din of this FBlock
|
org.vishia.util.IterableIterator<Dout_FBcl> |
iterDout(Evout_FBcl evout,
boolean bCreate)
Iterator over all associated din to an evin using the
#listDin . |
org.vishia.util.IterableIterator<Evin_FBcl> |
iterEvin(Din_FBcl din,
boolean bCreate)
Iterator over all associated evin to a din (usual one) using the
listEvin . |
org.vishia.util.IterableIterator<Evin_FBcl> |
iterEvin(Evout_FBcl evout,
boolean bCreate)
Iterator over all associated evin to a evout (usual one) using the
listEvin and PinType_FBcl.mAssocInOut . |
org.vishia.util.IterableIterator<Evin_FBcl> |
iterEvin(long mask)
Iterator over all associated evin to a given mask using the
listEvin . |
java.lang.Iterable<EvinType_FBcl> |
iterEvinType() |
java.lang.Iterable<Evout_FBcl> |
iterEvout()
Iterator over all Evout of this FBlock
|
org.vishia.util.IterableIterator<Evout_FBcl> |
iterEvout(Dout_FBcl dout,
boolean bCreate)
Iterator over all associated evin to a din (usual one) using the
listEvin . |
org.vishia.util.IterableIterator<Evout_FBcl> |
iterEvout(Evin_FBcl evin,
boolean bCreate)
Iterator over all associated evout to a evin (usual one) using the
listEvout and PinType_FBcl.mAssocInOut . |
org.vishia.util.IterableIterator<Evout_FBcl> |
iterEvout(long mask,
boolean bCreate)
Iterator over all associated evout to a dout (usual one) using the
listEvout . |
java.lang.Iterable<PinPort_FBcl> |
iterPort()
Iterator over all Evout of this FBlock
|
org.vishia.util.IterableIterator<PinPort_FBcl> |
iterPort(Evout_FBcl evout,
boolean bCreate) |
java.lang.Iterable<PinRef_FBcl> |
iterRef()
Iterator over all Evout of this FBlock
|
org.vishia.util.IterableIterator<PinRef_FBcl> |
iterRef(Evin_FBcl evin,
boolean bCreate) |
java.util.List<Evin_FBcl> |
listEvin()
Iterator over all Evin of this FBlock
|
int |
nrAnyInputs() |
int |
nrAnyOutputs() |
int |
nrDinCurrent()
Used to build a specific Din
|
int |
nrEvinCurrent()
Used to build multiple din with only one
EvinType_FBcl in the FBtype_FBcl |
void |
propagateType(Dinout_FBcl dinDst,
DType_FBcl dtSrc,
DType_FBcl dtArraySrc,
Write_FBlock_FBwr fbw,
java.util.List<Dout_FBcl> listDoutForward,
java.util.HashMap<Din_FBcl,Din_FBcl> idxDinBackward,
org.vishia.msgDispatch.LogMessage log)
Propagates the data type from pinSrc to pinDst in this FBlock.
|
void |
setDTypePinFromType(Dinout_FBcl pinDst,
DinoutType_FBcl pinSrc) |
boolean |
setFbw(Write_FBtype_FBwr fbtw,
FBtype_FBcl fbt)
Set a detected type afterwards.
|
java.lang.String |
toString() |
void |
updatePinsFromType()
Update all pins from an instance if meanwhile the type in
fbtw as Write_FBtype_FBwr has more pins. |
void |
XXXcreateFBlockPinsFromType(org.vishia.msgDispatch.LogMessage log)
Create the arrays of pins of the FBlock due to the order and completeness in the complete given and referenced
FBtype_FBcl
via its internal link FBlock_FBcl.getTypeFB() . |
clone_dtypes, createDinoutPins, createEvinoutPins, createRefPortPins, get_idxPin, getConnInArray, getConnOutArray, getEvInArray, getEvOutArray, propagateDtype, put_idxPin, setSteptime
protected Write_FBtype_FBwr fbtw
FBlock_FBcl.fbt
.protected final Write_FBlock_FBwr fbwRef
FBoper_FBcl
, null for ordinary usage.private int nrAnyInputs
private int nrAnyOutputs
public java.util.Map<java.lang.String,Din_FBcl> idxDin
public java.util.Map<java.lang.String,Dout_FBcl> idxDout
private java.util.List<Evin_FBcl> listEvin
FBlock_FBcl.evin
.
If the lists are not null, the gathering is in progress.private java.util.List<Evout_FBcl> listEvout
private java.util.List<EvinType_FBcl> XXXevinOperList
FBlock_FBcl.evin
.
If the lists are not null, the gathering is in progress.private java.util.List<PinRef_FBcl> listRef
private java.util.List<PinPort_FBcl> listPort
public final java.util.List<Write_FBlock_FBwr> listDepCtor
org.vishia.fbcl.readSource.Dataflow2Eventchain_FBrd
public final java.util.List<Write_FBlock_FBwr> listDepInit
org.vishia.fbcl.readSource.Dataflow2Eventchain_FBrd
protected DtypeMapping_FBwr XXXdtypeMapping
DType_FBcl
in relation to that of the type.public Write_FBlock_FBwr(FBlock_FBcl fb, Write_FBtype_FBwr fbtw, Write_FBlock_FBwr fbwRef)
public Write_FBlock_FBwr(FBlock_FBcl fb)
fb
- public Write_FBlock_FBwr(FBtype_FBcl fbt, java.lang.String name, Module_FBcl parentModule, XY_FBcl graphicPos)
FBlock_FBcl
writer with a given type. The type is fix, comes from Lib or Std FBlocks.
Hence all pins are defined, and no Write_FBtype_FBwr
is used.
The type pins are established also as pins for this Write_FBlock_FBwr
.
For specific type pins which allows expand only the first pin is created here.
All others are created with #getCreatePinFromType(TODO name)
.fbt
- kind
- Kind of the FBlockname
- parentModule
- public Write_FBlock_FBwr(Write_FBtype_FBwr fbtw, java.lang.String name, Module_FBcl parentModule, XY_FBcl graphicPos)
public Write_FBtype_FBwr fbtw()
fbtw()
public Write_FBlock_FBwr fbwRef()
public boolean setFbw(Write_FBtype_FBwr fbtw, FBtype_FBcl fbt)
fbtw
- null or The given type as writable, defined in the graphicfbt
- never null, should be proper to the given fbtw != null.public void changeFBtype(FBtype_FBcl fbt)
FBlock_FBcl.WriteFB
PinType_FBcl.ixPin
.changeFBtype
in class FBlock_FBcl.WriteFB
fbt
- The new type.public void updatePinsFromType()
fbtw
as Write_FBtype_FBwr
has more pins.
That occurs frequently if more as one instance of a type is created in the graphic.
This is sensible if the type is also created yet.
FBtype_FBcl
. For FBlocks from library types.
For library types the FBlocks have only the used pins.public void setDTypePinFromType(Dinout_FBcl pinDst, DinoutType_FBcl pinSrc)
public void propagateType(Dinout_FBcl dinDst, DType_FBcl dtSrc, DType_FBcl dtArraySrc, Write_FBlock_FBwr fbw, java.util.List<Dout_FBcl> listDoutForward, java.util.HashMap<Din_FBcl,Din_FBcl> idxDinBackward, org.vishia.msgDispatch.LogMessage log)
dinDst
- The pin as destination for propagation (a Din_FBcl
on forward propagation, Dout_FBcl
for backwarddtSrc
- The DType to propagatedtArraySrc
- The Dtype array which may be existing on a array FBlock. All Array usages should have the same.fbw
- listDoutForward
- idxDinBackward
- log
- public Pin_FBcl getCreatePin(PinKind_FBcl kind, java.lang.String name, java.lang.String sDType, int[] sizeArray, XY_FBcl xy)
PinType_FBcl
referenced in the returned Pin_FBcl.pint
and enters it in the associated fbtw
.
See also #getCreatePinDtype(org.vishia.fbcl.fblock.PinKind_FBcl, String, DType_FBcl)
kind
- if null do not create in the typename
- sDType
- data type can be null, should be null for events etc.Pin_FBcl.pint
. null if not found and kind == nullpublic Pin_FBcl getCreatePin(PinKind_FBcl kind, java.lang.String name)
kind
- name
- public Pin_FBcl getCreatePinDtype(PinKind_FBcl kind, java.lang.String name, DType_FBcl dtype, XY_FBcl xy)
PinType_FBcl
referenced in the returned Pin_FBcl.pint
and enters it in the associated fbtw
.
See also #getCreatePin(org.vishia.fbcl.fblock.PinKind_FBcl, String, String)
kind
- if null do not createname
- type
- can be null, should be null for events etc.Pin_FBcl.pint
. null if not found and kind == nullpublic Pin_FBcl getPinFromType(PinType_FBcl pint)
FBtype_FBcl
.pinType
- given pin in the type which is necessary herepublic Pin_FBcl getCreatePinFromType(java.lang.String name, PinType_FBcl pint, XY_FBcl xy)
FBtype_FBcl
also for the FBlock_FBcl
instance.
it searches the pin in #idxPinObjByName
, creates it if not found.pinType
- given pin in the type which is necessary hereprivate Pin_FBcl getCreatePin2(PinType_FBcl pint, XY_FBcl xy)
FBtype_FBcl
also for the FBlock_FBcl
instance.
it searches the pin in #idxPinObjByName
, creates it if not found.pinType
- given pin in the type which is necessary herepublic Pin_FBcl getCreatePinFromType(PinType_FBcl pintw, XY_FBcl xy)
FBtype_FBcl
also for the FBlock_FBcl
instance.
it searches the pin in #idxPinObjByName
, creates it if not found.pinType
- given pin in the type which is necessary herepublic PinPort_FBcl getCreatePortThis()
public int nrDinCurrent()
public int nrEvinCurrent()
EvinType_FBcl
in the FBtype_FBcl
listEvin()
public int nrAnyInputs()
public int nrAnyOutputs()
public void addDin(Din_FBcl pin)
din
- public void addDout(Dout_FBcl pin)
din
- public org.vishia.util.IterableIterator<Din_FBcl> iterDin()
public org.vishia.util.IterableIterator<Dout_FBcl> iterDout()
public java.util.List<Evin_FBcl> listEvin()
public java.lang.Iterable<Evout_FBcl> iterEvout()
public java.lang.Iterable<PinRef_FBcl> iterRef()
public java.lang.Iterable<PinPort_FBcl> iterPort()
public org.vishia.util.IterableIterator<Evin_FBcl> iterEvin(Din_FBcl din, boolean bCreate)
listEvin
.din
- Any din of this FBlockbCreate
- true then create in FBlock if exists in FBtypepublic org.vishia.util.IterableIterator<Evin_FBcl> iterEvin(Evout_FBcl evout, boolean bCreate)
listEvin
and PinType_FBcl.mAssocInOut
.evout
- Any evout of this FBlockbCreate
- true then create in FBlock if exists in FBtypepublic org.vishia.util.IterableIterator<Evin_FBcl> iterEvin(long mask)
listEvin
.mask
- can come for example from Pin_FBcl#getMaskEvoutMdlBackChainDrivenpublic org.vishia.util.IterableIterator<Evout_FBcl> iterEvout(Evin_FBcl evin, boolean bCreate)
listEvout
and PinType_FBcl.mAssocInOut
.evin
- Any evin of this FBlockbCreate
- true then create in FBlock if exists in FBtypepublic org.vishia.util.IterableIterator<Evout_FBcl> iterEvout(long mask, boolean bCreate)
listEvout
.mask
- can come for example from Pin_FBcl.getMaskEvinMdlChainDriven()
bCreate
- true then create in FBlock if exists in FBtypepublic org.vishia.util.IterableIterator<Evout_FBcl> iterEvout(Dout_FBcl dout, boolean bCreate)
listEvin
.dout
- and dout of this FBlockbCreate
- true then create in FBlock if exists in FBtypepublic Evin_FBcl getEvinPrep(Evout_FBcl evUpdout)
public org.vishia.util.IterableIterator<Din_FBcl> iterDin(Evin_FBcl evin, boolean bCreate)
#listDin
.evin
- Any input event of this FBlock. Its PinType_FBcl.mAssocEvData
is evaluated.public org.vishia.util.IterableIterator<Din_FBcl> iterDin(Dout_FBcl dout, boolean bCreate)
#listDin
and PinType_FBcl.mAssocInOut
.evin
- Any input event of this FBlock. Its PinType_FBcl.mAssocInOut
is evaluated.public org.vishia.util.IterableIterator<Dout_FBcl> iterDout(Evout_FBcl evout, boolean bCreate)
#listDin
.evin
- Any input event of this FBlock. Its PinType_FBcl.mAssocEvData
is evaluated.public org.vishia.util.IterableIterator<PinPort_FBcl> iterPort(Evout_FBcl evout, boolean bCreate)
public org.vishia.util.IterableIterator<PinRef_FBcl> iterRef(Evin_FBcl evin, boolean bCreate)
public Evin_FBcl getEvPrepUpdin(Evin_FBcl evin)
fbtw
list information, or if fbtw
==null (library block)
then it accesses the FBlock_FBcl.WriteFB.fb
.FBlock_FBcl.getTypeFB()
and their FBtype_FBcl.evinPin
.evin
- given evinpublic Evin_FBcl getCreateEvPrepUpdin(Evin_FBcl evin)
fbtw
list information, or if fbtw
==null (library block)
then it accesses the FBlock_FBcl.WriteFB.fb
.FBlock_FBcl.getTypeFB()
and their FBtype_FBcl.evinPin
.evin
- given evinpublic EvinType_FBcl getCreateEvPrepFromPrepout(EvoutType_FBcl evout)
PinType_FBcl.mAssocInOut
.
This operation is assigned to the Write_FBlock and not to Write_FBtype
because the Write_FBlock knows whether a Write_FBtype is referenced via fbtw
or only a FBtype_FBcl (via super class FBlock_FBcl.WriteFB#fb
).
It uses either the fbtw
list information, or if fbtw
==null (library block)
then it accesses the FBlock_FBcl.WriteFB.fb
.FBlock_FBcl.getTypeFB()
and their FBtype_FBcl.evinPin
.evin
- given evinpublic EvoutType_FBcl getCreateEvoutTypeFromEvin(EvinType_FBcl evin)
PinType_FBcl.mAssocInOut
.
This operation is assigned to the Write_FBlock and not to Write_FBtype
because the Write_FBlock knows whether a Write_FBtype is referenced via fbtw
or only a FBtype_FBcl (via super class FBlock_FBcl.WriteFB#fb
).
It uses either the fbtw
list information, or if fbtw
==null (library block)
then it accesses the FBlock_FBcl.WriteFB.fb
.FBlock_FBcl.getTypeFB()
and their FBtype_FBcl.evinPin
.evin
- given evinpublic PinType_FBcl getCreatePinType(PinKind_FBcl kind, java.lang.String name, DType_FBcl dtype)
public EvinType_FBcl getEvinType(int ix)
public java.lang.Iterable<EvinType_FBcl> iterEvinType()
public Evout_FBcl getEvPrepUpdout(Evout_FBcl evout)
fbtw
list information, or if fbtw
==null (library block)
then it accesses the FBlock_FBcl.WriteFB.fb
.FBlock_FBcl.getTypeFB()
and their FBtype_FBcl.evoutPin
.evout
- given evout as PinKind_FBcl.Evout
or PinKind_FBcl.EvinMdl
, but not as update pinpublic Evout_FBcl getCreateEvPrepUpdout(Evout_FBcl evout)
fbtw
list information, or if fbtw
==null (library block)
then it accesses the FBlock_FBcl.WriteFB.fb
.FBlock_FBcl.getTypeFB()
and their FBtype_FBcl.evoutPin
.evin
- given evinpublic void XXXcreateFBlockPinsFromType(org.vishia.msgDispatch.LogMessage log)
FBtype_FBcl
via its internal link FBlock_FBcl.getTypeFB()
.
The already existing pins while establish the FBlock in #idxPinObjByName
are used.
It means all #getCreatePinFromType(PinType_FBcl)
are used.XXXcreateFBlockPinsFromType
in class FBlock_FBcl.WriteFB
public void createFBlockPinsFromLists()
#getCreatePinDtype(String, String, org.vishia.fbcl.fblock.PinKind_FBcl)
or #getCreatePin(org.vishia.fbcl.fblock.PinKind_FBcl, String, String)
.
It writes the content of idxDin
, idxDout
, listEvin
, listEvout
, listRef
, listPort
to the adequate arrays in FBlock_FBcl.din
etc.public java.lang.String toString()
toString
in class java.lang.Object