Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::QtThreadClosure Class Reference

Class for creating Qt threads easier. More...

#include <QtThreadClosure.h>

Inheritance diagram for sf::QtThreadClosure:
Collaboration diagram for sf::QtThreadClosure:

Public Member Functions

 QtThreadClosure (QObject *parent=nullptr)
 Standard QT constructor.
 
 QtThreadClosure (const func_type &f, QObject *parent=nullptr)
 Constructor assigning the closure function.
 
 ~QtThreadClosure () override
 
- Public Member Functions inherited from sf::TClosure< void, QThread &, QObject * >
 TClosure ()=default
 Default constructor.
 
 TClosure (const TClosure &c)
 Copy constructor.
 
 TClosure (const func_type &fn)
 Function assignment constructor.
 
TClosureassign (const func_type &fn)
 Function assignment method for static function.
 
TClosureassign (ClassType *cls, MethodType mtd, BoundArgs... args)
 Binds a non-static class member function to this instance.
 
TClosureunassign ()
 Function assignment member.
 
TClosureoperator= (const TClosure &c)
 Closure assignment operator.
 
TClosureoperator= (const func_type &f)
 Closure assignment operator.
 
void operator() (Args... args) const
 Make the call to the member function.
 
bool isAssigned () const
 Checks if the closure is valid for calling.
 
 operator bool () const
 Checks if the closure is valid for calling.
 

Protected Member Functions

void run () override
 Overrides run function and calls the closure assigned one.
 
- Protected Member Functions inherited from sf::TClosure< void, QThread &, QObject * >
void call (Args... args) const
 Makes the call to the member function.
 

Additional Inherited Members

- Public Types inherited from sf::TClosure< void, QThread &, QObject * >
typedef std::function< void(Args...)> func_type
 Function type of the lambda or function.
 

Detailed Description

Class for creating Qt threads easier.

Constructor & Destructor Documentation

◆ QtThreadClosure() [1/2]

sf::QtThreadClosure::QtThreadClosure ( QObject *  parent = nullptr)
inlineexplicit

Standard QT constructor.

◆ QtThreadClosure() [2/2]

sf::QtThreadClosure::QtThreadClosure ( const func_type f,
QObject *  parent = nullptr 
)
inlineexplicit

Constructor assigning the closure function.

◆ ~QtThreadClosure()

sf::QtThreadClosure::~QtThreadClosure ( )
inlineoverride

Member Function Documentation

◆ run()

void sf::QtThreadClosure::run ( )
inlineoverrideprotected

Overrides run function and calls the closure assigned one.


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