molecular
Public Member Functions | List of all members
molecular::util::BlobFunctionTask< TQueue > Class Template Reference

Task that calls an std::function with a Blob argument. More...

#include <BlobFunctionTask.h>

Inheritance diagram for molecular::util::BlobFunctionTask< TQueue >:

Public Member Functions

 BlobFunctionTask (std::function< void(Blob &)> &function, Blob &blob)
 
void Run () override
 

Detailed Description

template<class TQueue>
class molecular::util::BlobFunctionTask< TQueue >

Task that calls an std::function with a Blob argument.

Blob is movable only, std::function is copyable, so std::bind cannot be used.

Todo:
Consider using std::packaged_task instead, which is movable-only
See also
GcdAsyncFileLoader
DummyFileLoader
StandardFileLoader

Constructor & Destructor Documentation

template<class TQueue >
molecular::util::BlobFunctionTask< TQueue >::BlobFunctionTask ( std::function< void(Blob &)> &  function,
Blob blob 
)
inline

Member Function Documentation

template<class TQueue >
void molecular::util::BlobFunctionTask< TQueue >::Run ( )
inlineoverride

The documentation for this class was generated from the following file: