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 _REVERSE_COMPLEMENT_WORKER_H_
23 #define _REVERSE_COMPLEMENT_WORKER_H_
24 
25 #include <U2Lang/LocalDomain.h>
26 #include <U2Lang/WorkflowUtils.h>
27 
28 namespace U2 {
29 namespace LocalWorkflow {
30 
31 class RCWorkerPrompter : public PrompterBase<RCWorkerPrompter> {
32     Q_OBJECT
33 public:
34     RCWorkerPrompter(Actor *p = 0)
35         : PrompterBase<RCWorkerPrompter>(p) {
36     }
37 
38 protected:
39     QString composeRichDoc();
40 };
41 
42 class RCWorker : public BaseWorker {
43     Q_OBJECT
44 public:
RCWorker(Actor * a)45     RCWorker(Actor *a)
46         : BaseWorker(a), input(nullptr), output(nullptr) {
47     }
48 
49     virtual void init();
50     virtual Task *tick();
cleanup()51     virtual void cleanup() {
52     }
53 
54     /*private slots:
55         void sl_taskFinished(Task*);*/
56 
57 protected:
58     IntegralBus *input, *output;
59 };
60 
61 class RCWorkerFactory : public DomainFactory {
62 public:
63     static const QString ACTOR_ID;
64     static void init();
RCWorkerFactory()65     RCWorkerFactory()
66         : DomainFactory(ACTOR_ID) {
67     }
createWorker(Actor * a)68     virtual Worker *createWorker(Actor *a) {
69         return new RCWorker(a);
70     }
71 };
72 
73 }  // namespace LocalWorkflow
74 }  // namespace U2
75 
76 #endif
77