OpenPose  1.0.0rc2
OpenPose: A Real-Time Multi-Person Key-Point Detection And Multi-Threading C++ Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
subThreadNoQueue.hpp
Go to the documentation of this file.
1 #ifndef OPENPOSE_THREAD_THREAD_NO_QUEUE_HPP
2 #define OPENPOSE_THREAD_THREAD_NO_QUEUE_HPP
3 
7 
8 namespace op
9 {
10  template<typename TDatums, typename TWorker = std::shared_ptr<Worker<TDatums>>>
11  class SubThreadNoQueue : public SubThread<TDatums, TWorker>
12  {
13  public:
14  explicit SubThreadNoQueue(const std::vector<TWorker>& tWorkers);
15 
16  virtual ~SubThreadNoQueue();
17 
18  bool work();
19 
21  };
22 }
23 
24 
25 
26 
27 
28 // Implementation
29 namespace op
30 {
31  template<typename TDatums, typename TWorker>
32  SubThreadNoQueue<TDatums, TWorker>::SubThreadNoQueue(const std::vector<TWorker>& tWorkers) :
33  SubThread<TDatums, TWorker>{tWorkers}
34  {
35  }
36 
37  template<typename TDatums, typename TWorker>
39  {
40  }
41 
42  template<typename TDatums, typename TWorker>
44  {
45  try
46  {
47  TDatums tDatums;
48  return this->workTWorkers(tDatums, true);
49  }
50  catch (const std::exception& e)
51  {
52  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
53  return false;
54  }
55  }
56 
57  COMPILE_TEMPLATE_DATUM(SubThreadNoQueue);
58 }
59 
60 #endif // OPENPOSE_THREAD_THREAD_NO_QUEUE_HPP
Definition: subThread.hpp:10
virtual ~SubThreadNoQueue()
OP_API void error(const std::string &message, const int line=-1, const std::string &function="", const std::string &file="")
DELETE_COPY(SubThreadNoQueue)
SubThreadNoQueue(const std::vector< TWorker > &tWorkers)
Definition: subThreadNoQueue.hpp:32
COMPILE_TEMPLATE_DATUM(WPoseTriangulation)
Definition: subThreadNoQueue.hpp:11