src/SkipString.cpp

Go to the documentation of this file.
00001 
00002 #include <iostream>
00003 #include <stdexcept>
00004 
00005 #include "SkipString.h"
00006 
00007 
00010 std::istream & operator>>(std::istream & is, const SkipString & skip)
00011 {
00012     char c;
00013     unsigned int i = 0;
00014     while (!is.eof() && i < skip.mStr.size())
00015     {
00016         is >> c;
00017         is.clear();
00018         if (c != skip.mStr[i])
00019             throw std::logic_error("Input stream does not contain string \"" + skip.mStr + "\"");
00020         i++;
00021     }
00022     return is;
00023 }
00024 
00025 

Generated on Fri Feb 1 00:01:42 2008 for Grayfall by  doxygen 1.5.1