Back to index

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

#include <NMTTools_CommonBlockAPI.hxx>

List of all members.

Public Member Functions

Standard_EXPORT NMTTools_CommonBlockAPI (const NMTTools_ListOfCommonBlock &aList)
Standard_EXPORT const
NMTTools_ListOfCommonBlock
List () const
 Selector

Standard_EXPORT const
BOPTools_ListOfPaveBlock & 
CommonPaveBlocks (const Standard_Integer anE) const
 Returns all PaveBlock-s (from the list) that are
common for the given edge with DS-index <anE>

Standard_EXPORT Standard_Boolean IsCommonBlock (const BOPTools_PaveBlock &aPB) const
 Returns TRUE if given PaveBlock <aPB> is
common for the Blocks from the list

Standard_EXPORT
NMTTools_CommonBlock
CommonBlock (const BOPTools_PaveBlock &aPB) const

Protected Attributes

Standard_Address myListOfCommonBlock
BOPTools_ListOfPaveBlock myListOfPaveBlock

Detailed Description

Definition at line 46 of file NMTTools_CommonBlockAPI.hxx.


Constructor & Destructor Documentation

Definition at line 42 of file NMTTools_CommonBlockAPI.cxx.

{
  myListOfCommonBlock=(void *)&aLCB;
}

Member Function Documentation

NMTTools_CommonBlock & NMTTools_CommonBlockAPI::CommonBlock ( const BOPTools_PaveBlock &  aPB) const

Definition at line 112 of file NMTTools_CommonBlockAPI.cxx.

{
  static NMTTools_CommonBlock aCBTMP;
  //
  NMTTools_ListIteratorOfListOfCommonBlock anItCB;
  BOPTools_ListIteratorOfListOfPaveBlock anItPB;
  //
  NMTTools_ListOfCommonBlock* pLCB=(NMTTools_ListOfCommonBlock*)myListOfCommonBlock;
  //
  anItCB.Initialize(*pLCB);
  for (; anItCB.More(); anItCB.Next()) {
    NMTTools_CommonBlock& aCB=anItCB.ChangeValue();
    //
    const BOPTools_ListOfPaveBlock& aLPB=aCB.PaveBlocks();
    anItPB.Initialize(aLPB);
    for (; anItPB.More(); anItPB.Next()) {
      const BOPTools_PaveBlock& aPBx=anItPB.Value();
      if (aPBx.IsEqual(aPB)) {
        return aCB;
      }
    }
  }
  return aCBTMP;
}

Here is the call graph for this function:

Here is the caller graph for this function:

const BOPTools_ListOfPaveBlock & NMTTools_CommonBlockAPI::CommonPaveBlocks ( const Standard_Integer  anE) const

Returns all PaveBlock-s (from the list) that are
common for the given edge with DS-index <anE>

Definition at line 59 of file NMTTools_CommonBlockAPI.cxx.

{
  Standard_Integer anECurrent;
  BOPTools_ListIteratorOfListOfPaveBlock anItPB;
  //
  BOPTools_ListOfPaveBlock* pmyListOfPaveBlock=(BOPTools_ListOfPaveBlock*) &myListOfPaveBlock;
  pmyListOfPaveBlock->Clear();

  NMTTools_ListOfCommonBlock* pListOfCommonBlock=(NMTTools_ListOfCommonBlock*)myListOfCommonBlock;

  NMTTools_ListIteratorOfListOfCommonBlock anIt(*pListOfCommonBlock);
  for (; anIt.More(); anIt.Next()) {
    const NMTTools_CommonBlock& aCB=anIt.Value();
    //
    const BOPTools_ListOfPaveBlock& aLPB=aCB.PaveBlocks();
    anItPB.Initialize(aLPB);
    for (; anItPB.More(); anItPB.Next()) {
      const BOPTools_PaveBlock& aPB=anItPB.Value();
      anECurrent=aPB.OriginalEdge();
      if (anECurrent==anE) {
        pmyListOfPaveBlock->Append(aPB);
        break;
      }
    }
  }
  return myListOfPaveBlock;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Standard_Boolean NMTTools_CommonBlockAPI::IsCommonBlock ( const BOPTools_PaveBlock &  aPB) const

Returns TRUE if given PaveBlock <aPB> is
common for the Blocks from the list

Definition at line 90 of file NMTTools_CommonBlockAPI.cxx.

{
  Standard_Integer anE;
  //
  anE=aPB.OriginalEdge();
  //
  CommonPaveBlocks(anE);
  //
  BOPTools_ListIteratorOfListOfPaveBlock anIt(myListOfPaveBlock);
  for (; anIt.More(); anIt.Next()) {
    const BOPTools_PaveBlock& aPB1=anIt.Value();
    if (aPB1.IsEqual(aPB)) {
      return Standard_True;
    }
  }
  return Standard_False;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Selector

Definition at line 50 of file NMTTools_CommonBlockAPI.cxx.

{
  NMTTools_ListOfCommonBlock* pListOfCommonBlock=(NMTTools_ListOfCommonBlock*)myListOfCommonBlock;
  return *pListOfCommonBlock;
}

Member Data Documentation

Standard_Address NMTTools_CommonBlockAPI::myListOfCommonBlock [protected]

Definition at line 71 of file NMTTools_CommonBlockAPI.hxx.

BOPTools_ListOfPaveBlock NMTTools_CommonBlockAPI::myListOfPaveBlock [protected]

Definition at line 72 of file NMTTools_CommonBlockAPI.hxx.


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