MySQL  8.0.18
Source Code Documentation
member_version.h
Go to the documentation of this file.
1 /* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
2 
3  This program is free software; you can redistribute it and/or modify
4  it under the terms of the GNU General Public License, version 2.0,
5  as published by the Free Software Foundation.
6 
7  This program is also distributed with certain software (including
8  but not limited to OpenSSL) that is licensed under separate terms,
9  as designated in a particular file or component or in included license
10  documentation. The authors of MySQL hereby grant you an additional
11  permission to link the program and your derivative works with the
12  separately licensed software that they have included with MySQL.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License, version 2.0, for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22 
23 #ifndef MEMBER_VERSION_INCLUDED
24 #define MEMBER_VERSION_INCLUDED
25 
26 #include <string>
27 
28 #include "my_inttypes.h"
29 
31  public:
32  Member_version(unsigned int version);
33 
34  /**
35  @return returns the member version.
36  */
37  uint32 get_version() const;
38 
39  /**
40  @return returns the member version in string format.
41  */
42  const std::string get_version_string() const;
43  /**
44  @return returns the major version (Major.v.v)
45  */
46  uint32 get_major_version() const;
47  /**
48  @return returns the minor version (v.Minor.v)
49  */
50  uint32 get_minor_version() const;
51  /**
52  @return returns the minor version (v.v.Patch)
53  */
54  uint32 get_patch_version() const;
55 
56  bool operator==(const Member_version &other) const;
57  bool operator!=(const Member_version &other) const;
58  bool operator<(const Member_version &other) const;
59  bool operator>(const Member_version &other) const;
60  bool operator>=(const Member_version &other) const;
61  bool operator<=(const Member_version &other) const;
62 
63  private:
65 };
66 
67 #endif /* MEMBER_VERSION_INCLUDED */
bool operator==(const Member_version &other) const
Definition: member_version.cc:51
bool operator!=(const Member_version &other) const
Definition: member_version.cc:55
bool operator>(const Member_version &other) const
Definition: member_version.cc:83
Some integer typedefs for easier portability.
uint32 version
Definition: member_version.h:64
const std::string get_version_string() const
Definition: member_version.cc:34
uint32 get_minor_version() const
Definition: member_version.cc:43
bool operator<=(const Member_version &other) const
Definition: member_version.cc:93
Definition: member_version.h:30
uint32 get_version() const
Definition: member_version.cc:32
bool operator>=(const Member_version &other) const
Definition: member_version.cc:89
uint32_t uint32
Definition: my_inttypes.h:66
uint32 get_major_version() const
Definition: member_version.cc:41
uint32 get_patch_version() const
Definition: member_version.cc:47
bool operator<(const Member_version &other) const
Definition: member_version.cc:59
Member_version(unsigned int version)
Definition: member_version.cc:28