+//=======================================================================
+//function : hasChildren
+//purpose :
+//=======================================================================
+
+bool SMESHGUI_Selection::hasChildren( int ind ) const
+{
+ if ( ind >= 0 )
+ {
+ _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
+ return SMESH::GetActiveStudyDocument()->GetUseCaseBuilder()->HasChildren( sobj );
+ }
+ return false;
+}
+
+//=======================================================================
+//function : hasChildren
+//purpose :
+//=======================================================================
+
+int SMESHGUI_Selection::nbChildren( int ind ) const
+{
+ int nb = 0;
+ if ( ind >= 0 )
+ {
+ _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
+ if ( sobj->GetStudy()->GetUseCaseBuilder()->IsUseCaseNode( sobj ) ) {
+ _PTR(UseCaseIterator) it = sobj->GetStudy()->GetUseCaseBuilder()->GetUseCaseIterator( sobj );
+ for (it->Init(false); it->More(); it->Next()) nb++;
+ }
+ }
+ return nb;
+}
+
+//=======================================================================
+//function : isContainer
+//purpose :
+//=======================================================================
+
+bool SMESHGUI_Selection::isContainer( int ind ) const
+{
+ return ind >= 0 && ind < myTypes.count() && myTypes[ind] == "Unknown";
+}
+