Debian Codegraph @

src/plugins/schedulers/tj/taskjuggler/Scenario.h

raw
1 /*
2 * Scenario.h - TaskJuggler
3 *
4 * SPDX-FileCopyrightText: 2001, 2002, 2003, 2004 Chris Schlaeger <[email protected]>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of version 2 of the GNU General Public License as
8 * published by the Free Software Foundation.
9 *
10 * $Id$
11 */
12 #ifndef _Scenario_h_
13 #define _Scenario_h_
14
15 #include "plantj_export.h"
16
17 #include "ScenarioList.h"
18
19 class QString;
20
21 namespace TJ
22 {
23
24 class Project;
25
26 class PLANTJ_EXPORT Scenario : public CoreAttributes
27 {
28 friend int ScenarioList::compareItemsLevel(CoreAttributes* c1,
29 CoreAttributes* c2,
30 int level);
31 public:
32 Scenario(Project* p, const QString& i, const QString& n, Scenario* s);
33 ~Scenario() override;
34
35 CAType getType() const override { return CA_Scenario; }
36
37 Scenario* getParent() const { return static_cast<Scenario*>(parent); }
38
39 ScenarioListIterator getSubListIterator() const;
40
41 void setEnabled(bool e) { enabled = e; }
42 bool getEnabled() const { return enabled; }
43
44 void setProjectionMode(bool p) { projectionMode = p; }
45 bool getProjectionMode() const { return projectionMode; }
46
47 void setOptimize(bool o) { optimize = o; }
48 bool getOptimize() const { return optimize; }
49
50 void setStrictBookings(bool s) { strictBookings = s; }
51 bool getStrictBookings() const { return strictBookings; }
52
53 void setMinSlackRate(double msr) { minSlackRate = msr; }
54 double getMinSlackRate() const { return minSlackRate; }
55
56 void setMaxPaths(long l) { maxPaths = l; }
57 long getMaxPaths() const { return maxPaths; }
58
59 private:
60 bool enabled;
61 bool projectionMode;
62 bool strictBookings;
63 bool optimize;
64 double minSlackRate;
65 long maxPaths;
66 } ;
67
68 } // namespace TJ
69
70 #endif