Back to index

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

#include <NMTDS_PassKeyBoolean.hxx>

Inheritance diagram for NMTDS_PassKeyBoolean:
Inheritance graph
[legend]
Collaboration diagram for NMTDS_PassKeyBoolean:
Collaboration graph
[legend]

List of all members.

Public Member Functions

Standard_EXPORT NMTDS_PassKeyBoolean ()
virtual Standard_EXPORT ~NMTDS_PassKeyBoolean ()
Standard_EXPORT void SetFlag (const Standard_Boolean aFlag)
Standard_EXPORT
NMTDS_PassKeyBoolean
operator= (const NMTDS_PassKeyBoolean &Other)
Standard_EXPORT Standard_Boolean Flag () const
Standard_EXPORT void Clear ()
Standard_EXPORT void SetIds (const Standard_Integer aI1)
Standard_EXPORT void SetIds (const Standard_Integer aI1, const Standard_Integer aI2)
Standard_EXPORT void SetIds (const Standard_Integer aI1, const Standard_Integer aI2, const Standard_Integer aI3)
Standard_EXPORT void SetIds (const Standard_Integer aI1, const Standard_Integer aI2, const Standard_Integer aI3, const Standard_Integer aI4)
Standard_EXPORT void SetIds (const TColStd_ListOfInteger &aLS)
Standard_EXPORT Standard_Integer NbIds () const
Standard_EXPORT Standard_Boolean IsEqual (const NMTDS_PassKey &aOther) const
Standard_EXPORT Standard_Integer HashCode (const Standard_Integer Upper) const
Standard_EXPORT Standard_Integer Id (const Standard_Integer aIndex) const
Standard_EXPORT void Ids (Standard_Integer &aI1, Standard_Integer &aI2) const
Standard_EXPORT void Dump (const Standard_Integer aHex=0) const

Protected Attributes

Standard_Boolean myFlag
Standard_Integer myNbIds
Standard_Integer mySum
TColStd_IndexedMapOfInteger myMap

Detailed Description

Definition at line 40 of file NMTDS_PassKeyBoolean.hxx.


Constructor & Destructor Documentation

Definition at line 34 of file NMTDS_PassKeyBoolean.cxx.

:
  myFlag(Standard_False),
  NMTDS_PassKey()
{
}

Definition at line 44 of file NMTDS_PassKeyBoolean.cxx.

{
}

Member Function Documentation

void NMTDS_PassKey::Clear ( ) [inherited]

Definition at line 83 of file NMTDS_PassKey.cxx.

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

Here is the caller graph for this function:

void NMTDS_PassKey::Dump ( const Standard_Integer  aHex = 0) const [inherited]

Definition at line 236 of file NMTDS_PassKey.cxx.

{
}
Standard_Boolean NMTDS_PassKeyBoolean::Flag ( ) const

Definition at line 69 of file NMTDS_PassKeyBoolean.cxx.

{
  return myFlag;
}
Standard_Integer NMTDS_PassKey::HashCode ( const Standard_Integer  Upper) const [inherited]

Definition at line 228 of file NMTDS_PassKey.cxx.

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

Here is the caller graph for this function:

Standard_Integer NMTDS_PassKey::Id ( const Standard_Integer  aIndex) const [inherited]

Definition at line 181 of file NMTDS_PassKey.cxx.

{
  if (aIndex<1 || aIndex>myNbIds) {
    return -1;
  }
  return myMap(aIndex);
}
void NMTDS_PassKey::Ids ( Standard_Integer &  aI1,
Standard_Integer &  aI2 
) const [inherited]

Definition at line 192 of file NMTDS_PassKey.cxx.

{
  aId1=0;
  aId2=0;
  if (myNbIds>1) {
    aId1=myMap(1);
    aId2=myMap(2);
  }
}
Standard_Boolean NMTDS_PassKey::IsEqual ( const NMTDS_PassKey aOther) const [inherited]

