MiKTeX 23.10-next
A scalable TeX distribution
Loading...
Searching...
No Matches
LibraryVersion.h
1/* miktex/Core/LibraryVersion.h: -*- C++ -*-
2
3 Copyright (C) 1996-2017 Christian Schenk
4
5 This file is part of the MiKTeX Core Library.
6
7 The MiKTeX Core Library is free software; you can redistribute it
8 and/or modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2, or
10 (at your option) any later version.
11
12 The MiKTeX Core Library is distributed in the hope that it will be
13 useful, but WITHOUT ANY WARRANTY; without even the implied warranty
14 of 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 the MiKTeX Core Library; if not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA. */
21
22#pragma once
23
24#if !defined(AB1AD5AD3B884FC5B7A00F69767B3375)
25#define AB1AD5AD3B884FC5B7A00F69767B3375
26
27#include <miktex/Core/config.h>
28
29#include <string>
30
31#include "VersionNumber.h"
32
33MIKTEX_CORE_BEGIN_NAMESPACE;
34
36{
37 LibraryVersion(const std::string& key, const std::string& fromHeader, const std::string& fromRuntime) :
38 key(key),
39 name(key),
40 fromHeader(fromHeader),
41 fromRuntime(fromRuntime)
42 {
43 }
44 LibraryVersion(const std::string& key, const std::string& name, const std::string& fromHeader, const std::string& fromRuntime) :
45 key(key),
46 name(name),
47 fromHeader(fromHeader),
48 fromRuntime(fromRuntime)
49 {
50 }
51 LibraryVersion(const std::string& key, const MiKTeX::Core::VersionNumber* fromHeader, const MiKTeX::Core::VersionNumber* fromRuntime) :
52 key(key),
53 name(key),
54 fromHeader(fromHeader == nullptr ? std::string() : fromHeader->ToString()),
55 fromRuntime(fromRuntime == nullptr ? std::string() : fromRuntime->ToString())
56 {
57 }
58 std::string key;
59 std::string name;
60 std::string description;
61 std::string fromHeader;
62 std::string fromRuntime;
63};
64
65inline bool operator<(const LibraryVersion& lhs, const LibraryVersion& rhs)
66{
67 return lhs.key < rhs.key;
68}
69
70MIKTEX_CORE_END_NAMESPACE;
71
72#endif
Definition: LibraryVersion.h:36
An instance of this struct represents a version number.
Definition: VersionNumber.h:36