Version: 3.0.4
wxVersionInfo Class Reference

#include <wx/versioninfo.h>

Detailed Description

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
Category:  Data Structures
Since
2.9.2

Public Member Functions

 wxVersionInfo (const wxString &name=wxString(), int major=0, int minor=0, int micro=0, const wxString &description=wxString(), const wxString &copyright=wxString())
 Constructor. More...
 
const wxStringGetName () const
 Get the name of the object (library). More...
 
int GetMajor () const
 Get the major version number. More...
 
int GetMinor () const
 Get the minor version number. More...
 
int GetMicro () const
 Get the micro version, or release number. More...
 
wxString ToString () const
 Get the string representation of this version object. More...
 
wxString GetVersionString () const
 Get the string representation. More...
 
bool HasDescription () const
 Return true if a description string has been specified. More...
 
const wxStringGetDescription ()
 Get the description string. More...
 
bool HasCopyright () const
 Returns true if a copyright string has been specified. More...
 
const wxStringGetCopyright () const
 Get the copyright string. More...
 

Constructor & Destructor Documentation

wxVersionInfo::wxVersionInfo ( const wxString name = wxString(),
int  major = 0,
int  minor = 0,
int  micro = 0,
const wxString description = wxString(),
const wxString copyright = wxString() 
)

Constructor.

The version information objects need to be initialized with this constructor and are immutable once they are created.

Parameters
nameThe name of the library or other entity that this object pertains to.
majorThe major version component.
minorThe minor version component.
microThe micro version component, 0 by default.
descriptionFree form description of this version, none by default.
copyrightCopyright string, none by default.

Member Function Documentation

const wxString& wxVersionInfo::GetCopyright ( ) const

Get the copyright string.

The copyright string may be empty.

Returns
The copyright string.
const wxString& wxVersionInfo::GetDescription ( )

Get the description string.

The description may be empty.

Returns
The description string, free-form.
int wxVersionInfo::GetMajor ( ) const

Get the major version number.

Returns
Major version number.
int wxVersionInfo::GetMicro ( ) const

Get the micro version, or release number.

Returns
Micro version, or release number.
int wxVersionInfo::GetMinor ( ) const

Get the minor version number.

Returns
Minor version number.
const wxString& wxVersionInfo::GetName ( ) const

Get the name of the object (library).

Returns
Name string.
wxString wxVersionInfo::GetVersionString ( ) const

Get the string representation.

The micro component of the version is ignored/not used if it is 0.

Returns
The version string in the form "name major.minor[.micro]".
bool wxVersionInfo::HasCopyright ( ) const

Returns true if a copyright string has been specified.

See also
GetCopyright()
bool wxVersionInfo::HasDescription ( ) const

Return true if a description string has been specified.

See also
GetDescription()
wxString wxVersionInfo::ToString ( ) const

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 also
GetDescription(), GetVersionString()