tools: nfdc creates Face and KeyChain in main function
refs #3749
Change-Id: I169ad766634371b0192ebae640355298b78aaaa4
diff --git a/tools/nfdc/command-parser.cpp b/tools/nfdc/command-parser.cpp
index d91cbc3..974c931 100644
--- a/tools/nfdc/command-parser.cpp
+++ b/tools/nfdc/command-parser.cpp
@@ -69,7 +69,7 @@
}
CommandParser&
-CommandParser::addCommand(const CommandDefinition& def, const Execute& execute, AvailableIn modes)
+CommandParser::addCommand(const CommandDefinition& def, const ExecuteCommand& execute, AvailableIn modes)
{
BOOST_ASSERT(modes != AVAILABLE_IN_NONE);
m_commands[{def.getNoun(), def.getVerb()}].reset(new Command{def, execute, modes});
@@ -83,7 +83,7 @@
return *this;
}
-std::tuple<CommandParser::Execute*, CommandArguments>
+std::tuple<std::string, std::string, CommandArguments, ExecuteCommand>
CommandParser::parse(const std::vector<std::string>& tokens, ParseMode mode) const
{
BOOST_ASSERT(mode == ParseMode::ONE_SHOT);
@@ -110,7 +110,7 @@
const CommandDefinition& def = i->second->def;
NDN_LOG_TRACE("found command " << def.getNoun() << " " << def.getVerb());
- return std::make_tuple(&i->second->execute, def.parse(tokens, nameLen));
+ return std::make_tuple(def.getNoun(), def.getVerb(), def.parse(tokens, nameLen), i->second->execute);
}
} // namespace nfdc