OSDN Git Service

Removing redundant error checking related to booking declaration.
[tjqt4port/tj2qt4.git] / taskjuggler / ResourceScenario.h
1 /*
2  * ResourceScenario.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 _ResourceScenario_h_
14 #define _ResourceScenario_h_
15
16 #include "Task.h"
17
18 class ResourceScenario
19 {
20     friend class Resource;
21
22 public:
23     ResourceScenario() :
24         allocatedTasks(),
25         firstSlot(-1),
26         lastSlot(-1)
27     { }
28
29     ~ResourceScenario() { }
30
31     void addTask(const Task* t)
32     {
33         if (allocatedTasks.findRef(t) < 0)
34             allocatedTasks.append(t);
35     }
36 private:
37     TaskList allocatedTasks;
38     int firstSlot;
39     int lastSlot;
40 } ;
41
42 #endif
43