MySQL 8.0.37
Source Code Documentation
member_version.h
Go to the documentation of this file.
1/* Copyright (c) 2015, 2024, Oracle and/or its affiliates.
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 designed to work 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 either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef MEMBER_VERSION_INCLUDED
25#define MEMBER_VERSION_INCLUDED
26
27#include <string>
28
29#include "my_inttypes.h"
30
31/**
32 * @brief represent the MySQL version of a Member within the Group Replication
33 * group.
34 */
36 public:
37 Member_version(unsigned int version);
38
39 /**
40 @return returns the member version.
41 */
42 uint32 get_version() const;
43
44 /**
45 @return returns the member version in string format.
46 */
47 const std::string get_version_string() const;
48 /**
49 @return returns the major version (Major.v.v)
50 */
52 /**
53 @return returns the minor version (v.Minor.v)
54 */
56 /**
57 @return returns the minor version (v.v.Patch)
58 */
60
61 bool operator==(const Member_version &other) const;
62 bool operator!=(const Member_version &other) const;
63 bool operator<(const Member_version &other) const;
64 bool operator>(const Member_version &other) const;
65 bool operator>=(const Member_version &other) const;
66 bool operator<=(const Member_version &other) const;
67
68 private:
70};
71
72#endif /* MEMBER_VERSION_INCLUDED */
represent the MySQL version of a Member within the Group Replication group.
Definition: member_version.h:35
bool operator>(const Member_version &other) const
Definition: member_version.cc:84
uint32 get_minor_version() const
Definition: member_version.cc:44
uint32 version
Definition: member_version.h:69
bool operator>=(const Member_version &other) const
Definition: member_version.cc:90
bool operator<(const Member_version &other) const
Definition: member_version.cc:60
bool operator==(const Member_version &other) const
Definition: member_version.cc:52
uint32 get_version() const
Definition: member_version.cc:33
Member_version(unsigned int version)
Definition: member_version.cc:29
bool operator!=(const Member_version &other) const
Definition: member_version.cc:56
bool operator<=(const Member_version &other) const
Definition: member_version.cc:94
const std::string get_version_string() const
Definition: member_version.cc:35
uint32 get_patch_version() const
Definition: member_version.cc:48
uint32 get_major_version() const
Definition: member_version.cc:42
Some integer typedefs for easier portability.
uint32_t uint32
Definition: my_inttypes.h:67