[Wsplgen-commits] r18 - in trunk: bin/test_results src

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Sat Dec 17 22:26:50 CET 2005


Author: mrchip
Date: 2005-12-17 22:26:49 +0100 (Sat, 17 Dec 2005)
New Revision: 18

Added:
   trunk/src/test_tri.cpp
   trunk/src/tri.cpp
   trunk/src/tri.h
Modified:
   trunk/bin/test_results/all_results_soll.txt
   trunk/bin/test_results/tools_results_soll.txt
   trunk/bin/test_results/xy_results_soll.txt
   trunk/src/Makefile
   trunk/src/test.cpp
   trunk/src/test.h
   trunk/src/test_tools.cpp
   trunk/src/test_xy.cpp
   trunk/src/tools.cpp
   trunk/src/tools.h
   trunk/src/xy.cpp
   trunk/src/xy.h
Log:
Es wurde die 64-Bit Unterst?\195?\188tzung f?\195?\188r GCC und CBuilder getestet.
Sie wird f?\195?\188r das schnelle 2D-Suchen nach Punkten ben?\195?\182tigt.

Modified: trunk/bin/test_results/all_results_soll.txt
===================================================================
--- trunk/bin/test_results/all_results_soll.txt	2005-12-11 13:25:00 UTC (rev 17)
+++ trunk/bin/test_results/all_results_soll.txt	2005-12-17 21:26:49 UTC (rev 18)
@@ -76,17 +76,143 @@
 Nach dem 'Clearen' von PolygonList 2
 
 Anzahl Polygone in PolygonList 2: 0
+Anzahl Punktepaare in 3D-PunkteListe: 4
+Koordinaten von Punkt 0: 1.000,1.000,1.000
+Koordinaten von Punkt 1: 9.000,1.000,2.000
+Koordinaten von Punkt 2: 9.000,9.000,3.000
+Koordinaten von Punkt 3: 1.000,9.000,4.000
+Anzahl Punktepaare in 3D-PunkteListe: 5
+Koordinaten von Punkt 0: 3.000,4.000,5.000
+Koordinaten von Punkt 1: 7.000,4.000,6.000
+Koordinaten von Punkt 2: 7.000,6.000,7.000
+Koordinaten von Punkt 3: 3.000,6.000,8.000
+Koordinaten von Punkt 4: 1.000,9.000,4.000
 
 Test 2
 
+
+Test Fehlerausgabe
 Datei: test_tools.cpp
-Zeile: 22
+Zeile: 28
 Dies ist keine Fehler.
 Es werden nur 3 Argumente der Typen char *, double und int ausgegeben
 Arg 1: 'Test String'
 Arg 2: 3.141593
 Arg 3: 1029233
+Fehler korrekt gefangen
 
+Test Binärumwandlung 32-Bit
+Value = 0 -> Value = 00000000000000000000000000000000
+Value = 1 -> Value = 00000000000000000000000000000001
+Value = 2 -> Value = 00000000000000000000000000000010
+Value = 123 -> Value = 00000000000000000000000001111011
+Value = 4096 -> Value = 00000000000000000001000000000000
+Value = 2147483646 -> Value = 01111111111111111111111111111110
+Value = 2147483647 -> Value = 01111111111111111111111111111111
+Value = 2147483648 -> Value = 10000000000000000000000000000000
+Value = 2147483649 -> Value = 10000000000000000000000000000001
+Value = 4026531840 -> Value = 11110000000000000000000000000000
+Value = 4278190080 -> Value = 11111111000000000000000000000000
+Value = 4294963200 -> Value = 11111111111111111111000000000000
+Value = 4294967294 -> Value = 11111111111111111111111111111110
+Value = 4294967295 -> Value = 11111111111111111111111111111111
+
+Test Binärumwandlung 64-Bit
+Value = 000000000000000000000 -> Value = 0000000000000000000000000000000000000000000000000000000000000000
+Value = 000000000000000000001 -> Value = 0000000000000000000000000000000000000000000000000000000000000001
+Value = 000000000000000000002 -> Value = 0000000000000000000000000000000000000000000000000000000000000010
+Value = 000000000000000000123 -> Value = 0000000000000000000000000000000000000000000000000000000001111011
+Value = 000000000000000004096 -> Value = 0000000000000000000000000000000000000000000000000001000000000000
+Value = 000000000002147483648 -> Value = 0000000000000000000000000000000010000000000000000000000000000000
+Value = 000000000034359738368 -> Value = 0000000000000000000000000000100000000000000000000000000000000000
+Value = 009223372036854775806 -> Value = 0111111111111111111111111111111111111111111111111111111111111110
+Value = 009223372036854775807 -> Value = 0111111111111111111111111111111111111111111111111111111111111111
+Value = 009223372036854775808 -> Value = 1000000000000000000000000000000000000000000000000000000000000000
+Value = 009223372036854775809 -> Value = 1000000000000000000000000000000000000000000000000000000000000001
+Value = 017293822569102704640 -> Value = 1111000000000000000000000000000000000000000000000000000000000000
+Value = 018374686479671623680 -> Value = 1111111100000000000000000000000000000000000000000000000000000000
+Value = 018446726481523507200 -> Value = 1111111111111111111100000000000000000000000000000000000000000000
+Value = 018446744073709551360 -> Value = 1111111111111111111111111111111111111111111111111111111100000000
+Value = 018446744073709551600 -> Value = 1111111111111111111111111111111111111111111111111111111111110000
+Value = 018446744073709551614 -> Value = 1111111111111111111111111111111111111111111111111111111111111110
+Value = 018446744073709551615 -> Value = 1111111111111111111111111111111111111111111111111111111111111111
+
+Test XYKombination
+X =       0.00 Y =       0.00
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0000000000000000000000000000000000000000000000000000000000000000
+
+X =       1.00 Y =       0.00
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0000000000000000000000000000000000000000000000000000000000000010
+
+X =       0.00 Y =       1.00
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 
+0000000000000000000000000000000000000000000000000000000000000001
+
+X =       1.00 Y =       1.00
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 
+0000000000000000000000000000000000000000000000000000000000000011
+
+X =      10.00 Y =      10.00
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 
+0000000000000000000000000000000000000000000000000000000011001100
+
+X =     100.00 Y =     100.00
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 
+0000000000000000000000000000000000000000000000000011110000110000
+
+X =   10000.00 Y =   10000.00
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 0 0 0 1 0 0 0 0 
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 0 0 0 1 0 0 0 0 
+0000000000000000000000000000000000001100001111110000001100000000
+
+X = 1000000.00 Y = 1000000.00
+0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 
+ 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 
+0000000000000000000000001111111100110000000011000011000000000000
+
+X = 6000000.00 Y = 6000000.00
+0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 1 1 0 0 0 1 1 0 1 1 0 0 0 0 0 0 0 
+ 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 1 1 0 0 0 1 1 0 1 1 0 0 0 0 0 0 0 
+0000000000000000001100111100111111000000111100111100000000000000
+
+X = 2147483647.00 Y = 2147483647.00
+0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
+ 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
+0011111111111111111111111111111111111111111111111111111111111111
+
+Datei: tools.cpp
+Zeile: 108
+Die Werte für die X und Y Koordinaten sind zu groß
+X = 2147483648.000000
+X = 2147483647.000000
+Fehler korrekt gefangen
+Datei: tools.cpp
+Zeile: 108
+Die Werte für die X und Y Koordinaten sind zu groß
+X = 2147483647.000000
+X = 2147483648.000000
+Fehler korrekt gefangen
+Datei: tools.cpp
+Zeile: 113
+Die Werte für die X und Y Koordinaten sind negativ
+X = -1.000000
+X = 1.000000
+Fehler korrekt gefangen
+Datei: tools.cpp
+Zeile: 113
+Die Werte für die X und Y Koordinaten sind negativ
+X = 1.000000
+X = -1.000000
+Fehler korrekt gefangen
+
 Test 3
 
 Meter 0.0 -> X = 1.000 Y = 2.000
@@ -1467,3 +1593,6 @@
 111.000 wurde gefunden
 112.000 wurde gefunden
 113.000 wurde nicht gefunden
+
+Test 4
+

Modified: trunk/bin/test_results/tools_results_soll.txt
===================================================================
--- trunk/bin/test_results/tools_results_soll.txt	2005-12-11 13:25:00 UTC (rev 17)
+++ trunk/bin/test_results/tools_results_soll.txt	2005-12-17 21:26:49 UTC (rev 18)
@@ -1,10 +1,125 @@
 
 Test 2
 
+
+Test Fehlerausgabe
 Datei: test_tools.cpp
-Zeile: 22
+Zeile: 28
 Dies ist keine Fehler.
 Es werden nur 3 Argumente der Typen char *, double und int ausgegeben
 Arg 1: 'Test String'
 Arg 2: 3.141593
 Arg 3: 1029233
+Fehler korrekt gefangen
+
+Test Binärumwandlung 32-Bit
+Value = 0 -> Value = 00000000000000000000000000000000
+Value = 1 -> Value = 00000000000000000000000000000001
+Value = 2 -> Value = 00000000000000000000000000000010
+Value = 123 -> Value = 00000000000000000000000001111011
+Value = 4096 -> Value = 00000000000000000001000000000000
+Value = 2147483646 -> Value = 01111111111111111111111111111110
+Value = 2147483647 -> Value = 01111111111111111111111111111111
+Value = 2147483648 -> Value = 10000000000000000000000000000000
+Value = 2147483649 -> Value = 10000000000000000000000000000001
+Value = 4026531840 -> Value = 11110000000000000000000000000000
+Value = 4278190080 -> Value = 11111111000000000000000000000000
+Value = 4294963200 -> Value = 11111111111111111111000000000000
+Value = 4294967294 -> Value = 11111111111111111111111111111110
+Value = 4294967295 -> Value = 11111111111111111111111111111111
+
+Test Binärumwandlung 64-Bit
+Value = 000000000000000000000 -> Value = 0000000000000000000000000000000000000000000000000000000000000000
+Value = 000000000000000000001 -> Value = 0000000000000000000000000000000000000000000000000000000000000001
+Value = 000000000000000000002 -> Value = 0000000000000000000000000000000000000000000000000000000000000010
+Value = 000000000000000000123 -> Value = 0000000000000000000000000000000000000000000000000000000001111011
+Value = 000000000000000004096 -> Value = 0000000000000000000000000000000000000000000000000001000000000000
+Value = 000000000002147483648 -> Value = 0000000000000000000000000000000010000000000000000000000000000000
+Value = 000000000034359738368 -> Value = 0000000000000000000000000000100000000000000000000000000000000000
+Value = 009223372036854775806 -> Value = 0111111111111111111111111111111111111111111111111111111111111110
+Value = 009223372036854775807 -> Value = 0111111111111111111111111111111111111111111111111111111111111111
+Value = 009223372036854775808 -> Value = 1000000000000000000000000000000000000000000000000000000000000000
+Value = 009223372036854775809 -> Value = 1000000000000000000000000000000000000000000000000000000000000001
+Value = 017293822569102704640 -> Value = 1111000000000000000000000000000000000000000000000000000000000000
+Value = 018374686479671623680 -> Value = 1111111100000000000000000000000000000000000000000000000000000000
+Value = 018446726481523507200 -> Value = 1111111111111111111100000000000000000000000000000000000000000000
+Value = 018446744073709551360 -> Value = 1111111111111111111111111111111111111111111111111111111100000000
+Value = 018446744073709551600 -> Value = 1111111111111111111111111111111111111111111111111111111111110000
+Value = 018446744073709551614 -> Value = 1111111111111111111111111111111111111111111111111111111111111110
+Value = 018446744073709551615 -> Value = 1111111111111111111111111111111111111111111111111111111111111111
+
+Test XYKombination
+X =       0.00 Y =       0.00
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0000000000000000000000000000000000000000000000000000000000000000
+
+X =       1.00 Y =       0.00
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0000000000000000000000000000000000000000000000000000000000000010
+
+X =       0.00 Y =       1.00
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 
+0000000000000000000000000000000000000000000000000000000000000001
+
+X =       1.00 Y =       1.00
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 
+0000000000000000000000000000000000000000000000000000000000000011
+
+X =      10.00 Y =      10.00
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 
+0000000000000000000000000000000000000000000000000000000011001100
+
+X =     100.00 Y =     100.00
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 
+0000000000000000000000000000000000000000000000000011110000110000
+
+X =   10000.00 Y =   10000.00
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 0 0 0 1 0 0 0 0 
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 0 0 0 1 0 0 0 0 
+0000000000000000000000000000000000001100001111110000001100000000
+
+X = 1000000.00 Y = 1000000.00
+0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 
+ 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 
+0000000000000000000000001111111100110000000011000011000000000000
+
+X = 6000000.00 Y = 6000000.00
+0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 1 1 0 0 0 1 1 0 1 1 0 0 0 0 0 0 0 
+ 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 1 1 0 0 0 1 1 0 1 1 0 0 0 0 0 0 0 
+0000000000000000001100111100111111000000111100111100000000000000
+
+X = 2147483647.00 Y = 2147483647.00
+0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
+ 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
+0011111111111111111111111111111111111111111111111111111111111111
+
+Datei: tools.cpp
+Zeile: 108
+Die Werte für die X und Y Koordinaten sind zu groß
+X = 2147483648.000000
+X = 2147483647.000000
+Fehler korrekt gefangen
+Datei: tools.cpp
+Zeile: 108
+Die Werte für die X und Y Koordinaten sind zu groß
+X = 2147483647.000000
+X = 2147483648.000000
+Fehler korrekt gefangen
+Datei: tools.cpp
+Zeile: 113
+Die Werte für die X und Y Koordinaten sind negativ
+X = -1.000000
+X = 1.000000
+Fehler korrekt gefangen
+Datei: tools.cpp
+Zeile: 113
+Die Werte für die X und Y Koordinaten sind negativ
+X = 1.000000
+X = -1.000000
+Fehler korrekt gefangen

