![]() |
ENSDF++ 1.1
An easy, fast and simple way to run querys towards the ENSDF database, written in C++.
|
00001 00013 using namespace std; 00014 00015 #ifndef LIST 00016 #define LIST //!<Inclusion guard 00017 #include <list> 00018 #endif 00019 00020 #ifndef STRING 00021 #define STRING //!<Inclusion guard 00022 #include <string> 00023 #endif 00024 00025 #ifndef VECTOR 00026 #define VECTOR //!<Inclusion guard 00027 #include <vector> 00028 #endif 00029 00030 #ifndef SET 00031 #define SET 00032 #include <set> 00033 #endif 00034 00035 #ifndef STDARG_H 00036 #define STDARG_H 00037 #include <stdarg.h> 00038 #endif 00039 00040 #include "Record.h" 00041 #include "DataFileException.h" 00042 #include "IdentificationRecord.h" 00043 #include "HistoryRecord.h" 00044 #include "QValueRecord.h" 00045 #include "CrossReferenceRecord.h" 00046 #include "CommentRecord.h" 00047 #include "ParentRecord.h" 00048 #include "NormalizationRecord.h" 00049 #include "ProductionNormalizationRecord.h" 00050 #include "LevelRecord.h" 00051 #include "BetaMinusRecord.h" 00052 #include "BetaPlusRecord.h" 00053 #include "AlphaRecord.h" 00054 #include "DelayedParticleRecord.h" 00055 #include "GammaRecord.h" 00056 #include "ReferenceRecord.h" 00057 #include "Enums.h" 00058 00059 #ifndef DATASET_H 00060 #define DATASET_H //!<Inclusion guard. 00061 00066 class Dataset 00067 { 00068 public: 00069 Dataset(list<string> textToInput 00070 ); 00071 00072 ~Dataset(); 00073 00074 list<Record * > getRecords() const; 00075 list<BetaRecordWrapper *> getBetaRecords() const; 00076 00077 list<IdentificationRecord* > getIdentificationRecords() const; 00078 list<HistoryRecord* > getHistoryRecords() const; 00079 list<CrossReferenceRecord* > getCrossReferenceRecords() const; 00080 list<CommentRecord* > getCommentRecords() const; 00081 list<ParentRecord* > getParentRecords() const; 00082 list<NormalizationRecord* > getNormalizationRecords() const; 00083 list<ProductionNormalizationRecord* > getProductionNormalizationRecords() const; 00084 list<LevelRecord* > getLevelRecords() const; 00085 list<BetaMinusRecord* > getBetaMinusRecords() const; 00086 list<BetaPlusRecord* > getBetaPlusRecords() const; 00087 list<AlphaRecord* > getAlphaRecords() const; 00088 list<DelayedParticleRecord* > getDelayedParticleRecords() const; 00089 list<GammaRecord* > getGammaRecords() const; 00090 list<ReferenceRecord* > getReferenceRecords() const; 00091 00092 protected: 00093 void generateRecordLists(); 00094 void initRecordStack(); 00095 void initRecords(); 00096 void initBetaRecords(); 00097 00098 list<Record* > myRecords; 00099 list<BetaRecordWrapper *> myBetaRecords; 00100 00101 list<IdentificationRecord* > myIdentificationRecords; 00102 list<HistoryRecord* > myHistoryRecords; 00103 list<CrossReferenceRecord* > myCrossReferenceRecords; 00104 list<CommentRecord* > myCommentRecords; 00105 list<ParentRecord* > myParentRecords; 00106 list<NormalizationRecord* > myNormalizationRecords; 00107 list<ProductionNormalizationRecord*> myProductionNormalizationRecords; 00108 list<LevelRecord* > myLevelRecords; 00109 list<BetaMinusRecord* > myBetaMinusRecords; 00110 list<BetaPlusRecord* > myBetaPlusRecords; 00111 list<AlphaRecord* > myAlphaRecords; 00112 list<DelayedParticleRecord* > myDelayedParticleRecords; 00113 list<GammaRecord* > myGammaRecords; 00114 list<QValueRecord* > myQValueRecords; 00115 list<ReferenceRecord* > myReferenceRecords; 00116 00117 private: 00118 void flushSpecific(RecordType toFlush 00119 ); 00120 00121 void flushAllStacksExcept(int nbrOfRecords, 00122 ...); 00123 00124 00125 map<RecordType, list<string> > myRecordStack; 00126 }; 00127 #endif