1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
|
<!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/cachefile.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> - cachefile.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%">1</td>
</tr>
<tr>
<td class="headerItem" width="20%">Code covered:</td>
<td class="headerValue" width="20%">100.0 %</td>
<td width="20%"></td>
<td class="headerItem" width="20%">Executed lines:</td>
<td class="headerValue" width="20%">1</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: cachefile.h,v 1.5 2002/04/27 04:28:04 jgg Exp $
<span class="lineNum"> 4 </span> : /* ######################################################################
<span class="lineNum"> 5 </span> :
<span class="lineNum"> 6 </span> : CacheFile - Simple wrapper class for opening, generating and whatnot
<span class="lineNum"> 7 </span> :
<span class="lineNum"> 8 </span> : This class implements a simple 2 line mechanism to open various sorts
<span class="lineNum"> 9 </span> : of caches. It can operate as root, as not root, show progress and so on,
<span class="lineNum"> 10 </span> : it transparently handles everything necessary.
<span class="lineNum"> 11 </span> :
<span class="lineNum"> 12 </span> : This means it can rebuild caches from the source list and instantiates
<span class="lineNum"> 13 </span> : and prepares the standard policy mechanism.
<span class="lineNum"> 14 </span> :
<span class="lineNum"> 15 </span> : ##################################################################### */
<span class="lineNum"> 16 </span> : /*}}}*/
<span class="lineNum"> 17 </span> : #ifndef PKGLIB_CACHEFILE_H
<span class="lineNum"> 18 </span> : #define PKGLIB_CACHEFILE_H
<span class="lineNum"> 19 </span> :
<span class="lineNum"> 20 </span> :
<span class="lineNum"> 21 </span> : #include <apt-pkg/depcache.h>
<span class="lineNum"> 22 </span> : #include <apt-pkg/acquire.h>
<span class="lineNum"> 23 </span> : #include <apt-pkg/sourcelist.h>
<span class="lineNum"> 24 </span> :
<span class="lineNum"> 25 </span> : class pkgPolicy;
<span class="lineNum"> 26 </span> : class pkgCacheFile
<span class="lineNum"> 27 </span> : {
<span class="lineNum"> 28 </span> : protected:
<span class="lineNum"> 29 </span> :
<span class="lineNum"> 30 </span> : MMap *Map;
<span class="lineNum"> 31 </span> : pkgCache *Cache;
<span class="lineNum"> 32 </span> : pkgDepCache *DCache;
<span class="lineNum"> 33 </span> :
<span class="lineNum"> 34 </span> : public:
<span class="lineNum"> 35 </span> :
<span class="lineNum"> 36 </span> : pkgPolicy *Policy;
<span class="lineNum"> 37 </span> :
<span class="lineNum"> 38 </span> : // We look pretty much exactly like a pointer to a dep cache
<span class="lineNum"> 39 </span> : inline operator pkgCache &() {return *Cache;};
<span class="lineNum"> 40 </span> : inline operator pkgCache *() {return Cache;};
<span class="lineNum"> 41 </span> : inline operator pkgDepCache &() {return *DCache;};
<span class="lineNum"> 42 </span> : inline operator pkgDepCache *() {return DCache;};
<span class="lineNum"> 43 </span> : inline pkgDepCache *operator ->() {return DCache;};
<span class="lineNum"> 44 </span> : inline pkgDepCache &operator *() {return *DCache;};
<span class="lineNum"> 45 </span><span class="lineCov"> 1 : inline pkgDepCache::StateCache &operator [](pkgCache::PkgIterator const &I) {return (*DCache)[I];};</span>
<span class="lineNum"> 46 </span> : inline unsigned char &operator [](pkgCache::DepIterator const &I) {return (*DCache)[I];};
<span class="lineNum"> 47 </span> :
<span class="lineNum"> 48 </span> : bool BuildCaches(OpProgress &Progress,bool WithLock = true);
<span class="lineNum"> 49 </span> : bool Open(OpProgress &Progress,bool WithLock = true);
<span class="lineNum"> 50 </span> : void Close();
<span class="lineNum"> 51 </span> :
<span class="lineNum"> 52 </span> : pkgCacheFile();
<span class="lineNum"> 53 </span> : ~pkgCacheFile();
<span class="lineNum"> 54 </span> : };
<span class="lineNum"> 55 </span> :
<span class="lineNum"> 56 </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>
|