10 #define _FILEPARSER_H_
12 #include <QtCore/QObject>
13 #include <QtCore/QThread>
14 #include <QtCore/QReadWriteLock>
69 virtual const std::string
type() {
return "Unknown";}
80 void savePos(
const std::streampos& eventStartPos,
const uint64_t eventId);
event2positionreaders_t & _event2posreader
reference to the map containing the beginnings of the event
declaration of a pausable QThread
static shared_pointer instance(const std::string type, const filereaderpointerpair_t readerpointerpair, event2positionreaders_t &event2posreader, QReadWriteLock &lock)
create an instance of the requested type
filereaderpointerpair_t _readerpointerpair
the file pointer
std::tr1::shared_ptr< FileParser > shared_pointer
typedef the shared pointer of this
QReadWriteLock & _lock
Lock that protects the map.
file contains global definitions for project cass
void savePos(const std::streampos &eventStartPos, const uint64_t eventId)
put current file position in the eventmap
std::pair< std::tr1::shared_ptr< FileReader >, FilePointer > filereaderpointerpair_t
pair of a file pointer with the associated file reader
FileParser(const filereaderpointerpair_t readerpointerpair, event2positionreaders_t &event2posreader, QReadWriteLock &lock)
constructor
virtual ~FileParser()
virtual destructor
base class for all file parsers
std::map< uint64_t, positionreaders_t > event2positionreaders_t
the list of events contained in a file with the associated position and reader
virtual const std::string type()
A QThread that has the ability to be paused and resumed.