00001 #ifndef SCANWRITERFACTORY_H
00002 #define SCANWRITERFACTORY_H
00003
00004
00005 #include <CommonWithDsp/processor.h>
00006 #include <map>
00007 #include <utility>
00008
00009 using namespace std;
00010
00011 namespace SctData {
00012
00013 class ScanResultWriter;
00014 class ScanDataWriter;
00015
00016 class ScanWriterFactory {
00017 public:
00018 static ScanWriterFactory& getFactory();
00019 bool addWriterToMap(UINT16 dataType, ScanResultWriter& resultWriter, ScanDataWriter& dataWriter);
00020 static ScanDataWriter& getDataWriter(UINT16 dataType);
00021 static ScanResultWriter& getResultWriter(UINT16 dataType);
00022
00023 private:
00024 ScanWriterFactory();
00025 map<UINT16, pair<ScanResultWriter*, ScanDataWriter*> > writerMap;
00026 };
00027
00028 }
00029
00030 #endif //#ifndef SCANWRITERFACTORY_H