diff options
Diffstat (limited to 'rep/usr/include/apt-pkg/cacheiterators.h.gcov.html')
-rw-r--r-- | rep/usr/include/apt-pkg/cacheiterators.h.gcov.html | 503 |
1 files changed, 0 insertions, 503 deletions
diff --git a/rep/usr/include/apt-pkg/cacheiterators.h.gcov.html b/rep/usr/include/apt-pkg/cacheiterators.h.gcov.html deleted file mode 100644 index ac4c9b8..0000000 --- a/rep/usr/include/apt-pkg/cacheiterators.h.gcov.html +++ /dev/null @@ -1,503 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> - -<html lang="en"> - -<head> - <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> - <title>LCOV - lcov.info - /usr/include/apt-pkg/cacheiterators.h</title> - <link rel="stylesheet" type="text/css" href="../../../gcov.css"> -</head> - -<body> - - <table width="100%" border=0 cellspacing=0 cellpadding=0> - <tr><td class="title">LTP GCOV extension - code coverage report</td></tr> - <tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr> - - <tr> - <td width="100%"> - <table cellpadding=1 border=0 width="100%"> - <tr> - <td class="headerItem" width="20%">Current view:</td> - <td class="headerValue" width="80%" colspan=4><a href="../../../index.html">directory</a> - <a href="index.html">usr/include/apt-pkg</a> - cacheiterators.h</td> - </tr> - <tr> - <td class="headerItem" width="20%">Test:</td> - <td class="headerValue" width="80%" colspan=4>lcov.info</td> - </tr> - <tr> - <td class="headerItem" width="20%">Date:</td> - <td class="headerValue" width="20%">2008-08-14</td> - <td width="20%"></td> - <td class="headerItem" width="20%">Instrumented lines:</td> - <td class="headerValue" width="20%">51</td> - </tr> - <tr> - <td class="headerItem" width="20%">Code covered:</td> - <td class="headerValue" width="20%">92.2 %</td> - <td width="20%"></td> - <td class="headerItem" width="20%">Executed lines:</td> - <td class="headerValue" width="20%">47</td> - </tr> - </table> - </td> - </tr> - <tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr> - </table> - - <table cellpadding=0 cellspacing=0 border=0> - <tr> - <td><br></td> - </tr> - <tr> - <td><pre class="source"> -<span class="lineNum"> 1 </span> : // -*- mode: cpp; mode: fold -*- -<span class="lineNum"> 2 </span> : // Description /*{{{*/ -<span class="lineNum"> 3 </span> : // $Id: cacheiterators.h,v 1.18.2.1 2004/05/08 22:44:27 mdz Exp $ -<span class="lineNum"> 4 </span> : /* ###################################################################### -<span class="lineNum"> 5 </span> : -<span class="lineNum"> 6 </span> : Cache Iterators - Iterators for navigating the cache structure -<span class="lineNum"> 7 </span> : -<span class="lineNum"> 8 </span> : The iterators all provides ++,==,!=,->,* and end for their type. -<span class="lineNum"> 9 </span> : The end function can be used to tell if the list has been fully -<span class="lineNum"> 10 </span> : traversed. -<span class="lineNum"> 11 </span> : -<span class="lineNum"> 12 </span> : Unlike STL iterators these contain helper functions to access the data -<span class="lineNum"> 13 </span> : that is being iterated over. This is because the data structures can't -<span class="lineNum"> 14 </span> : be formed in a manner that is intuitive to use and also mmapable. -<span class="lineNum"> 15 </span> : -<span class="lineNum"> 16 </span> : For each variable in the target structure that would need a translation -<span class="lineNum"> 17 </span> : to be accessed correctly a translating function of the same name is -<span class="lineNum"> 18 </span> : present in the iterator. If applicable the translating function will -<span class="lineNum"> 19 </span> : return an iterator. -<span class="lineNum"> 20 </span> : -<span class="lineNum"> 21 </span> : The DepIterator can iterate over two lists, a list of 'version depends' -<span class="lineNum"> 22 </span> : or a list of 'package reverse depends'. The type is determined by the -<span class="lineNum"> 23 </span> : structure passed to the constructor, which should be the structure -<span class="lineNum"> 24 </span> : that has the depends pointer as a member. The provide iterator has the -<span class="lineNum"> 25 </span> : same system. -<span class="lineNum"> 26 </span> : -<span class="lineNum"> 27 </span> : This header is not user includable, please use apt-pkg/pkgcache.h -<span class="lineNum"> 28 </span> : -<span class="lineNum"> 29 </span> : ##################################################################### */ -<span class="lineNum"> 30 </span> : /*}}}*/ -<span class="lineNum"> 31 </span> : #ifndef PKGLIB_CACHEITERATORS_H -<span class="lineNum"> 32 </span> : #define PKGLIB_CACHEITERATORS_H -<span class="lineNum"> 33 </span> : -<span class="lineNum"> 34 </span> : -<span class="lineNum"> 35 </span> : // Package Iterator -<span class="lineNum"> 36 </span> : class pkgCache::PkgIterator -<span class="lineNum"> 37 </span> : { -<span class="lineNum"> 38 </span> : friend class pkgCache; -<span class="lineNum"> 39 </span> : Package *Pkg; -<span class="lineNum"> 40 </span> : pkgCache *Owner; -<span class="lineNum"> 41 </span> : long HashIndex; -<span class="lineNum"> 42 </span> : -<span class="lineNum"> 43 </span> : protected: -<span class="lineNum"> 44 </span> : -<span class="lineNum"> 45 </span> : // This constructor is the 'begin' constructor, never use it. -<span class="lineNum"> 46 </span><span class="lineCov"> 19 : inline PkgIterator(pkgCache &Owner) : Owner(&Owner), HashIndex(-1)</span> -<span class="lineNum"> 47 </span> : { -<span class="lineNum"> 48 </span><span class="lineCov"> 19 : Pkg = Owner.PkgP;</span> -<span class="lineNum"> 49 </span><span class="lineCov"> 19 : operator ++(0);</span> -<span class="lineNum"> 50 </span><span class="lineCov"> 19 : };</span> -<span class="lineNum"> 51 </span> : -<span class="lineNum"> 52 </span> : public: -<span class="lineNum"> 53 </span> : -<span class="lineNum"> 54 </span> : enum OkState {NeedsNothing,NeedsUnpack,NeedsConfigure}; -<span class="lineNum"> 55 </span> : -<span class="lineNum"> 56 </span> : // Iteration -<span class="lineNum"> 57 </span> : void operator ++(int); -<span class="lineNum"> 58 </span><span class="lineCov"> 52878 : inline void operator ++() {operator ++(0);};</span> -<span class="lineNum"> 59 </span><span class="lineCov"> 89241 : inline bool end() const {return Owner == 0 || Pkg == Owner->PkgP?true:false;};</span> -<span class="lineNum"> 60 </span> : -<span class="lineNum"> 61 </span> : // Comparison -<span class="lineNum"> 62 </span><span class="lineNoCov"> 0 : inline bool operator ==(const PkgIterator &B) const {return Pkg == B.Pkg;};</span> -<span class="lineNum"> 63 </span><span class="lineNoCov"> 0 : inline bool operator !=(const PkgIterator &B) const {return Pkg != B.Pkg;};</span> -<span class="lineNum"> 64 </span> : -<span class="lineNum"> 65 </span> : // Accessors -<span class="lineNum"> 66 </span><span class="lineCov"> 67369 : inline Package *operator ->() {return Pkg;};</span> -<span class="lineNum"> 67 </span><span class="lineCov"> 3787 : inline Package const *operator ->() const {return Pkg;};</span> -<span class="lineNum"> 68 </span> : inline Package const &operator *() const {return *Pkg;}; -<span class="lineNum"> 69 </span> : inline operator Package *() {return Pkg == Owner->PkgP?0:Pkg;}; -<span class="lineNum"> 70 </span> : inline operator Package const *() const {return Pkg == Owner->PkgP?0:Pkg;}; -<span class="lineNum"> 71 </span> : inline pkgCache *Cache() {return Owner;}; -<span class="lineNum"> 72 </span> : -<span class="lineNum"> 73 </span><span class="lineCov"> 18343 : inline const char *Name() const {return Pkg->Name == 0?0:Owner->StrP + Pkg->Name;};</span> -<span class="lineNum"> 74 </span> : inline const char *Section() const {return Pkg->Section == 0?0:Owner->StrP + Pkg->Section;}; -<span class="lineNum"> 75 </span> : inline bool Purge() const {return Pkg->CurrentState == pkgCache::State::Purge || -<span class="lineNum"> 76 </span> : (Pkg->CurrentVer == 0 && Pkg->CurrentState == pkgCache::State::NotInstalled);}; -<span class="lineNum"> 77 </span> : inline VerIterator VersionList() const; -<span class="lineNum"> 78 </span> : inline VerIterator CurrentVer() const; -<span class="lineNum"> 79 </span> : inline DepIterator RevDependsList() const; -<span class="lineNum"> 80 </span> : inline PrvIterator ProvidesList() const; -<span class="lineNum"> 81 </span> : inline unsigned long Index() const {return Pkg - Owner->PkgP;}; -<span class="lineNum"> 82 </span> : OkState State() const; -<span class="lineNum"> 83 </span> : -<span class="lineNum"> 84 </span> : // Constructors -<span class="lineNum"> 85 </span><span class="lineCov"> 5424 : inline PkgIterator(pkgCache &Owner,Package *Trg) : Pkg(Trg), Owner(&Owner),</span> -<span class="lineNum"> 86 </span><span class="lineCov"> 5424 : HashIndex(0) </span> -<span class="lineNum"> 87 </span> : { -<span class="lineNum"> 88 </span><span class="lineCov"> 5424 : if (Pkg == 0)</span> -<span class="lineNum"> 89 </span><span class="lineNoCov"> 0 : Pkg = Owner.PkgP;</span> -<span class="lineNum"> 90 </span><span class="lineCov"> 5424 : };</span> -<span class="lineNum"> 91 </span><span class="lineCov"> 29 : inline PkgIterator() : Pkg(0), Owner(0), HashIndex(0) {};</span> -<span class="lineNum"> 92 </span> : }; -<span class="lineNum"> 93 </span> : -<span class="lineNum"> 94 </span> : // Version Iterator -<span class="lineNum"> 95 </span> : class pkgCache::VerIterator -<span class="lineNum"> 96 </span> : { -<span class="lineNum"> 97 </span> : Version *Ver; -<span class="lineNum"> 98 </span> : pkgCache *Owner; -<span class="lineNum"> 99 </span> : -<span class="lineNum"> 100 </span> : void _dummy(); -<span class="lineNum"> 101 </span> : -<span class="lineNum"> 102 </span> : public: -<span class="lineNum"> 103 </span> : -<span class="lineNum"> 104 </span> : // Iteration -<span class="lineNum"> 105 </span><span class="lineCov"> 15767 : void operator ++(int) {if (Ver != Owner->VerP) Ver = Owner->VerP + Ver->NextVer;};</span> -<span class="lineNum"> 106 </span><span class="lineCov"> 1808 : inline void operator ++() {operator ++(0);};</span> -<span class="lineNum"> 107 </span><span class="lineCov"> 58053 : inline bool end() const {return Owner == NULL || (Ver == Owner->VerP?true:false);};</span> -<span class="lineNum"> 108 </span><span class="lineCov"> 11172 : inline void operator =(const VerIterator &B) {Ver = B.Ver; Owner = B.Owner;};</span> -<span class="lineNum"> 109 </span> : -<span class="lineNum"> 110 </span> : // Comparison -<span class="lineNum"> 111 </span> : inline bool operator ==(const VerIterator &B) const {return Ver == B.Ver;}; -<span class="lineNum"> 112 </span><span class="lineCov"> 1433 : inline bool operator !=(const VerIterator &B) const {return Ver != B.Ver;};</span> -<span class="lineNum"> 113 </span> : int CompareVer(const VerIterator &B) const; -<span class="lineNum"> 114 </span> : -<span class="lineNum"> 115 </span> : // Accessors -<span class="lineNum"> 116 </span> : inline Version *operator ->() {return Ver;}; -<span class="lineNum"> 117 </span> : inline Version const *operator ->() const {return Ver;}; -<span class="lineNum"> 118 </span> : inline Version &operator *() {return *Ver;}; -<span class="lineNum"> 119 </span> : inline Version const &operator *() const {return *Ver;}; -<span class="lineNum"> 120 </span> : inline operator Version *() {return Ver == Owner->VerP?0:Ver;}; -<span class="lineNum"> 121 </span> : inline operator Version const *() const {return Ver == Owner->VerP?0:Ver;}; -<span class="lineNum"> 122 </span> : inline pkgCache *Cache() {return Owner;}; -<span class="lineNum"> 123 </span> : -<span class="lineNum"> 124 </span><span class="lineCov"> 1830 : inline const char *VerStr() const {return Ver->VerStr == 0?0:Owner->StrP + Ver->VerStr;};</span> -<span class="lineNum"> 125 </span> : inline const char *Section() const {return Ver->Section == 0?0:Owner->StrP + Ver->Section;}; -<span class="lineNum"> 126 </span> : inline const char *Arch() const {return Ver->Arch == 0?0:Owner->StrP + Ver->Arch;}; -<span class="lineNum"> 127 </span><span class="lineCov"> 5424 : inline PkgIterator ParentPkg() const {return PkgIterator(*Owner,Owner->PkgP + Ver->ParentPkg);};</span> -<span class="lineNum"> 128 </span> : inline DescIterator DescriptionList() const; -<span class="lineNum"> 129 </span> : DescIterator TranslatedDescription() const; -<span class="lineNum"> 130 </span> : inline DepIterator DependsList() const; -<span class="lineNum"> 131 </span> : inline PrvIterator ProvidesList() const; -<span class="lineNum"> 132 </span> : inline VerFileIterator FileList() const; -<span class="lineNum"> 133 </span> : inline unsigned long Index() const {return Ver - Owner->VerP;}; -<span class="lineNum"> 134 </span> : bool Downloadable() const; -<span class="lineNum"> 135 </span> : inline const char *PriorityType() {return Owner->Priority(Ver->Priority);}; -<span class="lineNum"> 136 </span> : string RelStr(); -<span class="lineNum"> 137 </span> : -<span class="lineNum"> 138 </span> : bool Automatic() const; -<span class="lineNum"> 139 </span> : VerFileIterator NewestFile() const; -<span class="lineNum"> 140 </span> : -<span class="lineNum"> 141 </span><span class="lineCov"> 15 : inline VerIterator() : Ver(0), Owner(0) {}; </span> -<span class="lineNum"> 142 </span><span class="lineCov"> 21130 : inline VerIterator(pkgCache &Owner,Version *Trg = 0) : Ver(Trg), </span> -<span class="lineNum"> 143 </span><span class="lineCov"> 21130 : Owner(&Owner) </span> -<span class="lineNum"> 144 </span> : { -<span class="lineNum"> 145 </span><span class="lineCov"> 21130 : if (Ver == 0)</span> -<span class="lineNum"> 146 </span><span class="lineNoCov"> 0 : Ver = Owner.VerP;</span> -<span class="lineNum"> 147 </span><span class="lineCov"> 21130 : };</span> -<span class="lineNum"> 148 </span> : }; -<span class="lineNum"> 149 </span> : -<span class="lineNum"> 150 </span> : // Description Iterator -<span class="lineNum"> 151 </span> : class pkgCache::DescIterator -<span class="lineNum"> 152 </span> : { -<span class="lineNum"> 153 </span> : Description *Desc; -<span class="lineNum"> 154 </span> : pkgCache *Owner; -<span class="lineNum"> 155 </span> : -<span class="lineNum"> 156 </span> : void _dummy(); -<span class="lineNum"> 157 </span> : -<span class="lineNum"> 158 </span> : public: -<span class="lineNum"> 159 </span> : -<span class="lineNum"> 160 </span> : // Iteration -<span class="lineNum"> 161 </span> : void operator ++(int) {if (Desc != Owner->DescP) Desc = Owner->DescP + Desc->NextDesc;}; -<span class="lineNum"> 162 </span> : inline void operator ++() {operator ++(0);}; -<span class="lineNum"> 163 </span> : inline bool end() const {return Desc == Owner->DescP?true:false;}; -<span class="lineNum"> 164 </span> : inline void operator =(const DescIterator &B) {Desc = B.Desc; Owner = B.Owner;}; -<span class="lineNum"> 165 </span> : -<span class="lineNum"> 166 </span> : // Comparison -<span class="lineNum"> 167 </span> : inline bool operator ==(const DescIterator &B) const {return Desc == B.Desc;}; -<span class="lineNum"> 168 </span> : inline bool operator !=(const DescIterator &B) const {return Desc != B.Desc;}; -<span class="lineNum"> 169 </span> : int CompareDesc(const DescIterator &B) const; -<span class="lineNum"> 170 </span> : -<span class="lineNum"> 171 </span> : // Accessors -<span class="lineNum"> 172 </span> : inline Description *operator ->() {return Desc;}; -<span class="lineNum"> 173 </span> : inline Description const *operator ->() const {return Desc;}; -<span class="lineNum"> 174 </span> : inline Description &operator *() {return *Desc;}; -<span class="lineNum"> 175 </span> : inline Description const &operator *() const {return *Desc;}; -<span class="lineNum"> 176 </span> : inline operator Description *() {return Desc == Owner->DescP?0:Desc;}; -<span class="lineNum"> 177 </span> : inline operator Description const *() const {return Desc == Owner->DescP?0:Desc;}; -<span class="lineNum"> 178 </span> : inline pkgCache *Cache() {return Owner;}; -<span class="lineNum"> 179 </span> : -<span class="lineNum"> 180 </span> : inline const char *LanguageCode() const {return Owner->StrP + Desc->language_code;}; -<span class="lineNum"> 181 </span> : inline const char *md5() const {return Owner->StrP + Desc->md5sum;}; -<span class="lineNum"> 182 </span> : inline DescFileIterator FileList() const; -<span class="lineNum"> 183 </span> : inline unsigned long Index() const {return Desc - Owner->DescP;}; -<span class="lineNum"> 184 </span> : -<span class="lineNum"> 185 </span> : inline DescIterator() : Desc(0), Owner(0) {}; -<span class="lineNum"> 186 </span> : inline DescIterator(pkgCache &Owner,Description *Trg = 0) : Desc(Trg), -<span class="lineNum"> 187 </span> : Owner(&Owner) -<span class="lineNum"> 188 </span> : { -<span class="lineNum"> 189 </span> : if (Desc == 0) -<span class="lineNum"> 190 </span> : Desc = Owner.DescP; -<span class="lineNum"> 191 </span> : }; -<span class="lineNum"> 192 </span> : }; -<span class="lineNum"> 193 </span> : -<span class="lineNum"> 194 </span> : // Dependency iterator -<span class="lineNum"> 195 </span> : class pkgCache::DepIterator -<span class="lineNum"> 196 </span> : { -<span class="lineNum"> 197 </span> : Dependency *Dep; -<span class="lineNum"> 198 </span> : enum {DepVer, DepRev} Type; -<span class="lineNum"> 199 </span> : pkgCache *Owner; -<span class="lineNum"> 200 </span> : -<span class="lineNum"> 201 </span> : void _dummy(); -<span class="lineNum"> 202 </span> : -<span class="lineNum"> 203 </span> : public: -<span class="lineNum"> 204 </span> : -<span class="lineNum"> 205 </span> : // Iteration -<span class="lineNum"> 206 </span> : void operator ++(int) {if (Dep != Owner->DepP) Dep = Owner->DepP + -<span class="lineNum"> 207 </span> : (Type == DepVer?Dep->NextDepends:Dep->NextRevDepends);}; -<span class="lineNum"> 208 </span> : inline void operator ++() {operator ++(0);}; -<span class="lineNum"> 209 </span> : inline bool end() const {return Owner == 0 || Dep == Owner->DepP?true:false;}; -<span class="lineNum"> 210 </span> : -<span class="lineNum"> 211 </span> : // Comparison -<span class="lineNum"> 212 </span> : inline bool operator ==(const DepIterator &B) const {return Dep == B.Dep;}; -<span class="lineNum"> 213 </span> : inline bool operator !=(const DepIterator &B) const {return Dep != B.Dep;}; -<span class="lineNum"> 214 </span> : -<span class="lineNum"> 215 </span> : // Accessors -<span class="lineNum"> 216 </span> : inline Dependency *operator ->() {return Dep;}; -<span class="lineNum"> 217 </span> : inline Dependency const *operator ->() const {return Dep;}; -<span class="lineNum"> 218 </span> : inline Dependency &operator *() {return *Dep;}; -<span class="lineNum"> 219 </span> : inline Dependency const &operator *() const {return *Dep;}; -<span class="lineNum"> 220 </span> : inline operator Dependency *() {return Dep == Owner->DepP?0:Dep;}; -<span class="lineNum"> 221 </span> : inline operator Dependency const *() const {return Dep == Owner->DepP?0:Dep;}; -<span class="lineNum"> 222 </span> : inline pkgCache *Cache() {return Owner;}; -<span class="lineNum"> 223 </span> : -<span class="lineNum"> 224 </span> : inline const char *TargetVer() const {return Dep->Version == 0?0:Owner->StrP + Dep->Version;}; -<span class="lineNum"> 225 </span> : inline PkgIterator TargetPkg() {return PkgIterator(*Owner,Owner->PkgP + Dep->Package);}; -<span class="lineNum"> 226 </span> : inline PkgIterator SmartTargetPkg() {PkgIterator R(*Owner,0);SmartTargetPkg(R);return R;}; -<span class="lineNum"> 227 </span> : inline VerIterator ParentVer() {return VerIterator(*Owner,Owner->VerP + Dep->ParentVer);}; -<span class="lineNum"> 228 </span> : inline PkgIterator ParentPkg() {return PkgIterator(*Owner,Owner->PkgP + Owner->VerP[Dep->ParentVer].ParentPkg);}; -<span class="lineNum"> 229 </span> : inline bool Reverse() {return Type == DepRev;}; -<span class="lineNum"> 230 </span> : inline unsigned long Index() const {return Dep - Owner->DepP;}; -<span class="lineNum"> 231 </span> : bool IsCritical(); -<span class="lineNum"> 232 </span> : void GlobOr(DepIterator &Start,DepIterator &End); -<span class="lineNum"> 233 </span> : Version **AllTargets(); -<span class="lineNum"> 234 </span> : bool SmartTargetPkg(PkgIterator &Result); -<span class="lineNum"> 235 </span> : inline const char *CompType() {return Owner->CompType(Dep->CompareOp);}; -<span class="lineNum"> 236 </span> : inline const char *DepType() {return Owner->DepType(Dep->Type);}; -<span class="lineNum"> 237 </span> : -<span class="lineNum"> 238 </span> : inline DepIterator(pkgCache &Owner,Dependency *Trg,Version * = 0) : -<span class="lineNum"> 239 </span> : Dep(Trg), Type(DepVer), Owner(&Owner) -<span class="lineNum"> 240 </span> : { -<span class="lineNum"> 241 </span> : if (Dep == 0) -<span class="lineNum"> 242 </span> : Dep = Owner.DepP; -<span class="lineNum"> 243 </span> : }; -<span class="lineNum"> 244 </span> : inline DepIterator(pkgCache &Owner,Dependency *Trg,Package *) : -<span class="lineNum"> 245 </span> : Dep(Trg), Type(DepRev), Owner(&Owner) -<span class="lineNum"> 246 </span> : { -<span class="lineNum"> 247 </span> : if (Dep == 0) -<span class="lineNum"> 248 </span> : Dep = Owner.DepP; -<span class="lineNum"> 249 </span> : }; -<span class="lineNum"> 250 </span> : inline DepIterator() : Dep(0), Type(DepVer), Owner(0) {}; -<span class="lineNum"> 251 </span> : }; -<span class="lineNum"> 252 </span> : -<span class="lineNum"> 253 </span> : // Provides iterator -<span class="lineNum"> 254 </span> : class pkgCache::PrvIterator -<span class="lineNum"> 255 </span> : { -<span class="lineNum"> 256 </span> : Provides *Prv; -<span class="lineNum"> 257 </span> : enum {PrvVer, PrvPkg} Type; -<span class="lineNum"> 258 </span> : pkgCache *Owner; -<span class="lineNum"> 259 </span> : -<span class="lineNum"> 260 </span> : void _dummy(); -<span class="lineNum"> 261 </span> : -<span class="lineNum"> 262 </span> : public: -<span class="lineNum"> 263 </span> : -<span class="lineNum"> 264 </span> : // Iteration -<span class="lineNum"> 265 </span> : void operator ++(int) {if (Prv != Owner->ProvideP) Prv = Owner->ProvideP + -<span class="lineNum"> 266 </span> : (Type == PrvVer?Prv->NextPkgProv:Prv->NextProvides);}; -<span class="lineNum"> 267 </span> : inline void operator ++() {operator ++(0);}; -<span class="lineNum"> 268 </span> : inline bool end() const {return Owner == 0 || Prv == Owner->ProvideP?true:false;}; -<span class="lineNum"> 269 </span> : -<span class="lineNum"> 270 </span> : // Comparison -<span class="lineNum"> 271 </span> : inline bool operator ==(const PrvIterator &B) const {return Prv == B.Prv;}; -<span class="lineNum"> 272 </span> : inline bool operator !=(const PrvIterator &B) const {return Prv != B.Prv;}; -<span class="lineNum"> 273 </span> : -<span class="lineNum"> 274 </span> : // Accessors -<span class="lineNum"> 275 </span> : inline Provides *operator ->() {return Prv;}; -<span class="lineNum"> 276 </span> : inline Provides const *operator ->() const {return Prv;}; -<span class="lineNum"> 277 </span> : inline Provides &operator *() {return *Prv;}; -<span class="lineNum"> 278 </span> : inline Provides const &operator *() const {return *Prv;}; -<span class="lineNum"> 279 </span> : inline operator Provides *() {return Prv == Owner->ProvideP?0:Prv;}; -<span class="lineNum"> 280 </span> : inline operator Provides const *() const {return Prv == Owner->ProvideP?0:Prv;}; -<span class="lineNum"> 281 </span> : inline pkgCache *Cache() {return Owner;}; -<span class="lineNum"> 282 </span> : -<span class="lineNum"> 283 </span> : inline const char *Name() const {return Owner->StrP + Owner->PkgP[Prv->ParentPkg].Name;}; -<span class="lineNum"> 284 </span> : inline const char *ProvideVersion() const {return Prv->ProvideVersion == 0?0:Owner->StrP + Prv->ProvideVersion;}; -<span class="lineNum"> 285 </span> : inline PkgIterator ParentPkg() {return PkgIterator(*Owner,Owner->PkgP + Prv->ParentPkg);}; -<span class="lineNum"> 286 </span> : inline VerIterator OwnerVer() {return VerIterator(*Owner,Owner->VerP + Prv->Version);}; -<span class="lineNum"> 287 </span> : inline PkgIterator OwnerPkg() {return PkgIterator(*Owner,Owner->PkgP + Owner->VerP[Prv->Version].ParentPkg);}; -<span class="lineNum"> 288 </span> : inline unsigned long Index() const {return Prv - Owner->ProvideP;}; -<span class="lineNum"> 289 </span> : -<span class="lineNum"> 290 </span> : inline PrvIterator() : Prv(0), Type(PrvVer), Owner(0) {}; -<span class="lineNum"> 291 </span> : -<span class="lineNum"> 292 </span> : inline PrvIterator(pkgCache &Owner,Provides *Trg,Version *) : -<span class="lineNum"> 293 </span> : Prv(Trg), Type(PrvVer), Owner(&Owner) -<span class="lineNum"> 294 </span> : { -<span class="lineNum"> 295 </span> : if (Prv == 0) -<span class="lineNum"> 296 </span> : Prv = Owner.ProvideP; -<span class="lineNum"> 297 </span> : }; -<span class="lineNum"> 298 </span> : inline PrvIterator(pkgCache &Owner,Provides *Trg,Package *) : -<span class="lineNum"> 299 </span> : Prv(Trg), Type(PrvPkg), Owner(&Owner) -<span class="lineNum"> 300 </span> : { -<span class="lineNum"> 301 </span> : if (Prv == 0) -<span class="lineNum"> 302 </span> : Prv = Owner.ProvideP; -<span class="lineNum"> 303 </span> : }; -<span class="lineNum"> 304 </span> : }; -<span class="lineNum"> 305 </span> : -<span class="lineNum"> 306 </span> : // Package file -<span class="lineNum"> 307 </span> : class pkgCache::PkgFileIterator -<span class="lineNum"> 308 </span> : { -<span class="lineNum"> 309 </span> : pkgCache *Owner; -<span class="lineNum"> 310 </span> : PackageFile *File; -<span class="lineNum"> 311 </span> : -<span class="lineNum"> 312 </span> : public: -<span class="lineNum"> 313 </span> : -<span class="lineNum"> 314 </span> : // Iteration -<span class="lineNum"> 315 </span> : void operator ++(int) {if (File!= Owner->PkgFileP) File = Owner->PkgFileP + File->NextFile;}; -<span class="lineNum"> 316 </span> : inline void operator ++() {operator ++(0);}; -<span class="lineNum"> 317 </span> : inline bool end() const {return File == Owner->PkgFileP?true:false;}; -<span class="lineNum"> 318 </span> : -<span class="lineNum"> 319 </span> : // Comparison -<span class="lineNum"> 320 </span> : inline bool operator ==(const PkgFileIterator &B) const {return File == B.File;}; -<span class="lineNum"> 321 </span> : inline bool operator !=(const PkgFileIterator &B) const {return File != B.File;}; -<span class="lineNum"> 322 </span> : -<span class="lineNum"> 323 </span> : // Accessors -<span class="lineNum"> 324 </span><span class="lineCov"> 26403 : inline PackageFile *operator ->() {return File;};</span> -<span class="lineNum"> 325 </span> : inline PackageFile const *operator ->() const {return File;}; -<span class="lineNum"> 326 </span> : inline PackageFile const &operator *() const {return *File;}; -<span class="lineNum"> 327 </span><span class="lineCov"> 5202 : inline operator PackageFile *() {return File == Owner->PkgFileP?0:File;};</span> -<span class="lineNum"> 328 </span> : inline operator PackageFile const *() const {return File == Owner->PkgFileP?0:File;}; -<span class="lineNum"> 329 </span><span class="lineCov"> 5216 : inline pkgCache *Cache() {return Owner;};</span> -<span class="lineNum"> 330 </span> : -<span class="lineNum"> 331 </span><span class="lineCov"> 26 : inline const char *FileName() const {return File->FileName == 0?0:Owner->StrP + File->FileName;};</span> -<span class="lineNum"> 332 </span> : inline const char *Archive() const {return File->Archive == 0?0:Owner->StrP + File->Archive;}; -<span class="lineNum"> 333 </span> : inline const char *Component() const {return File->Component == 0?0:Owner->StrP + File->Component;}; -<span class="lineNum"> 334 </span> : inline const char *Version() const {return File->Version == 0?0:Owner->StrP + File->Version;}; -<span class="lineNum"> 335 </span> : inline const char *Origin() const {return File->Origin == 0?0:Owner->StrP + File->Origin;}; -<span class="lineNum"> 336 </span> : inline const char *Label() const {return File->Label == 0?0:Owner->StrP + File->Label;}; -<span class="lineNum"> 337 </span> : inline const char *Site() const {return File->Site == 0?0:Owner->StrP + File->Site;}; -<span class="lineNum"> 338 </span> : inline const char *Architecture() const {return File->Architecture == 0?0:Owner->StrP + File->Architecture;}; -<span class="lineNum"> 339 </span> : inline const char *IndexType() const {return File->IndexType == 0?0:Owner->StrP + File->IndexType;}; -<span class="lineNum"> 340 </span> : -<span class="lineNum"> 341 </span> : inline unsigned long Index() const {return File - Owner->PkgFileP;}; -<span class="lineNum"> 342 </span> : -<span class="lineNum"> 343 </span> : bool IsOk(); -<span class="lineNum"> 344 </span> : string RelStr(); -<span class="lineNum"> 345 </span> : -<span class="lineNum"> 346 </span> : // Constructors -<span class="lineNum"> 347 </span><span class="lineCov"> 15 : inline PkgFileIterator() : Owner(0), File(0) {};</span> -<span class="lineNum"> 348 </span> : inline PkgFileIterator(pkgCache &Owner) : Owner(&Owner), File(Owner.PkgFileP) {}; -<span class="lineNum"> 349 </span><span class="lineCov"> 26429 : inline PkgFileIterator(pkgCache &Owner,PackageFile *Trg) : Owner(&Owner), File(Trg) {};</span> -<span class="lineNum"> 350 </span> : }; -<span class="lineNum"> 351 </span> : -<span class="lineNum"> 352 </span> : // Version File -<span class="lineNum"> 353 </span> : class pkgCache::VerFileIterator -<span class="lineNum"> 354 </span> : { -<span class="lineNum"> 355 </span> : pkgCache *Owner; -<span class="lineNum"> 356 </span> : VerFile *FileP; -<span class="lineNum"> 357 </span> : -<span class="lineNum"> 358 </span> : public: -<span class="lineNum"> 359 </span> : -<span class="lineNum"> 360 </span> : // Iteration -<span class="lineNum"> 361 </span><span class="lineCov"> 22055 : void operator ++(int) {if (FileP != Owner->VerFileP) FileP = Owner->VerFileP + FileP->NextFile;};</span> -<span class="lineNum"> 362 </span><span class="lineCov"> 11714 : inline void operator ++() {operator ++(0);};</span> -<span class="lineNum"> 363 </span><span class="lineCov"> 90338 : inline bool end() const {return FileP == Owner->VerFileP?true:false;};</span> -<span class="lineNum"> 364 </span> : -<span class="lineNum"> 365 </span> : // Comparison -<span class="lineNum"> 366 </span> : inline bool operator ==(const VerFileIterator &B) const {return FileP == B.FileP;}; -<span class="lineNum"> 367 </span> : inline bool operator !=(const VerFileIterator &B) const {return FileP != B.FileP;}; -<span class="lineNum"> 368 </span> : -<span class="lineNum"> 369 </span> : // Accessors -<span class="lineNum"> 370 </span><span class="lineCov"> 10056 : inline VerFile *operator ->() {return FileP;};</span> -<span class="lineNum"> 371 </span> : inline VerFile const *operator ->() const {return FileP;}; -<span class="lineNum"> 372 </span> : inline VerFile const &operator *() const {return *FileP;}; -<span class="lineNum"> 373 </span><span class="lineCov"> 4341 : inline operator VerFile *() {return FileP == Owner->VerFileP?0:FileP;};</span> -<span class="lineNum"> 374 </span> : inline operator VerFile const *() const {return FileP == Owner->VerFileP?0:FileP;}; -<span class="lineNum"> 375 </span><span class="lineCov"> 1311 : inline pkgCache *Cache() {return Owner;};</span> -<span class="lineNum"> 376 </span> : -<span class="lineNum"> 377 </span><span class="lineCov"> 26406 : inline PkgFileIterator File() const {return PkgFileIterator(*Owner,FileP->File + Owner->PkgFileP);};</span> -<span class="lineNum"> 378 </span> : inline unsigned long Index() const {return FileP - Owner->VerFileP;}; -<span class="lineNum"> 379 </span> : -<span class="lineNum"> 380 </span><span class="lineCov"> 7 : inline VerFileIterator() : Owner(0), FileP(0) {};</span> -<span class="lineNum"> 381 </span><span class="lineCov"> 27354 : inline VerFileIterator(pkgCache &Owner,VerFile *Trg) : Owner(&Owner), FileP(Trg) {};</span> -<span class="lineNum"> 382 </span> : }; -<span class="lineNum"> 383 </span> : -<span class="lineNum"> 384 </span> : // Description File -<span class="lineNum"> 385 </span> : class pkgCache::DescFileIterator -<span class="lineNum"> 386 </span> : { -<span class="lineNum"> 387 </span> : pkgCache *Owner; -<span class="lineNum"> 388 </span> : DescFile *FileP; -<span class="lineNum"> 389 </span> : -<span class="lineNum"> 390 </span> : public: -<span class="lineNum"> 391 </span> : -<span class="lineNum"> 392 </span> : // Iteration -<span class="lineNum"> 393 </span> : void operator ++(int) {if (FileP != Owner->DescFileP) FileP = Owner->DescFileP + FileP->NextFile;}; -<span class="lineNum"> 394 </span> : inline void operator ++() {operator ++(0);}; -<span class="lineNum"> 395 </span> : inline bool end() const {return FileP == Owner->DescFileP?true:false;}; -<span class="lineNum"> 396 </span> : -<span class="lineNum"> 397 </span> : // Comparison -<span class="lineNum"> 398 </span> : inline bool operator ==(const DescFileIterator &B) const {return FileP == B.FileP;}; -<span class="lineNum"> 399 </span> : inline bool operator !=(const DescFileIterator &B) const {return FileP != B.FileP;}; -<span class="lineNum"> 400 </span> : -<span class="lineNum"> 401 </span> : // Accessors -<span class="lineNum"> 402 </span> : inline DescFile *operator ->() {return FileP;}; -<span class="lineNum"> 403 </span> : inline DescFile const *operator ->() const {return FileP;}; -<span class="lineNum"> 404 </span> : inline DescFile const &operator *() const {return *FileP;}; -<span class="lineNum"> 405 </span> : inline operator DescFile *() {return FileP == Owner->DescFileP?0:FileP;}; -<span class="lineNum"> 406 </span> : inline operator DescFile const *() const {return FileP == Owner->DescFileP?0:FileP;}; -<span class="lineNum"> 407 </span> : inline pkgCache *Cache() {return Owner;}; -<span class="lineNum"> 408 </span> : -<span class="lineNum"> 409 </span> : inline PkgFileIterator File() const {return PkgFileIterator(*Owner,FileP->File + Owner->PkgFileP);}; -<span class="lineNum"> 410 </span> : inline unsigned long Index() const {return FileP - Owner->DescFileP;}; -<span class="lineNum"> 411 </span> : -<span class="lineNum"> 412 </span> : inline DescFileIterator() : Owner(0), FileP(0) {}; -<span class="lineNum"> 413 </span> : inline DescFileIterator(pkgCache &Owner,DescFile *Trg) : Owner(&Owner), FileP(Trg) {}; -<span class="lineNum"> 414 </span> : }; -<span class="lineNum"> 415 </span> : -<span class="lineNum"> 416 </span> : // Inlined Begin functions cant be in the class because of order problems -<span class="lineNum"> 417 </span><span class="lineCov"> 19696 : inline pkgCache::VerIterator pkgCache::PkgIterator::VersionList() const</span> -<span class="lineNum"> 418 </span><span class="lineCov"> 19696 : {return VerIterator(*Owner,Owner->VerP + Pkg->VersionList);};</span> -<span class="lineNum"> 419 </span><span class="lineCov"> 2 : inline pkgCache::VerIterator pkgCache::PkgIterator::CurrentVer() const</span> -<span class="lineNum"> 420 </span><span class="lineCov"> 2 : {return VerIterator(*Owner,Owner->VerP + Pkg->CurrentVer);};</span> -<span class="lineNum"> 421 </span> : inline pkgCache::DepIterator pkgCache::PkgIterator::RevDependsList() const -<span class="lineNum"> 422 </span> : {return DepIterator(*Owner,Owner->DepP + Pkg->RevDepends,Pkg);}; -<span class="lineNum"> 423 </span> : inline pkgCache::PrvIterator pkgCache::PkgIterator::ProvidesList() const -<span class="lineNum"> 424 </span> : {return PrvIterator(*Owner,Owner->ProvideP + Pkg->ProvidesList,Pkg);}; -<span class="lineNum"> 425 </span> : inline pkgCache::DescIterator pkgCache::VerIterator::DescriptionList() const -<span class="lineNum"> 426 </span> : {return DescIterator(*Owner,Owner->DescP + Ver->DescriptionList);}; -<span class="lineNum"> 427 </span> : inline pkgCache::PrvIterator pkgCache::VerIterator::ProvidesList() const -<span class="lineNum"> 428 </span> : {return PrvIterator(*Owner,Owner->ProvideP + Ver->ProvidesList,Ver);}; -<span class="lineNum"> 429 </span> : inline pkgCache::DepIterator pkgCache::VerIterator::DependsList() const -<span class="lineNum"> 430 </span> : {return DepIterator(*Owner,Owner->DepP + Ver->DependsList,Ver);}; -<span class="lineNum"> 431 </span><span class="lineCov"> 26484 : inline pkgCache::VerFileIterator pkgCache::VerIterator::FileList() const</span> -<span class="lineNum"> 432 </span><span class="lineCov"> 26484 : {return VerFileIterator(*Owner,Owner->VerFileP + Ver->FileList);};</span> -<span class="lineNum"> 433 </span> : inline pkgCache::DescFileIterator pkgCache::DescIterator::FileList() const -<span class="lineNum"> 434 </span> : {return DescFileIterator(*Owner,Owner->DescFileP + Desc->FileList);}; -<span class="lineNum"> 435 </span> : -<span class="lineNum"> 436 </span> : #endif -</pre> - </td> - </tr> - </table> - <br> - - <table width="100%" border=0 cellspacing=0 cellpadding=0> - <tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr> - <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LTP GCOV extension version 1.6</a></td></tr> - </table> - <br> - -</body> -</html> |