------------------------------------------------------------------------
| 66 | |
| 67 | //------------------------------------------------------------------------ |
| 68 | bool path_tokenizer::next() |
| 69 | { |
| 70 | if(m_path == 0) return false; |
| 71 | |
| 72 | // Skip all white spaces and other garbage |
| 73 | while(*m_path && !is_command(*m_path) && !is_numeric(*m_path)) |
| 74 | { |
| 75 | if(!is_separator(*m_path)) |
| 76 | { |
| 77 | char buf[100]; |
| 78 | sprintf(buf, "path_tokenizer::next : Invalid Character %c", *m_path); |
| 79 | throw exception(buf); |
| 80 | } |
| 81 | m_path++; |
| 82 | } |
| 83 | |
| 84 | if(*m_path == 0) return false; |
| 85 | |
| 86 | if(is_command(*m_path)) |
| 87 | { |
| 88 | // Check if the command is a numeric sign character |
| 89 | if(*m_path == '-' || *m_path == '+') |
| 90 | { |
| 91 | return parse_number(); |
| 92 | } |
| 93 | m_last_command = *m_path++; |
| 94 | while(*m_path && is_separator(*m_path)) m_path++; |
| 95 | if(*m_path == 0) return true; |
| 96 | } |
| 97 | return parse_number(); |
| 98 | } |
| 99 | |
| 100 | |
| 101 |
no test coverage detected