]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/versioninfo.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/versioninfo.h
3 // Purpose: declaration of wxVersionInfo class
7 // Copyright: (c) 2010 wxWidgets team
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_VERSIONINFO_H_
12 #define _WX_VERSIONINFO_H_
14 #include "wx/string.h"
16 // ----------------------------------------------------------------------------
17 // wxVersionInfo: represents version information
18 // ----------------------------------------------------------------------------
23 wxVersionInfo(const wxString
& name
,
27 const wxString
& description
= wxString(),
28 const wxString
& copyright
= wxString())
34 m_description
= description
;
35 m_copyright
= copyright
;
38 // Default copy ctor, assignment operator and dtor are ok.
41 const wxString
& GetName() const { return m_name
; }
43 int GetMajor() const { return m_major
; }
44 int GetMinor() const { return m_minor
; }
45 int GetMicro() const { return m_micro
; }
47 wxString
ToString() const
49 return HasDescription() ? GetDescription() : GetVersionString();
52 wxString
GetVersionString() const
55 str
<< m_name
<< ' ' << GetMajor() << '.' << GetMinor();
57 str
<< '.' << GetMicro();
62 bool HasDescription() const { return !m_description
.empty(); }
63 const wxString
& GetDescription() const { return m_description
; }
65 bool HasCopyright() const { return !m_copyright
.empty(); }
66 const wxString
& GetCopyright() const { return m_copyright
; }
78 #endif // _WX_VERSIONINFO_H_