debversion.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // -*- mode: cpp; mode: fold -*-
  2. // Description /*{{{*/
  3. /* ######################################################################
  4. Debian Version - Versioning system for Debian
  5. This implements the standard Debian versioning system.
  6. ##################################################################### */
  7. /*}}}*/
  8. #ifndef PKGLIB_DEBVERSION_H
  9. #define PKGLIB_DEBVERSION_H
  10. #include <apt-pkg/version.h>
  11. #include <string>
  12. class debVersioningSystem : public pkgVersioningSystem
  13. {
  14. public:
  15. static int CmpFragment(const char *A, const char *AEnd, const char *B,
  16. const char *BEnd) APT_PURE;
  17. // Compare versions..
  18. virtual int DoCmpVersion(const char *A,const char *Aend,
  19. const char *B,const char *Bend) APT_OVERRIDE APT_PURE;
  20. virtual bool CheckDep(const char *PkgVer,int Op,const char *DepVer) APT_OVERRIDE APT_PURE;
  21. virtual APT_PURE int DoCmpReleaseVer(const char *A,const char *Aend,
  22. const char *B,const char *Bend) APT_OVERRIDE
  23. {
  24. return DoCmpVersion(A,Aend,B,Bend);
  25. }
  26. virtual std::string UpstreamVersion(const char *A) APT_OVERRIDE;
  27. debVersioningSystem();
  28. };
  29. extern debVersioningSystem debVS;
  30. #endif