MiKTeX 26.5-next
A scalable TeX distribution
Loading...
Searching...
No Matches
RootDirectoryInfo.h
1/* RootDirectoryInfo.h: -*- C++ -*-
2
3 Copyright (C) 2018-2021 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(F880DB7F8908430C9C86844870CC44EE)
25#define F880DB7F8908430C9C86844870CC44EE
26
27#include <miktex/Core/config.h>
28
29#include <miktex/Util/OptionSet>
30#include <miktex/Util/PathName>
31
32MIKTEX_CORE_BEGIN_NAMESPACE;
33
35{
36public:
37 enum class Purpose
38 {
39 Generic,
40 Config,
41 Data,
42 Install
43 };
44
45public:
46 typedef MiKTeX::Util::OptionSet<Purpose> Purposes;
47
48public:
49 enum class Attribute
50 {
51 Common,
52 Other,
53 User
54 };
55
56public:
57 typedef MiKTeX::Util::OptionSet<Attribute> Attributes;
58
59public:
61
62public:
63 Purposes purposes;
64
65public:
66 Attributes attributes;
67
68public:
69 bool IsCommon() const
70 {
71 return attributes[Attribute::Common];
72 }
73
74public:
75 bool IsOther() const
76 {
77 return attributes[Attribute::Other];
78 }
79
80public:
81 bool IsUser() const
82 {
83 return attributes[Attribute::User];
84 }
85
86public:
87 bool IsManaged() const
88 {
89 return purposes[Purpose::Config] || purposes[Purpose::Data] || purposes[Purpose::Install];
90 }
91};
92
93MIKTEX_CORE_END_NAMESPACE;
94
95#endif
Definition OptionSet.h:26
Instances of this class can be used to store path names.
Definition PathName.h:64
Definition RootDirectoryInfo.h:35