Esempio n. 1
0
//### bob: should move this stuff into a "standalone" class
Ref<ILineReader> OpenFile(String filePath)
{
    Ref<ILineReader> reader = Ref<ILineReader>(new FileLineReader(filePath));
    
    if (reader->EndOfLines())
    {
        // couldn't open
        std::cout << "Couldn't open file \"" << filePath << "\"" << std::endl;
        return Ref<ILineReader>();
    }
    
    return reader;
}