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 Executor inline non-template implementation */
17 //#include "Executor.ih"
21 #define prefix_ inline
22 //-/////////////////////////////////////////////////////////////////////////////////////////////////
24 //-/////////////////////////////////////////////////////////////////////////////////////////////////
25 // senf::console::Executor
27 prefix_ senf::console::Executor::Executor()
28 : root_(senf::console::root().thisptr()), cwd_ (), oldCwd_ (),
29 autocd_ (false), autocomplete_ (false)
31 cwd_.push_back(root_);
34 prefix_ void senf::console::Executor::operator()(std::ostream & output,
35 ParseCommandInfo const & command)
37 return execute(output, command);
40 prefix_ void senf::console::Executor::cwd(DirectoryNode & dir)
43 cwd_.push_back(dir.thisptr());
49 prefix_ bool senf::console::Executor::autocd()
55 prefix_ senf::console::Executor & senf::console::Executor::autocd(bool v)
61 prefix_ bool senf::console::Executor::autocomplete()
67 prefix_ senf::console::Executor & senf::console::Executor::autocomplete(bool v)
73 prefix_ senf::console::DirectoryNode & senf::console::Executor::chroot()
79 prefix_ senf::console::Executor & senf::console::Executor::chroot(DirectoryNode & node)
81 root_ = node.thisptr();
83 cwd_.push_back(root_);
88 prefix_ senf::console::Executor & senf::console::Executor::policy(SecurityPolicy policy)
94 prefix_ bool senf::console::Executor::skipping()
100 //-/////////////////////////////////////////////////////////////////////////////////////////////////
107 // comment-column: 40
108 // c-file-style: "senf"
109 // indent-tabs-mode: nil
110 // ispell-local-dictionary: "american"
111 // compile-command: "scons -u test"