Photon Editor Library 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
TQueryPerformer.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <atomic>
6
7namespace ph::editor
8{
9
10template<typename Target>
12{
13public:
14 using TargetType = Target;
15
17
21 virtual bool performQuery(Target& target) = 0;
22
27 bool isReady() const;
28
29 void cancel();
30
31private:
33
38 void queryDone();
39
40 bool isCanceled() const;
41
42 std::atomic_flag m_readyFlag;
43 std::atomic_flag m_cancelFlag;
44};
45
46}// end namespace ph::editor
47
Definition TQuery.h:29
Definition TQueryPerformer.h:12
Target TargetType
Definition TQueryPerformer.h:14
virtual bool performQuery(Target &target)=0
bool isReady() const
Whether the query was finished and the result is ready.
Definition TQueryPerformer.ipp:12
void cancel()
Definition TQueryPerformer.ipp:26
Definition ph_editor.h:10