SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
trirefinehook.h
Go to the documentation of this file.
1
45#ifndef OPENSWMMVIS_MESH_TRIREFINEHOOK_H
46#define OPENSWMMVIS_MESH_TRIREFINEHOOK_H
47
48#include <QtGlobal>
49
50#include <functional>
51
52namespace mesh {
53
61{
65 std::function<bool()> isCancelled;
66
89 std::function<double(double x, double y)> targetAreaAt;
90
94 std::function<void(qint64 testCount)> onProgress;
95};
96
105{
106public:
107 explicit RefineHookGuard(const RefineHook *hook) noexcept;
109
112
113private:
114 const RefineHook *m_prev;
115};
116
122[[nodiscard]] bool refineHookWasCancelled() noexcept;
123
126[[nodiscard]] qint64 refineHookTestCount() noexcept;
127
128} // namespace mesh
129
130#endif // OPENSWMMVIS_MESH_TRIREFINEHOOK_H
Installs hook as the active refinement hook for the current thread.
Definition trirefinehook.h:105
RefineHookGuard(const RefineHookGuard &)=delete
~RefineHookGuard()
Definition trirefinehook.cpp:43
RefineHookGuard & operator=(const RefineHookGuard &)=delete
Definition meshcommands.h:302
qint64 refineHookTestCount() noexcept
Number of triunsuitable() invocations since the active guard was constructed. Useful for logging refi...
Definition trirefinehook.cpp:49
bool refineHookWasCancelled() noexcept
True if the hook active on this thread observed cancellation.
Definition trirefinehook.cpp:48
Callbacks consulted by Triangle's -u user test.
Definition trirefinehook.h:61
std::function< void(qint64 testCount)> onProgress
Definition trirefinehook.h:94
std::function< bool()> isCancelled
Definition trirefinehook.h:65
std::function< double(double x, double y)> targetAreaAt
Definition trirefinehook.h:89
double
Definition swmmpollutantpropertyadapter.cpp:50