diff options
author | Daniel Burrows <dburrows@debian.org> | 2007-06-17 11:01:07 -0700 |
---|---|---|
committer | Daniel Burrows <dburrows@debian.org> | 2007-06-17 11:01:07 -0700 |
commit | 6cfc0e4fabbd562d77e78faa0da050ab127bd1bc (patch) | |
tree | 9318810dfa6cab6fd99fd3ca22a812019b09d9ee /src/pkg_columnizer.h | |
parent | 47aacce851584d53fa7715c599122a2c98bacc89 (diff) | |
download | aptitude-6cfc0e4fabbd562d77e78faa0da050ab127bd1bc.tar.gz |
Expose the package column formatting logic directly.
Made setup_column public, and added a public static override that does
the setup directly, without a need to construct a column formatter.
I think it would be interesting to see whether the package and version
columnizers can be merged to a greater degree than they are currently;
much of the version columnization just replaces visible_ver with ver.
Diffstat (limited to 'src/pkg_columnizer.h')
-rw-r--r-- | src/pkg_columnizer.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/pkg_columnizer.h b/src/pkg_columnizer.h index 6cb46bcf..72ec94c6 100644 --- a/src/pkg_columnizer.h +++ b/src/pkg_columnizer.h @@ -1,6 +1,6 @@ // pkg_columnizer.h -*-c++-*- // -// Copyright 1999-2002, 2004-2005 Daniel Burrows +// Copyright 1999-2002, 2004-2005, 2007 Daniel Burrows // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -40,10 +40,15 @@ class pkg_item::pkg_columnizer:public column_generator // Set up the translated format widths. static void init_formatting(); protected: - virtual column_disposition setup_column(int type); const pkgCache::PkgIterator &get_pkg() {return pkg;} const pkgCache::VerIterator &get_visible_ver() {return visible_ver;} public: + static column_disposition setup_column(const pkgCache::PkgIterator &pkg, + const pkgCache::VerIterator &ver, + int basex, + int type); + virtual column_disposition setup_column(int type); + static const column_definition_list &get_columns() { setup_columns(); |