Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Related Pages

XmlSummaryFile.cpp

00001 #include "XmlSummaryFile.h"
00002 #include "Sct/IoExceptions.h"
00003 #include "Sct/Env.h"
00004 #include <iostream>
00005 
00006 using namespace std;
00007 
00008 namespace SctTest {
00009 
00010 XmlSummaryFile::XmlSummaryFile(string fileName) : file(fileName.c_str()) {
00011     if (!file.is_open()) throw Sct::FileException(fileName, "Cannot open file", __FILE__, __LINE__);
00012 }
00013 
00014 bool XmlSummaryFile::hasMoreRecords() {
00015     if (file.eof() || !file.is_open()) return false;
00016     return true;
00017 }
00018 
00019 XmlSummaryRecord XmlSummaryFile::getNextRecord() {
00020     XmlSummaryRecord s;
00021     if (!hasMoreRecords()) return s;
00022     file >> s.serialNumber >> s.xmlFile;// >> std::ws;
00023     s.xmlFile = Sct::Env::substituteVariables(s.xmlFile);
00024     return s;
00025 }
00026 }

Generated on Thu Jul 15 09:51:02 2004 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5