Util Namespace Reference

Functions

void eat_whitespace (std::istream &is)
 discard all whitespace chars until hitting a non-whitespace
std::string read_quoted_string (std::istream &is)

Function Documentation

void Util::eat_whitespace ( std::istream &  is  ) 

discard all whitespace chars until hitting a non-whitespace

Definition at line 5 of file UtilStream.cxx.

Referenced by read_quoted_string().

00006 {
00007     char c;
00008     while (is.get(c)) {
00009         if (!isspace(c)) {
00010             is.putback(c);
00011             break;
00012         }
00013     }
00014 }

Here is the caller graph for this function:

std::string Util::read_quoted_string ( std::istream &  is  ) 

return a string of words. Strings are delimited by single quotes. any leading white space is eaten.

Definition at line 16 of file UtilStream.cxx.

References eat_whitespace().

Referenced by TDbiRegistryItemXxx< T >::ReadStream(), and TDbiRegistry::ReadStream().

00017 {
00018     eat_whitespace(is);
00019 
00020     char c;
00021 
00022     if (!is.get(c)) return "";
00023     if (c == '\'') {
00024         string stot;
00025         while (is.get(c)) {
00026             if (c == '\'') break;
00027             stot += c;
00028         }
00029         return stot;
00030     }
00031     else {
00032         is.putback(c);
00033         return "";
00034     }
00035 }

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on 11 Aug 2013 for SKDatabase by  doxygen 1.6.1