Back to index

salome-geom  6.5.0
Public Member Functions | Protected Attributes
GEOMAlgo_StateCollector Class Reference

#include <GEOMAlgo_StateCollector.hxx>

List of all members.

Public Member Functions

Standard_EXPORT GEOMAlgo_StateCollector ()
Standard_EXPORT Standard_Boolean AppendState (const TopAbs_State aSt)
Standard_EXPORT TopAbs_State State () const

Protected Attributes

Standard_Integer myCounter [3]

Detailed Description

Definition at line 41 of file GEOMAlgo_StateCollector.hxx.


Constructor & Destructor Documentation

Definition at line 34 of file GEOMAlgo_StateCollector.cxx.

{
  myCounter[0]=0;
  myCounter[1]=0;
  myCounter[2]=0;
}

Member Function Documentation

Standard_Boolean GEOMAlgo_StateCollector::AppendState ( const TopAbs_State  aSt)

Definition at line 44 of file GEOMAlgo_StateCollector.cxx.

{
  Standard_Boolean bIsToBreak;
  //
  switch(aSt) {
    case TopAbs_IN:
      ++myCounter[0];
      break;
    case TopAbs_OUT:
      ++myCounter[1];
      break;
    case TopAbs_ON:
      ++myCounter[2];
      break;
    default:
      break;
  }
  bIsToBreak=(myCounter[0] && myCounter[1]);
  //
  return bIsToBreak;
}

Here is the caller graph for this function:

TopAbs_State GEOMAlgo_StateCollector::State ( ) const

Definition at line 69 of file GEOMAlgo_StateCollector.cxx.

{
  TopAbs_State aSt;
  //
  aSt=TopAbs_UNKNOWN;
  //
  if (myCounter[0] && myCounter[1]) {
    return aSt;
  }
  //
  else if (myCounter[0] && myCounter[2]>=0) {
    aSt=TopAbs_IN;
  }
  //
  else if (myCounter[1] && myCounter[2]>=0) {
    aSt=TopAbs_OUT;
  }
  //
  else if (!myCounter[0] && !myCounter[1] && myCounter[2]) {
    aSt=TopAbs_ON;
  }
  //
  return aSt;
}

Here is the caller graph for this function:


Member Data Documentation

Standard_Integer GEOMAlgo_StateCollector::myCounter[3] [protected]

Definition at line 54 of file GEOMAlgo_StateCollector.hxx.


The documentation for this class was generated from the following files: