Panda3D
 All Classes Functions Variables Enumerations
pStatClientVersion.I
1 // Filename: pStatClientVersion.I
2 // Created by: drose (21May01)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 
16 ////////////////////////////////////////////////////////////////////
17 // Function: PStatClientVersion::get_major_version
18 // Access: Public
19 // Description:
20 ////////////////////////////////////////////////////////////////////
21 INLINE int PStatClientVersion::
22 get_major_version() const {
23  return _major_version;
24 }
25 
26 ////////////////////////////////////////////////////////////////////
27 // Function: PStatClientVersion::get_minor_version
28 // Access: Public
29 // Description:
30 ////////////////////////////////////////////////////////////////////
31 INLINE int PStatClientVersion::
32 get_minor_version() const {
33  return _minor_version;
34 }
35 
36 ////////////////////////////////////////////////////////////////////
37 // Function: PStatClientVersion::set_version
38 // Access: Public
39 // Description:
40 ////////////////////////////////////////////////////////////////////
41 INLINE void PStatClientVersion::
42 set_version(int major_version, int minor_version) {
43  _major_version = major_version;
44  _minor_version = minor_version;
45 }
46 
47 ////////////////////////////////////////////////////////////////////
48 // Function: PStatClientVersion::is_at_least
49 // Access: Public
50 // Description: Returns true if the client version is at least the
51 // indicated major/minor version number, false
52 // otherwise.
53 ////////////////////////////////////////////////////////////////////
54 INLINE bool PStatClientVersion::
55 is_at_least(int major_version, int minor_version) const {
56  return (_major_version > major_version ||
57  (_major_version == major_version && _minor_version >= minor_version));
58 }
bool is_at_least(int major_version, int minor_version) const
Returns true if the client version is at least the indicated major/minor version number, false otherwise.