The SWORD Project  1.9.0.svnversion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
swversion.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * swversion.h - definition of class SWVersion used to compare version
4  * info
5  *
6  * $Id: swversion.h.in 3765 2020-07-26 10:31:09Z scribe $
7  *
8  * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org)
9  * CrossWire Bible Society
10  * P. O. Box 2528
11  * Tempe, AZ 85280-2528
12  *
13  * This program is free software; you can redistribute it and/or modify it
14  * under the terms of the GNU General Public License as published by the
15  * Free Software Foundation version 2.
16  *
17  * This program is distributed in the hope that it will be useful, but
18  * WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * General Public License for more details.
21  *
22  */
23 
24 #ifndef SWVERSION_H
25 #define SWVERSION_H
26 
27 #define SWORD_VERSION_NUM 1090003837
28 #define SWORD_VERSION_STR "1.9.0.3837"
29 #define SWORD_VERSION_MAJOR 1
30 #define SWORD_VERSION_MINOR 9
31 #define SWORD_VERSION_MICRO 0
32 #define SWORD_VERSION_NANO 3837
33 
34 #include <defs.h>
36 
40  public:
43  int major, minor, minor2, minor3;
47  SWVersion(const char *version = "0.0");
52  int compare(const SWVersion &vi) const;
55  const char *getText() const;
58  operator const char *() const { return getText(); }
59  bool operator>(const SWVersion &vi) const {return (compare(vi) > 0);}
60  bool operator<(const SWVersion &vi) const {return (compare(vi) < 0);}
61  bool operator>=(const SWVersion &vi) const {return (compare(vi) >= 0);}
62  bool operator<=(const SWVersion &vi) const {return (compare(vi) <= 0);}
63  bool operator==(const SWVersion &vi) const {return (compare(vi) == 0);}
64 
70 };
71 
73 #endif
74 
int minor3
Definition: swversion.h:43
#define SWORD_NAMESPACE_START
Definition: defs.h:39
#define SWDLLEXPORT
Definition: defs.h:171
bool operator>=(const SWVersion &vi) const
Definition: swversion.h:61
bool operator<=(const SWVersion &vi) const
Definition: swversion.h:62
bool operator<(const SWVersion &vi) const
Definition: swversion.h:60
bool operator>(const SWVersion &vi) const
Definition: swversion.h:59
static SWVersion currentVersion
Definition: swversion.h:69
bool operator==(const SWVersion &vi) const
Definition: swversion.h:63
#define SWORD_NAMESPACE_END
Definition: defs.h:40