Warning, file /include/opencascade/TopOpeBRepTool_ShapeExplorer.hxx was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _TopOpeBRepTool_ShapeExplorer_HeaderFile
0018 #define _TopOpeBRepTool_ShapeExplorer_HeaderFile
0019
0020 #include <TopExp_Explorer.hxx>
0021 #include <TopAbs.hxx>
0022
0023
0024
0025
0026 class TopOpeBRepTool_ShapeExplorer : public TopExp_Explorer
0027 {
0028 public:
0029
0030
0031 TopOpeBRepTool_ShapeExplorer() : myIndex(0)
0032 {
0033 }
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044 TopOpeBRepTool_ShapeExplorer(const TopoDS_Shape& S, const TopAbs_ShapeEnum ToFind, const TopAbs_ShapeEnum ToAvoid = TopAbs_SHAPE)
0045 : TopExp_Explorer (S, ToFind, ToAvoid), myIndex(More() ? 1 : 0)
0046 {
0047 }
0048
0049 void Init (const TopoDS_Shape& S, const TopAbs_ShapeEnum ToFind, const TopAbs_ShapeEnum ToAvoid = TopAbs_SHAPE)
0050 {
0051 TopExp_Explorer::Init(S,ToFind,ToAvoid);
0052 myIndex = (More() ? 1 : 0);
0053 }
0054
0055
0056 void Next()
0057 {
0058 if (More())
0059 myIndex++;
0060 TopExp_Explorer::Next();
0061 }
0062
0063
0064 Standard_Integer Index() const { return myIndex; }
0065
0066
0067 Standard_OStream& DumpCurrent (Standard_OStream& OS) const
0068 {
0069 if (More())
0070 {
0071 TopAbs::Print (Current().ShapeType(), OS);
0072 OS << "(" << Index() << ",";
0073 TopAbs::Print (Current().Orientation(), OS);
0074 OS << ") ";
0075 }
0076 return OS;
0077 }
0078
0079 private:
0080 Standard_Integer myIndex;
0081 };
0082
0083 #endif