-// Copyright (C) 2012-2015 CEA/DEN, EDF R&D
+// Copyright (C) 2012-2016 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
// 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)
#include "YACSEvalPort.hxx"
return new YACSEvalAnyInt(*this);
}
+bool YACSEvalPort::IsInputPortPublishable(const YACS::ENGINE::InputPort *port)
+{
+ YACS::ENGINE::TypeCode *tc(port->edGetType());
+ if(!tc)
+ throw YACS::Exception("YACSEvalPort::IsInPortPublishable : null type code !");
+ if(tc->kind()==YACS::ENGINE::Double || tc->kind()==YACS::ENGINE::Int)
+ return true;
+ if(tc->kind()==YACS::ENGINE::String)
+ {
+ if(port->edIsManuallyInitialized())
+ return false;
+ }
+ return true;
+}
+
+bool YACSEvalPort::IsOutputPortPublishable(const YACS::ENGINE::OutputPort *port)
+{
+ YACS::ENGINE::TypeCode *tc(port->edGetType());
+ if(!tc)
+ throw YACS::Exception("YACSEvalPort::IsOutputPortPublishable : null type code !");
+ return tc->kind()==YACS::ENGINE::Double || tc->kind()==YACS::ENGINE::Int;
+}
+
std::string YACSEvalPort::GetTypeOfData(const YACS::ENGINE::DataPort *port)
{
YACS::ENGINE::TypeCode *tc(port->edGetType());
return hasDefaultValueDefined();
}
+bool YACSEvalInputPort::isLocked() const
+{
+ return _isLocked;
+}
+
bool YACSEvalInputPort::hasDefaultValueDefined() const
{
return _ptr->edIsManuallyInitialized();
throw YACS::Exception("YACSEvalInputPort::checkForNonConstMethod : trying to modify a locked input ! To release it call unlockAll on YACSEvalYFX instance owning this !");
}
-YACSEvalOutputPort::YACSEvalOutputPort(YACS::ENGINE::OutputPort *ptr):_ptr(ptr)
+YACSEvalOutputPort::YACSEvalOutputPort(YACS::ENGINE::OutputPort *ptr):_ptr(ptr),_isQOfInt(false)
{
GetTypeOfData(_ptr);
}