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 14 class PackageCategory : public BReferenceable { 15 public: 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 32 private: 33 BString fCode; 34 BString fName; 35 }; 36 37 38 typedef BReference<PackageCategory> CategoryRef; 39 40 41 extern bool IsPackageCategoryBefore(const CategoryRef& c1, 42 const CategoryRef& c2); 43 44 45 #endif // PACKAGE_CATEGORY_H 46