summaryrefslogtreecommitdiff
path: root/src/inc/shim/versioninfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/inc/shim/versioninfo.h')
-rw-r--r--src/inc/shim/versioninfo.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/inc/shim/versioninfo.h b/src/inc/shim/versioninfo.h
new file mode 100644
index 0000000000..2c50d465e7
--- /dev/null
+++ b/src/inc/shim/versioninfo.h
@@ -0,0 +1,47 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+//
+// versioninfo.h
+//
+// representation of version#
+//
+// Note: must be platform independent
+//
+// ======================================================================================
+
+#ifndef VERSIONINFO_H
+#define VERSIONINFO_H
+
+
+struct VersionInfo
+{
+protected:
+ unsigned short m_wMajor;
+ unsigned short m_wMinor;
+ unsigned short m_wBuild;
+ unsigned short m_wRevision;
+public:
+ VersionInfo();
+ VersionInfo( const unsigned short major,
+ const unsigned short minor,
+ const unsigned short build,
+ const unsigned short revision
+ );
+ unsigned short Major() const;
+ unsigned short Minor() const;
+ unsigned short Build() const;
+ unsigned short Revision() const;
+
+ // 1 if "this" is bigger, -1 if "this' is smaller
+ int Compare(const VersionInfo& version) const;
+
+ // on success returns count of numbers read (<=4), otherwise -1
+ static int Parse( LPCTSTR szString,
+ VersionInfo* result);
+};
+
+#include "versioninfo.inl"
+
+#endif