File: versioninfo.h

package info (click to toggle)
wxpython4.0 4.2.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 221,752 kB
  • sloc: cpp: 962,555; python: 230,573; ansic: 170,731; makefile: 51,756; sh: 9,342; perl: 1,564; javascript: 584; php: 326; xml: 200
file content (146 lines) | stat: -rw-r--r-- 3,920 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
/////////////////////////////////////////////////////////////////////////////
// Name:        versioninfo.h
// Purpose:     interface of wxVersionInfo
// Author:      Troels K
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////

/**
    @class wxVersionInfo

    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}

    @since 2.9.2
*/
class wxVersionInfo
{
public:
    /**
        Constructor.

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

        @param name The name of the library or other entity that this object
            pertains to.
        @param major The major version component.
        @param minor The minor version component.
        @param micro The micro version component, 0 by default.
        @param revision The revision version component, also known as "build
            number". This component is also 0 by default and is only available
            since wxWidgets 3.2.0.
        @param description Free form description of this version, none by
            default.
        @param copyright Copyright string, none by default.
    */
    wxVersionInfo(const wxString& name = wxString(),
                  int major = 0,
                  int minor = 0,
                  int micro = 0,
                  int revision = 0,
                  const wxString& description = wxString(),
                  const wxString& copyright = wxString());

    /**
        Get the name of the object (library).

        @return Name string.
    */
    const wxString& GetName() const;

    /**
        Get the major version number.

        @return Major version number.
    */
    int GetMajor() const;

    /**
        Get the minor version number.

        @return Minor version number.
    */
    int GetMinor() const;

    /**
        Get the micro version, or release number.

        This is the third component of the version.

        @return Micro version, or release number.
    */
    int GetMicro() const;

    /**
        Get the revision version, or build number.

        This is the fourth component of the version.

        @return Revision version, or build number.

        @since 3.2.0
    */
    int GetRevision() 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 GetDescription(), GetVersionString()
    */
    wxString ToString() const;

    /**
        Get the string representation.

        The micro and revision components of the version are ignored/not used
        if they are both zero. If the revision component is non-zero all four
        parts will be used even if the micro component is zero.

        @return The version string in the form "name major.minor[.micro[.revision]]".
    */
    wxString GetVersionString() const;

    /**
        Return @true if a description string has been specified.

        @see GetDescription()
    */
    bool HasDescription() const;

    /**
        Get the description string.

        The description may be empty.

        @return The description string, free-form.
    */
    const wxString& GetDescription();

    /**
        Returns @true if a copyright string has been specified.

        @see GetCopyright()
    */
    bool HasCopyright() const;

    /**
        Get the copyright string.

        The copyright string may be empty.

        @return The copyright string.
    */
    const wxString& GetCopyright() const;
};