1 // -*- mode: cpp; mode: fold -*-
3 // $Id: version.h,v 1.1 1998/07/02 02:58:13 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
26 inline operator string () const {return Value
;};
29 void operator =(string rhs
) {Value
= rhs
;};
31 // Comparitors. STL will provide the rest
32 bool operator ==(const pkgVersion
&rhs
) const;
33 bool operator <(const pkgVersion
&rhs
) const;
36 pkgVersion(string Version
) : Value(Version
) {};
39 int pkgVersionCompare(const char *A
, const char *B
);
40 int pkgVersionCompare(const char *A
, const char *AEnd
, const char *B
,
42 int pkgVersionCompare(string A
,string B
);
43 bool pkgCheckDep(const char *DepVer
,const char *PkgVer
,int Op
);