Loading [MathJax]/extensions/tex2jax.js

Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
Timeouter.h
Go to the documentation of this file.
1
32#pragma once
33
34#include <ogdf/basic/basic.h>
35
36namespace ogdf {
37
39
47public:
49 Timeouter() : m_timeLimit(-1) { }
50
52 explicit Timeouter(double t) : m_timeLimit(t) { }
53
55 explicit Timeouter(bool t) : m_timeLimit(t ? 0 : -1) { }
56
57 Timeouter(const Timeouter& t) : m_timeLimit(t.m_timeLimit) { }
58
60
62 m_timeLimit = t.m_timeLimit;
63 return *this;
64 }
65
67 void timeLimit(double t) { m_timeLimit = t; }
68
70 void timeLimit(bool t) { m_timeLimit = t ? 0 : -1; }
71
73 double timeLimit() const { return m_timeLimit; }
74
76 bool isTimeLimit() const { return m_timeLimit >= 0; }
77
78protected:
79 double m_timeLimit;
80};
81
82}
Basic declarations, included by all source files.
class for timeout funtionality.
Definition Timeouter.h:46
void timeLimit(bool t)
shorthand to turn timelimit off or on (with 0 seconds)
Definition Timeouter.h:70
bool isTimeLimit() const
returns whether any time limit is set or not
Definition Timeouter.h:76
Timeouter & operator=(const Timeouter &t)
Definition Timeouter.h:61
double timeLimit() const
returns the current time limit for the call
Definition Timeouter.h:73
Timeouter(const Timeouter &t)
Definition Timeouter.h:57
void timeLimit(double t)
sets the time limit for the call (in seconds); <0 means no limit.
Definition Timeouter.h:67
Timeouter()
timeout is turned of by default
Definition Timeouter.h:49
double m_timeLimit
Time limit for module calls (< 0 means no limit).
Definition Timeouter.h:79
Timeouter(double t)
timeout is set to the given value (seconds)
Definition Timeouter.h:52
Timeouter(bool t)
timeout is turned off (false) or on (true) (with 0 second)
Definition Timeouter.h:55
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition config.h:101
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.