#ifndef PKGLIB_PKGCACHE_H
#define PKGLIB_PKGCACHE_H
-
#include <string>
#include <time.h>
#include <apt-pkg/mmap.h>
+#ifndef APT_8_CLEANER_HEADERS
using std::string;
-
+#endif
+
class pkgVersioningSystem;
class pkgCache /*{{{*/
{
protected:
// Memory mapped cache file
- string CacheFile;
+ std::string CacheFile;
MMap ⤅
- unsigned long sHash(const string &S) const;
+ unsigned long sHash(const std::string &S) const;
unsigned long sHash(const char *S) const;
public:
inline void *DataEnd() {return ((unsigned char *)Map.Data()) + Map.Size();};
// String hashing function (512 range)
- inline unsigned long Hash(const string &S) const {return sHash(S);};
+ inline unsigned long Hash(const std::string &S) const {return sHash(S);};
inline unsigned long Hash(const char *S) const {return sHash(S);};
// Useful transformation things
const char *Priority(unsigned char Priority);
// Accessors
- GrpIterator FindGrp(const string &Name);
- PkgIterator FindPkg(const string &Name);
- PkgIterator FindPkg(const string &Name, const string &Arch);
+ GrpIterator FindGrp(const std::string &Name);
+ PkgIterator FindPkg(const std::string &Name);
+ PkgIterator FindPkg(const std::string &Name, const std::string &Arch);
Header &Head() {return *HeaderP;};
inline GrpIterator GrpBegin();
inline PkgFileIterator FileEnd();
inline bool MultiArchCache() const { return MultiArchEnabled; };
+ inline char const * const NativeArch() const;
// Make me a function
pkgVersioningSystem *VS;
private:
bool MultiArchEnabled;
- PkgIterator SingleArchFindPkg(const string &Name);
- inline char const * const NativeArch() const;
+ PkgIterator SingleArchFindPkg(const std::string &Name);
};
/*}}}*/
// Header structure /*{{{*/