summaryrefslogtreecommitdiff
path: root/apt-pkg/tagfile.h
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-09-27 16:49:25 +0200
committerJulian Andres Klode <jak@debian.org>2016-11-22 22:56:46 +0100
commit45ecab4458c4015b7635042064165c229e099c28 (patch)
tree14b0cad45123fb6478c01af960a4a2e0e14b4e55 /apt-pkg/tagfile.h
parent3e633069c9c187dc51c12e59a7ddba4b68a76c4f (diff)
TagSection: Extract Find() methods taking Pos instead of Key
This allows us to add a perfect hash function to the tag file without having to reimplement the methods a second time.
Diffstat (limited to 'apt-pkg/tagfile.h')
-rw-r--r--apt-pkg/tagfile.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h
index f0f2f48c6..cdca54756 100644
--- a/apt-pkg/tagfile.h
+++ b/apt-pkg/tagfile.h
@@ -54,6 +54,17 @@ class pkgTagSection
pkgTagSectionPrivate * const d;
+ APT_HIDDEN bool FindInternal(unsigned int Pos,const char *&Start, const char *&End) const;
+#if defined(APT_PKG_EXPOSE_STRING_VIEW)
+ APT_HIDDEN APT::StringView FindInternal(unsigned int Pos) const;
+ APT_HIDDEN APT::StringView FindRawInternal(unsigned int Pos) const;
+#endif
+ APT_HIDDEN signed int FindIInternal(unsigned int Pos,signed long Default = 0) const;
+ APT_HIDDEN bool FindBInternal(unsigned int Pos, bool Default = false) const;
+ APT_HIDDEN unsigned long long FindULLInternal(unsigned int Pos, unsigned long long const &Default = 0) const;
+ APT_HIDDEN bool FindFlagInternal(unsigned int Pos,uint8_t &Flags, uint8_t const Flag) const;
+ APT_HIDDEN bool FindFlagInternal(unsigned int Pos,unsigned long &Flags, unsigned long Flag) const;
+
protected:
const char *Stop;