-// 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
#include "AnyInputPort.hxx"
#include "TypeCode.hxx"
-#include <iostream>
-#include <sstream>
#include "Mutex.hxx"
+#include "AutoLocker.hxx"
//#define _DEVDEBUG_
#include "YacsTrace.hxx"
+#include <iostream>
+#include <iomanip>
+#include <sstream>
+
using namespace YACS::ENGINE;
using namespace std;
void AnyInputPort::put(Any *data)
{
- YACS::BASES::Lock lock(&_mutex);
+ YACS::BASES::AutoLocker<YACS::BASES::Mutex> lock(&_mutex);
if(_value)
_value->decrRef();
_value=data;
std::string AnyInputPort::getAsString()
{
- YACS::BASES::Lock lock(&_mutex);
+ YACS::BASES::AutoLocker<YACS::BASES::Mutex> lock(&_mutex);
return getRuntime()->convertNeutralAsString(edGetType(),_value);
}
switch (_value->getType()->kind())
{
case Double:
- xmldump << "<value><double>" << _value->getDoubleValue() << "</double></value>" << endl;
+ xmldump << "<value><double>" << setprecision(16) << _value->getDoubleValue() << "</double></value>" << endl;
break;
case Int:
xmldump << "<value><int>" << _value->getIntValue() << "</int></value>" << endl;