mirror of
https://github.com/overte-org/overte.git
synced 2025-04-29 19:42:36 +02:00
36 lines
612 B
C++
Executable file
36 lines
612 B
C++
Executable file
#ifndef FVVERSIONCOMPARATOR_H
|
|
#define FVVERSIONCOMPARATOR_H
|
|
|
|
#include <iosfwd>
|
|
#include <vector>
|
|
|
|
|
|
class FvVersionComparator
|
|
{
|
|
public:
|
|
|
|
typedef enum {
|
|
kSame = 0,
|
|
kDescending = 1,
|
|
kAscending = -1
|
|
} ComparatorResult;
|
|
|
|
static ComparatorResult CompareVersions(std::string versionA,
|
|
std::string versionB);
|
|
|
|
private:
|
|
|
|
FvVersionComparator();
|
|
|
|
typedef enum {
|
|
kNumberType,
|
|
kStringType,
|
|
kSeparatorType
|
|
} CharacterType;
|
|
|
|
static CharacterType TypeOfCharacter(std::string character);
|
|
static std::vector<std::string> SplitVersionString(std::string version);
|
|
|
|
};
|
|
|
|
#endif // FVVERSIONCOMPARATOR_H
|