2010-11-24 19:53:44 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: versioninfo.h
|
|
|
|
// Purpose: interface of wxVersionInfo
|
|
|
|
// Author: Troels K
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxVersionInfo
|
|
|
|
|
|
|
|
wxVersionInfo contains version information.
|
|
|
|
|
|
|
|
This class is used by wxWidgets to provide version information about the
|
|
|
|
libraries it uses and itself, but you can also apply it in user space, to
|
|
|
|
provide version information about your own libraries, or other libraries
|
|
|
|
that you use.
|
|
|
|
|
|
|
|
@library{wxbase}
|
2012-01-18 14:14:16 -05:00
|
|
|
|
2010-11-24 19:53:44 -05:00
|
|
|
@category{data}
|
|
|
|
|
|
|
|
@since 2.9.2
|
|
|
|
*/
|
|
|
|
class wxVersionInfo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
Constructor.
|
|
|
|
|
|
|
|
The version information objects need to be initialized with this
|
|
|
|
constructor and are immutable once they are created.
|
|
|
|
|
|
|
|
@param name The name of the library or other entity that this object
|
|
|
|
pertains to.
|
|
|
|
@param major The major version component.
|
|
|
|
@param minor The minor version component.
|
|
|
|
@param micro The micro version component, 0 by default.
|
2022-05-25 09:20:51 -04:00
|
|
|
@param revision The revision version component, also known as "build
|
|
|
|
number". This component is also 0 by default and is only available
|
|
|
|
since wxWidgets 3.2.0.
|
2010-11-24 19:53:44 -05:00
|
|
|
@param description Free form description of this version, none by
|
|
|
|
default.
|
|
|
|
@param copyright Copyright string, none by default.
|
|
|
|
*/
|
2011-12-19 17:39:02 -05:00
|
|
|
wxVersionInfo(const wxString& name = wxString(),
|
|
|
|
int major = 0,
|
|
|
|
int minor = 0,
|
2010-11-24 19:53:44 -05:00
|
|
|
int micro = 0,
|
2022-05-25 09:20:51 -04:00
|
|
|
int revision = 0,
|
2010-11-24 19:53:44 -05:00
|
|
|
const wxString& description = wxString(),
|
|
|
|
const wxString& copyright = wxString());
|
|
|
|
|
|
|
|
/**
|
|
|
|
Get the name of the object (library).
|
|
|
|
|
|
|
|
@return Name string.
|
|
|
|
*/
|
|
|
|
const wxString& GetName() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
Get the major version number.
|
|
|
|
|
|
|
|
@return Major version number.
|
|
|
|
*/
|
|
|
|
int GetMajor() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
Get the minor version number.
|
|
|
|
|
|
|
|
@return Minor version number.
|
|
|
|
*/
|
|
|
|
int GetMinor() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
Get the micro version, or release number.
|
|
|
|
|
2022-05-25 09:20:51 -04:00
|
|
|
This is the third component of the version.
|
|
|
|
|
2010-11-24 19:53:44 -05:00
|
|
|
@return Micro version, or release number.
|
|
|
|
*/
|
|
|
|
int GetMicro() const;
|
|
|
|
|
2022-05-25 09:20:51 -04:00
|
|
|
/**
|
|
|
|
Get the revision version, or build number.
|
|
|
|
|
|
|
|
This is the fourth component of the version.
|
|
|
|
|
|
|
|
@return Revision version, or build number.
|
|
|
|
|
|
|
|
@since 3.2.0
|
|
|
|
*/
|
|
|
|
int GetRevision() const;
|
|
|
|
|
2010-11-24 19:53:44 -05:00
|
|
|
/**
|
|
|
|
Get the string representation of this version object.
|
|
|
|
|
|
|
|
This function returns the description if it is non-empty or
|
|
|
|
GetVersionString() if there is no description.
|
|
|
|
|
|
|
|
@see GetDescription(), GetVersionString()
|
|
|
|
*/
|
|
|
|
wxString ToString() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
Get the string representation.
|
|
|
|
|
2022-05-25 09:20:51 -04:00
|
|
|
The micro and revision components of the version are ignored/not used
|
|
|
|
if they are both zero. If the revision component is non-zero all four
|
|
|
|
parts will be used even if the micro component is zero.
|
2010-11-24 19:53:44 -05:00
|
|
|
|
2022-05-25 09:20:51 -04:00
|
|
|
@return The version string in the form "name major.minor[.micro[.revision]]".
|
2010-11-24 19:53:44 -05:00
|
|
|
*/
|
2011-12-19 16:16:01 -05:00
|
|
|
wxString GetVersionString() const;
|
2010-11-24 19:53:44 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Return @true if a description string has been specified.
|
|
|
|
|
|
|
|
@see GetDescription()
|
|
|
|
*/
|
|
|
|
bool HasDescription() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
Get the description string.
|
|
|
|
|
|
|
|
The description may be empty.
|
|
|
|
|
|
|
|
@return The description string, free-form.
|
|
|
|
*/
|
|
|
|
const wxString& GetDescription();
|
|
|
|
|
|
|
|
/**
|
|
|
|
Returns @true if a copyright string has been specified.
|
|
|
|
|
|
|
|
@see GetCopyright()
|
|
|
|
*/
|
|
|
|
bool HasCopyright() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
Get the copyright string.
|
|
|
|
|
|
|
|
The copyright string may be empty.
|
|
|
|
|
|
|
|
@return The copyright string.
|
|
|
|
*/
|
|
|
|
const wxString& GetCopyright() const;
|
|
|
|
};
|