00001
00002 #ifndef VERSION_H
00003 #define VERSION_H
00004
00005 #include <kore/kore.h>
00006
00007 namespace kore
00008 {
00009
00014 class KORE_API Version
00015 {
00016 public:
00024 Version(const int major ,const int minor = 0,const int revision = 0,const char* version = 0);
00025
00026
00027
00028
00029
00030 virtual ~Version();
00035 virtual const int major() const;
00040 virtual const int minor() const;
00045 virtual const int revision() const;
00050 virtual const char* string() const;
00055 virtual operator const char*() const;
00063 virtual const bool operator ==(const Version& other) const;
00071 virtual const bool operator !=(const Version& other) const;
00079 virtual const bool operator <(const Version& other) const;
00087 virtual const bool operator <=(const Version& other) const;
00095 virtual const bool operator >(const Version& other) const;
00103 virtual const bool operator >=(const Version& other) const;
00109 virtual const bool operator &(const Version& other) const;
00115 virtual const bool operator &&(const Version& other) const;
00116
00117 protected:
00121 Version();
00126 void setMajor(const int major = 0 );
00131 void setMinor(const int minor = 0 );
00136 void setRevision(const int revision = 0);
00141 void setString(const char* version = 0 );
00149 void setVersion(const int major = 0,const int minor = 0,const int revision = 0,const char* version = 0);
00150 private:
00151
00152 int _major;
00153
00154 int _minor;
00155
00156 int _revision;
00157
00158 const char* _version;
00159 };
00160
00161 }
00162
00163 #endif