/* * * Copyright (c) 1996 * Knowledge Science Institute, University of Calgary * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. The Knowledge Science Institute makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * */ #ifndef MVERSION_H #define MVERSION_H #ifndef __CSTRING_H #include #endif class Version { public: typedef enum {Unspecified=0,MacOS=1,XWindows=2,Motif=3,MSWin32=4,MSWin16=5} Platform_type; Version(unsigned char major, unsigned char minor, unsigned char patch=0, Platform_type platform=Unspecified); Version(unsigned long v) {V = v;} operator unsigned long() {return V;} operator string(); //string in .[.][ ()] format bool operator==(Version v); //does not take platform into account bool operator< (Version v); //does not take platform into account bool operator<=(Version v) {return V (Version v) {return !V<=v;} bool operator>=(Version v) {return !V