////////////////////////////////////////////////////////////////////////// SeekTo -- seeks to the named noun; this takes care of interpriting special nouns. If the seek fails, then Done() is true and false is returned. If noun is a special character, then it is altered to what it mapped to. //////////////////////////////////////////////////////////////////////////
| 121 | // If noun is a special character, then it is altered to what it mapped to. |
| 122 | /////////////////////////////////////////////////////////////////////////////// |
| 123 | static bool SeekTo(cDbDataSourceIter* pIter, TSTRING& noun) |
| 124 | { |
| 125 | if (noun[0] == _T('*')) |
| 126 | { |
| 127 | // interprite the rest of the string as a number index to seek to... |
| 128 | int index = _ttoi(&noun[1]); |
| 129 | if (index < 0) |
| 130 | return false; |
| 131 | pIter->SeekBegin(); |
| 132 | for (int i = 0; ((i < index) && (!pIter->Done())); i++, pIter->Next()) |
| 133 | { |
| 134 | } |
| 135 | if (pIter->Done()) |
| 136 | return false; |
| 137 | noun = pIter->GetShortName(); |
| 138 | return true; |
| 139 | } |
| 140 | else |
| 141 | return (pIter->SeekTo(noun.c_str())); |
| 142 | } |
| 143 | |
| 144 | /////////////////////////////////////////////////////////////////////////////// |
| 145 | // PrintFCO |