Salome HOME
Merge V9_dev branch into master
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_ChildIterator_i.cxx
index e5c3ad9e1cfd6a876d7e323d9ae777ee50eb3d78..574cf45b04ee7caef4bec4116c0786d43517cbb3 100644 (file)
@@ -25,6 +25,7 @@
 //  Module : SALOME
 //
 #include "SALOMEDS_ChildIterator_i.hxx"
+#include "SALOMEDS_Study_i.hxx"
 #include "SALOMEDS_SObject_i.hxx"
 #include "SALOMEDS.hxx"
 #include "SALOMEDSImpl_SObject.hxx"
@@ -37,8 +38,9 @@
  */
 //============================================================================
 SALOMEDS_ChildIterator_i::SALOMEDS_ChildIterator_i(const SALOMEDSImpl_ChildIterator& theImpl,
-                                                   CORBA::ORB_ptr orb) 
-  : _it(theImpl.GetPersistentCopy())
+                                                   CORBA::ORB_ptr orb)  :
+  GenericObj_i(SALOMEDS_Study_i::GetThePOA()),
+  _it(theImpl.GetPersistentCopy())
 {
   SALOMEDS::Locker lock;
   _orb = CORBA::ORB::_duplicate(orb);
@@ -54,6 +56,23 @@ SALOMEDS_ChildIterator_i::~SALOMEDS_ChildIterator_i()
     if(_it) delete _it;
 }
 
+//============================================================================
+/*!
+  \brief Get default POA for the servant object.
+
+  This function is implicitly called from "_this()" function.
+  Default POA can be set via the constructor.
+
+  \return reference to the default POA for the servant
+*/
+//============================================================================
+PortableServer::POA_ptr SALOMEDS_ChildIterator_i::_default_POA()
+{
+  myPOA = PortableServer::POA::_duplicate(SALOMEDS_Study_i::GetThePOA());
+  //MESSAGE("SALOMEDS_ChildIterator_i::_default_POA: " << myPOA);
+  return PortableServer::POA::_duplicate(myPOA);
+}
+
 //============================================================================
 /*! Function :Init
  *