All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
workerProducer.hpp
Go to the documentation of this file.
#ifndef OPENPOSE_THREAD_WORKER_PRODUCER_HPP
#define OPENPOSE_THREAD_WORKER_PRODUCER_HPP
#include <openpose/core/common.hpp>
#include <openpose/thread/worker.hpp>
namespace op
{
template<typename TDatums>
class WorkerProducer : public Worker<TDatums>
{
public:
virtual ~WorkerProducer();
inline void work(TDatums& tDatums)
{
tDatums = std::move(workProducer());
}
protected:
virtual TDatums workProducer() = 0;
};
}
// Implementation
namespace op
{
template<typename TDatums>
WorkerProducer<TDatums>::~WorkerProducer()
{
}
COMPILE_TEMPLATE_DATUM(WorkerProducer);
}
#endif // OPENPOSE_THREAD_WORKER_PRODUCER_HPP
op::WorkerProducer::workProducer
virtual TDatums workProducer()=0
op::WorkerProducer::~WorkerProducer
virtual ~WorkerProducer()
Definition: workerProducer.hpp:33
op::Worker
Definition: worker.hpp:9
common.hpp
op::WorkerProducer
Definition: workerProducer.hpp:10
worker.hpp
op::WorkerProducer::work
void work(TDatums &tDatums)
Definition: workerProducer.hpp:15
op::COMPILE_TEMPLATE_DATUM
COMPILE_TEMPLATE_DATUM(WPoseTriangulation)