Salome HOME
Implementation of the "20830: EDF 1357 GUI : Hide/Show Icon"
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_SObject_i.cxx
index 8de5670dd63dea327ebb24f726cb8a436a7ee81d..fea239f5e737bc86b1a7a6bfaab329c520139c9b 100644 (file)
@@ -60,6 +60,7 @@ SALOMEDS::SObject_ptr SALOMEDS_SObject_i::New(const SALOMEDSImpl_SObject& theImp
 //============================================================================
 SALOMEDS_SObject_i::SALOMEDS_SObject_i(const SALOMEDSImpl_SObject& impl, CORBA::ORB_ptr orb)
 {
+  _impl = 0;
   if(!impl.IsNull()) {
      if(impl.IsComponent()) {
          SALOMEDSImpl_SComponent sco = impl;
@@ -84,6 +85,17 @@ SALOMEDS_SObject_i::~SALOMEDS_SObject_i()
    if(_impl) delete _impl;    
 }
 
+//================================================================================
+/*!
+ * \brief Returns true if the %SObject does not belong to any %Study
+ */
+//================================================================================
+
+CORBA::Boolean SALOMEDS_SObject_i::IsNull()
+{
+  SALOMEDS::Locker lock;
+  return !_impl || _impl->IsNull();
+}
 
 //============================================================================
 /*! Function :GetID