26 #ifndef NFD_TOOLS_NFDC_COMMAND_ARGUMENTS_HPP
27 #define NFD_TOOLS_NFDC_COMMAND_ARGUMENTS_HPP
29 #include <ndn-cxx/encoding/nfd-constants.hpp>
35 #include <string_view>
37 #include <boost/logic/tribool.hpp>
41 using ndn::nfd::FacePersistency;
42 using ndn::nfd::RouteOrigin;
56 return i == end() ? std::nullopt : std::make_optional(std::any_cast<T>(i->second));
63 get(std::string_view key,
const T& defaultValue = T())
const
65 return getOptional<T>(key).value_or(defaultValue);
74 auto value = getOptional<bool>(key);
75 return value ? boost::logic::tribool(*value) : boost::logic::indeterminate;