4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 // Stefan Bund <g0dil@berlios.de>
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 \brief Config inline non-template implementation */
30 #define prefix_ inline
31 //-/////////////////////////////////////////////////////////////////////////////////////////////////
33 //-/////////////////////////////////////////////////////////////////////////////////////////////////
34 // senf::console::detail::RestrictedExecutor
36 prefix_ bool senf::console::detail::RestrictedExecutor::complete()
39 return parsedNodes_.size() == 1
40 && ! parsedNodes_[0].expired()
41 && *parsedNodes_[0].lock() == executor_.chroot();
44 prefix_ void senf::console::detail::RestrictedExecutor::reset()
49 prefix_ senf::console::DirectoryNode & senf::console::detail::RestrictedExecutor::root()
52 return executor_.chroot();
55 prefix_ void senf::console::detail::RestrictedExecutor::chroot(DirectoryNode & node)
57 executor_.chroot(node);
60 prefix_ std::ostream & senf::console::detail::RestrictedExecutor::stream()
65 //-/////////////////////////////////////////////////////////////////////////////////////////////////
66 // senf::console::ConfigBundle
68 prefix_ senf::console::ConfigBundle::ConfigBundle()
71 prefix_ senf::console::ConfigBundle::ConfigBundle(DirectoryNode & root)
75 prefix_ bool senf::console::ConfigBundle::complete()
78 return executor_.complete();
81 prefix_ bool senf::console::ConfigBundle::parsed(GenericNode & node)
84 return executor_.parsed(node);
87 prefix_ void senf::console::ConfigBundle::reset()
92 prefix_ senf::console::DirectoryNode & senf::console::ConfigBundle::root()
95 return executor_.root();
98 prefix_ void senf::console::ConfigBundle::chroot(DirectoryNode & node)
100 executor_.chroot(node);
103 //-/////////////////////////////////////////////////////////////////////////////////////////////////
104 // senf::console::detail::ConfigSource
106 prefix_ void senf::console::detail::ConfigSource::parse(RestrictedExecutor & executor)
111 //-/////////////////////////////////////////////////////////////////////////////////////////////////
112 // senf::console::detail::BundleMixin
114 prefix_ senf::console::detail::BundleMixin::BundleMixin()
117 prefix_ senf::console::detail::BundleMixin::BundleMixin(DirectoryNode & root)
121 prefix_ void senf::console::detail::BundleMixin::parse()
126 prefix_ void senf::console::detail::BundleMixin::parse(DirectoryNode & restrict)
128 bundle_.parse(restrict);
131 prefix_ bool senf::console::detail::BundleMixin::complete()
134 return bundle_.complete();
137 prefix_ bool senf::console::detail::BundleMixin::parsed(GenericNode & node)
140 return bundle_.parsed(node);
143 prefix_ void senf::console::detail::BundleMixin::reset()
148 //-/////////////////////////////////////////////////////////////////////////////////////////////////
155 // comment-column: 40
156 // c-file-style: "senf"
157 // indent-tabs-mode: nil
158 // ispell-local-dictionary: "american"
159 // compile-command: "scons -u test"