Back to index

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

#include <NMTDS_PassKeyShape.hxx>

List of all members.

Public Member Functions

Standard_EXPORT NMTDS_PassKeyShape ()
virtual Standard_EXPORT ~NMTDS_PassKeyShape ()
Standard_EXPORT NMTDS_PassKeyShape (const NMTDS_PassKeyShape &Other)
Standard_EXPORT
NMTDS_PassKeyShape
Assign (const NMTDS_PassKeyShape &Other)
NMTDS_PassKeyShapeoperator= (const NMTDS_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 NMTDS_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 40 of file NMTDS_PassKeyShape.hxx.


Constructor & Destructor Documentation

Definition at line 39 of file NMTDS_PassKeyShape.cxx.

{
  myUpper=432123;
}

Definition at line 58 of file NMTDS_PassKeyShape.cxx.

{
}

Definition at line 47 of file NMTDS_PassKeyShape.cxx.

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

Member Function Documentation

Definition at line 65 of file NMTDS_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 77 of file NMTDS_PassKeyShape.cxx.

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

Here is the caller graph for this function:

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

Definition at line 208 of file NMTDS_PassKeyShape.cxx.

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

Definition at line 200 of file NMTDS_PassKeyShape.cxx.

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

Here is the caller graph for this function:

Standard_Boolean NMTDS_PassKeyShape::IsEqual ( const NMTDS_PassKeyShape aOther) const

Definition at line 178 of file NMTDS_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 NMTDS_PassKeyShape::NbIds ( ) const

Definition at line 170 of file NMTDS_PassKeyShape.cxx.

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

Definition at line 54 of file NMTDS_PassKeyShape.hxx.

                                                                  {
    return Assign(Other);
  }

Here is the call graph for this function:

void NMTDS_PassKeyShape::SetShapes ( const TopoDS_Shape &  aS)

Definition at line 87 of file NMTDS_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 NMTDS_PassKeyShape::SetShapes ( const TopoDS_Shape &  aS1,
const TopoDS_Shape &  aS2 
)

Definition at line 102 of file NMTDS_PassKeyShape.cxx.

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

Here is the call graph for this function:

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

Definition at line 115 of file NMTDS_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 NMTDS_PassKeyShape::SetShapes ( const TopoDS_Shape &  aS1,
const TopoDS_Shape &  aS2,
const TopoDS_Shape &  aS3,
const TopoDS_Shape &  aS4 
)

Definition at line 130 of file NMTDS_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 NMTDS_PassKeyShape::SetShapes ( const TopTools_ListOfShape &  aLS)

Definition at line 147 of file NMTDS_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 NMTDS_PassKeyShape::myMap [protected]

Definition at line 98 of file NMTDS_PassKeyShape.hxx.

Standard_Integer NMTDS_PassKeyShape::myNbIds [protected]

Definition at line 95 of file NMTDS_PassKeyShape.hxx.

Standard_Integer NMTDS_PassKeyShape::mySum [protected]

Definition at line 96 of file NMTDS_PassKeyShape.hxx.

Standard_Integer NMTDS_PassKeyShape::myUpper [protected]

Definition at line 97 of file NMTDS_PassKeyShape.hxx.


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