Nix
2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
legacy.hh
Go to the documentation of this file.
1
#pragma once
3
4
#include "
lix/libutil/async.hh
"
5
#include <functional>
6
#include <list>
7
#include <map>
8
#include <string>
9
10
namespace
nix {
11
12
typedef
std::function<void(
AsyncIoRoot
&, std::string, std::list<std::string>)> MainFunction;
13
14
struct
LegacyCommandRegistry
15
{
16
using
LegacyCommandMap = std::map<std::string, MainFunction>;
17
static
LegacyCommandMap * commands;
18
19
static
void
add(
const
std::string & name, MainFunction fun)
20
{
21
if
(!commands) commands =
new
LegacyCommandMap;
22
(*commands)[name] = fun;
23
}
24
};
25
26
}
async.hh
nix::AsyncIoRoot
Definition
async.hh:39
nix::LegacyCommandRegistry
Definition
legacy.hh:15
lix
libcmd
legacy.hh
Generated by
1.15.0