diff options
Diffstat (limited to 'src/inc/shim/versioninfo.h')
-rw-r--r-- | src/inc/shim/versioninfo.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/inc/shim/versioninfo.h b/src/inc/shim/versioninfo.h new file mode 100644 index 0000000000..f3f3b8a719 --- /dev/null +++ b/src/inc/shim/versioninfo.h @@ -0,0 +1,46 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more 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 |