blob: 767b14876ca96e67b993bd49dd042bd2bb1d01be (
plain)
1 ////////////////////////////////////////////////////////////////////////
2 // FILE: versioncomparator.h
3 // AUTHOR: Johannes Winkelmann, jw@tks6.net
4 // COPYRIGHT: (c) 2004 by Johannes Winkelmann
5 // ---------------------------------------------------------------------
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 ////////////////////////////////////////////////////////////////////////
11
12 #ifndef _VERSIONCOMP_H_
13 #define _VERSIONCOMP_H_
14
15 namespace VersionComparator
16 {
17
18 enum COMP_RESULT { LESS, GREATER, EQUAL, UNDEFINED };
19
20 COMP_RESULT compareVersions(const string& v1, const string& v2) ;
21 void tokenizeIntoBlocks(const string& version, vector<string>& blocks);
22 int normalizeVectors(vector<string>& v1, vector<string>& v2);
23 void tokenizeMixed(const string& s, vector<string>& tokens);
24
25 }
26
27 #endif /* _VERSIONCOMP_H_ */
|