22 #ifndef __MYGUI_VERSION_H__
23 #define __MYGUI_VERSION_H__
36 Version(
unsigned int _major = 0,
unsigned int _minor = 0,
unsigned int _patch = 0) :
45 return (a.mMajor < b.mMajor) ?
true : (a.mMinor < b.mMinor);
65 return !(a < b) && !(a > b);
73 friend std::ostream& operator << (std::ostream& _stream,
const Version& _value)
75 _stream << _value.
print();
79 friend std::istream& operator >> (std::istream& _stream,
Version& _value)
83 _value = parse(value);
111 const std::vector<std::string>& vec =
utility::split(_value,
".");
115 unsigned int major = utility::parseValue<unsigned int>(vec[0]);
116 unsigned int minor = vec.size() > 1 ? utility::parseValue<unsigned int>(vec[1]) : 0;
117 unsigned int patch = vec.size() > 2 ? utility::parseValue<unsigned int>(vec[2]) : 0;
119 return Version(major, minor, patch);
125 unsigned mPatch : 16;
130 #endif // __MYGUI_VERSION_H__