[56] | 1 | #include "Behavioural/Generic/Queue_Control/include/Queue_Control.h" |
---|
| 2 | |
---|
| 3 | namespace morpheo { |
---|
| 4 | namespace behavioural { |
---|
| 5 | namespace generic { |
---|
| 6 | namespace queue_control { |
---|
| 7 | |
---|
| 8 | #undef FUNCTION |
---|
| 9 | #define FUNCTION "Queue_Control::pop" |
---|
| 10 | void Queue_Control::pop (uint32_t index) |
---|
| 11 | { |
---|
| 12 | log_printf(FUNC,Queue_Control,FUNCTION,"Begin"); |
---|
| 13 | |
---|
| 14 | uint32_t val = (*_tab)[index]; |
---|
| 15 | _tab->erase (_tab->begin()+index); |
---|
| 16 | _tab->push_back(val); |
---|
| 17 | _nb_elt --; |
---|
| 18 | |
---|
| 19 | log_printf(FUNC,Queue_Control,FUNCTION,"End"); |
---|
| 20 | }; |
---|
| 21 | |
---|
| 22 | #undef FUNCTION |
---|
| 23 | #define FUNCTION "Queue_Control::pop" |
---|
| 24 | void Queue_Control::pop (void) |
---|
| 25 | { |
---|
| 26 | log_printf(FUNC,Queue_Control,FUNCTION,"Begin"); |
---|
| 27 | |
---|
| 28 | pop (0); |
---|
| 29 | |
---|
| 30 | log_printf(FUNC,Queue_Control,FUNCTION,"End"); |
---|
| 31 | }; |
---|
| 32 | |
---|
| 33 | #undef FUNCTION |
---|
| 34 | #define FUNCTION "Queue_Control::pop_ovf" |
---|
| 35 | void Queue_Control::pop_ovf (uint32_t index) |
---|
| 36 | { |
---|
| 37 | log_printf(FUNC,Queue_Control,FUNCTION,"Begin"); |
---|
| 38 | |
---|
| 39 | if (empty() or (index >= _nb_elt_max)) |
---|
| 40 | { |
---|
| 41 | ErrorMorpheo ("<Queue_Control::pop_ovf> Queue Overflow"); |
---|
| 42 | } |
---|
| 43 | |
---|
| 44 | pop(index); |
---|
| 45 | |
---|
| 46 | log_printf(FUNC,Queue_Control,FUNCTION,"End"); |
---|
| 47 | }; |
---|
| 48 | |
---|
| 49 | #undef FUNCTION |
---|
| 50 | #define FUNCTION "Queue_Control::pop_ovf" |
---|
| 51 | void Queue_Control::pop_ovf (void) |
---|
| 52 | { |
---|
| 53 | log_printf(FUNC,Queue_Control,FUNCTION,"Begin"); |
---|
| 54 | |
---|
| 55 | pop_ovf(0); |
---|
| 56 | |
---|
| 57 | log_printf(FUNC,Queue_Control,FUNCTION,"End"); |
---|
| 58 | }; |
---|
| 59 | |
---|
| 60 | |
---|
| 61 | }; // end namespace queue_control |
---|
| 62 | }; // end namespace generic |
---|
| 63 | }; // end namespace behavioural |
---|
| 64 | }; // end namespace morpheo |
---|