Modified: trunk/bin/test_results/xy_results_soll.txt
===================================================================
--- trunk/bin/test_results/xy_results_soll.txt	2005-12-11 13:25:00 UTC (rev 17)
+++ trunk/bin/test_results/xy_results_soll.txt	2005-12-17 21:26:49 UTC (rev 18)
@@ -76,3 +76,14 @@
 Nach dem 'Clearen' von PolygonList 2
 
 Anzahl Polygone in PolygonList 2: 0
+Anzahl Punktepaare in 3D-PunkteListe: 4
+Koordinaten von Punkt 0: 1.000,1.000,1.000
+Koordinaten von Punkt 1: 9.000,1.000,2.000
+Koordinaten von Punkt 2: 9.000,9.000,3.000
+Koordinaten von Punkt 3: 1.000,9.000,4.000
+Anzahl Punktepaare in 3D-PunkteListe: 5
+Koordinaten von Punkt 0: 3.000,4.000,5.000
+Koordinaten von Punkt 1: 7.000,4.000,6.000
+Koordinaten von Punkt 2: 7.000,6.000,7.000
+Koordinaten von Punkt 3: 3.000,6.000,8.000
+Koordinaten von Punkt 4: 1.000,9.000,4.000

Modified: trunk/src/Makefile
===================================================================
--- trunk/src/Makefile	2005-12-11 13:25:00 UTC (rev 17)
+++ trunk/src/Makefile	2005-12-17 21:26:49 UTC (rev 18)
@@ -13,7 +13,7 @@
 PROJECT=wsplgen.exe
 TEST=test.exe
 OBJFILES=profil.o tools.o xy.o
-TESTOBJFILES=test.o test_profil.o test_tools.o test_xy.o 
+TESTOBJFILES=test.o test_profil.o test_tools.o test_xy.o test_tri.o
 
 ../bin/test.exe: $(TESTOBJFILES) $(OBJFILES)
 	$(CC) $(LDFLAGS) -o ../bin/test.exe $(TESTOBJFILES) $(OBJFILES) $(LIBS)

