]> git.saurik.com Git - apt.git/blame - apt-pkg/prettyprinters.h
test: Get rid of debhelper rules.tiny example dep
[apt.git] / apt-pkg / prettyprinters.h
CommitLineData
84573326
DK
1#ifndef APT_PRETTYPRINTERS_H
2#define APT_PRETTYPRINTERS_H
3#include <apt-pkg/pkgcache.h>
4#include <apt-pkg/macros.h>
5
6class pkgDepCache;
7
8namespace APT {
9
10/** helper to format PkgIterator for easier printing in debug messages.
11 *
12 * The actual text generated is subject to change without prior notice
13 * and should NOT be used as part of a general user interface.
14 */
15struct PrettyPkg
16{
d622baee 17 pkgDepCache * const DepCache;
84573326 18 pkgCache::PkgIterator const Pkg;
d622baee 19 PrettyPkg(pkgDepCache * const depcache, pkgCache::PkgIterator const &pkg) APT_NONNULL(2) : DepCache(depcache), Pkg(pkg) {}
84573326
DK
20};
21/** helper to format DepIterator for easier printing in debug messages.
22 *
23 * The actual text generated is subject to change without prior notice
24 * and should NOT be used as part of a general user interface.
25 */
26struct PrettyDep
27{
d622baee 28 pkgDepCache * const DepCache;
84573326 29 pkgCache::DepIterator const Dep;
d622baee 30 PrettyDep(pkgDepCache * const depcache, pkgCache::DepIterator const &dep) APT_NONNULL(2) : DepCache(depcache), Dep(dep) {}
84573326
DK
31};
32
33}
34std::ostream& operator<<(std::ostream& os, const APT::PrettyPkg& pp);
35std::ostream& operator<<(std::ostream& os, const APT::PrettyDep& pd);
36
37#endif