Panda3D
|
00001 // Filename: pStatClientVersion.I 00002 // Created by: drose (21May01) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 00016 //////////////////////////////////////////////////////////////////// 00017 // Function: PStatClientVersion::get_major_version 00018 // Access: Public 00019 // Description: 00020 //////////////////////////////////////////////////////////////////// 00021 INLINE int PStatClientVersion:: 00022 get_major_version() const { 00023 return _major_version; 00024 } 00025 00026 //////////////////////////////////////////////////////////////////// 00027 // Function: PStatClientVersion::get_minor_version 00028 // Access: Public 00029 // Description: 00030 //////////////////////////////////////////////////////////////////// 00031 INLINE int PStatClientVersion:: 00032 get_minor_version() const { 00033 return _minor_version; 00034 } 00035 00036 //////////////////////////////////////////////////////////////////// 00037 // Function: PStatClientVersion::set_version 00038 // Access: Public 00039 // Description: 00040 //////////////////////////////////////////////////////////////////// 00041 INLINE void PStatClientVersion:: 00042 set_version(int major_version, int minor_version) { 00043 _major_version = major_version; 00044 _minor_version = minor_version; 00045 } 00046 00047 //////////////////////////////////////////////////////////////////// 00048 // Function: PStatClientVersion::is_at_least 00049 // Access: Public 00050 // Description: Returns true if the client version is at least the 00051 // indicated major/minor version number, false 00052 // otherwise. 00053 //////////////////////////////////////////////////////////////////// 00054 INLINE bool PStatClientVersion:: 00055 is_at_least(int major_version, int minor_version) const { 00056 return (_major_version > major_version || 00057 (_major_version == major_version && _minor_version >= minor_version)); 00058 }