Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

swversion.h

00001 /******************************************************************************
00002  *  swversion.h   - definition of class SWVersion used to compare version info
00003  *
00004  * $Id: swversion_8h-source.html,v 1.1 2003/02/28 21:22:07 mgruner Exp $
00005  *
00006  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
00007  *      CrossWire Bible Society
00008  *      P. O. Box 2528
00009  *      Tempe, AZ  85280-2528
00010  *
00011  * This program is free software; you can redistribute it and/or modify it
00012  * under the terms of the GNU General Public License as published by the
00013  * Free Software Foundation version 2.
00014  *
00015  * This program is distributed in the hope that it will be useful, but
00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  * General Public License for more details.
00019  *
00020  */
00021 
00022 #ifndef SWORDVER
00023 #define SWORDVER "1.5.5"
00024 #endif
00025 
00026 #ifndef SWVERSION_H
00027 #define SWVERSION_H
00028 
00029 #include <defs.h>
00030 SWORD_NAMESPACE_START
00031 
00032 class SWVersion {
00033         public:
00034         int major, minor, minor2, minor3;
00035         
00036         SWVersion(const char *version = "0.0");
00037         int compare(const SWVersion &vi) const;
00038         const char *getText() const;
00039         operator const char *() const { return getText(); }
00040         bool operator>(const SWVersion &vi) const {return (compare(vi) > 0);}
00041         bool operator<(const SWVersion &vi) const {return (compare(vi) < 0);}
00042         bool operator==(const SWVersion &vi) const {return (compare(vi) == 0);}
00043 
00044         // current sword library version
00045         static SWVersion currentVersion;
00046 };
00047 
00048 SWORD_NAMESPACE_END
00049 #endif
00050 

Generated on Fri Feb 28 22:01:39 2003 for The Sword Project by doxygen1.3-rc3