26 #ifndef NFD_TOOLS_NFDC_COMMAND_ARGUMENTS_HPP
27 #define NFD_TOOLS_NFDC_COMMAND_ARGUMENTS_HPP
31 #include <ndn-cxx/encoding/nfd-constants.hpp>
34 #include <boost/logic/tribool.hpp>
38 using ndn::nfd::FacePersistency;
39 using ndn::nfd::RouteOrigin;
53 return i == end() ? std::nullopt : std::make_optional(std::any_cast<T>(i->second));
60 get(std::string_view key,
const T& defaultValue = T())
const
62 return getOptional<T>(key).value_or(defaultValue);
71 auto value = getOptional<bool>(key);
72 return value ? boost::logic::tribool(*value) : boost::logic::indeterminate;