summaryrefslogtreecommitdiff
path: root/apt-pkg/cachefilter.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-07-17 19:07:00 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-07-17 19:07:00 +0200
commit9ba5aa3b01f1f7c08c74f5d0a21971db221d30f1 (patch)
treed2b12bb5b382c36aeaf6872241e75a2b25923fe7 /apt-pkg/cachefilter.h
parentfe1af091b871f9af715d729e515f2e3a62802c6f (diff)
factor regex package name matches into newly created cachefilter classes
Diffstat (limited to 'apt-pkg/cachefilter.h')
-rw-r--r--apt-pkg/cachefilter.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/apt-pkg/cachefilter.h b/apt-pkg/cachefilter.h
new file mode 100644
index 000000000..e7ab1723f
--- /dev/null
+++ b/apt-pkg/cachefilter.h
@@ -0,0 +1,29 @@
+// -*- mode: cpp; mode: fold -*-
+// Description /*{{{*/
+/** \file cachefilter.h
+ Collection of functor classes */
+ /*}}}*/
+#ifndef APT_CACHEFILTER_H
+#define APT_CACHEFILTER_H
+// Include Files /*{{{*/
+#include <apt-pkg/pkgcache.h>
+
+#include <string>
+
+#include <regex.h>
+ /*}}}*/
+namespace APT {
+namespace CacheFilter {
+// PackageNameMatchesRegEx /*{{{*/
+class PackageNameMatchesRegEx {
+ regex_t* pattern;
+public:
+ PackageNameMatchesRegEx(std::string const &Pattern);
+ bool operator() (pkgCache::PkgIterator const &Pkg);
+ bool operator() (pkgCache::GrpIterator const &Grp);
+ ~PackageNameMatchesRegEx();
+};
+ /*}}}*/
+}
+}
+#endif