~pete-woods/unity-api/gobject-backup

« back to all changes in this revision

Viewing changes to include/unity/scopes/Version.h

  • Committer: Michi Henning
  • Date: 2013-03-07 04:35:58 UTC
  • Revision ID: michi.henning@canonical.com-20130307043558-0q8cq92hz5lkwj24
Initial check-in of build-environment skeleton.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//
 
2
// DO NOT EDIT Version.h (this file)! It is generated from Version.h.cmake.
 
3
//
 
4
 
 
5
/*
 
6
 * Copyright (C) 2013 Canonical Ltd
 
7
 *
 
8
 * This program is free software: you can redistribute it and/or modify
 
9
 * it under the terms of the GNU General Public License version 3 as
 
10
 * published by the Free Software Foundation.
 
11
 *
 
12
 * This program is distributed in the hope that it will be useful,
 
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
 * GNU General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU General Public License
 
18
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
19
 *
 
20
 * Authored by: Michi Henning <michi.henning@canonical.com>
 
21
 */
 
22
 
 
23
#ifndef UNITY_SCOPES_VERSION_H
 
24
#define UNITY_SCOPES_VERSION_H
 
25
 
 
26
#define UNITY_SCOPES_VERSION_MAJOR 0
 
27
#define UNITY_SCOPES_VERSION_MINOR 1
 
28
#define UNITY_SCOPES_VERSION_MICRO 0
 
29
 
 
30
#define UNITY_SCOPES_VERSION_STRING "0.1.0"
 
31
 
 
32
namespace unity
 
33
{
 
34
 
 
35
namespace scopes
 
36
{
 
37
 
 
38
/**
 
39
\brief Class to obtain version information for the Scopes API at run time.
 
40
 
 
41
Version information is represented as
 
42
<i>&lt;<code>major</code>&gt;</i>.<i>&lt;<code>minor</code>&gt;</i>.<i>&lt;<code>micro</code>&gt;</i>.
 
43
 
 
44
Releases that differ in the major or minor version number are binary incompatible.
 
45
 
 
46
Releases of the library that differ only in the micro version number are binary compatible with older releases,
 
47
so client code does not need to be recompiled to use the newer library version.
 
48
 
 
49
A different minor version is compatible at the API level, that is, it may add new APIs, but does not change existing
 
50
ones. API clients must be recompiled for a new major version.
 
51
 
 
52
A different major version indicates incompatible API changes.
 
53
*/
 
54
 
 
55
// Version could be a namespace instead of a class, but that requires a lower-case name,
 
56
// which is inconsistent with the remainder of the API.
 
57
 
 
58
class Version
 
59
{
 
60
public:
 
61
    /**
 
62
    \return The major version number.
 
63
    */
 
64
    static int major_version();
 
65
 
 
66
    /**
 
67
    \return The minor version number.
 
68
    */
 
69
    static int minor_version();
 
70
 
 
71
    /**
 
72
    \return The micro version number.
 
73
    */
 
74
    static int micro_version();
 
75
 
 
76
    /**
 
77
    \return The version string in the format
 
78
            <i>&lt;<code>major</code>&gt;</i>.<i>&lt;<code>minor</code>&gt;</i>.<i>&lt;<code>micro</code>&gt;</i>.
 
79
    */
 
80
    static const char* str();    // Returns "major.minor.micro"
 
81
 
 
82
    // TODO: Add methods to report compiler version and compiler flags
 
83
 
 
84
private:
 
85
    Version() = delete;
 
86
    ~Version() = delete;
 
87
};
 
88
 
 
89
} // namespace scopes
 
90
 
 
91
} // namespace unity
 
92
 
 
93
#endif