Logo Search packages:      
Sourcecode: lttoolbox version File versions  Download package

wstring FSTProcessor::readFullBlock ( FILE *  input,
wchar_t const   delim1,
wchar_t const   delim2 
) [private]

Reads a block from the stream input, enclosed by delim1 and delim2

Parameters:
input the stream being read
delim1 the delimiter of the beginning of the sequence
delim1 the delimiter of the end of the sequence

Definition at line 71 of file fst_processor.cc.

References readEscaped(), and streamError().

Referenced by readAnalysis(), readGeneration(), readPostgeneration(), and readSAO().

{
  wstring result = L"";
  result += delim1;
  wchar_t c = delim1;

  while(!feof(input) && c != delim2)
  {
    c = static_cast<wchar_t>(fgetwc_unlocked(input));
    result += c;
    if(c != L'\\')
    {
      continue;
    }
    else
    {
      result += static_cast<wchar_t>(readEscaped(input));
    }
  }   

  if(c != delim2)
  {
    streamError();
  }

  return result;
}


Generated by  Doxygen 1.6.0   Back to index