// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License. // // This library is distributed in the hope that it will be useful // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File: NMTDS_.InterfPoolcxx // Created: Wed Feb 21 10:35:35 2007 // Author: Peter KURNEV // #include #include #include #include #include static Standard_Integer TypeToInteger(const NMTDS_InterfType aType); //======================================================================= //function : //purpose : //======================================================================= NMTDS_InterfPool::NMTDS_InterfPool() { myMaxInd=6; } //======================================================================= //function : ~ //purpose : //======================================================================= NMTDS_InterfPool::~NMTDS_InterfPool() { } //======================================================================= //function : Add //purpose : //======================================================================= Standard_Boolean NMTDS_InterfPool::Add (const NMTDS_PassKeyBoolean& aPKB, const NMTDS_InterfType aType) { Standard_Boolean bRet; Standard_Integer iType; // bRet=Standard_False; // iType=TypeToInteger(aType); if (iType>-1 && iTypeClear(); // for (i=0; iAppend(aPKB); } } return myList; } //======================================================================= //function : Get //purpose : //======================================================================= const NMTDS_ListOfPassKeyBoolean& NMTDS_InterfPool::Get(const Standard_Integer aInd)const { Standard_Integer i, n1, n2; NMTDS_ListOfPassKeyBoolean* pL; // pL=(NMTDS_ListOfPassKeyBoolean*)&myList; pL->Clear(); // for (i=0; iAppend(aPKB); } } } return myList; } //======================================================================= //function : Get //purpose : //======================================================================= const NMTDS_ListOfPassKeyBoolean& NMTDS_InterfPool::Get(const NMTDS_InterfType aType)const { Standard_Integer iType; NMTDS_ListOfPassKeyBoolean* pL; // pL=(NMTDS_ListOfPassKeyBoolean*)&myList; pL->Clear(); // iType=TypeToInteger(aType); if (iType>-1 && iTypeAppend(aPKB); } } return myList; } //======================================================================= //function : Get //purpose : //======================================================================= const NMTDS_ListOfPassKeyBoolean& NMTDS_InterfPool::Get(const Standard_Integer aInd, const NMTDS_InterfType aType)const { Standard_Integer n1, n2; NMTDS_ListOfPassKeyBoolean *pL, aLPKB; NMTDS_ListIteratorOfListOfPassKeyBoolean aIt; // aLPKB=Get(aType); // pL=(NMTDS_ListOfPassKeyBoolean*)&myList; pL->Clear(); // aIt.Initialize (aLPKB); for (; aIt.More(); aIt.Next()) { const NMTDS_PassKeyBoolean& aPKB=aIt.Value(); aPKB.Ids(n1, n2); if(n1==aInd || n2==aInd) { pL->Append(aPKB); } } return myList; } //////////////////// //=========================================================================== //function : SSInterferences //purpose : //=========================================================================== BOPTools_CArray1OfSSInterference& NMTDS_InterfPool::SSInterferences() { return mySSInterferences; } //=========================================================================== //function : ESInterferences //purpose : //=========================================================================== BOPTools_CArray1OfESInterference& NMTDS_InterfPool::ESInterferences() { return myESInterferences; } //=========================================================================== //function : VSInterferences //purpose : //=========================================================================== BOPTools_CArray1OfVSInterference& NMTDS_InterfPool::VSInterferences() { return myVSInterferences; } //=========================================================================== //function : EEInterferences //purpose : //=========================================================================== BOPTools_CArray1OfEEInterference& NMTDS_InterfPool::EEInterferences() { return myEEInterferences; } //=========================================================================== //function : VEInterferences //purpose : //=========================================================================== BOPTools_CArray1OfVEInterference& NMTDS_InterfPool::VEInterferences() { return myVEInterferences; } //=========================================================================== //function : VVInterferences //purpose : //=========================================================================== BOPTools_CArray1OfVVInterference& NMTDS_InterfPool::VVInterferences() { return myVVInterferences; } //////////////////// //======================================================================= //function : TypeToInteger //purpose : //======================================================================= Standard_Integer TypeToInteger(const NMTDS_InterfType aType) { return (Standard_Integer)aType; }