]>
git.saurik.com Git - apt.git/blob - apt-pkg/version.h
3ced5d3e431a5807cb2d63c8aaa8fd60a1961e4c
1 // -*- mode: cpp; mode: fold -*-
3 // $Id: version.h,v 1.2 1998/07/07 04:17:09 jgg Exp $
4 /* ######################################################################
6 Version - Version string
8 This class implements storage and operators for version strings.
10 The client is responsible for stripping epochs should it be desired.
12 ##################################################################### */
14 // Header section: pkglib
15 #ifndef PKGLIB_VERSION_H
16 #define PKGLIB_VERSION_H
19 #pragma interface "pkglib/version.h"
30 inline operator string () const {return Value
;};
33 void operator =(string rhs
) {Value
= rhs
;};
35 // Comparitors. STL will provide the rest
36 bool operator ==(const pkgVersion
&rhs
) const;
37 bool operator <(const pkgVersion
&rhs
) const;
40 pkgVersion(string Version
) : Value(Version
) {};
43 int pkgVersionCompare(const char *A
, const char *B
);
44 int pkgVersionCompare(const char *A
, const char *AEnd
, const char *B
,
46 int pkgVersionCompare(string A
,string B
);
47 bool pkgCheckDep(const char *DepVer
,const char *PkgVer
,int Op
);