Replace all relative includes with abolute ones
[senf.git] / senf / Utils / Console / Config.cci
1 // $Id$
2 //
3 // Copyright (C) 2008 
4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 //     Stefan Bund <g0dil@berlios.de>
7 //
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.
12 //
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.
17 //
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.
22
23 /** \file
24     \brief Config inline non-template implementation */
25
26 #include "Config.ih"
27
28 // Custom includes
29 #include <senf/Utils/membind.hh>
30
31 #define prefix_ inline
32 ///////////////////////////////cci.p///////////////////////////////////////
33
34 ///////////////////////////////////////////////////////////////////////////
35 // senf::console::detail::RestrictedExecutor
36
37 prefix_ bool senf::console::detail::RestrictedExecutor::complete()
38     const
39 {
40     return parsedNodes_.size() == 1 
41         && ! parsedNodes_[0].expired() 
42         && *parsedNodes_[0].lock() == executor_.chroot();
43 }
44
45 prefix_ void senf::console::detail::RestrictedExecutor::reset()
46 {
47     parsedNodes_.clear();
48 }
49
50 prefix_ senf::console::DirectoryNode & senf::console::detail::RestrictedExecutor::root()
51     const
52 {
53     return executor_.chroot();
54 }
55
56 prefix_ void senf::console::detail::RestrictedExecutor::chroot(DirectoryNode & node)
57 {
58     executor_.chroot(node);
59 }
60
61 prefix_ std::ostream & senf::console::detail::RestrictedExecutor::stream()
62 {
63     return stream_;
64 }
65
66 ///////////////////////////////////////////////////////////////////////////
67 // senf::console::ConfigBundle
68
69 prefix_ senf::console::ConfigBundle::ConfigBundle()
70 {}
71
72 prefix_ senf::console::ConfigBundle::ConfigBundle(DirectoryNode & root)
73     : executor_ (root)
74 {}
75
76 prefix_ bool senf::console::ConfigBundle::complete()
77     const
78 {
79     return executor_.complete();
80 }
81
82 prefix_ bool senf::console::ConfigBundle::parsed(GenericNode & node)
83     const
84 {
85     return executor_.parsed(node);
86 }
87
88 prefix_ void senf::console::ConfigBundle::reset()
89 {
90     executor_.reset();
91 }
92
93 prefix_ senf::console::DirectoryNode & senf::console::ConfigBundle::root()
94     const
95 {
96     return executor_.root();
97 }
98
99 prefix_ void senf::console::ConfigBundle::chroot(DirectoryNode & node)
100 {
101     executor_.chroot(node);
102 }
103
104 ///////////////////////////////////////////////////////////////////////////
105 // senf::console::detail::ConfigSource
106
107 prefix_ void senf::console::detail::ConfigSource::parse(RestrictedExecutor & executor)
108 {
109     v_parse(executor);
110 }
111
112 ///////////////////////////////////////////////////////////////////////////
113 // senf::console::detail::BundleMixin
114
115 prefix_ senf::console::detail::BundleMixin::BundleMixin()
116 {}
117
118 prefix_ senf::console::detail::BundleMixin::BundleMixin(DirectoryNode & root)
119     : bundle_ (root)
120 {}
121
122 prefix_ void senf::console::detail::BundleMixin::parse()
123 {
124     bundle_.parse();
125 }
126
127 prefix_ void senf::console::detail::BundleMixin::parse(DirectoryNode & restrict)
128 {
129     bundle_.parse(restrict);
130 }
131
132 prefix_ bool senf::console::detail::BundleMixin::complete()
133     const
134 {
135     return bundle_.complete();
136 }
137
138 prefix_ bool senf::console::detail::BundleMixin::parsed(GenericNode & node)
139     const
140 {
141     return bundle_.parsed(node);
142 }
143
144 prefix_ void senf::console::detail::BundleMixin::reset()
145 {
146     bundle_.reset();
147 }
148
149 ///////////////////////////////cci.e///////////////////////////////////////
150 #undef prefix_
151
152 \f
153 // Local Variables:
154 // mode: c++
155 // fill-column: 100
156 // comment-column: 40
157 // c-file-style: "senf"
158 // indent-tabs-mode: nil
159 // ispell-local-dictionary: "american"
160 // compile-command: "scons -u test"
161 // End: