Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:27:16

0001 #include "Fireworks/Core/interface/FWJobMetadataManager.h"
0002 #include "Fireworks/Core/interface/FWJobMetadataUpdateRequest.h"
0003 #include <memory>
0004 
0005 FWJobMetadataManager::FWJobMetadataManager(void) : m_typeAndReps(nullptr) {}
0006 
0007 FWJobMetadataManager::~FWJobMetadataManager() {}
0008 
0009 /** Invoked when a given update request needs to happen. Will
0010     emit the metadataChanged_ signal when done so that observers can 
0011     update accordingly.
0012     
0013     Derived classes should implement the doUpdate() protected method
0014     to actually modify the metadata according to the request.
0015     
0016     Notice that this method is a consumer of request object and takes
0017     ownership of the lifetime of the @a request objects.
0018   */
0019 void FWJobMetadataManager::update(FWJobMetadataUpdateRequest* request) {
0020   std::unique_ptr<FWJobMetadataUpdateRequest> ptr(request);
0021   if (doUpdate(request))
0022     metadataChanged_();
0023 }
0024 
0025 void FWJobMetadataManager::initReps(const FWTypeToRepresentations& iTypeAndReps) {
0026   delete m_typeAndReps;
0027   m_typeAndReps = new FWTypeToRepresentations(iTypeAndReps);
0028 }