gpucalc::auxillary::TextFileLoader Class Reference

Auxillary class, provides text file loading. More...

#include <text_file_loader.h>

List of all members.

Static Public Member Functions

static std::string load (const std::string &FileName)
 load text from filename and save it in string.

Private Member Functions

 TextFileLoader ()
 ~TextFileLoader ()


Detailed Description

Auxillary class, provides text file loading.

Todo:
Create method for loading text file, separated on strings.

Definition at line 49 of file text_file_loader.h.


Constructor & Destructor Documentation

gpucalc::auxillary::TextFileLoader::TextFileLoader (  )  [private]

gpucalc::auxillary::TextFileLoader::~TextFileLoader (  )  [private]


Member Function Documentation

std::string gpucalc::auxillary::TextFileLoader::load ( const std::string &  FileName  )  [static]

load text from filename and save it in string.

Parameters:
FileName - name to loaded file.

Definition at line 41 of file text_file_loader.cpp.

00042   {
00043    LogManager::getSingleton().logMessage(Object("TextFileLoader", "TextFileLoader"), "Loading \"" + FileName + "\"", LML_Trivial);
00044    std::ifstream ifile(FileName.c_str());
00045    if (!ifile)
00046    {
00047     Except<ERR_FILE_NOT_FOUND>(Object("TextFileLoader", "TextFileLoader"), "Failed to load \"" + FileName + "\".", "TextFileLoader::Load", __FILE__, __LINE__);
00048     return "";
00049    }
00050    else
00051    {
00052     std::ostringstream result;
00053     result << ifile.rdbuf();
00054     return result.str();
00055    }
00056   }


The documentation for this class was generated from the following files:

Generated on Thu Mar 5 22:36:46 2009 for gpucalc by  doxygen 1.5.6