bool StdCompilerINIRead::FollowName(const char *szName) { // Current naming virtual? if (iDepth > iRealDepth) return false; // Next section must be the one if (!pName->NextChild || pName->NextChild->Name != szName) { // End current naming NameEnd(); // Go into virtual naming iDepth++; return false; } // End current naming NameEnd(); // Start new one Name(szName); // Done return true; }
// Separators bool StdCompilerINIRead::Separator(Sep eSep) { if (iDepth > iRealDepth) return false; // In section? if (pName->Section) { // Store current name, search another section with the same name StdStrBuf CurrName = pName->Name; NameEnd(); return Name(CurrName.getData()); } // Position saved back from separator mismatch? if (pReenter) { pPos = pReenter; pReenter = NULL; } // Nothing to read? if (!pPos) return false; // Read (while skipping over whitespace) SkipWhitespace(); // Separator mismatch? Let all read attempts fail until the correct separator is found or the naming ends. if (*pPos != SeparatorToChar(eSep)) { pReenter = pPos; pPos = NULL; return false; } // Go over separator, success pPos++; return true; }
bool StdCompilerConfigRead::FollowName(const char *szName) { NameEnd(); return Name(szName); }