cachefilter.h 668 B

123456789101112131415161718192021222324252627282930
  1. // -*- mode: cpp; mode: fold -*-
  2. // Description /*{{{*/
  3. /** \file cachefilter.h
  4. Collection of functor classes */
  5. /*}}}*/
  6. #ifndef APT_CACHEFILTER_H
  7. #define APT_CACHEFILTER_H
  8. // Include Files /*{{{*/
  9. #include <apt-pkg/pkgcache.h>
  10. #include <string>
  11. #include <regex.h>
  12. /*}}}*/
  13. namespace APT {
  14. namespace CacheFilter {
  15. // PackageNameMatchesRegEx /*{{{*/
  16. class PackageNameMatchesRegEx {
  17. regex_t* pattern;
  18. public:
  19. PackageNameMatchesRegEx(std::string const &Pattern);
  20. bool operator() (pkgCache::PkgIterator const &Pkg);
  21. bool operator() (pkgCache::GrpIterator const &Grp);
  22. ~PackageNameMatchesRegEx();
  23. };
  24. /*}}}*/
  25. }
  26. }
  27. #endif