X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fengine%2FAnyInputPort.cxx;h=bf0fed1d9c8d79a14870603834a0df0955cba78e;hb=2d7ef9f9768a58b0f6ccbfa403d39ecf8b7356a3;hp=f86ba5e217b15f5aba94611e25498df507744bd3;hpb=c81be9b5e74b26e207bd6efd0ccf68418ac536a3;p=modules%2Fyacs.git diff --git a/src/engine/AnyInputPort.cxx b/src/engine/AnyInputPort.cxx index f86ba5e21..bf0fed1d9 100644 --- a/src/engine/AnyInputPort.cxx +++ b/src/engine/AnyInputPort.cxx @@ -1,9 +1,9 @@ -// Copyright (C) 2006-2012 CEA/DEN, EDF R&D +// Copyright (C) 2006-2015 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 // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -19,13 +19,16 @@ #include "AnyInputPort.hxx" #include "TypeCode.hxx" -#include -#include #include "Mutex.hxx" +#include "AutoLocker.hxx" //#define _DEVDEBUG_ #include "YacsTrace.hxx" +#include +#include +#include + using namespace YACS::ENGINE; using namespace std; @@ -83,7 +86,7 @@ void AnyInputPort::exRestoreInit() void AnyInputPort::put(Any *data) { - YACS::BASES::Lock lock(&_mutex); + YACS::BASES::AutoLocker lock(&_mutex); if(_value) _value->decrRef(); _value=data; @@ -105,7 +108,7 @@ void *AnyInputPort::get() const std::string AnyInputPort::getAsString() { - YACS::BASES::Lock lock(&_mutex); + YACS::BASES::AutoLocker lock(&_mutex); return getRuntime()->convertNeutralAsString(edGetType(),_value); } @@ -130,7 +133,7 @@ std::string AnyInputPort::dump() switch (_value->getType()->kind()) { case Double: - xmldump << "" << _value->getDoubleValue() << "" << endl; + xmldump << "" << setprecision(16) << _value->getDoubleValue() << "" << endl; break; case Int: xmldump << "" << _value->getIntValue() << "" << endl;