summaryrefslogtreecommitdiff
path: root/typenunit.pas
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-12-19 10:36:52 +0100
committerErich Eckner <git@eckner.net>2017-12-19 10:36:52 +0100
commit43657256cfe47f7afe681730351e27f19b48cce3 (patch)
treee56fa39fdf56354e47bc8be80ad5d986100f6004 /typenunit.pas
parent7ffe2953de866595f94f09fe08aa9ce1699bd28f (diff)
downloadepost-43657256cfe47f7afe681730351e27f19b48cce3.tar.xz
ermittlePhase kann nun auch entspringen
Diffstat (limited to 'typenunit.pas')
-rw-r--r--typenunit.pas51
1 files changed, 51 insertions, 0 deletions
diff --git a/typenunit.pas b/typenunit.pas
index 0ea6cac..05e9c1d 100644
--- a/typenunit.pas
+++ b/typenunit.pas
@@ -21,6 +21,11 @@ type
parameter: tExtendedArray;
end;
tIntegrationsRichtung = (irHorizontal,irEinfall,irAusfall);
+ tLowLevelEntspringModus = (emKein,emHorizontal,emVertikal);
+ tEntspringModus = record
+ modus: tLowLevelEntspringModus;
+ parameter: tExtendedArray;
+ end;
tGenerischeInputDateiInfo = class // nur zum Vererben gedacht, nie selbst instanziieren!
name,fehlerBehebungsKommando: string;
gamma,groeszenFaktor,
@@ -607,6 +612,8 @@ procedure zerstoereTransformationWennObsolet(tr: tTransformation);
function dreheLagePositiv(l: tLage): tLage; inline;
function stringToTHintergrundAbzugsArt(s: string; sT: boolean; kvs: tKnownValues; cbgv: tCallBackGetValue; out hintergrundAbzugsArt: tHintergrundAbzugsArt): boolean;
function tHintergrundAbzugsArtToStr(hintergrundAbzugsArt: tHintergrundAbzugsArt): string;
+function strToTEntspringModus(s: string; sT: boolean; kvs: tKnownValues; cbgv: tCallBackGetValue; out entspringModus: tEntspringModus): boolean;
+function tEntspringModusToStr(entspringModus: tEntspringModus): string;
const
paralleleRichtung: array[tLage] of char = ('y','x','y','x');
@@ -3379,5 +3386,49 @@ begin
end{of case};
end;
+function strToTEntspringModus(s: string; sT: boolean; kvs: tKnownValues; cbgv: tCallBackGetValue; out entspringModus: tEntspringModus): boolean;
+var
+ bekannteModi: tMyStringList;
+begin
+ bekannteModi:=tMyStringList.create;
+ result:=true;
+ if istDasBefehl('kein',s,bekannteModi,false) then begin
+ entspringModus.modus:=emKein;
+ setLength(entspringModus.parameter,0);
+ end
+ else if istDasBefehl('horizontal',s,bekannteModi,true) then begin
+ entspringModus.modus:=emHorizontal;
+ setLength(entspringModus.parameter,1);
+ entspringModus.parameter[0]:=exprToFloat(sT,s,kvs,cbgv);
+ end
+ else if istDasBefehl('vertikal',s,bekannteModi,true) then begin
+ entspringModus.modus:=emVertikal;
+ setLength(entspringModus.parameter,1);
+ entspringModus.parameter[0]:=exprToFloat(sT,s,kvs,cbgv);
+ end
+ else begin
+ entspringModus.modus:=emKein;
+ setLength(entspringModus.parameter,0);
+ result:=false;
+ bekannteModi.sort;
+ gibAus('Unbekannter Entspringmodus '''+s+''' - ich kenne nur:'#10+bekannteModi.text,3);
+ end;
+ bekannteModi.free;
+end;
+
+function tEntspringModusToStr(entspringModus: tEntspringModus): string;
+begin
+ case entspringModus.modus of
+ emKein:
+ result:='kein';
+ emHorizontal:
+ result:='horizontal '+myFloatToStr(entspringModus.parameter[0]);
+ emVertikal:
+ result:='vertikal '+myFloatToStr(entspringModus.parameter[0]);
+ else
+ result:='UNBEKANNT';
+ end{of case};
+end;
+
end.