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 Config inline non-template implementation */
21 #define prefix_ inline
22 //-/////////////////////////////////////////////////////////////////////////////////////////////////
24 //-/////////////////////////////////////////////////////////////////////////////////////////////////
25 // senf::console::detail::RestrictedExecutor
27 prefix_ bool senf::console::detail::RestrictedExecutor::complete()
30 return parsedNodes_.size() == 1
31 && ! parsedNodes_[0].expired()
32 && *parsedNodes_[0].lock() == executor_.chroot();
35 prefix_ void senf::console::detail::RestrictedExecutor::reset()
40 prefix_ senf::console::DirectoryNode & senf::console::detail::RestrictedExecutor::root()
43 return executor_.chroot();
46 prefix_ void senf::console::detail::RestrictedExecutor::chroot(DirectoryNode & node)
48 executor_.chroot(node);
51 prefix_ std::ostream & senf::console::detail::RestrictedExecutor::stream()
56 //-/////////////////////////////////////////////////////////////////////////////////////////////////
57 // senf::console::ConfigBundle
59 prefix_ senf::console::ConfigBundle::ConfigBundle()
62 prefix_ senf::console::ConfigBundle::ConfigBundle(DirectoryNode & root)
66 prefix_ bool senf::console::ConfigBundle::complete()
69 return executor_.complete();
72 prefix_ bool senf::console::ConfigBundle::parsed(GenericNode & node)
75 return executor_.parsed(node);
78 prefix_ void senf::console::ConfigBundle::reset()
83 prefix_ senf::console::DirectoryNode & senf::console::ConfigBundle::root()
86 return executor_.root();
89 prefix_ void senf::console::ConfigBundle::chroot(DirectoryNode & node)
91 executor_.chroot(node);
94 //-/////////////////////////////////////////////////////////////////////////////////////////////////
95 // senf::console::detail::ConfigSource
97 prefix_ void senf::console::detail::ConfigSource::parse(RestrictedExecutor & executor)
102 //-/////////////////////////////////////////////////////////////////////////////////////////////////
103 // senf::console::detail::BundleMixin
105 prefix_ senf::console::detail::BundleMixin::BundleMixin()
108 prefix_ senf::console::detail::BundleMixin::BundleMixin(DirectoryNode & root)
112 prefix_ void senf::console::detail::BundleMixin::parse()
117 prefix_ void senf::console::detail::BundleMixin::parse(DirectoryNode & restrict)
119 bundle_.parse(restrict);
122 prefix_ bool senf::console::detail::BundleMixin::complete()
125 return bundle_.complete();
128 prefix_ bool senf::console::detail::BundleMixin::parsed(GenericNode & node)
131 return bundle_.parsed(node);
134 prefix_ void senf::console::detail::BundleMixin::reset()
139 //-/////////////////////////////////////////////////////////////////////////////////////////////////
146 // comment-column: 40
147 // c-file-style: "senf"
148 // indent-tabs-mode: nil
149 // ispell-local-dictionary: "american"
150 // compile-command: "scons -u test"