]>
git.saurik.com Git - apt.git/blob - apt-pkg/tagfile-compat.cc
1 // -*- mode: cpp; mode: fold -*-
3 // $Id: tagfile.cc,v 1.37.2.2 2003/12/31 16:02:30 mdz Exp $
4 /* ######################################################################
6 Fast scanner for RFC-822 type header information
8 This uses a rotating buffer to load the package information into.
9 The scanner runs over it and isolates and indexes a single section.
11 This defines compat functions for the external code.
13 ##################################################################### */
17 #define APT_COMPILING_TAGFILE_COMPAT_CC
18 #include <apt-pkg/tagfile.h>
21 using APT::StringView
;
24 bool pkgTagSection::Exists(const char* const Tag
) const
26 return Exists(StringView(Tag
));
29 bool pkgTagSection::Find(const char *Tag
,unsigned int &Pos
) const
31 return Find(StringView(Tag
), Pos
);
34 bool pkgTagSection::Find(const char *Tag
,const char *&Start
,
35 const char *&End
) const
37 return Find(StringView(Tag
), Start
, End
);
40 string
pkgTagSection::FindS(const char *Tag
) const
42 return Find(StringView(Tag
)).to_string();
45 string
pkgTagSection::FindRawS(const char *Tag
) const
47 return FindRaw(StringView(Tag
)).to_string();
50 signed int pkgTagSection::FindI(const char *Tag
,signed long Default
) const
52 return FindI(StringView(Tag
), Default
);
55 unsigned long long pkgTagSection::FindULL(const char *Tag
, unsigned long long const &Default
) const
57 return FindULL(StringView(Tag
), Default
);
61 bool pkgTagSection::FindB(const char *Tag
, bool const &Default
) const
63 return FindB(StringView(Tag
), Default
);
66 bool pkgTagSection::FindFlag(const char * const Tag
, uint8_t &Flags
,
67 uint8_t const Flag
) const
69 return FindFlag(StringView(Tag
), Flags
, Flag
);
72 bool pkgTagSection::FindFlag(const char *Tag
,unsigned long &Flags
,
73 unsigned long Flag
) const
75 return FindFlag(StringView(Tag
), Flags
, Flag
);