wxWidgets: wxVersionInfo Class Reference

| Version: 3.1.5

Loading...
Searching...
No Matches
Public Member Functions | List of all members
wxVersionInfo Class Reference
Class List by Category » Data Structures

`#include </cygdrive/c/Users/Hamis/Cygwin-packaging/wxWidgets3.1/wxWidgets3.1-3.1.5-4.x86_64/src/wxWidgets-3.1.5/interface/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

<>< =''>:</>&;&;< =''>\ </></>

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.
const wxString & | GetName () const
| Get the name of the object (library).
int | GetMajor () const
| Get the major version number.
int | GetMinor () const
| Get the minor version number.
int | GetMicro () const
| Get the micro version, or release number.
wxString | ToString () const
| Get the string representation of this version object.
wxString | GetVersionString () const
| Get the string representation.
bool | HasDescription () const
| Return true if a description string has been specified.
const wxString & | GetDescription ()
| Get the description string.
bool | HasCopyright () const
| Returns true if a copyright string has been specified.
const wxString & | GetCopyright () const
| Get the copyright string.

## Constructor & Destructor Documentation

## ◆ wxVersionInfo()

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

  name | The name of the library or other entity that this object pertains to.
  major | The major version component.
  minor | The minor version component.
  micro | The micro version component, 0 by default.
  description | Free form description of this version, none by default.
  copyright | Copyright string, none by default.

## Member Function Documentation

## ◆ GetCopyright()

const wxString & wxVersionInfo::GetCopyright | ( |  | ) | const

Get the copyright string.

The copyright string may be empty.

Returns
  The copyright string.

## ◆ GetDescription()

const wxString & wxVersionInfo::GetDescription | ( |  | ) |

Get the description string.

The description may be empty.

Returns
  The description string, free-form.

## ◆ GetMajor()

int wxVersionInfo::GetMajor | ( |  | ) | const

Get the major version number.

Returns
  Major version number.

## ◆ GetMicro()

int wxVersionInfo::GetMicro | ( |  | ) | const

Get the micro version, or release number.

Returns
  Micro version, or release number.

## ◆ GetMinor()

int wxVersionInfo::GetMinor | ( |  | ) | const

Get the minor version number.

Returns
  Minor version number.

## ◆ GetName()

const wxString & wxVersionInfo::GetName | ( |  | ) | const

Get the name of the object (library).

Returns
  Name string.

## ◆ GetVersionString()

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]".

## ◆ HasCopyright()

bool wxVersionInfo::HasCopyright | ( |  | ) | const

Returns true if a copyright string has been specified.

See also
  GetCopyright()

## ◆ HasDescription()

bool wxVersionInfo::HasDescription | ( |  | ) | const

Return true if a description string has been specified.

See also
  GetDescription()

## ◆ ToString()

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()