X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSALOMEDS%2FSALOMEDS_AttributeInteger.cxx;h=f7d4addfb5e9291a0ba35c966daa17443d28a11a;hb=ec64825655b99b08182ef682868ccb732edb3c2a;hp=b32650bcdc5ffe0175268f0fbe48264d51edaedd;hpb=35960e77d7f9f2a5cac7d6550c23f12943bc4378;p=modules%2Fyacs.git diff --git a/src/SALOMEDS/SALOMEDS_AttributeInteger.cxx b/src/SALOMEDS/SALOMEDS_AttributeInteger.cxx index b32650bcd..f7d4addfb 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeInteger.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeInteger.cxx @@ -22,6 +22,7 @@ // Module : SALOME #include "SALOMEDS_AttributeInteger.hxx" +#include "SALOMEDS.hxx" #include #include @@ -40,14 +41,20 @@ SALOMEDS_AttributeInteger::~SALOMEDS_AttributeInteger() int SALOMEDS_AttributeInteger::Value() { int aValue; - if(_isLocal) aValue = Handle(SALOMEDSImpl_AttributeInteger)::DownCast(_local_impl)->Value(); + if (_isLocal) { + SALOMEDS::Locker lock; + aValue = Handle(SALOMEDSImpl_AttributeInteger)::DownCast(_local_impl)->Value(); + } else aValue = SALOMEDS::AttributeInteger::_narrow(_corba_impl)->Value(); return aValue; } - + void SALOMEDS_AttributeInteger::SetValue(int value) { - CheckLocked(); - if(_isLocal) Handle(SALOMEDSImpl_AttributeInteger)::DownCast(_local_impl)->SetValue(value); + if (_isLocal) { + CheckLocked(); + SALOMEDS::Locker lock; + Handle(SALOMEDSImpl_AttributeInteger)::DownCast(_local_impl)->SetValue(value); + } else SALOMEDS::AttributeInteger::_narrow(_corba_impl)->SetValue(value); }