Modified: trunk/src/test.cpp
===================================================================
--- trunk/src/test.cpp	2005-12-11 13:25:00 UTC (rev 17)
+++ trunk/src/test.cpp	2005-12-17 21:26:49 UTC (rev 18)
@@ -18,10 +18,10 @@
 //---------------------------------------------------------------------
 int main(unsigned int argc, char **argv)
 {
-	int	Test = (1<<1) + (1<<2) + (1<<3);
+	int	Test = (1<<1) + (1<<2) + (1<<3) + (1<<4);
 
 	if (argc > 1)
-	{ 
+	{
 		Test = 0;
 		for (unsigned int i = 1; i < argc; i++)
 		{
@@ -33,7 +33,7 @@
 	try
 	{
 		int TestNr = 0;
-		
+
 		TestNr = 1;
 		if (Test & (1<<TestNr))
 		{
@@ -57,11 +57,19 @@
 			FailCode = test_profil(TestNr);
 			if (FailCode != 0)	printf ("Fehler bei Test %d\n", TestNr);
 		}
+
+		TestNr = 4;
+		if (Test & (1<<TestNr))
+		{
+			printf("\nTest %d\n\n", TestNr);
+			FailCode = test_tri(TestNr);
+			if (FailCode != 0)	printf ("Fehler bei Test %d\n", TestNr);
+		}
 	}
 	catch (...)
 	{
 		printf ("Programmabbruch\n");
 	}
-	
+
 	return (FailCode);
-} 
+}

Modified: trunk/src/test.h
===================================================================
--- trunk/src/test.h	2005-12-11 13:25:00 UTC (rev 17)
+++ trunk/src/test.h	2005-12-17 21:26:49 UTC (rev 18)
@@ -15,9 +15,10 @@
 #define TESTH
 
 //---------------------------------------------------------------------------
-int	test_xy(int TestNr);
-int	test_tools(int TestNr);
-int	test_profil(int TestNr);
+extern int	test_xy(int TestNr);
+extern int	test_tools(int TestNr);
+extern int	test_profil(int TestNr);
+extern int	test_tri(int TestNr);
 
 //----------------------------------------------------------------------------
 #endif

Modified: trunk/src/test_tools.cpp
===================================================================
--- trunk/src/test_tools.cpp	2005-12-11 13:25:00 UTC (rev 17)
+++ trunk/src/test_tools.cpp	2005-12-17 21:26:49 UTC (rev 18)
@@ -17,14 +17,280 @@
 //---------------------------------------------------------------------
 int	test_tools(int TestNr)
 {
+	////////////////////////////////////////
+	// Test der Fehlerausgabe
+	////////////////////////////////////////
+
+	printf ("\nTest Fehlerausgabe\n");
+
 	try
 	{
 		dump_error(__FILE__, __LINE__, "Dies ist keine Fehler.\nEs werden nur 3 Argumente der Typen char *, double und int ausgegeben\nArg 1: '%s'\nArg 2: %f\nArg 3: %d\n", "Test String", 3.1415926, 1029233);
 	}
-	catch(...)
+	catch(fehler)
 	{
-		return (TestNr);
+		printf ("Fehler korrekt gefangen\n");
 	}
-	
+
+
+
+	////////////////////////////////////////
+	// Test der Binärumwandlung long
+	////////////////////////////////////////
+
+	printf ("\nTest Binärumwandlung 32-Bit\n");
+
+	unsigned long LongValue = 0L;
+	printf ("Value = %lu -> Value = %s\n", LongValue, UnsignedInt32ToBin(LongValue, "").c_str());
+
+	LongValue = 1;
+	printf ("Value = %lu -> Value = %s\n", LongValue, UnsignedInt32ToBin(LongValue, "").c_str());
+
+	LongValue = 2;
+	printf ("Value = %lu -> Value = %s\n", LongValue, UnsignedInt32ToBin(LongValue, "").c_str());
+
+	LongValue = 123;
+	printf ("Value = %lu -> Value = %s\n", LongValue, UnsignedInt32ToBin(LongValue, "").c_str());
+
+	LongValue = 0x1000;
+	printf ("Value = %lu -> Value = %s\n", LongValue, UnsignedInt32ToBin(LongValue, "").c_str());
+
+	LongValue = 0x7FFFFFFE;
+	printf ("Value = %lu -> Value = %s\n", LongValue, UnsignedInt32ToBin(LongValue, "").c_str());
+
+	LongValue = 0x7FFFFFFF;
+	printf ("Value = %lu -> Value = %s\n", LongValue, UnsignedInt32ToBin(LongValue, "").c_str());
+
+	LongValue = 0x80000000;
+	printf ("Value = %lu -> Value = %s\n", LongValue, UnsignedInt32ToBin(LongValue, "").c_str());
+
+	LongValue = 0x80000001;
+	printf ("Value = %lu -> Value = %s\n", LongValue, UnsignedInt32ToBin(LongValue, "").c_str());
+
+	LongValue = 0xF0000000;
+	printf ("Value = %lu -> Value = %s\n", LongValue, UnsignedInt32ToBin(LongValue, "").c_str());
+
+	LongValue = 0xFF000000;
+	printf ("Value = %lu -> Value = %s\n", LongValue, UnsignedInt32ToBin(LongValue, "").c_str());
+
+	LongValue = 0xFFFFF000;
+	printf ("Value = %lu -> Value = %s\n", LongValue, UnsignedInt32ToBin(LongValue, "").c_str());
+
+	LongValue = 0xFFFFFFFE;
+	printf ("Value = %lu -> Value = %s\n", LongValue, UnsignedInt32ToBin(LongValue, "").c_str());
+
+	LongValue = 0xFFFFFFFF;
+	printf ("Value = %lu -> Value = %s\n", LongValue, UnsignedInt32ToBin(LongValue, "").c_str());
+
+
+	////////////////////////////////////////
+	// Test der Binärumwandlung __int64
+	////////////////////////////////////////
+
+	printf ("\nTest Binärumwandlung 64-Bit\n");
+
+	unsigned INT64 Value = INT64SUFF(0);
+	printf ("Value = %s -> Value = %s\n", UnsignedInt64ToDez(Value).c_str(), UnsignedInt64ToBin(Value).c_str());
+
+	Value = INT64SUFF(1);
+	printf ("Value = %s -> Value = %s\n", UnsignedInt64ToDez(Value).c_str(), UnsignedInt64ToBin(Value).c_str());
+
+	Value = INT64SUFF(2);
+	printf ("Value = %s -> Value = %s\n", UnsignedInt64ToDez(Value).c_str(), UnsignedInt64ToBin(Value).c_str());
+
+	Value = INT64SUFF(123);
+	printf ("Value = %s -> Value = %s\n", UnsignedInt64ToDez(Value).c_str(), UnsignedInt64ToBin(Value).c_str());
+
+	Value = INT64SUFF(4096);
+	printf ("Value = %s -> Value = %s\n", UnsignedInt64ToDez(Value).c_str(), UnsignedInt64ToBin(Value).c_str());
+
+	Value = INT64SUFF(2147483648);
+	printf ("Value = %s -> Value = %s\n", UnsignedInt64ToDez(Value).c_str(), UnsignedInt64ToBin(Value).c_str());
+
+	Value = INT64SUFF(34359738368);
+	printf ("Value = %s -> Value = %s\n", UnsignedInt64ToDez(Value).c_str(), UnsignedInt64ToBin(Value).c_str());
+
+	Value = INT64SUFF(9223372036854775806);
+	printf ("Value = %s -> Value = %s\n", UnsignedInt64ToDez(Value).c_str(), UnsignedInt64ToBin(Value).c_str());
+
+	Value = INT64SUFF(9223372036854775807);
+	printf ("Value = %s -> Value = %s\n", UnsignedInt64ToDez(Value).c_str(), UnsignedInt64ToBin(Value).c_str());
+
+	Value = INT64SUFF(9223372036854775808);
+	printf ("Value = %s -> Value = %s\n", UnsignedInt64ToDez(Value).c_str(), UnsignedInt64ToBin(Value).c_str());
+
+	Value = INT64SUFF(9223372036854775809);
+	printf ("Value = %s -> Value = %s\n", UnsignedInt64ToDez(Value).c_str(), UnsignedInt64ToBin(Value).c_str());
+
+	Value = INT64SUFF(17293822569102704640);
+	printf ("Value = %s -> Value = %s\n", UnsignedInt64ToDez(Value).c_str(), UnsignedInt64ToBin(Value).c_str());
+
+	Value = INT64SUFF(18374686479671623680);
+	printf ("Value = %s -> Value = %s\n", UnsignedInt64ToDez(Value).c_str(), UnsignedInt64ToBin(Value).c_str());
+
+	Value = INT64SUFF(18446726481523507200);
+	printf ("Value = %s -> Value = %s\n", UnsignedInt64ToDez(Value).c_str(), UnsignedInt64ToBin(Value).c_str());
+
+	Value = INT64SUFF(18446744073709551360);
+	printf ("Value = %s -> Value = %s\n", UnsignedInt64ToDez(Value).c_str(), UnsignedInt64ToBin(Value).c_str());
+
+	Value = INT64SUFF(18446744073709551600);
+	printf ("Value = %s -> Value = %s\n", UnsignedInt64ToDez(Value).c_str(), UnsignedInt64ToBin(Value).c_str());
+
+	Value = INT64SUFF(18446744073709551614);
+	printf ("Value = %s -> Value = %s\n", UnsignedInt64ToDez(Value).c_str(), UnsignedInt64ToBin(Value).c_str());
+
+	Value = INT64SUFF(18446744073709551615);
+	printf ("Value = %s -> Value = %s\n", UnsignedInt64ToDez(Value).c_str(), UnsignedInt64ToBin(Value).c_str());
+
+
+	////////////////////////////////////////
+	// Test der XYKombination
+	////////////////////////////////////////
+
+	printf ("\nTest XYKombination\n");
+
+	unsigned INT64 TestXYKombi = INT64SUFF(0);
+
+	double X = 0.0;
+	double Y = 0.0;
+	TestXYKombi = CalcXYKombi(X, Y);
+	printf ("X = %10.2f Y = %10.2f\n", X, Y);
+	printf ("%s\n", UnsignedInt32ToBin((long)X, " ").c_str());
+	printf (" %s\n", UnsignedInt32ToBin((long)Y, " ").c_str());
+	printf ("%s\n\n", UnsignedInt64ToBin(TestXYKombi).c_str());
+
+	X = 1.0;
+	Y = 0.0;
+	TestXYKombi = CalcXYKombi(X, Y);
+	printf ("X = %10.2f Y = %10.2f\n", X, Y);
+	printf ("%s\n", UnsignedInt32ToBin((long)X, " ").c_str());
+	printf (" %s\n", UnsignedInt32ToBin((long)Y, " ").c_str());
+	printf ("%s\n\n", UnsignedInt64ToBin(TestXYKombi).c_str());
+
+	X = 0.0;
+	Y = 1.0;
+	TestXYKombi = CalcXYKombi(X, Y);
+	printf ("X = %10.2f Y = %10.2f\n", X, Y);
+	printf ("%s\n", UnsignedInt32ToBin((long)X, " ").c_str());
+	printf (" %s\n", UnsignedInt32ToBin((long)Y, " ").c_str());
+	printf ("%s\n\n", UnsignedInt64ToBin(TestXYKombi).c_str());
+
+	X = 1.0;
+	Y = 1.0;
+	TestXYKombi = CalcXYKombi(X, Y);
+	printf ("X = %10.2f Y = %10.2f\n", X, Y);
+	printf ("%s\n", UnsignedInt32ToBin((long)X, " ").c_str());
+	printf (" %s\n", UnsignedInt32ToBin((long)Y, " ").c_str());
+	printf ("%s\n\n", UnsignedInt64ToBin(TestXYKombi).c_str());
+
+	X = 10.0;
+	Y = 10.0;
+	TestXYKombi = CalcXYKombi(X, Y);
+	printf ("X = %10.2f Y = %10.2f\n", X, Y);
+	printf ("%s\n", UnsignedInt32ToBin((long)X, " ").c_str());
+	printf (" %s\n", UnsignedInt32ToBin((long)Y, " ").c_str());
+	printf ("%s\n\n", UnsignedInt64ToBin(TestXYKombi).c_str());
+
+	X = 100.0;
+	Y = 100.0;
+	TestXYKombi = CalcXYKombi(X, Y);
+	printf ("X = %10.2f Y = %10.2f\n", X, Y);
+	printf ("%s\n", UnsignedInt32ToBin((long)X, " ").c_str());
+	printf (" %s\n", UnsignedInt32ToBin((long)Y, " ").c_str());
+	printf ("%s\n\n", UnsignedInt64ToBin(TestXYKombi).c_str());
+
+	X = 10000.0;
+	Y = 10000.0;
+	TestXYKombi = CalcXYKombi(X, Y);
+	printf ("X = %10.2f Y = %10.2f\n", X, Y);
+	printf ("%s\n", UnsignedInt32ToBin((long)X, " ").c_str());
+	printf (" %s\n", UnsignedInt32ToBin((long)Y, " ").c_str());
+	printf ("%s\n\n", UnsignedInt64ToBin(TestXYKombi).c_str());
+
+	X = 1000000.0;
+	Y = 1000000.0;
+	TestXYKombi = CalcXYKombi(X, Y);
+	printf ("X = %10.2f Y = %10.2f\n", X, Y);
+	printf ("%s\n", UnsignedInt32ToBin((long)X, " ").c_str());
+	printf (" %s\n", UnsignedInt32ToBin((long)Y, " ").c_str());
+	printf ("%s\n\n", UnsignedInt64ToBin(TestXYKombi).c_str());
+
+	X = 6000000.0;
+	Y = 6000000.0;
+	TestXYKombi = CalcXYKombi(X, Y);
+	printf ("X = %10.2f Y = %10.2f\n", X, Y);
+	printf ("%s\n", UnsignedInt32ToBin((long)X, " ").c_str());
+	printf (" %s\n", UnsignedInt32ToBin((long)Y, " ").c_str());
+	printf ("%s\n\n", UnsignedInt64ToBin(TestXYKombi).c_str());
+
+	X = 0x7FFFFFFFL;
+	Y = 0x7FFFFFFFL;
+	TestXYKombi = CalcXYKombi(X, Y);
+	printf ("X = %10.2f Y = %10.2f\n", X, Y);
+	printf ("%s\n", UnsignedInt32ToBin((long)X, " ").c_str());
+	printf (" %s\n", UnsignedInt32ToBin((long)Y, " ").c_str());
+	printf ("%s\n\n", UnsignedInt64ToBin(TestXYKombi).c_str());
+
+	try
+	{
+		X = 0x80000000L;
+		Y = 0x7FFFFFFFL;
+		TestXYKombi = CalcXYKombi(X, Y);
+		printf ("X = %10.2f Y = %10.2f\n", X, Y);
+		printf ("%s\n", UnsignedInt32ToBin((long)X, " ").c_str());
+		printf (" %s\n", UnsignedInt32ToBin((long)Y, " ").c_str());
+		printf ("%s\n\n", UnsignedInt64ToBin(TestXYKombi).c_str());
+	}
+	catch(fehler)
+	{
+		printf ("Fehler korrekt gefangen\n");
+	}
+
+	try
+	{
+		X = 0x7FFFFFFFL;
+		Y = 0x80000000L;
+		TestXYKombi = CalcXYKombi(X, Y);
+		printf ("X = %10.2f Y = %10.2f\n", X, Y);
+		printf ("%s\n", UnsignedInt32ToBin((long)X, " ").c_str());
+		printf (" %s\n", UnsignedInt32ToBin((long)Y, " ").c_str());
+		printf ("%s\n\n", UnsignedInt64ToBin(TestXYKombi).c_str());
+	}
+	catch(fehler)
+	{
+		printf ("Fehler korrekt gefangen\n");
+	}
+
+	try
+	{
+		X = -1.0;
+		Y = 1.0;
+		TestXYKombi = CalcXYKombi(X, Y);
+		printf ("X = %10.2f Y = %10.2f\n", X, Y);
+		printf ("%s\n", UnsignedInt32ToBin((long)X, " ").c_str());
+		printf (" %s\n", UnsignedInt32ToBin((long)Y, " ").c_str());
+		printf ("%s\n\n", UnsignedInt64ToBin(TestXYKombi).c_str());
+	}
+	catch(fehler)
+	{
+		printf ("Fehler korrekt gefangen\n");
+	}
+
+	try
+	{
+		X = 1.0;
+		Y = -1.0;
+		TestXYKombi = CalcXYKombi(X, Y);
+		printf ("X = %10.2f Y = %10.2f\n", X, Y);
+		printf ("%s\n", UnsignedInt32ToBin((long)X, " ").c_str());
+		printf (" %s\n", UnsignedInt32ToBin((long)Y, " ").c_str());
+		printf ("%s\n\n", UnsignedInt64ToBin(TestXYKombi).c_str());
+	}
+	catch(fehler)
+	{
+		printf ("Fehler korrekt gefangen\n");
+	}
+
 	return (0);
 }

Added: trunk/src/test_tri.cpp
===================================================================
--- trunk/src/test_tri.cpp	2005-12-11 13:25:00 UTC (rev 17)
+++ trunk/src/test_tri.cpp	2005-12-17 21:26:49 UTC (rev 18)
@@ -0,0 +1,20 @@
+//
+// $Id: test_tri.cpp 14 2005-12-07 20:40:16Z mrchip $
+//
+// Copyright (C) 2005 STADT-LAND-FLUSS INGENIEURDIENSTE GmbH
+//
+// Authors:
+// Ulrich Kiel <u.kiel at S-L-F.de>
+//
+// This program is free software under the GPL (>=v2)
+// Read the file COPYING coming with WSPLGEN for details.
+//
+
+//---------------------------------------------------------------------------
+#include "tri.h"
+
+//---------------------------------------------------------------------
+int	test_tri(int TestNr)
+{
+	return (0);
+}

Modified: trunk/src/test_xy.cpp
===================================================================
--- trunk/src/test_xy.cpp	2005-12-11 13:25:00 UTC (rev 17)
+++ trunk/src/test_xy.cpp	2005-12-17 21:26:49 UTC (rev 18)
@@ -74,7 +74,7 @@
 	PGL1->push_back(PL1);
 	PGL1->push_back(PL2);
 	PGL1->push_back(PL3);
-	
+
 	printf("\nEine PolygonListe wurde erzeugt\n\n");
 
 	// Alles ausgeben
@@ -82,7 +82,7 @@
 	for (unsigned int i=0; i<PGL1->size(); i++)
 	{
 		TXYList *PL = (*PGL1)[i];
-		
+
 		printf("Anzahl Punktepaare in Polygon %d: %d\n", i, PL->size());
 
 		for (unsigned int j=0; j<PL->size(); j++)
@@ -104,7 +104,7 @@
 	for (unsigned int i=0; i<PGL2->size(); i++)
 	{
 		TXYList *PL = (*PGL2)[i];
-		
+
 		printf("Anzahl Punktepaare in Polygon %d: %d\n", i, PL->size());
 
 		for (unsigned int j=0; j<PL->size(); j++)
@@ -117,7 +117,7 @@
 
 	// Die erste Polylinie der zweiten Liste ermitteln
 	TXYList *PL = PGL2->First();
-		
+
 	printf("\nDie erste Polylinien der 2. PolygonListe wurde ermittelt\n\n");
 
 	// Von dieser Polylinie alle Punkte ausgeben
@@ -128,7 +128,7 @@
 
 		printf("Koordinaten von Punkt %d: %.3f,%.3f\n", j, XY->X, XY->Y);
 	}
-	
+
 	// Die erste Liste von Polylinien komplett löschen
 	delete PGL1;
 	PGL1 = 0;
@@ -140,7 +140,7 @@
 	for (unsigned int i=0; i<PGL2->size(); i++)
 	{
 		TXYList *PL = (*PGL2)[i];
-		
+
 		printf("Anzahl Punktepaare in Polygon %d: %d\n", i, PL->size());
 
 		for (unsigned int j=0; j<PL->size(); j++)
@@ -162,7 +162,7 @@
 	for (unsigned int i=0; i<PGL2->size(); i++)
 	{
 		TXYList *PL = (*PGL2)[i];
-		
+
 		printf("Anzahl Punktepaare in Polygon %d: %d\n", i, PL->size());
 
 		for (unsigned int j=0; j<PL->size(); j++)
@@ -178,5 +178,82 @@
 	delete PGL2;
 	PGL2 = 0;
 
+
+	/////////////////////////////////////////////
+	// Jetzt der 3D Teil
+	/////////////////////////////////////////////
+
+	// Zuerst ein paar Punkte generieren
+	TXYZ *Pz11 = new TXYZ(1.0, 1.0, 1.0);
+	TXYZ *Pz12 = new TXYZ(9.0, 1.0, 2.0);
+	TXYZ *Pz13 = new TXYZ(9.0, 9.0, 3.0);
+	TXYZ *Pz14 = new TXYZ(1.0, 9.0, 4.0);
+
+	TXYZ *Pz21 = new TXYZ(3.0, 4.0, 5.0);
+	TXYZ *Pz22 = new TXYZ(7.0, 4.0, 6.0);
+	TXYZ *Pz23 = new TXYZ(7.0, 6.0, 7.0);
+	TXYZ *Pz24 = new TXYZ(3.0, 6.0, 8.0);
+	TXYZ *Pz25 = new TXYZ(Pz14);
+
+	if (Pz11 == 0)	return (TestNr);
+	if (Pz12 == 0)	return (TestNr);
+	if (Pz13 == 0)	return (TestNr);
+	if (Pz14 == 0)	return (TestNr);
+	if (Pz21 == 0)	return (TestNr);
+	if (Pz22 == 0)	return (TestNr);
+	if (Pz23 == 0)	return (TestNr);
+	if (Pz24 == 0)	return (TestNr);
+	if (Pz25 == 0)	return (TestNr);
+
+	// Jetzt zwei leer PolyliniePolygone generieren
+	TXYZList *PLz1 = new TXYZList();
+	TXYZList *PLz2 = new TXYZList();
+
+	if (PLz1 == 0)	return (TestNr);
+	if (PLz2 == 0)	return (TestNr);
+
+	// Ein paar Punkte zur ersten Polylinie zuweisen
+	PLz1->push_back(Pz11);
+	PLz1->push_back(Pz12);
+	PLz1->push_back(Pz13);
+	PLz1->push_back(Pz14);
+
+	// Ein paar Punkte zur zweiten Polylinie zuweisen
+	PLz2->push_back(Pz21);
+	PLz2->push_back(Pz22);
+	PLz2->push_back(Pz23);
+	PLz2->push_back(Pz24);
+	PLz2->push_back(Pz25);
+
+	// die zweite Polylinie verdoppeln
+	// Dabei werden alle Punkte mit verdoppelt
+	TXYZList *PLz3 = PLz2->Copy();
+
+	if (PLz3 == 0)	return (TestNr);
+
+	// Alles ausgeben
+
+	printf("Anzahl Punktepaare in 3D-PunkteListe: %d\n", PLz1->size());
+
+	for (unsigned int j=0; j<PLz1->size(); j++)
+	{
+		TXYZ *XYZ = (*PLz1)[j];
+
+		printf("Koordinaten von Punkt %d: %.3f,%.3f,%.3f\n", j, XYZ->X, XYZ->Y, XYZ->Z);
+	}
+
+	printf("Anzahl Punktepaare in 3D-PunkteListe: %d\n", PLz2->size());
+
+	for (unsigned int j=0; j<PLz2->size(); j++)
+	{
+		TXYZ *XYZ = (*PLz2)[j];
+
+		printf("Koordinaten von Punkt %d: %.3f,%.3f,%.3f\n", j, XYZ->X, XYZ->Y, XYZ->Z);
+	}
+
+	delete PLz1;
+	delete PLz2;
+	delete PLz3;
+
 	return (0);
 }

Modified: trunk/src/tools.cpp
===================================================================
--- trunk/src/tools.cpp	2005-12-11 13:25:00 UTC (rev 17)
+++ trunk/src/tools.cpp	2005-12-17 21:26:49 UTC (rev 18)
@@ -32,9 +32,103 @@
 	printf("Datei: %s\n", p);
 	printf("Zeile: %d\n", line);
 
-   	va_list argptr;
+	va_list argptr;
 
-   	va_start(argptr, format);
-   	vprintf(format, argptr);
-   	va_end(argptr);
+	va_start(argptr, format);
+	vprintf(format, argptr);
+	va_end(argptr);
+
+	throw fehler("Fehler");
 }
+
+//---------------------------------------------------------------------------
+std::string UnsignedInt32ToBin (unsigned long Value, char *Spaces)
+{
+	std::string Line = "";
+	unsigned long Mask = 0x80000000L;
+	for (unsigned int i=32; i>0; i--)
+	{
+		if ((Value & Mask) != 0L)	Line = Line + "1";
+		else						Line = Line + "0";
+
+		Line = Line + Spaces;
+
+		Mask = Mask / 2;
+	}
+	return (Line);
+}
+
+//---------------------------------------------------------------------------
+std::string UnsignedInt64ToBin (unsigned INT64 Value)
+{
+	std::string Line = "";
+	unsigned INT64 Mask = INT64SUFF(0x8000000000000000);
+	for (unsigned int i=64; i>0; i--)
+	{
+		if ((Value & Mask) != 0L)	Line = Line + "1";
+		else						Line = Line + "0";
+
+		Mask = Mask / 2;
+	}
+	return (Line);
+}
+
+//---------------------------------------------------------------------------
+std::string UnsignedInt64ToDez (unsigned INT64 Value)
+{
+	std::string Line = "";
+	for (unsigned int i=0; i<21; i++)
+	{
+		int Ziffer = Value % 10;
+
+		switch (Ziffer)
+		{
+			case 0: Line = "0" + Line; break;
+			case 1: Line = "1" + Line; break;
+			case 2: Line = "2" + Line; break;
+			case 3: Line = "3" + Line; break;
+			case 4: Line = "4" + Line; break;
+			case 5: Line = "5" + Line; break;
+			case 6: Line = "6" + Line; break;
+			case 7: Line = "7" + Line; break;
+			case 8: Line = "8" + Line; break;
+			case 9: Line = "9" + Line; break;
+		}
+
+		Value = Value / 10;
+	}
+	return (Line);
+}
+
+//---------------------------------------------------------------------------
+unsigned INT64 CalcXYKombi (double X, double Y)
+{
+	if ((X > 0x7FFFFFFFL) || (Y > 0x7FFFFFFFL))
+	{
+		dump_error(__FILE__, __LINE__, "Die Werte für die X und Y Koordinaten sind zu groß\nX = %f\nX = %f\n", X, Y);
+	}
+
+	if ((X < 0.0) || (Y < 0.0))
+	{
+		dump_error(__FILE__, __LINE__, "Die Werte für die X und Y Koordinaten sind negativ\nX = %f\nX = %f\n", X, Y);
+	}
+
+	unsigned INT64 Xl = (INT64)X;
+	unsigned INT64 Yl = (INT64)Y;
+
+	unsigned INT64 Kombi = INT64SUFF(0);
+	unsigned INT64 Mask = INT64SUFF(0x40000000);
+	for (int i=30; i>=0; i--)
+	{
+		Kombi = Kombi * 2;
+		if (Xl & Mask) Kombi = Kombi + 1;
+
+		Kombi = Kombi * 2;
+		if (Yl & Mask) Kombi = Kombi + 1;
+
+		Mask = Mask / 2;
+	}
+
+	return (Kombi);
+}
+

Modified: trunk/src/tools.h
===================================================================
--- trunk/src/tools.h	2005-12-11 13:25:00 UTC (rev 17)
+++ trunk/src/tools.h	2005-12-17 21:26:49 UTC (rev 18)
@@ -14,8 +14,35 @@
 #ifndef TOOLSH
 #define TOOLSH
 
+#ifdef __BORLANDC__
+#define INT64			__int64
+#define INT64SUFF(x)	x##L
+int i = tt;
+#else
+#define INT64			long long int
+#define INT64SUFF(x)	x##ULL
+#endif
+
+//----------------------------------------------------------------------------
+#include <string>
+
 //---------------------------------------------------------------------------
-void	dump_error(char *file, int line, char *format, ...);
+struct fehler
+{
+	std::string Fehlermeldung;
 
+	fehler(std::string fehlermeldung)
+	{
+		Fehlermeldung = fehlermeldung;
+	}
+};
+
 //---------------------------------------------------------------------------
+void			dump_error(char *file, int line, char *format, ...);
+std::string		UnsignedInt32ToBin (unsigned long Value, char *Spaces);
+std::string		UnsignedInt64ToBin (unsigned INT64 Value);
+std::string 	UnsignedInt64ToDez (unsigned INT64 Value);
+unsigned INT64 	CalcXYKombi (double X, double Y);
+
+//---------------------------------------------------------------------------
 #endif

Added: trunk/src/tri.cpp
===================================================================
--- trunk/src/tri.cpp	2005-12-11 13:25:00 UTC (rev 17)
+++ trunk/src/tri.cpp	2005-12-17 21:26:49 UTC (rev 18)
@@ -0,0 +1,12 @@
+//
+// $Id: tri.cpp 14 2005-12-07 20:40:16Z mrchip $
+//
+// Copyright (C) 2005 STADT-LAND-FLUSS INGENIEURDIENSTE GmbH
+//
+// Authors:
+// Ulrich Kiel <u.kiel at S-L-F.de>
+//
+// This program is free software under the GPL (>=v2)
+// Read the file COPYING coming with WSPLGEN for details.
+//
+

Added: trunk/src/tri.h
===================================================================
--- trunk/src/tri.h	2005-12-11 13:25:00 UTC (rev 17)
+++ trunk/src/tri.h	2005-12-17 21:26:49 UTC (rev 18)
@@ -0,0 +1,12 @@
+//
+// $Id: tri.h 14 2005-12-07 20:40:16Z mrchip $
+//
+// Copyright (C) 2005 STADT-LAND-FLUSS INGENIEURDIENSTE GmbH
+//
+// Authors:
+// Ulrich Kiel <u.kiel at S-L-F.de>
+//
+// This program is free software under the GPL (>=v2)
+// Read the file COPYING coming with WSPLGEN for details.
+//
+

Modified: trunk/src/xy.cpp
===================================================================
--- trunk/src/xy.cpp	2005-12-11 13:25:00 UTC (rev 17)
+++ trunk/src/xy.cpp	2005-12-17 21:26:49 UTC (rev 18)
@@ -18,7 +18,6 @@
 {
 	X = x;
 	Y = y;
-	KannWeg = false;
 }
 
 //---------------------------------------------------------------------
@@ -26,13 +25,28 @@
 {
 	X = Xy->X;
 	Y = Xy->Y;
-	KannWeg = Xy->KannWeg;
 }
 
 
 
 
 
+//---------------------------------------------------------------------
+TXYZ::TXYZ(double x, double y, double z) : TXY (x, y)
+{
+	Z = z;
+}
+
+//---------------------------------------------------------------------
+TXYZ::TXYZ(TXYZ *Xyz) : TXY (Xyz->X, Xyz->Y)
+{
+	Z = Xyz->Z;
+}
+
+
+
+
+
 //---------------------------------------------------------------------------
 TXYList::~TXYList(void)
 {
@@ -72,6 +86,44 @@
 
 
 //---------------------------------------------------------------------------
+TXYZList::~TXYZList(void)
+{
+	Clear();
+}
+
+//---------------------------------------------------------------------
+void TXYZList::Clear(void)
+{
+	for (unsigned int i=0; i<size(); i++)
+	{
+		TXYZ *Xyz = (*this)[i];
+		delete Xyz;
+	}
+	clear();
+}
+
+//---------------------------------------------------------------------
+TXYZList* TXYZList::Copy(void)
+{
+	TXYZList *NewXyzList = new TXYZList;
+
+	for (unsigned int i=0; i<size(); i++)
+	{
+		TXYZ *OldXyz = (*this)[i];
+		TXYZ *NewXyz = new TXYZ(OldXyz);
+		NewXyzList->push_back(NewXyz);
+	}
+	return(NewXyzList);
+}
+//---------------------------------------------------------------------------
+
+
+
+
+
+
+
+//---------------------------------------------------------------------------
 TPolygonList::~TPolygonList(void)
 {
 	Clear();

Modified: trunk/src/xy.h
===================================================================
--- trunk/src/xy.h	2005-12-11 13:25:00 UTC (rev 17)
+++ trunk/src/xy.h	2005-12-17 21:26:49 UTC (rev 18)
@@ -16,20 +16,38 @@
 
 //----------------------------------------------------------------------------
 #include <vector>
+#include "tools.h"
 
 //----------------------------------------------------------------------------
 class TXY
 {
+	private:
+		// Dieser Wert ist eine abwechselt Bitweise Kombination des (long)(X * 100) und (long)(Y * 100) Wertes.
+		// X = 1.2345 -> (long)(X*100) = 123 = 001111011
+		// Y = 2.654  -> (long)(Y*100) = 265 = 100001001
+		// XYKombi = 0...0 01 00 10 10 10 11 00 10 11 = 0000000000000000000000000000000000000000000000010010101011001011
+		unsigned INT64	XYKombi;
+
 	public:
-		double  	X;
-		double  	Y;
-		bool  		KannWeg;
+		double  		X;
+		double  		Y;
 
 		TXY(double X, double Y);
 		TXY(TXY *Xy);
 };
 
 //----------------------------------------------------------------------------
+class TXYZ : public TXY
+{
+	public:
+
+		double  	Z;
+
+		TXYZ(double X, double Y, double Z);
+		TXYZ(TXYZ *Xyz);
+};
+
+//----------------------------------------------------------------------------
 class TXYList : public std::vector<TXY *>
 {
 	public:
@@ -39,6 +57,15 @@
 };
 
 //----------------------------------------------------------------------------
+class TXYZList : public std::vector<TXYZ *>
+{
+	public:
+		~TXYZList(void);
+		void Clear(void);
+		TXYZList* Copy(void);
+};
+
+//----------------------------------------------------------------------------
 class TPolygonList : public std::vector<TXYList *>
 {
 	public:



More information about the Wsplgen-commits mailing list