Definition at line 206 of file NMTDS_PassKey.cxx.

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

Here is the caller graph for this function:

Standard_Integer NMTDS_PassKey::NbIds ( ) const [inherited]

Definition at line 173 of file NMTDS_PassKey.cxx.

{
  return myNbIds;
}
NMTDS_PassKeyBoolean & NMTDS_PassKeyBoolean::operator= ( const NMTDS_PassKeyBoolean Other)

Definition at line 51 of file NMTDS_PassKeyBoolean.cxx.

{
  myFlag=anOther.myFlag;
  NMTDS_PassKey::operator =(anOther);
  return *this;
}
void NMTDS_PassKeyBoolean::SetFlag ( const Standard_Boolean  aFlag)

Definition at line 61 of file NMTDS_PassKeyBoolean.cxx.

{
  myFlag=aFlag;
}
void NMTDS_PassKey::SetIds ( const Standard_Integer  aI1) [inherited]

Definition at line 93 of file NMTDS_PassKey.cxx.

{
  Clear();
  myNbIds=1;
  myMap.Add(aId1);
  mySum=NormalizedId(aId1, myNbIds);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void NMTDS_PassKey::SetIds ( const Standard_Integer  aI1,
const Standard_Integer  aI2 
) [inherited]

Definition at line 105 of file NMTDS_PassKey.cxx.

{
  TColStd_ListOfInteger aLI;
  //
  aLI.Append(aId1);
  aLI.Append(aId2);
  SetIds(aLI);
}

Here is the call graph for this function:

void NMTDS_PassKey::SetIds ( const Standard_Integer  aI1,
const Standard_Integer  aI2,
const Standard_Integer  aI3 
) [inherited]

Definition at line 118 of file NMTDS_PassKey.cxx.

{
  TColStd_ListOfInteger aLI;
  //
  aLI.Append(aId1);
  aLI.Append(aId2);
  aLI.Append(aId3);
  SetIds(aLI);
}

Here is the call graph for this function:

void NMTDS_PassKey::SetIds ( const Standard_Integer  aI1,
const Standard_Integer  aI2,
const Standard_Integer  aI3,
const Standard_Integer  aI4 
) [inherited]

Definition at line 133 of file NMTDS_PassKey.cxx.

{ 
  TColStd_ListOfInteger aLI;
  //
  aLI.Append(aId1);
  aLI.Append(aId2);
  aLI.Append(aId3);
  aLI.Append(aId4);
  SetIds(aLI);
}

Here is the call graph for this function:

void NMTDS_PassKey::SetIds ( const TColStd_ListOfInteger &  aLS) [inherited]

Definition at line 150 of file NMTDS_PassKey.cxx.

{
  Standard_Integer i, aId, aIdN;
  TColStd_ListIteratorOfListOfInteger aIt;
  //
  Clear();
  aIt.Initialize(aLI);
  for (; aIt.More(); aIt.Next()) {
    aId=aIt.Value();
    myMap.Add(aId);
  }
  myNbIds=myMap.Extent();
  for(i=1; i<=myNbIds; ++i) {
    aId=myMap(i);
    aIdN=NormalizedId(aId, myNbIds);
    mySum+=aIdN;
  }
}

Here is the call graph for this function:


Member Data Documentation

Standard_Boolean NMTDS_PassKeyBoolean::myFlag [protected]

Definition at line 58 of file NMTDS_PassKeyBoolean.hxx.

TColStd_IndexedMapOfInteger NMTDS_PassKey::myMap [protected, inherited]

Definition at line 101 of file NMTDS_PassKey.hxx.

Standard_Integer NMTDS_PassKey::myNbIds [protected, inherited]

Definition at line 99 of file NMTDS_PassKey.hxx.

Standard_Integer NMTDS_PassKey::mySum [protected, inherited]

Definition at line 100 of file NMTDS_PassKey.hxx.


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