Version: 9.16.0
Task.hxx
Go to the documentation of this file.
1// Copyright (C) 2006-2026 CEA, EDF
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
24#include "define.hxx"
25#include <set>
26#include <string>
27
28namespace YACS
29{
30 namespace ENGINE
31 {
32 class ComponentInstance;
33 class Container;
34
36 {
37 public:
38 virtual void begin() = 0;
39 virtual bool isReady() = 0;
40 virtual void execute() = 0;
41 virtual void load() = 0;
42 virtual void loaded() = 0;
43 virtual void connected() = 0;
44 virtual void initService() = 0;
45 virtual void connectService() = 0;
46 virtual void disconnectService() = 0;
47 virtual void getCoupledTasks(std::set<Task*>& coupledSet) = 0;
48 virtual bool isDeployable() const = 0;
50 virtual const ComponentInstance *getComponent() const = 0;
51 virtual Container *getContainer() = 0;
52 virtual YACS::StatesForNode getState() const = 0;
53 virtual void finished() = 0;
54 virtual void aborted() = 0;
55 virtual void imposeResource(const std::string& resource_name,
56 const std::string& container_name) {}
57 virtual bool canAcceptImposedResource() { return false;}
58 virtual bool hasImposedResource()const { return false;}
59 virtual ~Task();
60 };
61 }
62}
63
64#endif
#define YACSLIBENGINE_EXPORT
Base class for all component instances.
virtual bool isDeployable() const =0
virtual void initService()=0
virtual bool canAcceptImposedResource()
Definition: Task.hxx:57
virtual const ComponentInstance * getComponent() const =0
virtual void begin()=0
virtual void aborted()=0
virtual void imposeResource(const std::string &resource_name, const std::string &container_name)
Definition: Task.hxx:55
virtual void connected()=0
virtual void finished()=0
virtual void getCoupledTasks(std::set< Task * > &coupledSet)=0
virtual void disconnectService()=0
virtual void load()=0
virtual void execute()=0
virtual bool isReady()=0
virtual Container * getContainer()=0
virtual void connectService()=0
virtual void loaded()=0
virtual YACS::StatesForNode getState() const =0
virtual bool hasImposedResource() const
Definition: Task.hxx:58
virtual ComponentInstance * getComponent()=0
StatesForNode
Definition: define.hxx:34