add leaves

Change-Id: I962bb4e74f39ec0a838f984b8c13a420ba36d7ce
diff --git a/src/schema.cpp b/src/schema.cpp
index fa72f81..9832c45 100644
--- a/src/schema.cpp
+++ b/src/schema.cpp
@@ -115,3 +115,17 @@
     std::string locationString = pathToString(location);
     return boost::get<yang::container>(children(locationString).at(name)).m_presence == yang::ContainerTraits::Presence;
 }
+
+void Schema::addLeaf(const std::string& location, const std::string& name)
+{
+    m_nodes.at(location).emplace(name, yang::leaf{});
+}
+
+bool Schema::isLeaf(const path_& location, const std::string& name) const
+{
+    std::string locationString = pathToString(location);
+    if (!nodeExists(locationString, name))
+        return false;
+
+    return children(locationString).at(name).type() == typeid(yang::leaf);
+}