26 #ifndef NFD_TOOLS_NFDC_COMMAND_PARSER_HPP 27 #define NFD_TOOLS_NFDC_COMMAND_PARSER_HPP 31 #include <type_traits> 65 class Error :
public std::invalid_argument
70 :
std::invalid_argument(what)
88 addAlias(
const std::string& noun,
const std::string& verb,
const std::string& verb2);
95 std::vector<const CommandDefinition*>
96 listCommands(
const std::string& noun,
ParseMode mode)
const;
105 std::tuple<std::string, std::string, CommandArguments, ExecuteCommand>
106 parse(
const std::vector<std::string>& tokens,
ParseMode mode)
const;
109 typedef std::pair<std::string, std::string> CommandName;
120 typedef std::map<CommandName, shared_ptr<Command>> CommandContainer;
121 CommandContainer m_commands;
125 std::vector<CommandContainer::const_iterator> m_commandOrder;
132 #endif // NFD_TOOLS_NFDC_COMMAND_PARSER_HPP
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...