| 505 | typename mem_manager |
| 506 | > |
| 507 | bool queue_kernel_2<T,block_size,mem_manager>:: |
| 508 | move_next ( |
| 509 | ) const |
| 510 | { |
| 511 | if (at_start_) |
| 512 | { |
| 513 | at_start_ = false; |
| 514 | // if the queue is empty then there is nothing to do |
| 515 | if (queue_size == 0) |
| 516 | { |
| 517 | return false; |
| 518 | } |
| 519 | else |
| 520 | { |
| 521 | current_element = out; |
| 522 | current_element_pos = out_pos; |
| 523 | return true; |
| 524 | } |
| 525 | } |
| 526 | else if (current_element == 0) |
| 527 | { |
| 528 | return false; |
| 529 | } |
| 530 | else |
| 531 | { |
| 532 | ++current_element_pos; |
| 533 | // if we are at the last element then the enumeration has finished |
| 534 | if (current_element == in && current_element_pos == in_pos ) |
| 535 | { |
| 536 | current_element = 0; |
| 537 | return false; |
| 538 | } |
| 539 | else if (current_element_pos == block_size) |
| 540 | { |
| 541 | current_element_pos = 0; |
| 542 | current_element = current_element->next; |
| 543 | } |
| 544 | |
| 545 | return true; |
| 546 | } |
| 547 | } |
| 548 | |
| 549 | // ---------------------------------------------------------------------------------------- |
| 550 | // ---------------------------------------------------------------------------------------- |
nothing calls this directly
no outgoing calls
no test coverage detected