private:
/** \brief dpointer placeholder (for later in case we need it) */
- void *d;
+ void * const d;
pkgCache &Cache;
std::vector<Parser *>Files;
Parser &Lookup(pkgCache::DescFileIterator const &Desc);
// Construct destruct
- pkgRecords(pkgCache &Cache);
- ~pkgRecords();
+ explicit pkgRecords(pkgCache &Cache);
+ virtual ~pkgRecords();
};
/*}}}*/
class pkgRecords::Parser /*{{{*/
* choose the hash to be used.
*/
virtual HashStringList Hashes() const { return HashStringList(); };
- APT_DEPRECATED std::string MD5Hash() const { return GetHashFromHashes("MD5Sum"); };
- APT_DEPRECATED std::string SHA1Hash() const { return GetHashFromHashes("SHA1"); };
- APT_DEPRECATED std::string SHA256Hash() const { return GetHashFromHashes("SHA256"); };
- APT_DEPRECATED std::string SHA512Hash() const { return GetHashFromHashes("SHA512"); };
+ APT_DEPRECATED_MSG("Use .Hashes instead of a hardcoded hash algorithm") std::string MD5Hash() const { return GetHashFromHashes("MD5Sum"); };
+ APT_DEPRECATED_MSG("Use .Hashes instead of a hardcoded hash algorithm") std::string SHA1Hash() const { return GetHashFromHashes("SHA1"); };
+ APT_DEPRECATED_MSG("Use .Hashes instead of a hardcoded hash algorithm") std::string SHA256Hash() const { return GetHashFromHashes("SHA256"); };
+ APT_DEPRECATED_MSG("Use .Hashes instead of a hardcoded hash algorithm") std::string SHA512Hash() const { return GetHashFromHashes("SHA512"); };
// These are some general stats about the package
virtual std::string Maintainer() {return std::string();};
// The record in binary form
virtual void GetRec(const char *&Start,const char *&Stop) {Start = Stop = 0;};
-
- virtual ~Parser() {};
+
+ Parser();
+ virtual ~Parser();
private:
+ void * const d;
APT_HIDDEN std::string GetHashFromHashes(char const * const type) const
{
HashStringList const hashes = Hashes();