1 /** 2 * UGENE - Integrated Bioinformatics Tools. 3 * Copyright (C) 2008-2021 UniPro <ugene@unipro.ru> 4 * http://ugene.net 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version 2 9 * of the License, or (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 * MA 02110-1301, USA. 20 */ 21 22 #ifndef _ASSEMBLY_TO_SEQUENCES_WORKER_ 23 #define _ASSEMBLY_TO_SEQUENCES_WORKER_ 24 25 #include <U2Lang/LocalDomain.h> 26 #include <U2Lang/WorkflowUtils.h> 27 28 namespace U2 { 29 namespace LocalWorkflow { 30 31 class AssemblyToSequencesTask; 32 33 class AssemblyToSequencesWorker : public BaseWorker { 34 Q_OBJECT 35 public: 36 AssemblyToSequencesWorker(Actor *p); 37 virtual void init(); 38 virtual Task *tick(); cleanup()39 virtual void cleanup() { 40 } 41 42 private slots: 43 void sl_taskFinished(); 44 45 private: 46 AssemblyToSequencesTask *converter; 47 IntegralBus *inChannel; 48 IntegralBus *outChannel; 49 }; // AssemblyToSequencesWorker 50 51 class AssemblyToSequencesTask : public Task { 52 Q_OBJECT 53 public: 54 AssemblyToSequencesTask(const Message &m, const QVariantMap &context, IntegralBus *channel, DbiDataStorage *storage); 55 56 virtual void run(); 57 virtual void cleanup(); 58 59 private: 60 Message message; 61 QVariantMap ctx; 62 IntegralBus *channel; 63 DbiDataStorage *storage; 64 }; 65 66 class AssemblyToSequencesWorkerFactory : public DomainFactory { 67 public: 68 static const QString ACTOR_ID; 69 AssemblyToSequencesWorkerFactory()70 AssemblyToSequencesWorkerFactory() 71 : DomainFactory(ACTOR_ID) { 72 } 73 static void init(); 74 virtual Worker *createWorker(Actor *a); 75 76 }; // AssemblyToSequencesWorkerFactory 77 78 class AssemblyToSequencesPrompter : public PrompterBase<AssemblyToSequencesPrompter> { 79 Q_OBJECT 80 public: 81 AssemblyToSequencesPrompter(Actor *p = nullptr) 82 : PrompterBase<AssemblyToSequencesPrompter>(p) { 83 } 84 85 protected: 86 QString composeRichDoc(); 87 }; // AssemblyToSequencesPrompter 88 89 } // namespace LocalWorkflow 90 } // namespace U2 91 92 #endif // _ASSEMBLY_TO_SEQUENCES_WORKER_ 93