00001 #ifndef DEBTAGS_PACKAGE_SET_H
00002 #define DEBTAGS_PACKAGE_SET_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #pragma interface
00025
00026 #include <debtags/Package.h>
00027 #include <debtags/Consumer.h>
00028
00029 #include <tagcoll/OpSet.h>
00030
00031 namespace Tagcoll
00032 {
00033 class FacetSet;
00034 class TagSet;
00035 };
00036
00037 namespace Debtags
00038 {
00039 using namespace Tagcoll;
00040 class Maintainer;
00041 class MaintainerSet;
00042
00043 class PackageSet : public OpSet<Debtags::Package>, public PackageConsumer
00044 {
00045 public:
00046 using OpSet<Debtags::Package>::find;
00047
00048 PackageSet() throw ();
00049 PackageSet(const OpSet<Debtags::Package>&) throw ();
00050 virtual ~PackageSet() throw ();
00051
00052 virtual void consume(const Package& pkg) throw ();
00053
00054
00055 FacetSet getFacets() const throw ();
00056
00057
00058 TagSet getTags() const throw ();
00059
00060
00061 MaintainerSet getMaintainers() const throw ();
00062
00063
00064
00065 Debtags::TagSet getCompanionTags(const Debtags::TagSet& ts) const throw ();
00066
00067
00068 Package find(const std::string& name) const throw ();
00069
00070
00071 Maintainer findMaintainer(const std::string& email) const throw ();
00072
00073
00074 void output(PackageConsumer& cons) const throw ();
00075
00076
00077 void output(PackageConsumer& cons, PackageMatcher& filter) const throw ();
00078
00079
00080 PackageSet getFiltered(PackageMatcher& filter) const throw ();
00081
00082
00083 PackageSet getRelated(const Package& pivot, int distance = 1) const throw ();
00084
00085
00086 PackageSet getRelated(const Debtags::TagSet& ts, int distance = 1) const throw ();
00087
00088
00089 void outputRelated(PackageConsumer& cons, const Package& pivot, int distance = 1) const throw ();
00090
00091
00092 void outputRelated(PackageConsumer& cons, const Debtags::TagSet& ts, int distance = 1) const throw ();
00093 };
00094
00095 };
00096
00097
00098 #endif