]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/lilypond-version.hh
c59afb561ee687d76a4c4fa7cfa23a04468de17b
[lilypond.git] / lily / include / lilypond-version.hh
1 /*
2   This file is part of LilyPond, the GNU music typesetter.
3
4   Copyright (C) 1998--2014 Jan Nieuwenhuizen <janneke@gnu.org>
5
6   LilyPond is free software: you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation, either version 3 of the License, or
9   (at your option) any later version.
10
11   LilyPond is distributed in the hope that it will be useful,
12   but WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   GNU General Public License for more details.
15
16   You should have received a copy of the GNU General Public License
17   along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef LILYPOND_VERSION_HH
21 #define LILYPOND_VERSION_HH
22
23 #include "std-string.hh"
24 #include "compare.hh"
25
26 struct Lilypond_version
27 {
28   Lilypond_version (int major, int minor, int patch);
29   Lilypond_version (const string &str);
30
31   string to_string () const;
32   operator bool () const;
33   static int compare (const Lilypond_version &, const Lilypond_version &);
34
35   int major_;
36   int minor_;
37   int patch_;
38   string extra_patch_string_;
39 };
40
41 INSTANTIATE_COMPARE (const Lilypond_version &, Lilypond_version::compare);
42
43 extern Lilypond_version oldest_version;
44
45 #endif // LILYPOND_VERSION_HH