[Debtags-commits] [svn] r1824 - in debtags/1.6.0: . tools

Enrico Zini enrico at costa.debian.org
Sun Jul 9 07:52:29 UTC 2006


Author: enrico
Date: Sun Jul  9 07:52:26 2006
New Revision: 1824

Added:
   debtags/1.6.0/tools/Ept.cc
Modified:
   debtags/1.6.0/   (props changed)
   debtags/1.6.0/tools/Ept.h
Log:
 r3012 at viaza:  enrico | 2006-07-09 09:31:03 +0200
 More work on splitting code away from debtags.cc


Modified: debtags/1.6.0/tools/Ept.h
==============================================================================
--- debtags/1.6.0/tools/Ept.h	(original)
+++ debtags/1.6.0/tools/Ept.h	Sun Jul  9 07:52:26 2006
@@ -18,6 +18,9 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#ifndef EPT_H
+#define EPT_H
+
 #include <ept/init.h>
 #include <ept/forward.h>
 //#include <ept/cache/cache.h>
@@ -28,33 +31,12 @@
 #include <ept/cache/tag.h>
 #include <ept/cache/package.h>
 #include <ept/cache/version.h>
+#include <ept/cache/apt/packages.h>
 //#include <ept/predicate/factory.h>
 //#include <ept/predicate/predicate.h>
 
-#include <tagcoll/input/stdio.h>
-#include <tagcoll/stream/filters.h>
-#include <tagcoll/expression.h>
-#include <tagcoll/TextFormat.h>
-#include <tagcoll/SmartHierarchy.h>
-#include <tagcoll/coll/simple.h>
-#include <tagcoll/utils/set.h>
-//#include <tagcoll/experiments.h>
-
-#include "Environment.h"
-#include "DebtagsOptions.h"
-#include "acqprogress.h"
-#include "Printer.h"
-#include "nullstream.h"
-
-#include <apt-pkg/configuration.h>
-
-#include <errno.h>
-#include <termios.h>
-#include <sys/ioctl.h>
-#include <sys/types.h>	// umask
-#include <sys/stat.h>	// umask
-
 using namespace ept::configuration;
+using namespace tagcoll;
 
 typedef apt::cache::Package Package;
 typedef apt::cache::Tag Tag;
@@ -64,6 +46,7 @@
 typedef apt::cache::Vocabulary Vocabulary;
 typedef apt::cache::TagMap TagMap;
 
+
 class Ept
 {
 	struct antani {
@@ -86,34 +69,11 @@
 	Vocabulary& vocabulary() { return m_vocabulary; }
 
 	template<typename OUT>
-	void readCollection(const string& file, const OUT& out)
-	{
-		if (file == "-")
-		{
-			input::Stdio input(stdin, "<stdin>");
-			textformat::parse(input, ept::t::cache::debtags::stringToEpt<ept::configuration::Apt>(m_packages, m_vocabulary, out));
-		}
-		else
-		{
-			input::Stdio input(file);
-			textformat::parse(input, ept::t::cache::debtags::stringToEpt<ept::configuration::Apt>(m_packages, m_vocabulary, out));
-		}
-	}
+	void readCollection(const string& file, const OUT& out);
 
 	template<typename OUT>
-	void readCollectionRaw(const string& file, const OUT& out)
-	{
-		if (file == "-")
-		{
-			input::Stdio input(stdin, "<stdin>");
-			textformat::parse(input, out);
-		}
-		else
-		{
-			input::Stdio input(file);
-			textformat::parse(input, out);
-		}
-	}
+	void readCollectionRaw(const string& file, const OUT& out);
 };
 
+#endif
 // vim:set ts=4 sw=4:



More information about the Debtags-commits mailing list