Warning, file /include/opencascade/BVH_BuildThread.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 #ifndef _BVH_BuildThread_Header
0017 #define _BVH_BuildThread_Header
0018
0019 #include <OSD_Thread.hxx>
0020 #include <BVH_BuildQueue.hxx>
0021
0022
0023 struct BVH_BuildTool
0024 {
0025
0026 virtual void Perform (const Standard_Integer theNode) = 0;
0027 };
0028
0029
0030 class BVH_BuildThread : public Standard_Transient
0031 {
0032 template <class T, int N> friend class BVH_QueueBuilder;
0033
0034 public:
0035
0036
0037 Standard_EXPORT BVH_BuildThread (BVH_BuildTool& theBuildTool, BVH_BuildQueue& theBuildQueue);
0038
0039
0040 void Run()
0041 {
0042 myWorkThread.Run (this);
0043 }
0044
0045
0046 void Wait()
0047 {
0048 myWorkThread.Wait();
0049 }
0050
0051 protected:
0052
0053
0054 Standard_EXPORT void execute();
0055
0056
0057 static Standard_Address threadFunction (Standard_Address theData);
0058
0059
0060 BVH_BuildThread& operator= (const BVH_BuildThread&);
0061
0062 protected:
0063
0064
0065 BVH_BuildTool& myBuildTool;
0066
0067
0068 BVH_BuildQueue& myBuildQueue;
0069
0070
0071 OSD_Thread myWorkThread;
0072
0073 public:
0074
0075 DEFINE_STANDARD_RTTIEXT(BVH_BuildThread,Standard_Transient)
0076 };
0077
0078 DEFINE_STANDARD_HANDLE (BVH_BuildThread, Standard_Transient)
0079
0080 #endif