bool StdCompilerConfigWrite::Separator(Sep eSep) { // Append separators to last string char sep [] = { SeparatorToChar(eSep), '\0' }; WriteString(sep); return true; }
bool StdCompilerINIWrite::Separator(Sep eSep) { if (fInSection) { // Re-put section name PutName(true); } else { PrepareForValue(); Buf.AppendChar(SeparatorToChar(eSep)); } 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::Separator(Sep eSep) { // ensure string is loaded in case value begins with a separator if (!LastString.getData()) LastString.Take(ReadString()); if (LastString.getData()) { // separator within string: check if it is there if (LastString.getLength() && *LastString.getData() == SeparatorToChar(eSep)) { LastString.Take(StdStrBuf(LastString.getData()+1, true)); return true; } else { return false; } } else { // No separators outside strings return false; } }