00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef TA_VERSION_H
00012 #define TA_VERSION_H
00013
00014 #ifndef TA_DEBUG_H
00015 #include "Debug.h"
00016 #endif // TA_DEBUG_H
00017
00018 #ifndef TA_COMMON_H
00019 #include "Common.h"
00020 #endif // TA_COMMON_H
00021
00022 namespace TA
00023 {
00024
00025 struct TACOMMON_CLASS Version
00026 {
00027 Version() {}
00028 Version(u16 nMajor, u16 nMinor) { this->nMajor = nMajor; this->nMinor = nMinor; }
00029 u16 nMajor;
00030 u16 nMinor;
00031
00032 bool operator <= (const Version& that) const
00033 {
00034 if (nMajor <= that.nMajor)
00035 {
00036
00037 TA_ASSERT(nMinor < 10);
00038 TA_ASSERT(that.nMinor < 10);
00039 if (nMinor <= that.nMinor)
00040 return true;
00041 }
00042 return false;
00043 }
00044 bool operator >= (const Version& that) const
00045 {
00046 if (nMajor >= that.nMajor)
00047 {
00048
00049 TA_ASSERT(nMinor < 10);
00050 TA_ASSERT(that.nMinor < 10);
00051 if (nMinor >= that.nMinor)
00052 return true;
00053 }
00054 return false;
00055 }
00056 bool operator < (const Version& that) const
00057 {
00058 if (nMajor < that.nMajor)
00059 {
00060
00061 TA_ASSERT(nMinor < 10);
00062 TA_ASSERT(that.nMinor < 10);
00063 if (nMinor < that.nMinor)
00064 return true;
00065 }
00066 return false;
00067 }
00068 bool operator > (const Version& that) const
00069 {
00070 if (nMajor > that.nMajor)
00071 {
00072
00073 TA_ASSERT(nMinor < 10);
00074 TA_ASSERT(that.nMinor < 10);
00075 if (nMinor > that.nMinor)
00076 return true;
00077 }
00078 return false;
00079 }
00080 };
00081
00082 };
00083
00084 #endif // TA_VERSION_H
© Copyright 2004-2006 TRUE AXIS PTY LTD Australia. All rights reserved.