1 // Copyright (C) 2016-2023 CEA, EDF
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // Author : Anthony Geay (EDF R&D)
21 #ifndef __YDFXGUIWRAP_HXX__
22 #define __YDFXGUIWRAP_HXX__
24 #include "ydfxwidgetsExport.hxx"
29 class YACSEvalSession;
30 class YACSEvalObserver;
31 class YACSEvalInputPort;
32 class YACSEvalExecParams;
33 class YACSEvalOutputPort;
34 class YACSEvalListOfResources;
36 class YACSEvalYFXWrap : public QObject
40 YDFXWIDGETS_EXPORT YACSEvalYFXWrap(YACSEvalYFX *efx):_efx(efx),_isSeqOfValsSet(false),_isRunning(false) { }
41 YDFXWIDGETS_EXPORT YACSEvalYFXWrap(const YACSEvalYFXWrap& other):_efx(other._efx) { }
42 YDFXWIDGETS_EXPORT std::vector< YACSEvalInputPort * > getFreeInputPorts() const;
43 YDFXWIDGETS_EXPORT std::vector< YACSEvalOutputPort * > getFreeOutputPorts() const;
44 YDFXWIDGETS_EXPORT YACSEvalExecParams *getParams() const;
45 YDFXWIDGETS_EXPORT bool isLocked() const;
46 YDFXWIDGETS_EXPORT void unlockAll();
47 YDFXWIDGETS_EXPORT YACSEvalListOfResources *giveResources();
48 YDFXWIDGETS_EXPORT bool run(YACSEvalSession *session, int& nbOfBranches);
49 YDFXWIDGETS_EXPORT void registerObserver(YACSEvalObserver *observer);
50 YDFXWIDGETS_EXPORT ~YACSEvalYFXWrap();
51 public:// modified API
52 YDFXWIDGETS_EXPORT void lockPortsForEvaluation();
53 YDFXWIDGETS_EXPORT int getNbOfItems() const;
55 YDFXWIDGETS_EXPORT void setRunningStatus(bool status);
56 YDFXWIDGETS_EXPORT bool isRunning() const { return _isRunning; }
57 YDFXWIDGETS_EXPORT void updateSequencesStatus();
58 YDFXWIDGETS_EXPORT bool computeSequencesStatus(int& nbOfVals);
60 void lockSignal(bool);
61 void sequencesAreSetSignal(bool);