forked from https-github-com-Surachai-kent/runtime
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathversion.h
More file actions
40 lines (30 loc) · 1.05 KB
/
version.h
File metadata and controls
40 lines (30 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
#ifndef __VERSION_H__
#define __VERSION_H__
#include "pal.h"
#include "utils.h"
struct version_t
{
version_t();
version_t(int major, int minor, int build, int revision);
int get_major() const { return m_major; }
int get_minor() const { return m_minor; }
int get_build() const { return m_build; }
// int get_revision() const { return m_revision; }
pal::string_t as_str() const;
bool operator ==(const version_t& b) const;
bool operator !=(const version_t& b) const;
bool operator <(const version_t& b) const;
bool operator >(const version_t& b) const;
bool operator <=(const version_t& b) const;
bool operator >=(const version_t& b) const;
static bool parse(const pal::string_t& ver, version_t* ver_out);
private:
int m_major;
int m_minor;
int m_build;
int m_revision;
static int compare(const version_t&a, const version_t& b);
};
#endif // __VERSION_H__