apt  2.2.4
About: Apt (Advanced Package Tool) is a management system for software packages (Debian/Ubuntu). Release series 2.2.
  Fossies Dox: apt-2.2.4.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

private-output.h File Reference
#include <apt-pkg/configuration.h>
#include <apt-pkg/macros.h>
#include <apt-pkg/pkgcache.h>
#include <fstream>
#include <functional>
#include <iostream>
#include <string>
Include dependency graph for private-output.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

APT_PUBLIC bool InitOutput (std::basic_streambuf< char > *const out=std::cout.rdbuf())
 
void ListSingleVersion (pkgCacheFile &CacheFile, pkgRecords &records, pkgCache::VerIterator const &V, std::ostream &out, std::string const &format)
 
APT_PUBLIC void ShowBroken (std::ostream &out, CacheFile &Cache, bool const Now)
 
APT_PUBLIC void ShowBroken (std::ostream &out, pkgCacheFile &Cache, bool const Now)
 
template<class Container , class PredicateC , class DisplayP , class DisplayV >
bool ShowList (std::ostream &out, std::string const &Title, Container const &cont, PredicateC Predicate, DisplayP PkgDisplay, DisplayV VerboseDisplay)
 
void ShowNew (std::ostream &out, CacheFile &Cache)
 
void ShowDel (std::ostream &out, CacheFile &Cache)
 
void ShowKept (std::ostream &out, CacheFile &Cache)
 
void ShowUpgraded (std::ostream &out, CacheFile &Cache)
 
bool ShowDowngraded (std::ostream &out, CacheFile &Cache)
 
bool ShowHold (std::ostream &out, CacheFile &Cache)
 
bool ShowEssential (std::ostream &out, CacheFile &Cache)
 
void Stats (std::ostream &out, pkgDepCache &Dep)
 
APT_PUBLIC bool YnPrompt (char const *const Question, bool Default=true)
 
bool YnPrompt (char const *const Question, bool const Default, bool const ShowGlobalErrors, std::ostream &c1o, std::ostream &c2o)
 
bool AnalPrompt (std::string const &Question, const char *Text)
 
APT_PUBLIC std::string PrettyFullName (pkgCache::PkgIterator const &Pkg)
 
std::string CandidateVersion (pkgCacheFile *const Cache, pkgCache::PkgIterator const &Pkg)
 
std::function< std::string(pkgCache::PkgIterator const &)> CandidateVersion (pkgCacheFile *const Cache)
 
std::string CurrentToCandidateVersion (pkgCacheFile *const Cache, pkgCache::PkgIterator const &Pkg)
 
std::function< std::string(pkgCache::PkgIterator const &)> CurrentToCandidateVersion (pkgCacheFile *const Cache)
 
std::string EmptyString (pkgCache::PkgIterator const &)
 
bool AlwaysTrue (pkgCache::PkgIterator const &)
 

Variables

APT_PUBLIC std::ostream c0out
 
APT_PUBLIC std::ostream c1out
 
APT_PUBLIC std::ostream c2out
 
APT_PUBLIC std::ofstream devnull
 
APT_PUBLIC unsigned int ScreenWidth
 

Function Documentation

◆ AlwaysTrue()

bool AlwaysTrue ( pkgCache::PkgIterator const &  )

◆ AnalPrompt()

bool AnalPrompt ( std::string const &  Question,
const char *  Text 
)

Definition at line 757 of file private-output.cc.

References _config, c2out(), and GlobalError::DEBUG.

Referenced by InstallPackages().

◆ CandidateVersion() [1/2]

std::function<std::string(pkgCache::PkgIterator const &)> CandidateVersion ( pkgCacheFile *const  Cache)

Definition at line 781 of file private-output.cc.

References CandidateVersion(), and pkgCache< Str, Itr >::PkgIterator().

◆ CandidateVersion() [2/2]

std::string CandidateVersion ( pkgCacheFile *const  Cache,
pkgCache::PkgIterator const &  Pkg 
)

Definition at line 777 of file private-output.cc.

Referenced by CandidateVersion(), DoAutomaticRemove(), DoInstall(), ShowDel(), and ShowNew().

◆ CurrentToCandidateVersion() [1/2]

std::function<std::string(pkgCache::PkgIterator const &)> CurrentToCandidateVersion ( pkgCacheFile *const  Cache)

◆ CurrentToCandidateVersion() [2/2]

std::string CurrentToCandidateVersion ( pkgCacheFile *const  Cache,
pkgCache::PkgIterator const &  Pkg 
)

◆ EmptyString()

std::string EmptyString ( pkgCache::PkgIterator const &  )

◆ InitOutput()

APT_PUBLIC bool InitOutput ( std::basic_streambuf< char > *const  out = std::cout.rdbuf())

Definition at line 56 of file private-output.cc.

References _config, c0out(), c1out(), c2out(), devnull(), ScreenWidth, and SigWinch().

Referenced by main().

◆ ListSingleVersion()

◆ PrettyFullName()

◆ ShowBroken() [1/2]

APT_PUBLIC void ShowBroken ( std::ostream &  out,
CacheFile Cache,
bool const  Now 
)

◆ ShowBroken() [2/2]

APT_PUBLIC void ShowBroken ( std::ostream &  out,
pkgCacheFile Cache,
bool const  Now 
)

Definition at line 456 of file private-output.cc.

References pkgDepCache::BrokenCount(), and ShowBrokenPackage().

◆ ShowDel()

void ShowDel ( std::ostream &  out,
CacheFile Cache 
)

◆ ShowDowngraded()

bool ShowDowngraded ( std::ostream &  out,
CacheFile Cache 
)

◆ ShowEssential()

◆ ShowHold()

bool ShowHold ( std::ostream &  out,
CacheFile Cache 
)

◆ ShowKept()

void ShowKept ( std::ostream &  out,
CacheFile Cache 
)

◆ ShowList()

bool ShowList ( std::ostream &  out,
std::string const &  Title,
Container const &  cont,
PredicateC  Predicate,
DisplayP  PkgDisplay,
DisplayV  VerboseDisplay 
)

◆ ShowNew()

void ShowNew ( std::ostream &  out,
CacheFile Cache 
)

◆ ShowUpgraded()

void ShowUpgraded ( std::ostream &  out,
CacheFile Cache 
)

◆ Stats()

◆ YnPrompt() [1/2]

bool YnPrompt ( char const *const  Question,
bool const  Default,
bool const  ShowGlobalErrors,
std::ostream &  c1o,
std::ostream &  c2o 
)

◆ YnPrompt() [2/2]

APT_PUBLIC bool YnPrompt ( char const *const  Question,
bool  Default = true 
)

Definition at line 749 of file private-output.cc.

References c1out(), c2out(), and YnPrompt().

Variable Documentation

◆ c0out

◆ c1out

◆ c2out

APT_PUBLIC std::ostream c2out
extern

◆ devnull

APT_PUBLIC std::ofstream devnull
extern

◆ ScreenWidth

APT_PUBLIC unsigned int ScreenWidth
extern

Definition at line 40 of file private-output.cc.

Referenced by DoUpdate(), InitOutput(), ShowList(), and SigWinch().