delete vn[i];
_root._node->Reset();
+ delete _root._node;
}
//Returns true if this document is empty
#-------------------------------------------------------------------------
- def __init__(self, orb):
+ def __init__(self, orb=None):
"""
Standard Constructor, with ORB reference.
Initializes the naming service root context
"""
#MESSAGE ( "SALOME_NamingServicePy_i::__init__" )
+ if orb is None:
+ orb=CORBA.ORB_init([''], CORBA.ORB_ID)
self._orb = orb
# initialize root context and current context
ok = 0
public virtual SALOME::GenericObj_i
{
private:
- CORBA::ORB_ptr _orb;
+ CORBA::ORB_var _orb;
SALOMEDSImpl_ChildIterator* _it;
public:
_impl = theImpl;
}
+SALOMEDS_GenericAttribute_i::~SALOMEDS_GenericAttribute_i()
+{
+}
+
void SALOMEDS_GenericAttribute_i::CheckLocked() throw (SALOMEDS::GenericAttribute::LockProtection)
{
SALOMEDS::Locker lock;
protected:
DF_Attribute* _impl;
- CORBA::ORB_ptr _orb;
+ CORBA::ORB_var _orb;
public:
SALOMEDS_GenericAttribute_i(DF_Attribute* theImpl, CORBA::ORB_ptr theOrb);
- virtual ~SALOMEDS_GenericAttribute_i() {};
+ virtual ~SALOMEDS_GenericAttribute_i();
void CheckLocked() throw (SALOMEDS::GenericAttribute::LockProtection);
private:
- CORBA::ORB_ptr _orb;
+ CORBA::ORB_var _orb;
SALOMEDSImpl_SComponentIterator* _impl;
public:
SALOMEDS::SComponent_ptr SALOMEDS_SComponent_i::New(const SALOMEDSImpl_SComponent& theImpl, CORBA::ORB_ptr theORB)
{
SALOMEDS_SComponent_i* sco_servant = new SALOMEDS_SComponent_i(theImpl, theORB);
- SALOMEDS::SComponent_var sco = SALOMEDS::SComponent::_narrow(sco_servant->SComponent::_this());
- return sco._retn();
+ return sco_servant->_this();
}
//============================================================================
SALOMEDS::SObject_ptr SALOMEDS_SObject_i::New(const SALOMEDSImpl_SObject& theImpl, CORBA::ORB_ptr theORB)
{
SALOMEDS_SObject_i* so_servant = new SALOMEDS_SObject_i(theImpl, theORB);
- SALOMEDS::SObject_var so = SALOMEDS::SObject::_narrow(so_servant->_this());
- return so._retn();
+ return so_servant->_this();
}
public virtual SALOME::GenericObj_i
{
protected:
- CORBA::ORB_ptr _orb;
+ CORBA::ORB_var _orb;
SALOMEDSImpl_SObject* _impl;
public:
SALOMEDS::Locker lock;
CheckLocked();
ASSERT(!CORBA::is_nil(aComponent));
- SALOMEDSImpl_SComponent aSCO = _impl->GetOwner()->GetSComponent(aComponent->GetID());
+ CORBA::String_var cid=aComponent->GetID();
+ SALOMEDSImpl_SComponent aSCO = _impl->GetOwner()->GetSComponent(cid.in());
_impl->RemoveComponent(aSCO);
}
class SALOMEDS_StudyBuilder_i: public POA_SALOMEDS::StudyBuilder
{
private:
- CORBA::ORB_ptr _orb;
+ CORBA::ORB_var _orb;
SALOMEDSImpl_StudyBuilder* _impl;
public:
MESSAGE("NewStudy : Creating the CORBA servant holding it... ");
SALOMEDS_Study_i *Study_servant = new SALOMEDS_Study_i(aStudyImpl, _orb);
- SALOMEDS::Study_var Study = SALOMEDS::Study::_narrow(Study_servant->_this());
+ SALOMEDS::Study_var Study = Study_servant->_this();
// Register study in the naming service
// Path to acces the study
_mapOfPOA[Study->StudyId()] = _poa;
- return Study;
+ return Study._retn();
}
//============================================================================
//Create iterator
SALOMEDS_ChildIterator_i* it_servant = new SALOMEDS_ChildIterator_i(anItr, _orb);
- SALOMEDS::ChildIterator_var it = SALOMEDS::ChildIterator::_narrow(it_servant->_this());
- return it;
+ return it_servant->_this();
}
SALOMEDS::SComponentIterator_var itcomponent = NewComponentIterator();
for (; itcomponent->More(); itcomponent->Next()) {
SALOMEDS::SComponent_var sco = itcomponent->Value();
- MESSAGE ( "Look for an engine for data type :"<< sco->ComponentDataType());
+ CORBA::String_var compodatatype=sco->ComponentDataType();
+ MESSAGE ( "Look for an engine for data type :"<< compodatatype);
// if there is an associated Engine call its method for closing
CORBA::String_var IOREngine;
if (sco->ComponentIOR(IOREngine)) {
// we have found the associated engine to write the data
- MESSAGE ( "We have found an engine for data type :"<< sco->ComponentDataType());
+ MESSAGE ( "We have found an engine for data type :"<< compodatatype);
//_narrow can throw a corba exception
try
{
class Standard_EXPORT SALOMEDS_Study_i: public POA_SALOMEDS::Study
{
private:
- CORBA::ORB_ptr _orb;
+ CORBA::ORB_var _orb;
SALOMEDSImpl_Study* _impl;
SALOMEDS_StudyBuilder_i* _builder;
{
private:
- CORBA::ORB_ptr _orb;
+ CORBA::ORB_var _orb;
SALOMEDSImpl_UseCaseBuilder* _impl;
public:
public virtual SALOME::GenericObj_i
{
private:
- CORBA::ORB_ptr _orb;
+ CORBA::ORB_var _orb;
SALOMEDSImpl_UseCaseIterator* _impl;
public:
*/
//============================================================================
SALOMEDSImpl_Study::~SALOMEDSImpl_Study()
-{}
+{
+ delete _builder;
+ delete _cb;
+ delete _useCaseBuilder;
+}
//============================================================================
/*! Function : GetPersistentReference
//============================================================================
SALOMEDSImpl_StudyManager::~SALOMEDSImpl_StudyManager()
{
+ _appli->Close(_clipboard);
// Destroy application
delete _appli;
}