summaryrefslogtreecommitdiff
path: root/support/konwerter/system_zapisu.h
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/konwerter/system_zapisu.h
Initial commit
Diffstat (limited to 'support/konwerter/system_zapisu.h')
-rw-r--r--support/konwerter/system_zapisu.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/support/konwerter/system_zapisu.h b/support/konwerter/system_zapisu.h
new file mode 100644
index 0000000000..6dae381546
--- /dev/null
+++ b/support/konwerter/system_zapisu.h
@@ -0,0 +1,80 @@
+/*
+Copyright (C) 2004 Piotr Wawrzyniak (piti@piti.vsv.pl)
+
+Plik zawiera definicję klasy przechowującej informacje i funkcje,
+które będą definiowały odpowiednie numerowanie
+
+In this file, there is class defined, that handles number types.
+I know that this can be made much easies, without class definition etc,
+but I wanted to write alittle with classes to lern them allitle.
+
+*/
+
+#include<string.h>
+
+struct kol_liczb{
+ int liczba;
+ kol_liczb* next;
+ kol_liczb* prev;
+};
+
+
+
+ const int dl=20;//długość linii przechowującej numerk kolejnej etykietki
+//klasa rekord_numerow zawierające kolejne numery dla poszczegolnych składowych
+class r_numerow{
+
+ public:
+ char numer_etykietki[dl]; //np 111, ab, XV, xv itd.
+ int set_up_all(int,int,int,int,int,int);
+ int set_up_all(int, int);
+
+ /*
+ zwróci numerek etykiety w liczbach rzymskich, arabskich czy literkach
+ dokładnie to tylko zmodyfikuje wartość numer_etykietki[], którą trzeba
+ będzie odzielnie odczytać po wywołaniu tej funkcji na rzecz etykietki.
+ Przy czym dozwolone wartości są następujące"
+ 0 - roman numbers small :r
+ 1 - roman numbers bigg :R
+ 2 - arabic numbers :a
+ 3 - small letters :l
+ 4 - big letters :L
+ */
+
+ int zwroc_numer_etykiety(int numer);
+ int domyslny_styl_numeracji;
+ r_numerow(int,int,int,int,int);//konstruktor, constructor
+ int ustaw_zmienna_numer_etykietki(char *);
+ private:
+
+ /*
+ default numbering scheme. There are 5 possible values
+ 0 - roman numbers small :r
+ 1 - roman numbers bigg :R
+ 2 - arabic numbers :a
+ 3 - small letters :l
+ 4 - big letters :L
+ */
+
+ /*
+ tablica przechowująca kolejny numer dla każdej etykietki
+ table that contains the last number for given group of labels
+ */
+ int zwroc_num_etykiet[5];
+
+ int int_na_rom_char(int,int);//zamiana numeru na romanski mały i duzy, change to roman small and big
+ int int_na_char(int); //zamiana numeru na char zawierający numer, change int to char
+ int int_na_lit_char(int,int);//zamiana numeru na litery male i duże, change to small and capital letters
+
+ /*
+ The inline function that fill in with zeros the variable numer_etykietki
+ Generally it is better to have everywhere there zeros.
+ */
+ int zeruj_numer_etykietki()
+ {
+ for(int dupa=0;dupa<dl;dupa++)
+ numer_etykietki[dupa]='\0';
+ return 0;
+ }
+
+};