File indexing completed on 2025-01-18 10:03:04
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef _BOPDS_SubIterator_HeaderFile
0016 #define _BOPDS_SubIterator_HeaderFile
0017
0018 #include <Standard.hxx>
0019 #include <Standard_DefineAlloc.hxx>
0020 #include <Standard_Handle.hxx>
0021
0022 #include <BOPDS_PDS.hxx>
0023 #include <BOPDS_VectorOfPair.hxx>
0024 #include <NCollection_BaseAllocator.hxx>
0025 #include <TColStd_ListOfInteger.hxx>
0026 #include <Standard_Integer.hxx>
0027
0028
0029
0030
0031
0032
0033
0034 class BOPDS_SubIterator
0035 {
0036 public:
0037
0038 DEFINE_STANDARD_ALLOC
0039
0040
0041 Standard_EXPORT BOPDS_SubIterator();
0042 Standard_EXPORT virtual ~BOPDS_SubIterator();
0043
0044
0045
0046 Standard_EXPORT BOPDS_SubIterator(const Handle(NCollection_BaseAllocator)& theAllocator);
0047
0048
0049
0050 void SetDS (const BOPDS_PDS& pDS)
0051 {
0052 myDS = pDS;
0053 }
0054
0055
0056 const BOPDS_DS& DS() const
0057 {
0058 return *myDS;
0059 }
0060
0061
0062 void SetSubSet1 (const TColStd_ListOfInteger& theLI)
0063 {
0064 mySubSet1 = (TColStd_ListOfInteger*)&theLI;
0065 }
0066
0067
0068 const TColStd_ListOfInteger& SubSet1() const
0069 {
0070 return *mySubSet1;
0071 }
0072
0073
0074 void SetSubSet2 (const TColStd_ListOfInteger& theLI)
0075 {
0076 mySubSet2 = (TColStd_ListOfInteger*)&theLI;
0077 }
0078
0079
0080 const TColStd_ListOfInteger& SubSet2() const
0081 {
0082 return *mySubSet2;
0083 }
0084
0085
0086 Standard_EXPORT void Initialize();
0087
0088
0089 Standard_Boolean More() const
0090 {
0091 return myIterator.More();
0092 }
0093
0094
0095 void Next()
0096 {
0097 myIterator.Next();
0098 }
0099
0100
0101
0102
0103 Standard_EXPORT void Value (Standard_Integer& theIndex1, Standard_Integer& theIndex2) const;
0104
0105
0106
0107 Standard_EXPORT virtual void Prepare();
0108
0109
0110 Standard_Integer ExpectedLength() const
0111 {
0112 return myList.Length();
0113 }
0114
0115 protected:
0116
0117
0118 Standard_EXPORT virtual void Intersect();
0119
0120 Handle(NCollection_BaseAllocator) myAllocator;
0121 BOPDS_PDS myDS;
0122 BOPDS_VectorOfPair myList;
0123 BOPDS_VectorOfPair::Iterator myIterator;
0124 TColStd_ListOfInteger* mySubSet1;
0125 TColStd_ListOfInteger* mySubSet2;
0126
0127 private:
0128
0129 };
0130
0131 #endif