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)  

Configuration Class Reference

#include <configuration.h>

Collaboration diagram for Configuration:
[legend]

Classes

struct  Item
 
class  MatchAgainstConfig
 match a string against a configurable list of patterns More...
 

Public Member Functions

std::string Find (const char *Name, const char *Default=0) const
 
std::string Find (std::string const &Name, const char *Default=0) const
 
std::string Find (std::string const &Name, std::string const &Default) const
 
std::string FindFile (const char *Name, const char *Default=0) const
 
std::string FindDir (const char *Name, const char *Default=0) const
 
std::vector< std::string > FindVector (const char *Name, std::string const &Default="", bool const Keys=false) const
 
std::vector< std::string > FindVector (std::string const &Name, std::string const &Default="", bool const Keys=false) const
 
int FindI (const char *Name, int const &Default=0) const
 
int FindI (std::string const &Name, int const &Default=0) const
 
bool FindB (const char *Name, bool const &Default=false) const
 
bool FindB (std::string const &Name, bool const &Default=false) const
 
std::string FindAny (const char *Name, const char *Default=0) const
 
void Set (const std::string &Name, const std::string &Value)
 
void CndSet (const char *Name, const std::string &Value)
 
void CndSet (const char *Name, const int Value)
 
void Set (const char *Name, const std::string &Value)
 
void Set (const char *Name, const int &Value)
 
bool Exists (const std::string &Name) const
 
bool Exists (const char *Name) const
 
bool ExistsAny (const char *Name) const
 
void MoveSubTree (char const *const OldRoot, char const *const NewRoot)
 
void Clear (const std::string &Name)
 
void Clear ()
 
void Clear (std::string const &List, std::string const &Value)
 
void Clear (std::string const &List, int const &Value)
 
const ItemTree (const char *Name) const
 
void Dump ()
 
void Dump (std::ostream &str)
 
void Dump (std::ostream &str, char const *const root, char const *const format, bool const emptyValue)
 
 Configuration (const Item *Root)
 
 Configuration ()
 
 ~Configuration ()
 

Private Member Functions

ItemLookup (Item *Head, const char *S, unsigned long const &Len, bool const &Create)
 
ItemLookup (const char *Name, const bool &Create)
 
const ItemLookup (const char *Name) const
 

Private Attributes

ItemRoot
 
bool ToFree
 

Detailed Description

Definition at line 39 of file configuration.h.

Constructor & Destructor Documentation

◆ Configuration() [1/2]

Configuration ( const Item Root)
explicit

Definition at line 207 of file configuration.cc.

◆ Configuration() [2/2]

Definition at line 203 of file configuration.cc.

References Root.

◆ ~Configuration()

Member Function Documentation

◆ Clear() [1/4]

void Clear ( )

Definition at line 594 of file configuration.cc.

References Configuration::Item::FullTag(), and Configuration::Item::Next.

◆ Clear() [2/4]

void Clear ( const std::string &  Name)

Referenced by main().

◆ Clear() [3/4]

void Clear ( std::string const &  List,
int const &  Value 
)

◆ Clear() [4/4]

void Clear ( std::string const &  List,
std::string const &  Value 
)

◆ CndSet() [1/2]

void CndSet ( const char *  Name,
const int  Value 
)

◆ CndSet() [2/2]

void CndSet ( const char *  Name,
const std::string &  Value 
)

◆ Dump() [1/3]

void Dump ( )
inline

Definition at line 114 of file configuration.h.

References Dump().

Referenced by Dump(), ExecGPGV(), and pkgInitConfig().

◆ Dump() [2/3]

void Dump ( std::ostream &  str)

◆ Dump() [3/3]

void Dump ( std::ostream &  str,
char const *const  root,
char const *const  format,
bool const  emptyValue 
)

◆ Exists() [1/2]

bool Exists ( const char *  Name) const

Definition at line 698 of file configuration.cc.

◆ Exists() [2/2]

bool Exists ( const std::string &  Name) const
inline

◆ ExistsAny()

bool ExistsAny ( const char *  Name) const

Definition at line 709 of file configuration.cc.

◆ Find() [1/3]

◆ Find() [2/3]

std::string Find ( std::string const &  Name,
const char *  Default = 0 
) const
inline

Definition at line 71 of file configuration.h.

References Find().

Referenced by Find().

◆ Find() [3/3]

std::string Find ( std::string const &  Name,
std::string const &  Default 
) const
inline

Definition at line 72 of file configuration.h.

References Find().

Referenced by Find().

◆ FindAny()

string FindAny ( const char *  Name,
const char *  Default = 0 
) const

Definition at line 464 of file configuration.cc.

◆ FindB() [1/2]

bool FindB ( const char *  Name,
bool const &  Default = false 
) const

