]>
Commit | Line | Data |
---|---|---|
ccec9093 VZ |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: versioninfo.h | |
3 | // Purpose: interface of wxVersionInfo | |
4 | // Author: Troels K | |
ccec9093 VZ |
5 | // Licence: wxWindows licence |
6 | ///////////////////////////////////////////////////////////////////////////// | |
7 | ||
8 | /** | |
9 | @class wxVersionInfo | |
10 | ||
11 | wxVersionInfo contains version information. | |
12 | ||
13 | This class is used by wxWidgets to provide version information about the | |
14 | libraries it uses and itself, but you can also apply it in user space, to | |
15 | provide version information about your own libraries, or other libraries | |
16 | that you use. | |
17 | ||
18 | @library{wxbase} | |
ce45dbe3 | 19 | |
ccec9093 | 20 | @category{data} |
ccec9093 VZ |
21 | |
22 | @since 2.9.2 | |
23 | */ | |
24 | class wxVersionInfo | |
25 | { | |
26 | public: | |
27 | /** | |
28 | Constructor. | |
29 | ||
30 | The version information objects need to be initialized with this | |
31 | constructor and are immutable once they are created. | |
32 | ||
33 | @param name The name of the library or other entity that this object | |
34 | pertains to. | |
35 | @param major The major version component. | |
36 | @param minor The minor version component. | |
37 | @param micro The micro version component, 0 by default. | |
38 | @param description Free form description of this version, none by | |
39 | default. | |
40 | @param copyright Copyright string, none by default. | |
41 | */ | |
3d2ee2fb RD |
42 | wxVersionInfo(const wxString& name = wxString(), |
43 | int major = 0, | |
44 | int minor = 0, | |
ccec9093 VZ |
45 | int micro = 0, |
46 | const wxString& description = wxString(), | |
47 | const wxString& copyright = wxString()); | |
48 | ||
49 | /** | |
50 | Get the name of the object (library). | |
51 | ||
52 | @return Name string. | |
53 | */ | |
54 | const wxString& GetName() const; | |
55 | ||
56 | /** | |
57 | Get the major version number. | |
58 | ||
59 | @return Major version number. | |
60 | */ | |
61 | int GetMajor() const; | |
62 | ||
63 | /** | |
64 | Get the minor version number. | |
65 | ||
66 | @return Minor version number. | |
67 | */ | |
68 | int GetMinor() const; | |
69 | ||
70 | /** | |
71 | Get the micro version, or release number. | |
72 | ||
73 | @return Micro version, or release number. | |
74 | */ | |
75 | int GetMicro() const; | |
76 | ||
77 | /** | |
78 | Get the string representation of this version object. | |
79 | ||
80 | This function returns the description if it is non-empty or | |
81 | GetVersionString() if there is no description. | |
82 | ||
83 | @see GetDescription(), GetVersionString() | |
84 | */ | |
85 | wxString ToString() const; | |
86 | ||
87 | /** | |
88 | Get the string representation. | |
89 | ||
90 | The micro component of the version is ignored/not used if it is 0. | |
91 | ||
92 | @return The version string in the form "name major.minor[.micro]". | |
93 | */ | |
b821341a | 94 | wxString GetVersionString() const; |
ccec9093 VZ |
95 | |
96 | /** | |
97 | Return @true if a description string has been specified. | |
98 | ||
99 | @see GetDescription() | |
100 | */ | |
101 | bool HasDescription() const; | |
102 | ||
103 | /** | |
104 | Get the description string. | |
105 | ||
106 | The description may be empty. | |
107 | ||
108 | @return The description string, free-form. | |
109 | */ | |
110 | const wxString& GetDescription(); | |
111 | ||
112 | /** | |
113 | Returns @true if a copyright string has been specified. | |
114 | ||
115 | @see GetCopyright() | |
116 | */ | |
117 | bool HasCopyright() const; | |
118 | ||
119 | /** | |
120 | Get the copyright string. | |
121 | ||
122 | The copyright string may be empty. | |
123 | ||
124 | @return The copyright string. | |
125 | */ | |
126 | const wxString& GetCopyright() const; | |
127 | }; | |
128 | ||
129 | //@} |