Nix
2.26.3
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
legacy.hh
Go to the documentation of this file.
1
#pragma once
3
4
#include <functional>
5
#include <map>
6
#include <string>
7
8
namespace
nix {
9
10
typedef
std::function<void(
int
,
char
* *)> MainFunction;
11
12
struct
RegisterLegacyCommand
13
{
14
typedef
std::map<std::string, MainFunction> Commands;
15
static
Commands * commands;
16
17
RegisterLegacyCommand(
const
std::string &
name
, MainFunction
fun
)
18
{
19
if
(!commands) commands =
new
Commands;
20
(*commands)[
name
] =
fun
;
21
}
22
};
23
24
}
fun
std::function< void(Sink &)> fun
Definition
lexer.l:3485
name
const std::string_view & name
Definition
lexer.l:1709
src
libcmd
legacy.hh
Generated by
1.13.2