Flox Package Database 1
CRUD Operations on Nix Package Metadata
Loading...
Searching...
No Matches
command.hh
Go to the documentation of this file.
1/* ========================================================================== *
2 *
3 * @file flox/resolver/command.hh
4 *
5 * @brief Executable command helpers, argument parsers, etc.
6 *
7 *
8 * -------------------------------------------------------------------------- */
9
10#pragma once
11
12#include <filesystem>
13#include <optional>
14
18
19
20/* -------------------------------------------------------------------------- */
21
22namespace flox::resolver {
23
24/* -------------------------------------------------------------------------- */
25
28{
29
30private:
31
33
34
35public:
36
38
39 [[nodiscard]] command::VerboseParser &
40 getParser()
41 {
42 return this->parser;
43 }
44
49 int
50 run();
51
52
53}; /* End class `LockCommand' */
54
55
56/* -------------------------------------------------------------------------- */
57
60{
61
62private:
63
64 std::optional<std::filesystem::path> manifestPath;
65 std::optional<ManifestRaw> manifestRaw;
66
67 std::optional<std::filesystem::path> oldManifestPath;
68 std::optional<ManifestRaw> oldManifestRaw;
69
71
72
73 [[nodiscard]] const ManifestRaw &
74 getManifestRaw();
75
76 [[nodiscard]] const ManifestRaw &
77 getOldManifestRaw();
78
79
80public:
81
83
84 [[nodiscard]] command::VerboseParser &
85 getParser()
86 {
87 return this->parser;
88 }
89
94 int
95 run();
96
97
98}; /* End class `DiffCommand' */
99
100
101/* -------------------------------------------------------------------------- */
102
105{
106
107private:
108
109 std::optional<std::string> inputName;
110
112
113
114public:
115
117
118 [[nodiscard]] command::VerboseParser &
119 getParser()
120 {
121 return this->parser;
122 }
123
128 int
129 run();
130
131
132}; /* End class `UpdateCommand' */
133
134
135/* -------------------------------------------------------------------------- */
136
139{
140
141private:
142
144
145
146public:
147
149
150 [[nodiscard]] command::VerboseParser &
151 getParser()
152 {
153 return this->parser;
154 }
155
160 int
161 run();
162
163
164}; /* End class `DiffCommand' */
165
166
167/* -------------------------------------------------------------------------- */
168
170{
171
172private:
173
181public:
182
184
185 [[nodiscard]] command::VerboseParser &
186 getParser()
187 {
188 return this->parser;
189 }
190
195 int
196 run();
197
198
199}; /* End class `ManifestCommand' */
200
201
202/* -------------------------------------------------------------------------- */
203
204} // namespace flox::resolver
205
206
207/* -------------------------------------------------------------------------- *
208 *
209 *
210 *
211 * ========================================================================== */
Diff two manifest files.
Definition: command.hh:60
int run()
Execute the diff routine.
Definition: command.cc:118
Definition: mixins.hh:334
Lock a manifest file.
Definition: command.hh:28
int run()
Execute the lock routine.
Definition: command.cc:36
Definition: command.hh:170
UpdateCommand cmdUpdate
Definition: command.hh:177
RegistryCommand cmdRegistry
Definition: command.hh:178
int run()
Execute the manifest sub-command.
Definition: command.cc:255
command::VerboseParser parser
Definition: command.hh:174
DiffCommand cmdDiff
Definition: command.hh:176
LockCommand cmdLock
Definition: command.hh:175
Show information about an environment's registries.
Definition: command.hh:139
int run()
Execute the registry routine.
Definition: command.cc:202
Update lockfile inputs.
Definition: command.hh:105
int run()
Execute the update routine.
Definition: command.cc:149
An abstract description of an environment in its unresolved state. This representation is intended fo...
State blobs for flox commands.
Executable command helpers, argument parsers, etc.
Add verbosity flags to any parser and modify the global verbosity.
Definition: command.hh:49
A raw description of an environment to be read from a file.
Definition: manifest-raw.hh:264