FBX C++ API Reference
fbxthread.h
Go to the documentation of this file.
1 /****************************************************************************************
2 
3  Copyright (C) 2015 Autodesk, Inc.
4  All rights reserved.
5 
6  Use of this software is subject to the terms of the Autodesk license agreement
7  provided at the time of installation or download, or which otherwise accompanies
8  this software in either electronic or hard copy form.
9 
10 ****************************************************************************************/
11 
13 #ifndef _FBXSDK_CORE_SYNC_THREAD_H_
14 #define _FBXSDK_CORE_SYNC_THREAD_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
18 #if !defined(FBXSDK_ENV_WINSTORE) && !defined(FBXSDK_ENV_EMSCRIPTEN)
19 
20 #include <fbxsdk/fbxsdk_nsbegin.h>
21 
22 class FbxThreadImpl;
23 
25 typedef void (*FbxThreadProc)(void*);
26 
30 {
31 public:
32  enum EState {eUnknown, eRunning, eDead};
33  enum EPriority {eNone, eIdle, eLowest, eLow, eNormal, eHigh, eHighest, eRealTime};
34 
40  FbxThread(FbxThreadProc pProc, void* pArg, bool pSuspend=false);
41 
48  FbxThread(FbxThreadProc pProc, void* pArg, EPriority pPriority, bool pSuspend=false);
49 
51  virtual ~FbxThread();
52 
58  bool Suspend();
59 
63  bool Resume();
64 
68  bool Join();
69 
73  bool Kill();
74 
78  EPriority GetPriority();
79 
84  bool SetPriority(EPriority pPriority);
85 
89  EState GetState();
90 
91 private:
92  FbxThreadImpl* mImpl;
93 };
94 
95 #include <fbxsdk/fbxsdk_nsend.h>
96 
97 #endif /* !FBXSDK_ENV_WINSTORE && !FBXSDK_ENV_EMSCRIPTEN */
98 
99 #endif /* _FBXSDK_CORE_SYNC_THREAD_H_ */
FBX SDK environment definition.
#define FBXSDK_DLL
Definition: fbxarch.h:173
void(* FbxThreadProc)(void *)
Definition of a thread procedure function signature.
Definition: fbxthread.h:25
This class implement a standard way to use threads across platforms.
Definition: fbxthread.h:29