FACT++  1.0
string Converter::GetString ( std::stringstream &  line) const
private

Converts from the stringstream into a string. Leading whitespaces are skipped. Everything up to the next whitespace is returned. strings can be encapsulated into escape characters ("). Note, that they cannot be nested.

Parameters
linereference to the stringstream from which the data should be interpreted
Returns
The string

Definition at line 294 of file Converter.cc.

Referenced by Get(), GetSize(), GetString(), GetVector(), and FactGui::infoHandlerService().

295 {
296  while (line.peek()==' ')
297  line.get();
298 
299  string buf;
300  if (line.peek()=='\"')
301  {
302  line.get();
303  getline(line, buf, '\"');
304  if (line.peek()==-1)
305  line.clear(ios::eofbit);
306  }
307  else
308  line >> buf;
309 
310  return buf;
311 }

+ Here is the caller graph for this function: