// File : SALOMEDS.idl
// Author : Yves FRICAUD
-// $Header$
//
/*! \file SALOMEDS.idl \brief This file contains a set of interfaces used for creation, management
and modification of the %Study
/*! Name of the %SObject
*/
attribute string Name; // equivalent to setName() & getName()
+
+/*! Returns true if the %SObject does not belong to any %Study
+*/
+ boolean IsNull();
+
/*! Gets an object %ID
\return ID of the %SObject.
}
}
+bool SALOMEDS_SObject::IsNull() const
+{
+ return _isLocal ? ( !_local_impl || _local_impl->IsNull() ) : _corba_impl->IsNull();
+}
+
std::string SALOMEDS_SObject::GetID()
{
std::string aValue;
SALOMEDS_SObject(const SALOMEDSImpl_SObject& theSObject);
virtual ~SALOMEDS_SObject();
+ virtual bool IsNull() const;
virtual std::string GetID();
virtual _PTR(SComponent) GetFatherComponent();
virtual _PTR(SObject) GetFather();
//============================================================================
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;
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
virtual ~SALOMEDS_SObject_i();
+ virtual CORBA::Boolean IsNull();
virtual char* GetID();
virtual SALOMEDS::SComponent_ptr GetFatherComponent();
virtual SALOMEDS::SObject_ptr GetFather() ;
public:
virtual ~SALOMEDSClient_SObject() {}
+ virtual bool IsNull() const = 0;
virtual std::string GetID() = 0;
virtual _PTR(SComponent) GetFatherComponent() = 0;
virtual _PTR(SObject) GetFather() = 0;