Salome HOME
Update copyrights
[modules/yacs.git] / src / engine / Task.hxx
1 // Copyright (C) 2006-2019  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef __TASK_HXX__
21 #define __TASK_HXX__
22
23 #include "YACSlibEngineExport.hxx"
24 #include "define.hxx"
25 #include <set>
26
27 namespace YACS
28 {
29   namespace ENGINE
30   {
31     class ComponentInstance;
32     class Container;
33
34     class YACSLIBENGINE_EXPORT Task
35     {
36     public:
37       virtual void begin() = 0;
38       virtual bool isReady() = 0;
39       virtual void execute() = 0;
40       virtual void load() = 0;
41       virtual void loaded() = 0;
42       virtual void connected() = 0;
43       virtual void initService() = 0;
44       virtual void connectService() = 0;
45       virtual void disconnectService() = 0;
46       virtual void getCoupledTasks(std::set<Task*>& coupledSet) = 0;
47       virtual bool isDeployable() const = 0;
48       virtual ComponentInstance *getComponent() = 0;
49       virtual const ComponentInstance *getComponent() const = 0;
50       virtual Container *getContainer() = 0;
51       virtual YACS::StatesForNode getState() const = 0;
52       virtual void finished() = 0;
53       virtual void aborted() = 0;
54       virtual ~Task();
55     };
56   }
57 }
58
59 #endif