1/*
2 * Copyright 2013-2014, Stephan A��mus <superstippi@gmx.de>.
3 * Copyright 2016-2023, Andrew Lindesay <apl@lindesay.co.nz>.
4 * All rights reserved. Distributed under the terms of the MIT License.
5 */
6#ifndef PACKAGE_CATEGORY_H
7#define PACKAGE_CATEGORY_H
8
9
10#include <Referenceable.h>
11#include <String.h>
12
13
14class PackageCategory : public BReferenceable {
15public:
16								PackageCategory();
17								PackageCategory(const BString& code,
18									const BString& name);
19								PackageCategory(const PackageCategory& other);
20
21			PackageCategory&	operator=(const PackageCategory& other);
22			bool				operator==(const PackageCategory& other) const;
23			bool				operator!=(const PackageCategory& other) const;
24
25			const BString&		Code() const
26									{ return fCode; }
27			const BString&		Name() const
28									{ return fName; }
29
30			int					Compare(const PackageCategory& other) const;
31
32private:
33			BString				fCode;
34			BString				fName;
35};
36
37
38typedef BReference<PackageCategory> CategoryRef;
39
40
41extern bool IsPackageCategoryBefore(const CategoryRef& c1,
42	const CategoryRef& c2);
43
44
45#endif // PACKAGE_CATEGORY_H
46