Back to index

salome-med  6.5.0
MEDMEM_Field_i.cxx File Reference
#include "MEDMEM_Field_i.hxx"
#include "SALOME_NamingService.hxx"
#include "SALOME_LifeCycleCORBA.hxx"

Go to the source code of this file.


static SALOMEDS::SObject_ptr FindChildByName (SALOMEDS::SObject_ptr theFather, const string theName)

Function Documentation

static SALOMEDS::SObject_ptr FindChildByName ( SALOMEDS::SObject_ptr  theFather,
const string  theName 
) [static]

Definition at line 469 of file MEDMEM_Field_i.cxx.

  SALOMEDS::SObject_var aChild;
  if (CORBA::is_nil(theFather))
    return aChild._retn();

  SALOMEDS::SObject_var aCurChild;
  SALOMEDS::ChildIterator_ptr anIter = theFather->GetStudy()->NewChildIterator(theFather);
  for (; anIter->More() && aChild->_is_nil(); anIter->Next()) {
    aCurChild = anIter->Value();
    string aCurName = aCurChild->GetName();
    if (aCurName == theName)
      aChild = aCurChild;
  return aChild._retn();