tools: nfdc face list command with filters

refs #3864

Change-Id: Ie22e506bb2aeae8abf7c94b394e7aa56c840266f
diff --git a/tools/nfdc/command-arguments.hpp b/tools/nfdc/command-arguments.hpp
index b3175d5..1bec816 100644
--- a/tools/nfdc/command-arguments.hpp
+++ b/tools/nfdc/command-arguments.hpp
@@ -53,6 +53,19 @@
     auto i = find(key);
     return i == end() ? defaultValue : boost::any_cast<T>(i->second);
   }
+
+  /** \return the argument value, or nullopt if the argument is omitted on command line
+   */
+  template<typename T>
+  ndn::optional<T>
+  getOptional(const std::string& key) const
+  {
+    auto i = find(key);
+    if (i == end()) {
+      return ndn::nullopt;
+    }
+    return boost::any_cast<T>(i->second);
+  }
 };
 
 } // namespace nfdc