]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/versioninfo.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/versioninfo.h
3 // Purpose: declaration of wxVersionInfo class
6 // Copyright: (c) 2010 wxWidgets team
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_VERSIONINFO_H_
11 #define _WX_VERSIONINFO_H_
13 #include "wx/string.h"
15 // ----------------------------------------------------------------------------
16 // wxVersionInfo: represents version information
17 // ----------------------------------------------------------------------------
22 wxVersionInfo(const wxString
& name
= wxString(),
26 const wxString
& description
= wxString(),
27 const wxString
& copyright
= wxString())
33 m_description
= description
;
34 m_copyright
= copyright
;
37 // Default copy ctor, assignment operator and dtor are ok.
40 const wxString
& GetName() const { return m_name
; }
42 int GetMajor() const { return m_major
; }
43 int GetMinor() const { return m_minor
; }
44 int GetMicro() const { return m_micro
; }
46 wxString
ToString() const
48 return HasDescription() ? GetDescription() : GetVersionString();
51 wxString
GetVersionString() const
54 str
<< m_name
<< ' ' << GetMajor() << '.' << GetMinor();
56 str
<< '.' << GetMicro();
61 bool HasDescription() const { return !m_description
.empty(); }
62 const wxString
& GetDescription() const { return m_description
; }
64 bool HasCopyright() const { return !m_copyright
.empty(); }
65 const wxString
& GetCopyright() const { return m_copyright
; }
77 #endif // _WX_VERSIONINFO_H_