Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

FilelistExpander.cpp

Go to the documentation of this file.
00001 
00002 #include <string>
00003 #include <iostream>
00004 #include <fstream>
00005 #include <stdexcept>
00006 
00007 #include "cafe/FilelistExpander.hpp"
00008 
00009 namespace cafe {
00010 
00011     FilelistExpander::FilelistExpander(const char *url)
00012     {
00013         const char *ptr = strchr(url, ':') + 1;
00014         _file.open(ptr);
00015         if(!_file) {
00016             std::string msg("FilelistExpander: cannot find ");
00017             msg += url;
00018             throw std::runtime_error(msg);
00019         }
00020     }
00021 
00022     std::string FilelistExpander::nextFile()
00023     {
00024         std::string next;
00025         if(_file && _file >> next) {
00026             return next;
00027         }
00028         return "";
00029     }
00030 
00031 }
00032 
00033 ClassImp(cafe::FilelistExpander)
00034 

Generated on Tue Mar 28 10:13:03 2006 for CAF by doxygen 1.3.4