Utils/Console: added missing ScopedDirectory proxy members
tho [Thu, 4 Feb 2010 13:09:28 +0000 (13:09 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1567 270642c3-0616-0410-b53a-bc976706d245

senf/Utils/Console/ScopedDirectory.cci
senf/Utils/Console/ScopedDirectory.hh
senf/Utils/Console/ScopedDirectory.test.cc

index 80b3882..162c658 100644 (file)
@@ -105,6 +105,54 @@ senf::console::ScopedDirectoryBase::doc(std::string const & doc)
     return node().doc(doc);
 }
 
+prefix_ std::string const & senf::console::ScopedDirectoryBase::name() 
+    const
+{
+    return node().name();
+}
+
+prefix_ bool senf::console::ScopedDirectoryBase::active()
+    const
+{
+    return node().active();
+}
+
+prefix_ std::string senf::console::ScopedDirectoryBase::path()
+    const
+{
+    return node().path();
+}
+
+prefix_ std::string senf::console::ScopedDirectoryBase::path(DirectoryNode const & root)
+    const
+{
+    return node().path(root);
+}
+
+prefix_ boost::shared_ptr<senf::console::DirectoryNode> 
+senf::console::ScopedDirectoryBase::parent() 
+    const
+{
+    return node().parent();
+}
+
+prefix_ senf::console::GenericNode::ptr senf::console::ScopedDirectoryBase::unlink()
+{
+    return node().unlink();
+}
+
+prefix_ void senf::console::ScopedDirectoryBase::help(std::ostream & output)
+    const
+{
+    node().help( output);
+}
+
+prefix_ std::string senf::console::ScopedDirectoryBase::shorthelp() 
+    const
+{
+    return node().shorthelp();
+}
+        
 prefix_ senf::console::ScopedDirectoryBase::ScopedDirectoryBase()
     : node_ (DirectoryNode::create())
 {}
index 481a4dd..86f5334 100644 (file)
@@ -61,6 +61,14 @@ namespace console {
         GenericNode & get(std::string const & name) const;
         DirectoryNode::ChildrenRange children() const;
         DirectoryNode & doc(std::string const & doc);
+        std::string const & name() const;
+        bool active() const;
+        std::string path() const;
+        std::string path(DirectoryNode const & root) const;
+        boost::shared_ptr<DirectoryNode> parent() const;
+        GenericNode::ptr unlink();
+        void help(std::ostream & output) const;
+        std::string shorthelp() const;
 
         ///\}
 
index a0248ba..6a6ba60 100644 (file)
@@ -107,6 +107,7 @@ SENF_AUTO_UNIT_TEST(scopedDirectoryBase)
         dir.add("cb", fty::Command(&callback));
         BOOST_CHECK( &dir["foo"] == &dir.get("foo") );
         BOOST_CHECK( &dir("cb") == &dir.get("cb") );
+        BOOST_CHECK_EQUAL(dir.name(), "dir");
         
         char const * const children[] = { "cb", "foo" };
         BOOST_CHECK_EQUAL_COLLECTIONS(