Salome HOME
Merge V9_dev branch into master
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_SComponentIterator_i.cxx
index cc7d6700fda508498f90395d78f7f59796d68637..35b3b34fb62b664cd264b9417976ef49eb397d94 100644 (file)
@@ -27,6 +27,8 @@
 #include "SALOMEDS_SComponentIterator_i.hxx"
 #include "SALOMEDS.hxx"
 #include "SALOMEDSImpl_SComponent.hxx"
+#include "SALOMEDS_Study_i.hxx"
+#include "utilities.h"
 
 //============================================================================
 /*! Function : constructor
@@ -35,7 +37,8 @@
 //============================================================================
 
 SALOMEDS_SComponentIterator_i::SALOMEDS_SComponentIterator_i(const SALOMEDSImpl_SComponentIterator& theImpl, 
-                                                             CORBA::ORB_ptr orb) 
+                                                             CORBA::ORB_ptr orb)  :
+  GenericObj_i(SALOMEDS_Study_i::GetThePOA())
 {
   _orb = CORBA::ORB::_duplicate(orb);
   _impl = theImpl.GetPersistentCopy();
@@ -51,6 +54,23 @@ SALOMEDS_SComponentIterator_i::~SALOMEDS_SComponentIterator_i()
    if(_impl) delete _impl;
 }
 
+//============================================================================
+/*!
+  \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_SComponentIterator_i::_default_POA()
+{
+  myPOA = PortableServer::POA::_duplicate(SALOMEDS_Study_i::GetThePOA());
+  MESSAGE("SALOMEDS_SComponentIterator_i::_default_POA: " << myPOA);
+  return PortableServer::POA::_duplicate(myPOA);
+}
+
 //============================================================================
 /*! Function : Init
  *