summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcachegen.h
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2019-02-04 19:50:16 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2019-06-11 14:45:55 +0200
commita6e86d51a0e32cdc91f2902b0d6b483af884dcca (patch)
tree528867efd4499d088a7204470b0ff10bdb87457f /apt-pkg/pkgcachegen.h
parent93e0ba2bfde58e6c1fbad53614083be8754d7ee8 (diff)
Make APT::StringView public
Diffstat (limited to 'apt-pkg/pkgcachegen.h')
-rw-r--r--apt-pkg/pkgcachegen.h20
1 files changed, 0 insertions, 20 deletions
diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h
index 42ea3aa34..1f639c526 100644
--- a/apt-pkg/pkgcachegen.h
+++ b/apt-pkg/pkgcachegen.h
@@ -28,9 +28,7 @@
#if __cplusplus >= 201103L
#include <unordered_set>
#endif
-#ifdef APT_PKG_EXPOSE_STRING_VIEW
#include <apt-pkg/string_view.h>
-#endif
class FileFd;
class pkgSourceList;
@@ -40,9 +38,7 @@ class pkgCacheListParser;
class APT_HIDDEN pkgCacheGenerator /*{{{*/
{
-#ifdef APT_PKG_EXPOSE_STRING_VIEW
APT_HIDDEN map_stringitem_t WriteStringInMap(APT::StringView String) { return WriteStringInMap(String.data(), String.size()); };
-#endif
APT_HIDDEN map_stringitem_t WriteStringInMap(const char *String);
APT_HIDDEN map_stringitem_t WriteStringInMap(const char *String, const unsigned long &Len);
APT_HIDDEN map_pointer_t AllocateInMap(const unsigned long &size);
@@ -112,14 +108,12 @@ class APT_HIDDEN pkgCacheGenerator /*{{{*/
std::string PkgFileName;
pkgCache::PackageFile *CurrentFile;
-#ifdef APT_PKG_EXPOSE_STRING_VIEW
bool NewGroup(pkgCache::GrpIterator &Grp, APT::StringView Name);
bool NewPackage(pkgCache::PkgIterator &Pkg, APT::StringView Name, APT::StringView Arch);
map_pointer_t NewVersion(pkgCache::VerIterator &Ver, APT::StringView const &VerStr,
map_pointer_t const ParentPkg, unsigned short const Hash,
map_pointer_t const Next);
map_pointer_t NewDescription(pkgCache::DescIterator &Desc,const std::string &Lang, APT::StringView md5sum,map_stringitem_t const idxmd5str);
-#endif
bool NewFileVer(pkgCache::VerIterator &Ver,ListParser &List);
bool NewFileDesc(pkgCache::DescIterator &Desc,ListParser &List);
bool NewDepends(pkgCache::PkgIterator &Pkg, pkgCache::VerIterator &Ver,
@@ -133,9 +127,7 @@ class APT_HIDDEN pkgCacheGenerator /*{{{*/
enum StringType { MIXED, PKGNAME, VERSIONNUMBER, SECTION };
map_stringitem_t StoreString(StringType const type, const char * S, unsigned int const Size);
-#ifdef APT_PKG_EXPOSE_STRING_VIEW
inline map_stringitem_t StoreString(enum StringType const type, APT::StringView S) {return StoreString(type, S.data(),S.length());};
-#endif
void DropProgress() {Progress = 0;};
bool SelectFile(const std::string &File,pkgIndexFile const &Index, std::string const &Architecture, std::string const &Component, unsigned long Flags = 0);
@@ -163,19 +155,15 @@ class APT_HIDDEN pkgCacheGenerator /*{{{*/
void * const d;
APT_HIDDEN bool MergeListGroup(ListParser &List, std::string const &GrpName);
APT_HIDDEN bool MergeListPackage(ListParser &List, pkgCache::PkgIterator &Pkg);
-#ifdef APT_PKG_EXPOSE_STRING_VIEW
APT_HIDDEN bool MergeListVersion(ListParser &List, pkgCache::PkgIterator &Pkg,
APT::StringView const &Version, pkgCache::VerIterator* &OutVer);
-#endif
APT_HIDDEN bool AddImplicitDepends(pkgCache::GrpIterator &G, pkgCache::PkgIterator &P,
pkgCache::VerIterator &V);
APT_HIDDEN bool AddImplicitDepends(pkgCache::VerIterator &V, pkgCache::PkgIterator &D);
-#ifdef APT_PKG_EXPOSE_STRING_VIEW
APT_HIDDEN bool AddNewDescription(ListParser &List, pkgCache::VerIterator &Ver,
std::string const &lang, APT::StringView CurMd5, map_stringitem_t &md5idx);
-#endif
};
/*}}}*/
// This is the abstract package list parser class. /*{{{*/
@@ -193,13 +181,10 @@ class APT_HIDDEN pkgCacheListParser
protected:
inline map_stringitem_t StoreString(pkgCacheGenerator::StringType const type, const char *S,unsigned int Size) {return Owner->StoreString(type, S, Size);};
-#ifdef APT_PKG_EXPOSE_STRING_VIEW
inline map_stringitem_t StoreString(pkgCacheGenerator::StringType const type, APT::StringView S) {return Owner->StoreString(type, S);};
inline map_stringitem_t WriteString(APT::StringView S) {return Owner->WriteStringInMap(S.data(), S.size());};
-#endif
inline map_stringitem_t WriteString(const char *S,unsigned int Size) {return Owner->WriteStringInMap(S,Size);};
-#ifdef APT_PKG_EXPOSE_STRING_VIEW
bool NewDepends(pkgCache::VerIterator &Ver,APT::StringView Package, APT::StringView Arch,
APT::StringView Version,uint8_t const Op,
uint8_t const Type);
@@ -208,21 +193,16 @@ class APT_HIDDEN pkgCacheListParser
uint8_t const Flags);
bool NewProvidesAllArch(pkgCache::VerIterator &Ver, APT::StringView Package,
APT::StringView Version, uint8_t const Flags);
-#endif
public:
// These all operate against the current section
virtual std::string Package() = 0;
virtual bool ArchitectureAll() = 0;
-#ifdef APT_PKG_EXPOSE_STRING_VIEW
virtual APT::StringView Architecture() = 0;
virtual APT::StringView Version() = 0;
-#endif
virtual bool NewVersion(pkgCache::VerIterator &Ver) = 0;
virtual std::vector<std::string> AvailableDescriptionLanguages() = 0;
-#ifdef APT_PKG_EXPOSE_STRING_VIEW
virtual APT::StringView Description_md5() = 0;
-#endif
virtual unsigned short VersionHash() = 0;
/** compare currently parsed version with given version
*