]> git.saurik.com Git - apt.git/blame - apt-pkg/version.h
Working cache generator
[apt.git] / apt-pkg / version.h
CommitLineData
578bfd0a
AL
1// -*- mode: cpp; mode: fold -*-
2// Description /*{{{*/
094a497d 3// $Id: version.h,v 1.3 1998/07/12 23:58:43 jgg Exp $
578bfd0a
AL
4/* ######################################################################
5
6 Version - Version string
7
8 This class implements storage and operators for version strings.
9
10 The client is responsible for stripping epochs should it be desired.
11
12 ##################################################################### */
13 /*}}}*/
14// Header section: pkglib
15#ifndef PKGLIB_VERSION_H
16#define PKGLIB_VERSION_H
17
6c139d6e 18#ifdef __GNUG__
094a497d 19#pragma interface "apt-pkg/version.h"
6c139d6e
AL
20#endif
21
578bfd0a
AL
22#include <string>
23
24class pkgVersion
25{
26 string Value;
27
28 public:
29
30 inline operator string () const {return Value;};
31
32 // Assignmnet
33 void operator =(string rhs) {Value = rhs;};
34
35 // Comparitors. STL will provide the rest
36 bool operator ==(const pkgVersion &rhs) const;
37 bool operator <(const pkgVersion &rhs) const;
38
39 pkgVersion();
40 pkgVersion(string Version) : Value(Version) {};
41};
42
43int pkgVersionCompare(const char *A, const char *B);
44int pkgVersionCompare(const char *A, const char *AEnd, const char *B,
45 const char *BEnd);
46int pkgVersionCompare(string A,string B);
47bool pkgCheckDep(const char *DepVer,const char *PkgVer,int Op);
48
49#endif