2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
3 // Network Research Group (NET)
4 // Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
5 // Contact: support@wiback.org
7 // This file is part of the SENF code tree.
8 // It is licensed under the 3-clause BSD License (aka New BSD License).
9 // See LICENSE.txt in the top level directory for details or visit
10 // https://opensource.org/licenses/BSD-3-Clause
15 \brief ScopedDirectory inline non-template implementation */
17 //#include "ScopedDirectory.ih"
21 #define prefix_ inline
22 //-/////////////////////////////////////////////////////////////////////////////////////////////////
24 //-/////////////////////////////////////////////////////////////////////////////////////////////////
25 // senf::console::ScopedDirectoryBase
27 prefix_ senf::console::DirectoryNode & senf::console::ScopedDirectoryBase::node()
33 prefix_ senf::console::ScopedDirectoryBase::operator DirectoryNode &()
39 prefix_ senf::console::GenericNode::ptr
40 senf::console::ScopedDirectoryBase::remove(std::string const & name)
42 return node().remove(name);
45 prefix_ bool senf::console::ScopedDirectoryBase::hasChild(std::string const & name)
48 return node().hasChild(name);
51 prefix_ senf::console::DirectoryNode &
52 senf::console::ScopedDirectoryBase::getDirectory(std::string const & name)
55 return node().getDirectory(name);
58 prefix_ senf::console::DirectoryNode &
59 senf::console::ScopedDirectoryBase::operator[](std::string const & name)
65 prefix_ senf::console::CommandNode &
66 senf::console::ScopedDirectoryBase::getCommand(std::string const & name)
69 return node().getCommand(name);
72 prefix_ senf::console::CommandNode &
73 senf::console::ScopedDirectoryBase::operator()(std::string const & name)
79 prefix_ senf::console::GenericNode &
80 senf::console::ScopedDirectoryBase::get(std::string const & name)
83 return node().get(name);
86 prefix_ senf::console::DirectoryNode::ChildrenRange
87 senf::console::ScopedDirectoryBase::children()
90 return node().children();
93 prefix_ senf::console::DirectoryNode &
94 senf::console::ScopedDirectoryBase::doc(std::string const & doc)
96 return node().doc(doc);
99 prefix_ std::string const & senf::console::ScopedDirectoryBase::name()
102 return node().name();
105 prefix_ bool senf::console::ScopedDirectoryBase::active()
108 return node().active();
111 prefix_ std::string senf::console::ScopedDirectoryBase::path()
114 return node().path();
117 prefix_ std::string senf::console::ScopedDirectoryBase::path(DirectoryNode const & root)
120 return node().path(root);
123 prefix_ boost::shared_ptr<senf::console::DirectoryNode>
124 senf::console::ScopedDirectoryBase::parent()
127 return node().parent();
130 prefix_ senf::console::GenericNode::ptr senf::console::ScopedDirectoryBase::unlink()
132 return node().unlink();
135 prefix_ void senf::console::ScopedDirectoryBase::help(std::ostream & output)
138 node().help( output);
141 prefix_ std::string senf::console::ScopedDirectoryBase::shorthelp()
144 return node().shorthelp();
147 prefix_ senf::console::ScopedDirectoryBase::ScopedDirectoryBase()
148 : node_ (DirectoryNode::create())
151 prefix_ senf::console::ScopedDirectoryBase::~ScopedDirectoryBase()
156 //-/////////////////////////////////////////////////////////////////////////////////////////////////
163 // comment-column: 40
164 // c-file-style: "senf"
165 // indent-tabs-mode: nil
166 // ispell-local-dictionary: "american"
167 // compile-command: "scons -u test"