MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / add_callback

Method add_callback

samples/example.cpp:44–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42 std::map<std::string, std::function<std::string (const std::string &) > > m_callbacks;
43
44 void add_callback(const std::string &t_name,
45 const std::function<std::string (const std::string &)> &t_func)
46 {
47 m_callbacks[t_name] = t_func;
48 }
49
50
51 void do_callbacks(const std::string &inp)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected