Back to index

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

#include <GEOMAlgo_PassKeyShape.hxx>

List of all members.

Public Member Functions

Standard_EXPORT GEOMAlgo_PassKeyShape ()
virtual Standard_EXPORT ~GEOMAlgo_PassKeyShape ()
Standard_EXPORT GEOMAlgo_PassKeyShape (const GEOMAlgo_PassKeyShape &Other)
Standard_EXPORT
GEOMAlgo_PassKeyShape
Assign (const GEOMAlgo_PassKeyShape &Other)
GEOMAlgo_PassKeyShapeoperator= (const GEOMAlgo_PassKeyShape &Other)
Standard_EXPORT void SetShapes (const TopoDS_Shape &aS)
Standard_EXPORT void SetShapes (const TopoDS_Shape &aS1, const TopoDS_Shape &aS2)
Standard_EXPORT void SetShapes (const TopoDS_Shape &aS1, const TopoDS_Shape &aS2, const TopoDS_Shape &aS3)
Standard_EXPORT void SetShapes (const TopoDS_Shape &aS1, const TopoDS_Shape &aS2, const TopoDS_Shape &aS3, const TopoDS_Shape &aS4)
Standard_EXPORT void SetShapes (const TopTools_ListOfShape &aLS)
Standard_EXPORT void Clear ()
Standard_EXPORT Standard_Integer NbIds () const
Standard_EXPORT Standard_Boolean IsEqual (const GEOMAlgo_PassKeyShape &aOther) const
Standard_EXPORT Standard_Integer HashCode (const Standard_Integer Upper) const
Standard_EXPORT void Dump (const Standard_Integer aHex=0) const

Protected Attributes

Standard_Integer myNbIds
Standard_Integer mySum
Standard_Integer myUpper
TopTools_IndexedMapOfShape myMap

Detailed Description

Definition at line 45 of file GEOMAlgo_PassKeyShape.hxx.


Constructor & Destructor Documentation

Definition at line 41 of file GEOMAlgo_PassKeyShape.cxx.

{
  myUpper=432123;
}

Definition at line 60 of file GEOMAlgo_PassKeyShape.cxx.

{
}

Definition at line 49 of file GEOMAlgo_PassKeyShape.cxx.

{
  myUpper=432123;
  myNbIds=aOther.myNbIds;
  mySum=aOther.mySum;
  myMap=aOther.myMap;
}

Member Function Documentation

Definition at line 67 of file GEOMAlgo_PassKeyShape.cxx.

{
  myUpper=432123;
  myNbIds=aOther.myNbIds;
  mySum=aOther.mySum;
  myMap=aOther.myMap;
  return *this;
}

Here is the caller graph for this function:

Definition at line 79 of file GEOMAlgo_PassKeyShape.cxx.

{
  myNbIds=0;
  mySum=0;
  myMap.Clear();
}

Here is the caller graph for this function:

void GEOMAlgo_PassKeyShape::Dump ( const Standard_Integer  aHex = 0) const

Definition at line 210 of file GEOMAlgo_PassKeyShape.cxx.

{
}
Standard_Integer GEOMAlgo_PassKeyShape::HashCode ( const Standard_Integer  Upper) const

Definition at line 202 of file GEOMAlgo_PassKeyShape.cxx.

{
  return ::HashCode(mySum, aUpper);
}

Here is the caller graph for this function:

Standard_Boolean GEOMAlgo_PassKeyShape::IsEqual ( const GEOMAlgo_PassKeyShape aOther) const

Definition at line 180 of file GEOMAlgo_PassKeyShape.cxx.

{
  Standard_Boolean bRet;
  Standard_Integer i;
  //
  bRet=Standard_False;
  //
  if (myNbIds!=aOther.myNbIds) {
    return bRet;
  }
  for (i=1; i<=myNbIds; ++i) {
    const TopoDS_Shape& aS=myMap(i);
    if (!aOther.myMap.Contains(aS)) {
      return bRet;
    }
  }
  return !bRet;
}

Here is the caller graph for this function:

Standard_Integer GEOMAlgo_PassKeyShape::NbIds ( ) const

Definition at line 172 of file GEOMAlgo_PassKeyShape.cxx.

{
  return myNbIds;
}
GEOMAlgo_PassKeyShape& GEOMAlgo_PassKeyShape::operator= ( const GEOMAlgo_PassKeyShape Other) [inline]

Definition at line 59 of file GEOMAlgo_PassKeyShape.hxx.

                                                                        {
    return Assign(Other);
  }

Here is the call graph for this function:

void GEOMAlgo_PassKeyShape::SetShapes ( const TopoDS_Shape &  aS)

Definition at line 89 of file GEOMAlgo_PassKeyShape.cxx.

{
  Standard_Integer aHC;
  //
  Clear();
  myNbIds=1;
  myMap.Add(aS1);
  aHC=aS1.HashCode(myUpper);
  mySum=NormalizedId(aHC, myNbIds);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_PassKeyShape::SetShapes ( const TopoDS_Shape &  aS1,
const TopoDS_Shape &  aS2 
)

Definition at line 104 of file GEOMAlgo_PassKeyShape.cxx.

{
  TopTools_ListOfShape aLS;
  //
  aLS.Append(aS1);
  aLS.Append(aS2);
  SetShapes(aLS);
}

Here is the call graph for this function:

void GEOMAlgo_PassKeyShape::SetShapes ( const TopoDS_Shape &  aS1,
const TopoDS_Shape &  aS2,
const TopoDS_Shape &  aS3 
)

Definition at line 117 of file GEOMAlgo_PassKeyShape.cxx.

{
  TopTools_ListOfShape aLS;
  //
  aLS.Append(aS1);
  aLS.Append(aS2);
  aLS.Append(aS3);
  SetShapes(aLS);
}

Here is the call graph for this function:

void GEOMAlgo_PassKeyShape::SetShapes ( const TopoDS_Shape &  aS1,
const TopoDS_Shape &  aS2,
const TopoDS_Shape &  aS3,
const TopoDS_Shape &  aS4 
)

Definition at line 132 of file GEOMAlgo_PassKeyShape.cxx.

{
  TopTools_ListOfShape aLS;
  //
  aLS.Append(aS1);
  aLS.Append(aS2);
  aLS.Append(aS3);
  aLS.Append(aS4);
  SetShapes(aLS);
}

Here is the call graph for this function:

void GEOMAlgo_PassKeyShape::SetShapes ( const TopTools_ListOfShape &  aLS)

Definition at line 149 of file GEOMAlgo_PassKeyShape.cxx.

{
  Standard_Integer i, aId, aIdN;
  TopTools_ListIteratorOfListOfShape aIt;
  //
  Clear();
  aIt.Initialize(aLS);
  for (; aIt.More(); aIt.Next()) {
    const TopoDS_Shape& aS=aIt.Value();
    myMap.Add(aS);
  }
  myNbIds=myMap.Extent();
  for(i=1; i<=myNbIds; ++i) {
    const TopoDS_Shape& aS=myMap(i);
    aId=aS.HashCode(myUpper);
    aIdN=NormalizedId(aId, myNbIds);
    mySum+=aIdN;
  }
}

Here is the call graph for this function:


Member Data Documentation

TopTools_IndexedMapOfShape GEOMAlgo_PassKeyShape::myMap [protected]

Definition at line 103 of file GEOMAlgo_PassKeyShape.hxx.

Standard_Integer GEOMAlgo_PassKeyShape::myNbIds [protected]

Definition at line 100 of file GEOMAlgo_PassKeyShape.hxx.

Standard_Integer GEOMAlgo_PassKeyShape::mySum [protected]

Definition at line 101 of file GEOMAlgo_PassKeyShape.hxx.

Standard_Integer GEOMAlgo_PassKeyShape::myUpper [protected]

Definition at line 102 of file GEOMAlgo_PassKeyShape.hxx.


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