0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / BVH / BVH_Sorter.hxx
1 // Created on: 2014-01-10
2 // Created by: Denis BOGOLEPOV
3 // Copyright (c) 2013-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #ifndef BVH_Sorter_HeaderFile
17 #define BVH_Sorter_HeaderFile
18
19 #include <BVH_Set.hxx>
20
21 //! Tool object to sort abstract primitive set.
22 template<class T, int N>
23 class BVH_Sorter
24 {
25 public:
26
27   //! Performs default initialization.
28   BVH_Sorter()
29   : myIsParallel (Standard_False)
30   { }
31
32   //! Releases resources of BVH sorter.
33   virtual ~BVH_Sorter() { }
34
35   //! Sorts the set.
36   virtual void Perform (BVH_Set<T, N>* theSet) = 0;
37
38   //! Sorts the given (inclusive) range in the set.
39   virtual void Perform (BVH_Set<T, N>* theSet, const Standard_Integer theStart, const Standard_Integer theFinal) = 0;
40
41   //! Returns parallel flag.
42   inline Standard_Boolean IsParallel() const
43   {
44     return myIsParallel;
45   }
46
47   //! Set parallel flag contolling possibility of parallel execution.
48   inline void SetParallel(const Standard_Boolean isParallel)
49   {
50     myIsParallel = isParallel;
51   }
52
53 private:
54
55   Standard_Boolean myIsParallel;
56 };
57
58 #endif // _BVH_Sorter_Header