[Debtags-commits] [svn] r896 - debtags/trunk/src

Enrico Zini debtags-commits@lists.alioth.debian.org
Sat, 18 Jun 2005 07:59:31 +0000


Author: enrico
Date: Sat Jun 18 07:59:30 2005
New Revision: 896

Modified:
   debtags/trunk/src/debtags.cc
   debtags/trunk/src/instantiations.cc
Log:
Ported to libdebtags 1.0.3

Modified: debtags/trunk/src/debtags.cc
==============================================================================
--- debtags/trunk/src/debtags.cc	(original)
+++ debtags/trunk/src/debtags.cc	Sat Jun 18 07:59:30 2005
@@ -32,7 +32,6 @@
 #include <debtags/PackageSet.h>
 #include <debtags/Vocabulary.h>
 #include <debtags/TagDB.h>
-#include <debtags/MaintainerSet.h>
 #include <debtags/DebtagsSerializer.h>
 #include <debtags/Tag.h>
 #include <debtags/TagSet.h>
@@ -708,7 +707,7 @@
 				for (OpSet<Package>::const_iterator j = items.begin();
 						j != items.end() && newItems.size() <= 101; j++)
 				{
-					TagSet tags = j->tags();
+					TagSet tags = debtags.tagDB().getTags(*j);
 					bool isSeen = false;
 					for (TagSet::const_iterator i = tags.begin(); i != tags.end(); i++)
 						if (seen.contains(i->facet()))
@@ -898,10 +897,10 @@
 {
 protected:
 	DebtagsSimple<Package>& debtags;
-	TagcollConsumer<Maintainer, Tag>& cons;
+	TagcollConsumer<string, Tag>& cons;
 	
 public:
-	MaintCollector(DebtagsSimple<Package>& debtags, TagcollConsumer<Maintainer, Tag>& cons)
+	MaintCollector(DebtagsSimple<Package>& debtags, TagcollConsumer<string, Tag>& cons)
 		throw () : debtags(debtags), cons(cons) {}
 	void consume(const Package& pkg) throw ()
 	{
@@ -909,16 +908,16 @@
 	}
 };
 
-class MaintPrinter : public TagcollConsumer<Maintainer, Tag>
+class MaintPrinter : public TagcollConsumer<string, Tag>
 {
 public:
-	void consume(const Maintainer& m) throw ()
+	void consume(const string& m) throw ()
 	{
-		printf("%.*s\n", PFSTR(m.fullname()));
+		printf("%.*s\n", PFSTR(m));
 	}
-	void consume(const Maintainer& m, const OpSet<Tag>& tags) throw ()
+	void consume(const string& m, const OpSet<Tag>& tags) throw ()
 	{
-		printf("%.*s: ", PFSTR(m.fullname()));
+		printf("%.*s: ", PFSTR(m));
 		for (OpSet<Tag>::const_iterator j = tags.begin();
 				j != tags.end(); j++)
 			if (j != tags.begin())
@@ -1421,7 +1420,7 @@
 				wantTagDatabase(debtags);
 
 				// Gather maintainer informations
-				InputMerger<Maintainer, Tag> maints;
+				InputMerger<string, Tag> maints;
 				MaintCollector collector(debtags, maints);
 				debtags.serializer().packageDB().iterateAll(collector);
 				MaintPrinter printer;

Modified: debtags/trunk/src/instantiations.cc
==============================================================================
--- debtags/trunk/src/instantiations.cc	(original)
+++ debtags/trunk/src/instantiations.cc	Sat Jun 18 07:59:30 2005
@@ -1,6 +1,5 @@
 #define INSTANTIATING_TEMPLATES
 
-#include <debtags/Maintainer.h>
 #include <debtags/Tag.h>
 
 #include <tagcoll/InputMerger.cc>
@@ -10,7 +9,7 @@
 
 // Instantiate needed templates
 
-template class InputMerger<Debtags::Maintainer, Debtags::Tag>;
+template class InputMerger<std::string, Debtags::Tag>;
 template class ItemGrouper<std::string, Debtags::Tag>;
 
 // vim:set ts=4 sw=4: