File indexing completed on 2024-04-06 12:11:32
0001 #ifndef Fireworks_Core_FWJobMetadataManager
0002 #define Fireworks_Core_FWJobMetadataManager
0003
0004 #include "Fireworks/Core/interface/FWTypeToRepresentations.h"
0005
0006 #include "sigc++/signal.h"
0007
0008 #include <string>
0009 #include <vector>
0010
0011 class FWJobMetadataUpdateRequest;
0012 class FWTypeToRepresentations;
0013
0014
0015
0016
0017
0018 class FWJobMetadataManager {
0019 public:
0020 struct Data {
0021 std::string purpose_;
0022 std::string type_;
0023 std::string moduleLabel_;
0024 std::string productInstanceLabel_;
0025 std::string processName_;
0026 };
0027
0028 FWJobMetadataManager();
0029 virtual ~FWJobMetadataManager();
0030
0031 std::vector<Data> &usableData() { return m_metadata; }
0032 std::vector<std::string> &processNamesInJob() { return m_processNamesInJob; }
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044 void update(FWJobMetadataUpdateRequest *request);
0045
0046
0047
0048
0049 void initReps(const FWTypeToRepresentations &iTypeAndReps);
0050
0051
0052 virtual bool hasModuleLabel(std::string &moduleLabel) = 0;
0053
0054 sigc::signal<void()> metadataChanged_;
0055
0056 protected:
0057
0058
0059
0060
0061
0062 virtual bool doUpdate(FWJobMetadataUpdateRequest *) = 0;
0063 std::vector<Data> m_metadata;
0064 std::vector<std::string> m_processNamesInJob;
0065 FWTypeToRepresentations *m_typeAndReps;
0066 };
0067
0068 #endif