Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
cmd_registration.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <functional>
5#include <vector>
6
7#include <boost/program_options.hpp>
8
9namespace bpo = boost::program_options;
10
11namespace sysio::trace_api {
15 using command_fn = std::function<int( const bpo::variables_map&, const std::vector<std::string>&)>;
16
21 command_registration( std::string name, std::string slug, command_fn func )
22 :name(std::move(name))
23 ,slug(std::move(slug))
24 ,func(std::move(func))
25 {
26 _next = _list;
27 _list = this;
28 }
29
30 std::string name;
31 std::string slug;
34
36 };
37}
Definition name.hpp:106
std::function< int(const bpo::variables_map &, const std::vector< std::string > &)> command_fn
Immutable except for fc::from_variant.
Definition name.hpp:43
command_registration(std::string name, std::string slug, command_fn func)
static command_registration * _list