X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fengine%2FAnyInputPort.cxx;h=3db6b63297ba49803acdba02210702e1bf6d2428;hb=e66f0810428fc92d9f3e4089e43e068f68c7ed7e;hp=dceb3b4764cd8489f6596167940d7a6d2e79a74f;hpb=b797825313f7af9fd691d137c7c6df4950e7de2c;p=modules%2Fyacs.git diff --git a/src/engine/AnyInputPort.cxx b/src/engine/AnyInputPort.cxx old mode 100755 new mode 100644 index dceb3b476..3db6b6329 --- a/src/engine/AnyInputPort.cxx +++ b/src/engine/AnyInputPort.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2006-2014 CEA/DEN, EDF R&D +// Copyright (C) 2006-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 @@ -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;