tim003 tim003
/
LukaIElmir26
Novo
Fork of LukaIElmir by
Diff: Znak.h
- Revision:
- 4:ba24ce878e87
- Parent:
- 3:43648fa57d55
- Child:
- 5:654e3398c1ef
diff -r 43648fa57d55 -r ba24ce878e87 Znak.h --- a/Znak.h Mon May 26 15:07:13 2014 +0000 +++ b/Znak.h Mon May 26 17:39:37 2014 +0000 @@ -1,1 +1,27 @@ -if(c >= 'A' && c <= 'Z') return znakovi['A'- c].registri; \ No newline at end of file +#include "mbed.h" +#ifndef ZNAK_H +#define ZNAK_H +#include <vector> + +class Znak +{ + public: + std::vector<int> registri; + Znak(int r0 = -1, int r1 = -1, int r2 = -1, int r3 = -1, int r4 = -1, int r5 = -1) + { + if(r0 != -1) registri.push_back(r0); + if(r1 != -1) registri.push_back(r1); + if(r2 != -1) registri.push_back(r2); + if(r3 != -1) registri.push_back(r3); + if(r4 != -1) registri.push_back(r4); + if(r5 != -1) registri.push_back(r5); + } + Znak(int *niz, int vel) + { + for(int i = 0; i < vel; i++) registri.push_back(niz[i]); + } + ~Znak() {} + +}; + +#endif // ZNAK_H