2.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit ef127d10 authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Merge branch 'campvis-core-dll' into 'development'

Campvis Core Dll
parents 42f4ff45 ef459135
......@@ -181,4 +181,22 @@ namespace campvis {
throw tgt::CorruptedFileException("Error parsing key " + key + " to vec4: " + e.what(), _url);
}
}
// ================================================================================================
template<>
std::vector<std::string> TextFileParser::readAndParseItems<TextFileParser::ItemSeparatorLines>() const throw (tgt::FileException, tgt::CorruptedFileException) {
tgt::File* file = FileSys.open(_url);
if (!file || !file->isOpen())
throw tgt::FileException("Could not open file " + _url + " for reading.", _url);
std::vector<std::string> lines;
while (!file->eof()) {
lines.push_back(file->getLine());
}
file->close();
delete file;
return lines;
}
}
\ No newline at end of file
......@@ -243,7 +243,7 @@ namespace campvis {
}
template<typename T>
inline std::vector<std::string> campvis::TextFileParser::readAndParseItems() const throw (tgt::FileException, tgt::CorruptedFileException) {
inline std::vector<std::string> TextFileParser::readAndParseItems() const throw (tgt::FileException, tgt::CorruptedFileException) {
tgt::File* file = FileSys.open(_url);
if (!file || !file->isOpen())
throw tgt::FileException("Could not open file " + _url + " for reading.", _url);
......@@ -266,19 +266,7 @@ namespace campvis {
/// Template specialization for avoiding redundant split-join-split of lines.
template<>
CAMPVIS_CORE_API std::vector<std::string> campvis::TextFileParser::readAndParseItems<TextFileParser::ItemSeparatorLines>() const throw (tgt::FileException, tgt::CorruptedFileException) {
tgt::File* file = FileSys.open(_url);
if (!file || !file->isOpen())
throw tgt::FileException("Could not open file " + _url + " for reading.", _url);
std::vector<std::string> lines;
while (!file->eof()) {
lines.push_back(file->getLine());
}
file->close();
delete file;
return lines;
}
CAMPVIS_CORE_API std::vector<std::string> TextFileParser::readAndParseItems<TextFileParser::ItemSeparatorLines>() const throw (tgt::FileException, tgt::CorruptedFileException);
}
......
......@@ -31,7 +31,7 @@
namespace tgt {
class TextureReader {
class TGT_API TextureReader {
public:
TextureReader();
virtual ~TextureReader() {}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment