]> cygwin.com Git - cygwin-apps/setup.git/blame - category.h
2002-02-19 Robert Collins <rbtcollins@hotmail.com>
[cygwin-apps/setup.git] / category.h
CommitLineData
7b606ae5
RC
1/*
2 * Copyright (c) 2001, Robert Collins.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * A copy of the GNU General Public License can be found at
10 * http://www.gnu.org/
11 *
12 * Written by Robert Collins <rbtcollins@hotmail.com>
13 *
14 */
15
16/* categories for packages */
17
18#ifndef _CATEGORY_H_
19#define _CATEGORY_H_
20
3c054baf
RC
21#include "String++.h"
22
d343da15 23class Category;
7b606ae5
RC
24class CategoryPackage;
25
d343da15
RC
26int Categorycmp (Category const &, Category const &);
27// Grrr template problem - couldn't get list to use int Ucmp (U const, U const),
28// and gcc wouldn't cast on the fly.
29int Categorycmp (Category &, Category &);
30
7b606ae5
RC
31class Category
32{
33public:
34 Category ();
3c054baf 35 Category (String const &);
d343da15 36 bool operator== (Category const &rhs) const {return Categorycmp (*this, rhs) ? false : true;}
7b606ae5
RC
37
38 Category *next; /* the next category in the list */
3c054baf
RC
39 String const name; /* the category */
40 String const key; /* always == name */
7b606ae5
RC
41 CategoryPackage *packages; /* the packages in this category */
42};
43
7b606ae5 44#endif /* _CATEGORY_H_ */
This page took 0.026763 seconds and 5 git commands to generate.