Debian Codegraph @

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

raw
1 /*
2 * ResourceList.h - TaskJuggler
3 *
4 * SPDX-FileCopyrightText: 2001, 2002, 2003, 2004 Chris Schlaeger <[email protected]>
5 * SPDX-FileCopyrightText: 2011 Dag Andersen <[email protected]>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of version 2 of the GNU General Public License as
9 * published by the Free Software Foundation.
10 *
11 * $Id$
12 */
13
14 #ifndef _ResourceList_h_
15 #define _ResourceList_h_
16
17 #include "plantj_export.h"
18
19 #include "CoreAttributesList.h"
20
21 class QString;
22
23 namespace TJ
24 {
25
26 class Resource;
27
28 /**
29 * @short A list of resources.
30 * @author Chris Schlaeger <[email protected]>
31 */
32 class PLANTJ_EXPORT ResourceList : public CoreAttributesList
33 {
34 public:
35 ResourceList();
36 ~ResourceList() override { }
37
38 Resource* getResource(const QString& id) const;
39
40 static bool isSupportedSortingCriteria(int sc);
41
42 int compareItemsLevel(CoreAttributes* c1, CoreAttributes* c2,
43 int level) override;
44 } ;
45
46 /**
47 * @short Iterator class for ResourceList objects.
48 * @author Chris Schlaeger <[email protected]>
49 */
50 class ResourceListIterator : public virtual CoreAttributesListIterator
51 {
52 public:
53 explicit ResourceListIterator(const CoreAttributesList& l) :
54 CoreAttributesListIterator(l)
55 { }
56
57 ~ResourceListIterator() override { }
58
59 Resource* operator*();
60 } ;
61
62 } // namespace TJ
63
64 #endif