diff options
Diffstat (limited to 'apt-pkg/cachefilter.h')
-rw-r--r-- | apt-pkg/cachefilter.h | 29 |
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 |