Advances the position to the next term of the polynomial. returns true if the position marker was successfully advanced to the next term which can be used; false if the position marker has passed the end of the polynomial.
| 79 | /// false if the position marker has passed the end of the |
| 80 | /// polynomial. |
| 81 | virtual bool MoveNext() |
| 82 | { |
| 83 | assume( m_position != NULL ); |
| 84 | |
| 85 | { |
| 86 | const poly p_next = pNext(m_position); |
| 87 | |
| 88 | if (p_next != NULL) // not the last term? |
| 89 | { |
| 90 | m_position = p_next; |
| 91 | assume( IsValid() ); |
| 92 | return true; |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | if (m_position == &m_prevposition_struct) // -1 position? |
| 97 | { |
| 98 | assume( !IsValid() ); |
| 99 | m_position = m_poly; |
| 100 | return (m_position != NULL); |
| 101 | } |
| 102 | |
| 103 | // else: past the end (or an empty polynomial) |
| 104 | m_position = NULL; |
| 105 | assume( !IsValid() ); |
| 106 | return false; |
| 107 | } |
| 108 | }; |
| 109 | |
| 110 |
no outgoing calls
no test coverage detected