X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fevalyfx%2FYACSEvalPort.hxx;h=988f53eb8fc13b8926ea1675984223ee4c2c7c2e;hb=237b241699ced019d48ecc8cac65bf9abeb4b5e1;hp=3044dcae7711ef6cdc7833607261ed1d2705f51d;hpb=622943a60b0033fccad737b98e90accc1d2d2fe3;p=modules%2Fyacs.git diff --git a/src/evalyfx/YACSEvalPort.hxx b/src/evalyfx/YACSEvalPort.hxx index 3044dcae7..988f53eb8 100644 --- a/src/evalyfx/YACSEvalPort.hxx +++ b/src/evalyfx/YACSEvalPort.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2012-2015 CEA/DEN, EDF R&D +// Copyright (C) 2012-2020 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -15,7 +15,7 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +// // Author : Anthony Geay (EDF R&D) #ifndef __YACSEVALPORT_HXX__ @@ -61,7 +61,7 @@ public: private: double _v; public: - static const char TYPE_REPR[]; + YACSEVALYFX_EXPORT static const char TYPE_REPR[]; }; class YACSEvalAnyInt : public YACSEvalAny @@ -76,7 +76,7 @@ public: private: int _v; public: - static const char TYPE_REPR[]; + YACSEVALYFX_EXPORT static const char TYPE_REPR[]; }; class YACSEvalPort @@ -84,6 +84,9 @@ class YACSEvalPort public: YACSEVALYFX_EXPORT virtual std::string getTypeOfData() const = 0; YACSEVALYFX_EXPORT virtual ~YACSEvalPort() { } +public: + YACSEVALYFX_EXPORT static bool IsInputPortPublishable(const YACS::ENGINE::InputPort *port); + YACSEVALYFX_EXPORT static bool IsOutputPortPublishable(const YACS::ENGINE::OutputPort *port); protected: YACSEVALYFX_EXPORT static std::string GetTypeOfData(const YACS::ENGINE::DataPort *port); }; @@ -95,26 +98,33 @@ public: YACSEVALYFX_EXPORT std::string getName() const; YACSEVALYFX_EXPORT std::string getTypeOfData() const; YACSEVALYFX_EXPORT bool isOKForLock() const; + YACSEVALYFX_EXPORT bool isLocked() const; // YACSEVALYFX_EXPORT bool hasDefaultValueDefined() const; YACSEVALYFX_EXPORT YACSEvalAny *getDefaultValueDefined() const; YACSEVALYFX_EXPORT void setDefaultValue(const YACSEvalAny *parameter); YACSEVALYFX_EXPORT void setSequenceOfValuesToEval(const YACSEvalSeqAny* vals); - YACSEVALYFX_EXPORT bool hasSequenceOfValuesToEval(std::size_t& sz) const; + YACSEVALYFX_EXPORT bool hasSequenceOfValuesToEval() const; + YACSEVALYFX_EXPORT YACSEvalSeqAny *getSequenceOfValuesToEval() const { return _mySeq; } + YACSEVALYFX_EXPORT bool isRandomVar() const { return _isRandom; } + YACSEVALYFX_EXPORT void declareRandomnessStatus(bool isRandom); // YACSEVALYFX_EXPORT YACS::ENGINE::InputPort *getUndergroundPtr() const { return _ptr; } - YACSEVALYFX_EXPORT void initializeUndergroundWithSeq(YACS::ENGINE::InputPyPort *p) const; + YACSEVALYFX_EXPORT std::size_t initializeUndergroundWithSeq() const; // YACSEVALYFX_EXPORT virtual ~YACSEvalInputPort(); void lock() const { _isLocked=true; } - void unlock() const { _isLocked=false; } + void unlock() const { _isLocked=false; _isRandom=false; } + void setUndergroundPortToBeSet(YACS::ENGINE::InputPyPort *p) const; private: YACSEvalAny *convertFromInternalAnyToExternal(YACS::ENGINE::Any *data) const; void checkForNonConstMethod() const; private: YACS::ENGINE::InputPort * _ptr; YACSEvalSeqAny *_mySeq; + mutable bool _isRandom; mutable bool _isLocked; + mutable YACS::ENGINE::InputPyPort *_undergroundPort; }; class YACSEvalOutputPort : public YACSEvalPort @@ -123,11 +133,14 @@ public: YACSEVALYFX_EXPORT YACSEvalOutputPort(YACS::ENGINE::OutputPort *ptr); YACSEVALYFX_EXPORT std::string getName() const; YACSEVALYFX_EXPORT std::string getTypeOfData() const; + YACSEVALYFX_EXPORT bool setQOfInterestStatus(bool newStatus) { _isQOfInt=newStatus; return _isQOfInt; } + YACSEVALYFX_EXPORT bool isQOfInterest() const { return _isQOfInt; } // YACSEVALYFX_EXPORT YACS::ENGINE::OutputPort *getUndergroundPtr() const { return _ptr; } // private: YACS::ENGINE::OutputPort * _ptr; + bool _isQOfInt; }; #endif