Referenced by AcqTextStatus::AcqTextStatus(), AuthPrompt(), AutoDetectProxy(), pkgCacheFile::BuildCaches(), CheckFreeSpaceBeforeDownload(), CheckIfCalledByScript(), CheckIfSimulateMode(), CheckValidity(), CacheDB::Clean(), Connect(), ConnectionAllowed(), ConnectToHostname(), CreateDynamicMMap(), debSLTypeDebian::CreateItemInternal(), aptMethod::DebugEnabled(), aptMethod::DecodeSendURI(), DoAutoClean(), DoAutomaticRemove(), DoBuildDep(), DoCacheManipulationFromCommandLine(), DoChangelog(), DoClean(), DoDownload(), DoList(), DoMoo2(), DoSource(), DoUpdate(), DoUpgrade(), PackageManagerFancy::DrawStatusLine(), LogCleaner::Erase(), ExecGPGV(), AcqTextStatus::Fail(), StoreMethod::Fetch(), pkgDebianIndexFile::FindInCache(), debReleaseIndex::FindInCache(), FindSrc(), FullTextSearch(), GetBuildDeps(), debSLTypeDebian::GetDebReleaseIndexBy(), GetIndexTargetsFor(), GetLocalitySortedVersionSet(), GetLockMaybeWait(), GetSrvRecords(), Digest::getState(), PackageManagerFancy::GetTerminalSize(), pkgArchiveCleaner::Go(), HashString::HashString(), IdentCdrom(), InstallPackages(), IsConfigured(), IsModeChangeOk(), debReleaseIndex::IsTrusted(), debReleaseIndex::Load(), aptMethod::LoadSeccomp(), debSystem::Lock(), main(), pkgCacheGenerator::MakeStatusCache(), pkgDepCache::MarkFollowsRecommends(), pkgDepCache::MarkFollowsSuggests(), pkgDepCache::MarkInstall_StateChange(), pkgDepCache::MarkPackage(), pkgDepCache::MarkRequired(), MaybeAddAuth(), AcqTextStatus::MediaChange(), CacheFile::OpenForInstall(), TryToInstall::operator()(), CacheSetHelper::PackageFromFnmatch(), CacheSetHelper::PackageFromRegEx(), APT::Progress::PackageManagerProgressFactory(), PackageNameMatcher::PackageNameMatcher(), pkgAllUpgradeNoNewPackages(), pkgAllUpgradeWithNewPackages(), pkgDepCache::pkgDepCache(), pkgDistUpgrade(), pkgInitConfig(), pkgDepCache::Policy::Policy(), PopFromSrvRecs(), AcqTextStatus::Pulse(), pkgDepCache::readStateFile(), CacheDB::ReadyDB(), AcqTextStatus::ReleaseInfoChanges(), pkgCache< Str, Itr >::ReMap(), pkgCacheGenerator::ReMap(), RunJsonHook(), StateChanges::Save(), Search(), PackageManagerFancy::SetupTerminalScrollArea(), ShowCommonHelp(), ShowDepends(), ShowList(), ShowPackage(), ShowSrcPackage(), PackageManagerProgressFd::StatusChanged(), AcqTextStatus::Stop(), pkgDepCache::Sweep(), UnMet(), UnwrapTLS(), HashString::VerifyFile(), WriteBuildDependencyPackage(), EDSP::WriteRequest(), EDSP::WriteSolutionStanza(), pkgDepCache::writeStateFile(), and pkgCacheGenerator::~pkgCacheGenerator().

◆ FindB() [2/2]

bool FindB ( std::string const &  Name,
bool const &  Default = false 
) const
inline

Definition at line 89 of file configuration.h.

References FindB().

Referenced by FindB().

◆ FindDir()

◆ FindFile()

◆ FindI() [1/2]

◆ FindI() [2/2]

int FindI ( std::string const &  Name,
int const &  Default = 0 
) const
inline

Definition at line 87 of file configuration.h.

References FindI().

Referenced by FindI().

◆ FindVector() [1/2]

std::vector<std::string> FindVector ( const char *  Name,
std::string const &  Default = "",
bool const  Keys = false 
) const

return a list of child options

Options like Acquire::Languages are handled as lists which can be overridden and have a default. For the later two a comma separated list of values is supported.

Parameters
Nameof the parent node
Defaultlist of values separated by commas

Referenced by Compressor::Compressor(), debListParser::debListParser(), DoBuildDep(), ExecuteExternal(), FindMountPointForDevice(), aptMethod::LoadSeccomp(), and debSLTypeDebian::parsePlusMinusTargetOptions().

◆ FindVector() [2/2]

std::vector<std::string> FindVector ( std::string const &  Name,
std::string const &  Default = "",
bool const  Keys = false 
) const
inline

Definition at line 84 of file configuration.h.

References FindVector().

Referenced by FindVector().

◆ Lookup() [1/3]

const Item* Lookup ( const char *  Name) const
inlineprivate

Definition at line 63 of file configuration.h.

◆ Lookup() [2/3]

Item* Lookup ( const char *  Name,
const bool &  Create 
)
private

◆ Lookup() [3/3]

Configuration::Item * Lookup ( Item Head,
const char *  S,
unsigned long const &  Len,
bool const &  Create 
)
private

Definition at line 247 of file configuration.cc.

References Configuration::Item::Child, I, and stringcasecmp().

◆ MoveSubTree()

void MoveSubTree ( char const *const  OldRoot,
char const *const  NewRoot 
)

◆ Set() [1/3]

void Set ( const char *  Name,
const int &  Value 
)

◆ Set() [2/3]

void Set ( const char *  Name,
const std::string &  Value 
)

◆ Set() [3/3]

◆ Tree()

const Item* Tree ( const char *  Name) const
inline

Member Data Documentation

◆ Root

Item* Root
private

Definition at line 58 of file configuration.h.

Referenced by Configuration().

◆ ToFree

bool ToFree
private

Definition at line 59 of file configuration.h.


The documentation for this class was generated from the following files: