Cleande up the deserialization code

This commit is contained in:
Xawotihs
2011-10-02 14:11:30 +00:00
parent 7e1566fe77
commit 86131f7ea0
7 changed files with 22 additions and 220 deletions
+15
View File
@@ -100,4 +100,19 @@ bool FileExists(const string & filename);
std::string buildFilePath(const vector<string> & folders, const string & filename);
std::string ensureFolder(const string & folderName);
template <class T> istream& operator>>(istream& in, T& p)
{
string s;
while(std::getline(in, s))
{
if(!p.parseLine(s))
{
break;
}
}
return in;
}
#endif