![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Novo
Fork of LukaIElmir by
Znak.h@4:ba24ce878e87, 2014-05-26 (annotated)
- Committer:
- tim003
- Date:
- Mon May 26 17:39:37 2014 +0000
- Revision:
- 4:ba24ce878e87
- Parent:
- 3:43648fa57d55
- Child:
- 5:654e3398c1ef
Verzija koja radi;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
tim003 | 4:ba24ce878e87 | 1 | #include "mbed.h" |
tim003 | 4:ba24ce878e87 | 2 | #ifndef ZNAK_H |
tim003 | 4:ba24ce878e87 | 3 | #define ZNAK_H |
tim003 | 4:ba24ce878e87 | 4 | #include <vector> |
tim003 | 4:ba24ce878e87 | 5 | |
tim003 | 4:ba24ce878e87 | 6 | class Znak |
tim003 | 4:ba24ce878e87 | 7 | { |
tim003 | 4:ba24ce878e87 | 8 | public: |
tim003 | 4:ba24ce878e87 | 9 | std::vector<int> registri; |
tim003 | 4:ba24ce878e87 | 10 | Znak(int r0 = -1, int r1 = -1, int r2 = -1, int r3 = -1, int r4 = -1, int r5 = -1) |
tim003 | 4:ba24ce878e87 | 11 | { |
tim003 | 4:ba24ce878e87 | 12 | if(r0 != -1) registri.push_back(r0); |
tim003 | 4:ba24ce878e87 | 13 | if(r1 != -1) registri.push_back(r1); |
tim003 | 4:ba24ce878e87 | 14 | if(r2 != -1) registri.push_back(r2); |
tim003 | 4:ba24ce878e87 | 15 | if(r3 != -1) registri.push_back(r3); |
tim003 | 4:ba24ce878e87 | 16 | if(r4 != -1) registri.push_back(r4); |
tim003 | 4:ba24ce878e87 | 17 | if(r5 != -1) registri.push_back(r5); |
tim003 | 4:ba24ce878e87 | 18 | } |
tim003 | 4:ba24ce878e87 | 19 | Znak(int *niz, int vel) |
tim003 | 4:ba24ce878e87 | 20 | { |
tim003 | 4:ba24ce878e87 | 21 | for(int i = 0; i < vel; i++) registri.push_back(niz[i]); |
tim003 | 4:ba24ce878e87 | 22 | } |
tim003 | 4:ba24ce878e87 | 23 | ~Znak() {} |
tim003 | 4:ba24ce878e87 | 24 | |
tim003 | 4:ba24ce878e87 | 25 | }; |
tim003 | 4:ba24ce878e87 | 26 | |
tim003 | 4:ba24ce878e87 | 27 | #endif // ZNAK_H |