OSDN Git Service

adjust integer's signedness
[tjqt4port/tj2qt4.git] / taskjuggler / UsageLimits.h
1 /*
2  * UsageLimits.h - TaskJuggler
3  *
4  * Copyright (c) 2001, 2002, 2003, 2004, 2005 by Chris Schlaeger <cs@kde.org>
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
13 #ifndef _UsageLimits_h_
14 #define _UsageLimits_h_
15
16 /**
17  * This class stores usage limits of resources or task allocations. The values
18  * are stored as number of scoreboard slots.
19  *
20  * @short The class stores usage limits
21  * @see Resource
22  * @see Allocation
23  * @author Chris Schlaeger <cs@kde.org>
24  */
25 class UsageLimits
26 {
27     public:
28         UsageLimits() :
29             dailyMax(0),
30             weeklyMax(0),
31             weeklyRatioMax(0.0),
32             monthlyMax(0),
33             monthlyRatioMax(0.0),
34             yearlyMax(0),
35             projectMax(0)
36         { }
37
38         ~UsageLimits() { }
39
40         void setDailyMax(uint m) { dailyMax = m; }
41         uint getDailyMax() const { return dailyMax; }
42
43         void setWeeklyMax(uint m) { weeklyMax = m; }
44         uint getWeeklyMax() const { return weeklyMax; }
45
46         void setWeeklyRatioMax(double m) { weeklyRatioMax = m; }
47         double getWeeklyRatioMax() const { return weeklyRatioMax; }
48
49         void setMonthlyMax(uint m) { monthlyMax = m; }
50         uint getMonthlyMax() const { return monthlyMax; }
51
52         void setMonthlyRatioMax(double m) { monthlyRatioMax = m; }
53         double getMonthlyRatioMax() const { return monthlyRatioMax; }
54
55         void setYearlyMax(uint m) { yearlyMax = m; }
56         uint getYearlyMax() const { return yearlyMax; }
57
58         void setProjectMax(uint m) { projectMax = m; }
59         uint getProjectMax() const { return projectMax; }
60
61     private:
62         uint dailyMax;
63         uint weeklyMax;
64         double weeklyRatioMax;
65         uint monthlyMax;
66         double monthlyRatioMax;
67         uint yearlyMax;
68         uint projectMax;
69 } ;
70
71 #endif
72