Heart 1.3.850.999012c
Heart is base back end library for your c++ Qt projects.
QH::AsyncRenderLoop Class Referenceabstract

#include <asyncrenderloop.h>

Inheritance diagram for QH::AsyncRenderLoop:
Inheritance graph
Collaboration diagram for QH::AsyncRenderLoop:
Collaboration graph

Public Member Functions

 AsyncRenderLoop (QThread *thread, QObject *ptr=nullptr)
 
virtual void run ()
 run This method starts the render loop.
 
virtual void stop ()
 stop This method stops the render loop.
 
bool isRun () const
 isRun This method returns the state of the render loop.
 
- Public Member Functions inherited from QH::Async
bool asyncLauncher (const Job &job, bool await=false, bool freaze=true) const
 asyncLauncher This method invoke a job on the thread (using the asyncHandler method) of this object.
 

Protected Member Functions

virtual void renderIteration (int msec)=0
 renderIteration This method is called in each iteration of the render loop. This method must be implemented in the derived class.
 
- Protected Member Functions inherited from QH::Async
 Async (QThread *thread, QObject *ptr=nullptr)
 Async This is default constructor of the async object.
 
 ~Async ()
 
bool waitFor (bool *condition, int timeout=WAIT_TIME, bool freaze=true) const
 waitFor This is base wait function.
 
bool waitFor (const Job &condition, int timeout=WAIT_TIME, bool freaze=true) const
 waitFor This is base wait function.
 

Additional Inherited Members

- Public Types inherited from QH::Async
using Job = std::function< bool()>
 

Detailed Description

Definition at line 39 of file asyncrenderloop.h.

Constructor & Destructor Documentation

◆ AsyncRenderLoop()

QH::AsyncRenderLoop::AsyncRenderLoop ( QThread *  thread,
QObject *  ptr = nullptr 
)

Definition at line 14 of file asyncrenderloop.cpp.

Member Function Documentation

◆ isRun()

bool QH::AsyncRenderLoop::isRun ( ) const

isRun This method returns the state of the render loop.

Returns
true if the render loop is running, else false.

Definition at line 32 of file asyncrenderloop.cpp.

◆ renderIteration()

virtual void QH::AsyncRenderLoop::renderIteration ( int  msec)
protectedpure virtual

renderIteration This method is called in each iteration of the render loop. This method must be implemented in the derived class.

Parameters
msectime in milliseconds from the last iteration.
See also
stop
run

◆ run()

void QH::AsyncRenderLoop::run ( )
virtual

run This method starts the render loop.

Definition at line 18 of file asyncrenderloop.cpp.

◆ stop()

void QH::AsyncRenderLoop::stop ( )
virtual

stop This method stops the render loop.

Definition at line 26 of file asyncrenderloop.cpp.


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