VHISTlib
1.84.0.3018
|
00001 /* $HEADERS 00002 $Id: summaryreader.h 2792 2013-05-06 11:25:27Z michael $ 00003 */ 00004 00005 #ifndef SUMMARYREADER_INCLUDED 00006 #define SUMMARYREADER_INCLUDED 00007 00008 #include "../shared/misc_defines.h" 00009 #include "../shared/tripple.tpl" 00010 00011 #include <QObject> 00012 #include <QSharedPointer> 00013 #include <QString> 00014 00015 #include "tags.h" 00016 #include "summary.h" 00017 00018 namespace vhist 00019 { 00020 00021 typedef Tripple<QString, QString, QSharedPointer<QString> > Attribute; 00022 00030 class VHIST_EXTERN SummaryReader: public QObject 00031 { 00032 Q_OBJECT 00033 public: // construction, destruction and assignment 00034 SummaryReader(); 00035 ~SummaryReader(); 00036 00037 public: 00038 Summary readSummary(const QString& data); 00039 00040 private: 00041 Summary parseSummary(const QString& content); 00042 Workflowstep parseWorkflowstep(const QString& content); 00043 FileSummary parseFile(const QString& content); 00044 Tripple<UserAttributes,UserAttributeOrder,UserAttributeUnits> 00045 parseUserAttributes(const QString& content); 00046 Attribute parseAttribute(const QString& content); 00047 }; 00048 00049 Summary VHIST_EXTERN makeSummaryFromTags(const SectionTag& tag, const FileTagList& files); 00050 FileSummary VHIST_EXTERN makeFileSummaryFromFileTag(const FileTag& tag); 00051 00052 void VHIST_EXTERN printFileSummary(const FileSummary& f); 00053 void VHIST_EXTERN printSummary(const Summary& s); 00054 00055 QString VHIST_EXTERN makeFileHash(const FileSummary& f, int sectionID); 00056 00057 } // namespace 00058 00059 #endif 00060