diff options
author | Shea Levy <shea@shealevy.com> | 2021-01-26 06:22:24 -0500 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2021-01-26 06:22:24 -0500 |
commit | 6af6e41df06f0a8a3b919b4052b41d09f0a97678 (patch) | |
tree | 2b2a3a8c199151b3ffc21599a9a0f06adeea1ff3 /src/nix/legacy.hh | |
parent | 36c4d6f59247826dde32ad2e6b5a9471a9a1c911 (diff) |
Move command plugin interface to libnixcmd
Diffstat (limited to 'src/nix/legacy.hh')
-rw-r--r-- | src/nix/legacy.hh | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/nix/legacy.hh b/src/nix/legacy.hh deleted file mode 100644 index f503b0da3..000000000 --- a/src/nix/legacy.hh +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once - -#include <functional> -#include <map> -#include <string> - -namespace nix { - -typedef std::function<void(int, char * *)> MainFunction; - -struct RegisterLegacyCommand -{ - typedef std::map<std::string, MainFunction> Commands; - static Commands * commands; - - RegisterLegacyCommand(const std::string & name, MainFunction fun) - { - if (!commands) commands = new Commands; - (*commands)[name] = fun; - } -}; - -} |