Version: 6.3.1
Public Member Functions | Private Member Functions | Private Attributes

HypothesesSet Class Reference

Class containing set of hypotheses. More...

#include <SMESHGUI_Hypotheses.h>

Public Member Functions

 HypothesesSet (const QString &)
 HypothesesSet (const QString &, const QStringList &, const QStringList &)
QString name () const
void set (bool, const QStringList &)
int count (bool) const
void setIsCustom (bool)
bool getIsCustom () const
int maxDim () const
bool isAlgo () const
void init (bool)
bool more () const
void next ()
QString current () const

Private Member Functions

QStringList * list (bool) const
QStringList * list () const

Private Attributes

QString myHypoSetName
QStringList myHypoList
QStringList myAlgoList
bool myIsAlgo
bool myIsCustom
int myIndex

Detailed Description

Class containing set of hypotheses.

Actually it contains list of hypo types

Definition at line 195 of file SMESHGUI_Hypotheses.h.


Constructor & Destructor Documentation

HypothesesSet::HypothesesSet ( const QString &  theSetName)

Definition at line 697 of file SMESHGUI_Hypotheses.cxx.

  : myHypoSetName( theSetName ),
    myIsAlgo( false ),
    myIsCustom( false )
{
}
HypothesesSet::HypothesesSet ( const QString &  theSetName,
const QStringList &  theHypoList,
const QStringList &  theAlgoList 
)

Definition at line 704 of file SMESHGUI_Hypotheses.cxx.

  : myHypoSetName( theSetName ),
    myHypoList( theHypoList ),
    myAlgoList( theAlgoList ),
    myIsAlgo( false ),
    myIsCustom( false )
{
}

Member Function Documentation

int HypothesesSet::count ( bool  isAlgo) const

Definition at line 735 of file SMESHGUI_Hypotheses.cxx.

References list().

Referenced by SMESH.GetHypothesesSets().

{
  return list(isAlgo)->count();
}
QString HypothesesSet::current ( ) const

Definition at line 761 of file SMESHGUI_Hypotheses.cxx.

References list(), and myIndex.

Referenced by maxDim(), and SMESHGUI_MeshOp.processSet().

{
  return list()->at(myIndex);
}
bool HypothesesSet::getIsCustom ( ) const

Definition at line 771 of file SMESHGUI_Hypotheses.cxx.

References myIsCustom.

Referenced by SMESH.mangledHypoSetName().

{
  return myIsCustom;
}
void HypothesesSet::init ( bool  isAlgo)

Definition at line 745 of file SMESHGUI_Hypotheses.cxx.

References isAlgo(), myIndex, and myIsAlgo.

Referenced by maxDim(), and SMESHGUI_MeshOp.onHypoSet().

{
  myIsAlgo = isAlgo;
  myIndex = -1;
}
bool HypothesesSet::isAlgo ( ) const

Definition at line 740 of file SMESHGUI_Hypotheses.cxx.

References myIsAlgo.

Referenced by init(), maxDim(), and SMESHGUI_MeshOp.processSet().

{
  return myIsAlgo;
}
QStringList * HypothesesSet::list ( ) const [private]

Definition at line 720 of file SMESHGUI_Hypotheses.cxx.

References myIsAlgo.

Referenced by count(), current(), more(), and set().

{
  return list( myIsAlgo );
}
QStringList * HypothesesSet::list ( bool  is_algo) const [private]

Definition at line 715 of file SMESHGUI_Hypotheses.cxx.

References myAlgoList, and myHypoList.

{
  return const_cast<QStringList*>( &( is_algo ? myAlgoList : myHypoList ) );
}
int HypothesesSet::maxDim ( ) const

Definition at line 776 of file SMESHGUI_Hypotheses.cxx.

References current(), SMESH.GetHypothesisData(), init(), isAlgo(), more(), and next().

Referenced by SMESH.GetHypothesesSets(), and SMESH.mangledHypoSetName().

{
  HypothesesSet * thisSet = (HypothesesSet*) this;
  int dim = -1;
  for ( int isAlgo = 0; isAlgo < 2; ++isAlgo )
  {
    thisSet->init( isAlgo );
    while ( thisSet->next(), thisSet->more() )
      if ( HypothesisData* hypData = SMESH::GetHypothesisData( thisSet->current() ))
        for ( int i = 0; i < hypData->Dim.count(); ++i )
          dim = qMax( dim, hypData->Dim[i] );
  }
  return dim;
}
bool HypothesesSet::more ( ) const

Definition at line 751 of file SMESHGUI_Hypotheses.cxx.

References list(), and myIndex.

Referenced by maxDim(), and SMESHGUI_MeshOp.processSet().

{
  return myIndex < list()->count();
}
QString HypothesesSet::name ( ) const

Definition at line 725 of file SMESHGUI_Hypotheses.cxx.

References myHypoSetName.

Referenced by SMESH.GetHypothesesSet(), and SMESH.mangledHypoSetName().

{
  return myHypoSetName;
}
void HypothesesSet::next ( )

Definition at line 756 of file SMESHGUI_Hypotheses.cxx.

References myIndex.

Referenced by maxDim(), and SMESHGUI_MeshOp.processSet().

{
  myIndex++;
}
void HypothesesSet::set ( bool  isAlgo,
const QStringList &  lst 
)

Definition at line 730 of file SMESHGUI_Hypotheses.cxx.

References list().

Referenced by SMESHGUI_XmlHandler.startElement().

{
  *list(isAlgo) = lst;
}
void HypothesesSet::setIsCustom ( bool  isCustom)

Definition at line 766 of file SMESHGUI_Hypotheses.cxx.

References myIsCustom.

{
  myIsCustom = isCustom;
}

Field Documentation

QStringList HypothesesSet.myAlgoList [private]

Definition at line 224 of file SMESHGUI_Hypotheses.h.

Referenced by list().

QStringList HypothesesSet.myHypoList [private]

Definition at line 224 of file SMESHGUI_Hypotheses.h.

Referenced by list().

QString HypothesesSet.myHypoSetName [private]

Definition at line 223 of file SMESHGUI_Hypotheses.h.

Referenced by name().

Definition at line 226 of file SMESHGUI_Hypotheses.h.

Referenced by current(), init(), more(), and next().

Definition at line 225 of file SMESHGUI_Hypotheses.h.

Referenced by init(), isAlgo(), and list().

Definition at line 225 of file SMESHGUI_Hypotheses.h.

Referenced by getIsCustom(), and setIsCustom().

Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS