00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef _MIMETIC_VERSION_H_
00017 #define _MIMETIC_VERSION_H_
00018 #include <string>
00019 #include <iostream>
00020
00021 namespace mimetic
00022 {
00023 struct Version;
00024
00025
00026
00027 extern const Version version;
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 struct Version
00042 {
00043 typedef unsigned int ver_type;
00044 Version();
00045 Version(const std::string&);
00046 Version(ver_type, ver_type, ver_type build = 0);
00047 void maj(ver_type);
00048 void min(ver_type);
00049 void build(ver_type);
00050 ver_type maj() const;
00051 ver_type min() const;
00052 ver_type build() const;
00053
00054 void set(ver_type, ver_type, ver_type build = 0);
00055 void set(const std::string&);
00056 std::string str() const;
00057
00058 bool operator==(const Version&) const;
00059 bool operator!=(const Version&) const;
00060 bool operator<(const Version&) const;
00061 bool operator>(const Version&) const;
00062 bool operator<=(const Version&) const;
00063 bool operator>=(const Version&) const;
00064 friend std::ostream& operator<<(std::ostream&, const Version&);
00065 protected:
00066 ver_type m_maj, m_min, m_build;
00067 };
00068
00069 }
00070
00071 #endif
00072